aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCJITInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-02 19:14:47 +0000
committerChris Lattner <sabre@nondot.org>2006-05-02 19:14:47 +0000
commitd3f0aefc33965d3d0ca6f92af4ebaea354b063c4 (patch)
treea930b341d61cfa8a4c28505803970a2b270946a2 /lib/Target/PowerPC/PPCJITInfo.cpp
parent43b429b05989075b60693d57395c99b0ad789f8d (diff)
downloadexternal_llvm-d3f0aefc33965d3d0ca6f92af4ebaea354b063c4.zip
external_llvm-d3f0aefc33965d3d0ca6f92af4ebaea354b063c4.tar.gz
external_llvm-d3f0aefc33965d3d0ca6f92af4ebaea354b063c4.tar.bz2
Fix a purely hypothetical problem (for now): emitWord emits in the host
byte format. This doesn't work when using the code emitter in a cross target environment. Since the code emitter is only really used by the JIT, this isn't a current problem, but if we ever start emitting .o files, it would be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCJITInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCJITInfo.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Target/PowerPC/PPCJITInfo.cpp b/lib/Target/PowerPC/PPCJITInfo.cpp
index 9329b38..a6d630e 100644
--- a/lib/Target/PowerPC/PPCJITInfo.cpp
+++ b/lib/Target/PowerPC/PPCJITInfo.cpp
@@ -168,23 +168,23 @@ void *PPCJITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) {
if (Fn != PPC32CompilationCallback) {
MCE.startFunctionStub(4*4);
void *Addr = (void*)(intptr_t)MCE.getCurrentPCValue();
- MCE.emitWord(0);
- MCE.emitWord(0);
- MCE.emitWord(0);
- MCE.emitWord(0);
+ MCE.emitWordBE(0);
+ MCE.emitWordBE(0);
+ MCE.emitWordBE(0);
+ MCE.emitWordBE(0);
EmitBranchToAt(Addr, Fn, false);
return MCE.finishFunctionStub(0);
}
MCE.startFunctionStub(4*7);
- MCE.emitWord(0x9421ffe0); // stwu r1,-32(r1)
- MCE.emitWord(0x7d6802a6); // mflr r11
- MCE.emitWord(0x91610028); // stw r11, 40(r1)
+ MCE.emitWordBE(0x9421ffe0); // stwu r1,-32(r1)
+ MCE.emitWordBE(0x7d6802a6); // mflr r11
+ MCE.emitWordBE(0x91610028); // stw r11, 40(r1)
void *Addr = (void*)(intptr_t)MCE.getCurrentPCValue();
- MCE.emitWord(0);
- MCE.emitWord(0);
- MCE.emitWord(0);
- MCE.emitWord(0);
+ MCE.emitWordBE(0);
+ MCE.emitWordBE(0);
+ MCE.emitWordBE(0);
+ MCE.emitWordBE(0);
EmitBranchToAt(Addr, Fn, true/*is call*/);
return MCE.finishFunctionStub(0);
}