mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
bswapped load/store instructions are only availble in indexed addressing form.
As such, use xoaddr (indexed only), not xaddr for address selection. This fixes CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll, a crash compiling lencod. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29208 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
52379111e8
commit
2a785500e0
@ -478,10 +478,10 @@ def LWZX : XForm_1<31, 23, (ops GPRC:$rD, memrr:$src),
|
||||
|
||||
def LHBRX : XForm_1<31, 790, (ops GPRC:$rD, memrr:$src),
|
||||
"lhbrx $rD, $src", LdStGeneral,
|
||||
[(set GPRC:$rD, (PPClbrx xaddr:$src,srcvalue:$dummy, i16))]>;
|
||||
[(set GPRC:$rD, (PPClbrx xoaddr:$src, srcvalue:$sv, i16))]>;
|
||||
def LWBRX : XForm_1<31, 534, (ops GPRC:$rD, memrr:$src),
|
||||
"lwbrx $rD, $src", LdStGeneral,
|
||||
[(set GPRC:$rD, (PPClbrx xaddr:$src,srcvalue:$dummy, i32))]>;
|
||||
[(set GPRC:$rD, (PPClbrx xoaddr:$src, srcvalue:$sv, i32))]>;
|
||||
|
||||
}
|
||||
|
||||
@ -538,11 +538,11 @@ def STWUX : XForm_8<31, 183, (ops GPRC:$rS, GPRC:$rA, GPRC:$rB),
|
||||
[]>;
|
||||
def STHBRX: XForm_8<31, 918, (ops GPRC:$rS, memrr:$dst),
|
||||
"sthbrx $rS, $dst", LdStGeneral,
|
||||
[(PPCstbrx GPRC:$rS, xaddr:$dst, srcvalue:$dummy, i16)]>,
|
||||
[(PPCstbrx GPRC:$rS, xoaddr:$dst, srcvalue:$dummy, i16)]>,
|
||||
PPC970_DGroup_Cracked;
|
||||
def STWBRX: XForm_8<31, 662, (ops GPRC:$rS, memrr:$dst),
|
||||
"stwbrx $rS, $dst", LdStGeneral,
|
||||
[(PPCstbrx GPRC:$rS, xaddr:$dst, srcvalue:$dummy, i32)]>,
|
||||
[(PPCstbrx GPRC:$rS, xoaddr:$dst, srcvalue:$dummy, i32)]>,
|
||||
PPC970_DGroup_Cracked;
|
||||
}
|
||||
let PPC970_Unit = 1 in { // FXU Operations.
|
||||
|
Loading…
Reference in New Issue
Block a user