Skip to content

Commit

Permalink
ARM: Permit "sp" in ARM variant of STREXD instructions
Browse files Browse the repository at this point in the history
Patch from Mihail Popa

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179854 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Tim Northover authored and Tim Northover committed Apr 19, 2013
1 parent 143d223 commit d3af696
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Target/ARM/Disassembler/ARMDisassembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3573,7 +3573,7 @@ static DecodeStatus DecodeDoubleRegStore(MCInst &Inst, unsigned Insn,
unsigned Rn = fieldFromInstruction(Insn, 16, 4);
unsigned pred = fieldFromInstruction(Insn, 28, 4);

if (!Check(S, DecoderGPRRegisterClass(Inst, Rd, Address, Decoder)))
if (!Check(S, DecodeGPRnopcRegisterClass(Inst, Rd, Address, Decoder)))
return MCDisassembler::Fail;

if ((Rt & 1) || Rt == 0xE || Rn == 0xF) return MCDisassembler::Fail;
Expand Down
3 changes: 2 additions & 1 deletion test/MC/Disassembler/ARM/basic-arm-instructions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1823,12 +1823,13 @@
# CHECK: strexh r4, r2, [r5
# CHECK: strex r2, r1, [r7
# CHECK: strexd r6, r2, r3, [r8
# CHECK: strexd sp, r0, r1, [r0]

0x93 0x1f 0xc4 0xe1
0x92 0x4f 0xe5 0xe1
0x91 0x2f 0x87 0xe1
0x92 0x6f 0xa8 0xe1

0x90 0xdf 0xa0 0xe1

#------------------------------------------------------------------------------
# SUB
Expand Down

0 comments on commit d3af696

Please sign in to comment.