[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp AlphaJITInfo.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue May 2 12:15:02 PDT 2006



Changes in directory llvm/lib/Target/Alpha:

AlphaCodeEmitter.cpp updated: 1.10 -> 1.11
AlphaJITInfo.cpp updated: 1.8 -> 1.9
---
Log message:

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.


---
Diffs of the changes:  (+2 -6)

 AlphaCodeEmitter.cpp |    6 +-----
 AlphaJITInfo.cpp     |    2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp
diff -u llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.10 llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.11
--- llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.10	Tue May  2 13:27:26 2006
+++ llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp	Tue May  2 14:14:47 2006
@@ -55,10 +55,6 @@
 
     void emitInstruction(const MachineInstr &MI);
 
-    /// emitWord - write a 32-bit word to memory at the current PC
-    ///
-    void emitWord(unsigned w) { MCE.emitWord(w); }
-
     /// getBinaryCodeForInstr - This function, generated by the
     /// CodeEmitterGenerator using TableGen, produces the binary encoding for
     /// machine instructions.
@@ -117,7 +113,7 @@
     unsigned Opcode = MI.getOpcode();
     switch(MI.getOpcode()) {
     default:
-      emitWord(getBinaryCodeForInstr(*I));
+      MCE.emitWordLE(getBinaryCodeForInstr(*I));
       break;
     case Alpha::ALTENT:
     case Alpha::PCLABEL:


Index: llvm/lib/Target/Alpha/AlphaJITInfo.cpp
diff -u llvm/lib/Target/Alpha/AlphaJITInfo.cpp:1.8 llvm/lib/Target/Alpha/AlphaJITInfo.cpp:1.9
--- llvm/lib/Target/Alpha/AlphaJITInfo.cpp:1.8	Sun Jan  1 16:20:31 2006
+++ llvm/lib/Target/Alpha/AlphaJITInfo.cpp	Tue May  2 14:14:47 2006
@@ -197,7 +197,7 @@
   MCE.startFunctionStub(19*4);
   void* Addr = (void*)(intptr_t)MCE.getCurrentPCValue();
   for (int x = 0; x < 19; ++ x)
-    MCE.emitWord(0);
+    MCE.emitWordLE(0);
   EmitBranchToAt(Addr, Fn);
   DEBUG(std::cerr << "Emitting Stub to " << Fn << " at [" << Addr << "]\n");
   return MCE.finishFunctionStub(0);






More information about the llvm-commits mailing list