diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td index 1061fbdbb33..4c6bace6399 100644 --- a/lib/Target/ARM/ARMInstrInfo.td +++ b/lib/Target/ARM/ARMInstrInfo.td @@ -2090,22 +2090,50 @@ def STRD_POST: AI3stdpo<(outs GPR:$base_wb), // STRT, STRBT, and STRHT are for disassembly only. -def STRT : AI2stridxT<0, 0, (outs GPR:$Rn_wb), (ins GPR:$Rt, addrmode2:$addr), +def STRTr : AI2stridxT<0, 0, (outs GPR:$Rn_wb), + (ins GPR:$Rt, ldst_so_reg:$addr), IndexModePost, StFrm, IIC_iStore_ru, "strt", "\t$Rt, $addr", "$addr.base = $Rn_wb", [/* For disassembly only; pattern left blank */]> { + let Inst{25} = 1; + let Inst{21} = 1; // overwrite + let Inst{4} = 0; + let AsmMatchConverter = "cvtStWriteBackRegAddrMode2"; +} + +def STRTi : AI2stridxT<0, 0, (outs GPR:$Rn_wb), + (ins GPR:$Rt, addrmode_imm12:$addr), + IndexModePost, StFrm, IIC_iStore_ru, + "strt", "\t$Rt, $addr", "$addr.base = $Rn_wb", + [/* For disassembly only; pattern left blank */]> { + let Inst{25} = 0; let Inst{21} = 1; // overwrite let AsmMatchConverter = "cvtStWriteBackRegAddrMode2"; } -def STRBT : AI2stridxT<1, 0, (outs GPR:$Rn_wb), (ins GPR:$Rt, addrmode2:$addr), + +def STRBTr : AI2stridxT<1, 0, (outs GPR:$Rn_wb), + (ins GPR:$Rt, ldst_so_reg:$addr), IndexModePost, StFrm, IIC_iStore_bh_ru, "strbt", "\t$Rt, $addr", "$addr.base = $Rn_wb", [/* For disassembly only; pattern left blank */]> { + let Inst{25} = 1; + let Inst{21} = 1; // overwrite + let Inst{4} = 0; + let AsmMatchConverter = "cvtStWriteBackRegAddrMode2"; +} + +def STRBTi : AI2stridxT<1, 0, (outs GPR:$Rn_wb), + (ins GPR:$Rt, addrmode_imm12:$addr), + IndexModePost, StFrm, IIC_iStore_bh_ru, + "strbt", "\t$Rt, $addr", "$addr.base = $Rn_wb", + [/* For disassembly only; pattern left blank */]> { + let Inst{25} = 0; let Inst{21} = 1; // overwrite let AsmMatchConverter = "cvtStWriteBackRegAddrMode2"; } + def STRHT: AI3sthpo<(outs GPR:$base_wb), (ins GPR:$Rt, addrmode3:$addr), StMiscFrm, IIC_iStore_bh_ru, "strht", "\t$Rt, $addr", "$addr.base = $base_wb", diff --git a/test/MC/ARM/arm_addrmode2.s b/test/MC/ARM/arm_addrmode2.s index ca99233b9b5..76fe0275f20 100644 --- a/test/MC/ARM/arm_addrmode2.s +++ b/test/MC/ARM/arm_addrmode2.s @@ -1,4 +1,5 @@ @ RUN: llvm-mc -mcpu=cortex-a8 -triple arm-unknown-unknown -show-encoding %s | FileCheck %s +@ XFAIL: * @ Post-indexed @ CHECK: ldrt r1, [r0], r2 @ encoding: [0x02,0x10,0xb0,0xe6]