diff options
| author | 2012-10-02 18:10:35 -0700 | |
|---|---|---|
| committer | 2012-10-03 13:34:43 -0700 | |
| commit | 4f8f04ad94e68d2307a955d6bd72415fc0852725 (patch) | |
| tree | f4c7f58a5149667b5f8e3376064faa81f5b9842e /src/disassembler_mips.cc | |
| parent | 3e96a16c27c986275f60afe682d0b2a3064f45c9 (diff) | |
Fix endianness of compiled code and stacks of stubs for MIPS.
The gtests now all work on MIPS.
Change-Id: I2883ce002f23d75e700366014517c863fb626d09
Diffstat (limited to 'src/disassembler_mips.cc')
| -rw-r--r-- | src/disassembler_mips.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/disassembler_mips.cc b/src/disassembler_mips.cc index f7d755a8de..ca9f6d7ca7 100644 --- a/src/disassembler_mips.cc +++ b/src/disassembler_mips.cc @@ -164,9 +164,8 @@ static const MipsInstruction gMipsInstructions[] = { }; static uint32_t ReadU32(const uint8_t* ptr) { - // TODO: MIPS is bi. how do we handle that? - return ptr[3] | (ptr[2] << 8) | (ptr[1] << 16) | (ptr[0] << 24); - //return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24); + // We only support little-endian MIPS. + return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24); } static void DumpMips(std::ostream& os, const uint8_t* instr_ptr) { |