mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 06:09:05 +00:00
Add @earlyclobber constraints to the writeback register of all ARM store instructions.
The ARMARM specifies these instructions as unpredictable when storing the writeback register. This shouldn't affect code generation much since storing a pointer to itself is quite rare. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8e98de9979
commit
836a7de159
@ -1802,41 +1802,47 @@ def STRD : AI3str<0b1111, (outs), (ins GPR:$Rt, GPR:$src2, addrmode3:$addr),
|
||||
def STR_PRE : AI2stridx<0, 1, (outs GPR:$Rn_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, am2offset:$offset),
|
||||
IndexModePre, StFrm, IIC_iStore_ru,
|
||||
"str", "\t$Rt, [$Rn, $offset]!", "$Rn = $Rn_wb",
|
||||
"str", "\t$Rt, [$Rn, $offset]!",
|
||||
"$Rn = $Rn_wb,@earlyclobber $Rn_wb",
|
||||
[(set GPR:$Rn_wb,
|
||||
(pre_store GPR:$Rt, GPR:$Rn, am2offset:$offset))]>;
|
||||
|
||||
def STR_POST : AI2stridx<0, 0, (outs GPR:$Rn_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, am2offset:$offset),
|
||||
IndexModePost, StFrm, IIC_iStore_ru,
|
||||
"str", "\t$Rt, [$Rn], $offset", "$Rn = $Rn_wb",
|
||||
"str", "\t$Rt, [$Rn], $offset",
|
||||
"$Rn = $Rn_wb,@earlyclobber $Rn_wb",
|
||||
[(set GPR:$Rn_wb,
|
||||
(post_store GPR:$Rt, GPR:$Rn, am2offset:$offset))]>;
|
||||
|
||||
def STRB_PRE : AI2stridx<1, 1, (outs GPR:$Rn_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, am2offset:$offset),
|
||||
IndexModePre, StFrm, IIC_iStore_bh_ru,
|
||||
"strb", "\t$Rt, [$Rn, $offset]!", "$Rn = $Rn_wb",
|
||||
"strb", "\t$Rt, [$Rn, $offset]!",
|
||||
"$Rn = $Rn_wb,@earlyclobber $Rn_wb",
|
||||
[(set GPR:$Rn_wb, (pre_truncsti8 GPR:$Rt,
|
||||
GPR:$Rn, am2offset:$offset))]>;
|
||||
def STRB_POST: AI2stridx<1, 0, (outs GPR:$Rn_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, am2offset:$offset),
|
||||
IndexModePost, StFrm, IIC_iStore_bh_ru,
|
||||
"strb", "\t$Rt, [$Rn], $offset", "$Rn = $Rn_wb",
|
||||
"strb", "\t$Rt, [$Rn], $offset",
|
||||
"$Rn = $Rn_wb,@earlyclobber $Rn_wb",
|
||||
[(set GPR:$Rn_wb, (post_truncsti8 GPR:$Rt,
|
||||
GPR:$Rn, am2offset:$offset))]>;
|
||||
|
||||
def STRH_PRE : AI3stridx<0b1011, 0, 1, (outs GPR:$Rn_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, am3offset:$offset),
|
||||
IndexModePre, StMiscFrm, IIC_iStore_ru,
|
||||
"strh", "\t$Rt, [$Rn, $offset]!", "$Rn = $Rn_wb",
|
||||
"strh", "\t$Rt, [$Rn, $offset]!",
|
||||
"$Rn = $Rn_wb,@earlyclobber $Rn_wb",
|
||||
[(set GPR:$Rn_wb,
|
||||
(pre_truncsti16 GPR:$Rt, GPR:$Rn, am3offset:$offset))]>;
|
||||
|
||||
def STRH_POST: AI3stridx<0b1011, 0, 0, (outs GPR:$Rn_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, am3offset:$offset),
|
||||
IndexModePost, StMiscFrm, IIC_iStore_bh_ru,
|
||||
"strh", "\t$Rt, [$Rn], $offset", "$Rn = $Rn_wb",
|
||||
"strh", "\t$Rt, [$Rn], $offset",
|
||||
"$Rn = $Rn_wb,@earlyclobber $Rn_wb",
|
||||
[(set GPR:$Rn_wb, (post_truncsti16 GPR:$Rt,
|
||||
GPR:$Rn, am3offset:$offset))]>;
|
||||
|
||||
|
@ -1423,42 +1423,48 @@ def t2STRDi8 : T2Ii8s4<1, 0, 0, (outs),
|
||||
def t2STR_PRE : T2Iidxldst<0, 0b10, 0, 1, (outs GPR:$base_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr),
|
||||
AddrModeT2_i8, IndexModePre, IIC_iStore_iu,
|
||||
"str", "\t$Rt, [$Rn, $addr]!", "$Rn = $base_wb",
|
||||
"str", "\t$Rt, [$Rn, $addr]!",
|
||||
"$Rn = $base_wb,@earlyclobber $base_wb",
|
||||
[(set GPR:$base_wb,
|
||||
(pre_store GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr))]>;
|
||||
|
||||
def t2STR_POST : T2Iidxldst<0, 0b10, 0, 0, (outs GPR:$base_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr),
|
||||
AddrModeT2_i8, IndexModePost, IIC_iStore_iu,
|
||||
"str", "\t$Rt, [$Rn], $addr", "$Rn = $base_wb",
|
||||
"str", "\t$Rt, [$Rn], $addr",
|
||||
"$Rn = $base_wb,@earlyclobber $base_wb",
|
||||
[(set GPR:$base_wb,
|
||||
(post_store GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr))]>;
|
||||
|
||||
def t2STRH_PRE : T2Iidxldst<0, 0b01, 0, 1, (outs GPR:$base_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr),
|
||||
AddrModeT2_i8, IndexModePre, IIC_iStore_iu,
|
||||
"strh", "\t$Rt, [$Rn, $addr]!", "$Rn = $base_wb",
|
||||
"strh", "\t$Rt, [$Rn, $addr]!",
|
||||
"$Rn = $base_wb,@earlyclobber $base_wb",
|
||||
[(set GPR:$base_wb,
|
||||
(pre_truncsti16 GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr))]>;
|
||||
|
||||
def t2STRH_POST : T2Iidxldst<0, 0b01, 0, 0, (outs GPR:$base_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr),
|
||||
AddrModeT2_i8, IndexModePost, IIC_iStore_bh_iu,
|
||||
"strh", "\t$Rt, [$Rn], $addr", "$Rn = $base_wb",
|
||||
"strh", "\t$Rt, [$Rn], $addr",
|
||||
"$Rn = $base_wb,@earlyclobber $base_wb",
|
||||
[(set GPR:$base_wb,
|
||||
(post_truncsti16 GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr))]>;
|
||||
|
||||
def t2STRB_PRE : T2Iidxldst<0, 0b00, 0, 1, (outs GPR:$base_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr),
|
||||
AddrModeT2_i8, IndexModePre, IIC_iStore_bh_iu,
|
||||
"strb", "\t$Rt, [$Rn, $addr]!", "$Rn = $base_wb",
|
||||
"strb", "\t$Rt, [$Rn, $addr]!",
|
||||
"$Rn = $base_wb,@earlyclobber $base_wb",
|
||||
[(set GPR:$base_wb,
|
||||
(pre_truncsti8 GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr))]>;
|
||||
|
||||
def t2STRB_POST : T2Iidxldst<0, 0b00, 0, 0, (outs GPR:$base_wb),
|
||||
(ins GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr),
|
||||
AddrModeT2_i8, IndexModePost, IIC_iStore_bh_iu,
|
||||
"strb", "\t$Rt, [$Rn], $addr", "$Rn = $base_wb",
|
||||
"strb", "\t$Rt, [$Rn], $addr",
|
||||
"$Rn = $base_wb,@earlyclobber $base_wb",
|
||||
[(set GPR:$base_wb,
|
||||
(post_truncsti8 GPR:$Rt, GPR:$Rn, t2am_imm8_offset:$addr))]>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user