summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCodeEmitter.cpp
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2003-05-28 18:27:19 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2003-05-28 18:27:19 +0000
commitdf88104198319a287b8ef426453a95bcd0cb2e90 (patch)
treef8fb4a9c5c87587a566d174d9f7e938fd8a98911 /llvm/lib/CodeGen/MachineCodeEmitter.cpp
parentfded35952a9386933b02701baaba8a0eaee2f259 (diff)
downloadbcm5719-llvm-df88104198319a287b8ef426453a95bcd0cb2e90.tar.gz
bcm5719-llvm-df88104198319a287b8ef426453a95bcd0cb2e90.zip
Correctly write out binary data as chars, before they're cast to ints.
llvm-svn: 6385
Diffstat (limited to 'llvm/lib/CodeGen/MachineCodeEmitter.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCodeEmitter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineCodeEmitter.cpp b/llvm/lib/CodeGen/MachineCodeEmitter.cpp
index ae4d7cecec6..e67b4aaa021 100644
--- a/llvm/lib/CodeGen/MachineCodeEmitter.cpp
+++ b/llvm/lib/CodeGen/MachineCodeEmitter.cpp
@@ -129,6 +129,7 @@ namespace {
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 @@ namespace {
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) {
OpenPOWER on IntegriCloud