summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/mips/Assemble.cc
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2012-03-11 22:19:38 -0700
committer Ian Rogers <irogers@google.com> 2012-03-11 22:40:50 -0700
commitab058bb04d11ed086116d95f2d55bf6b35e8cc35 (patch)
treeeb6d9f03207431ce9bcb262fe661765cfcca8b5e /src/compiler/codegen/mips/Assemble.cc
parent49c4894f76f6a7aec4d6a1ec2c901700c9108944 (diff)
Make code buffer units 8bit rather than 16bit.
Change-Id: I1ca087c4f7f820a8816388095405603f4163b354
Diffstat (limited to 'src/compiler/codegen/mips/Assemble.cc')
-rw-r--r--src/compiler/codegen/mips/Assemble.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/compiler/codegen/mips/Assemble.cc b/src/compiler/codegen/mips/Assemble.cc
index 359ec428d2..e064da974c 100644
--- a/src/compiler/codegen/mips/Assemble.cc
+++ b/src/compiler/codegen/mips/Assemble.cc
@@ -693,14 +693,18 @@ AssemblerStatus oatAssembleInstructions(CompilationUnit *cUnit,
}
}
// FIXME: need multi-endian handling here
- cUnit->codeBuffer.push_back((bits >> 16) & 0xffff);
- cUnit->codeBuffer.push_back(bits & 0xffff);
+ cUnit->codeBuffer.push_back((bits >> 24) & 0xff);
+ cUnit->codeBuffer.push_back((bits >> 16) & 0xff);
+ cUnit->codeBuffer.push_back((bits >> 8) & 0xff);
+ cUnit->codeBuffer.push_back(bits & 0xff);
// TUNING: replace with proper delay slot handling
if (encoder->size == 8) {
const MipsEncodingMap *encoder = &EncodingMap[kMipsNop];
u4 bits = encoder->skeleton;
- cUnit->codeBuffer.push_back((bits >> 16) & 0xffff);
- cUnit->codeBuffer.push_back(bits & 0xffff);
+ cUnit->codeBuffer.push_back((bits >> 24) & 0xff);
+ cUnit->codeBuffer.push_back((bits >> 16) & 0xff);
+ cUnit->codeBuffer.push_back((bits >> 8) & 0xff);
+ cUnit->codeBuffer.push_back(bits & 0xff);
}
}
return res;