summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-19 17:15:36 +0000
committerChris Lattner <sabre@nondot.org>2006-07-19 17:15:36 +0000
commit4f8eb5ccafecccc717614f8c0b21857d324be0e2 (patch)
treeea89b8d1103c838d646e2912aafc5caf4c5f19ae /llvm/lib
parent4f501620ff87afd4556b60df07be9dff6c624b14 (diff)
downloadbcm5719-llvm-4f8eb5ccafecccc717614f8c0b21857d324be0e2.tar.gz
bcm5719-llvm-4f8eb5ccafecccc717614f8c0b21857d324be0e2.zip
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. llvm-svn: 29208
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/PowerPC/PPCInstrInfo.td8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
index f3241254555..252036f497c 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -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.
OpenPOWER on IntegriCloud