diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td index edc4660034f..63d8b48734e 100644 --- a/lib/Target/ARM/ARMInstrThumb.td +++ b/lib/Target/ARM/ARMInstrThumb.td @@ -120,6 +120,7 @@ def t_addrmode_rr : Operand, let EncoderMethod = "getThumbAddrModeRegRegOpValue"; let PrintMethod = "printThumbAddrModeRROperand"; let DecoderMethod = "DecodeThumbAddrModeRR"; + let ParserMatchClass = t_addrmode_rr_asm_operand; let MIOperandInfo = (ops tGPR:$base, tGPR:$offsreg); } diff --git a/test/MC/ARM/basic-thumb-instructions.s b/test/MC/ARM/basic-thumb-instructions.s index 591c6c6dd0b..50554326ca8 100644 --- a/test/MC/ARM/basic-thumb-instructions.s +++ b/test/MC/ARM/basic-thumb-instructions.s @@ -250,3 +250,13 @@ _func: ldrh r6, [r2, r6] @ CHECK: ldrh r6, [r2, r6] @ encoding: [0x96,0x5b] + + +@------------------------------------------------------------------------------ +@ LDRSB/LDRSH +@------------------------------------------------------------------------------ + ldrsb r6, [r2, r6] + ldrsh r3, [r7, r1] + +@ CHECK: ldrsb r6, [r2, r6] @ encoding: [0x96,0x57] +@ CHECK: ldrsh r3, [r7, r1] @ encoding: [0x7b,0x5e]