diff options
author | 2017-02-01 16:25:37 -0800 | |
---|---|---|
committer | 2017-02-01 18:49:30 -0800 | |
commit | 85885fe630462955e68ed0f2668c1c42e633dfd1 (patch) | |
tree | dab2c0e8d00f452f640ff3bc5c03d255f4ea77ec | |
parent | 318797a758f81e7f8a0b440129238b9b5eb1b74e (diff) |
MIPS: Correct instruction alignment.
Test: booted MIPS32R2 in QEMU
Test: booted MIPS64 (with 2nd arch MIPS32R6) in QEMU
Change-Id: Iff61353bc9e787e65f3f17d8938d4b5561d2a603
-rw-r--r-- | runtime/arch/instruction_set.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/arch/instruction_set.h b/runtime/arch/instruction_set.h index 99aea62468..7ef9a7abb5 100644 --- a/runtime/arch/instruction_set.h +++ b/runtime/arch/instruction_set.h @@ -68,8 +68,8 @@ static constexpr size_t kArmAlignment = 8; // ARM64 instruction alignment. This is the recommended alignment for maximum performance. static constexpr size_t kArm64Alignment = 16; -// MIPS instruction alignment. MIPS processors require code to be 4-byte aligned. -// TODO: Can this be 4? +// MIPS instruction alignment. MIPS processors require code to be 4-byte aligned, +// but 64-bit literals must be 8-byte aligned. static constexpr size_t kMipsAlignment = 8; // X86 instruction alignment. This is the recommended alignment for maximum performance. @@ -80,8 +80,8 @@ static constexpr size_t kThumb2InstructionAlignment = 2; static constexpr size_t kArm64InstructionAlignment = 4; static constexpr size_t kX86InstructionAlignment = 1; static constexpr size_t kX86_64InstructionAlignment = 1; -static constexpr size_t kMipsInstructionAlignment = 2; -static constexpr size_t kMips64InstructionAlignment = 2; +static constexpr size_t kMipsInstructionAlignment = 4; +static constexpr size_t kMips64InstructionAlignment = 4; const char* GetInstructionSetString(InstructionSet isa); |