[llvm-commits] CVS: llvm/lib/CodeGen/MachineCodeEmitter.cpp

Misha Brukman brukman at cs.uiuc.edu
Wed May 28 13:28:01 PDT 2003


Changes in directory llvm/lib/CodeGen:

MachineCodeEmitter.cpp updated: 1.6 -> 1.7

---
Log message:

Correctly write out binary data as chars, before they're cast to ints.


---
Diffs of the changes:

Index: llvm/lib/CodeGen/MachineCodeEmitter.cpp
diff -u llvm/lib/CodeGen/MachineCodeEmitter.cpp:1.6 llvm/lib/CodeGen/MachineCodeEmitter.cpp:1.7
--- llvm/lib/CodeGen/MachineCodeEmitter.cpp:1.6	Tue May 27 17:43:19 2003
+++ llvm/lib/CodeGen/MachineCodeEmitter.cpp	Wed May 28 13:27:19 2003
@@ -129,6 +129,7 @@
     
     void emitByte(unsigned char B) {
       if (MCE) MCE->emitByte(B);
+      actual << B; actual.flush();
 
       values[counter] = (unsigned int) B;
       if (++counter % 4 == 0 && counter != 0) {
@@ -136,9 +137,7 @@
         for (unsigned i=0; i<4; ++i) {
           if (values[i] < 16) o << "0";
           o << values[i] << " ";
-          actual << values[i];
         }
-        actual.flush();
 
         o << std::dec << "\t";
         for (unsigned i=0; i<4; ++i) {





More information about the llvm-commits mailing list