diff options
author | 2017-02-17 13:48:35 +0000 | |
---|---|---|
committer | 2017-02-17 13:48:36 +0000 | |
commit | a7e9bfafeb64b1142433a41b05ddc263cadc61e3 (patch) | |
tree | 2b659faf879a974a2f5b737cb3ace1205b1116fc | |
parent | 530fadac26be900a5550cf8ef25f426838ffbe68 (diff) | |
parent | 3c89d4234589816fb7dafb5215543f2cf023ce6c (diff) |
Merge "x86/string compression: Use TESTB instead of TESTL in String.charAt()."
-rw-r--r-- | compiler/optimizing/code_generator_x86.cc | 2 | ||||
-rw-r--r-- | compiler/optimizing/code_generator_x86_64.cc | 2 | ||||
-rw-r--r-- | disassembler/disassembler_x86.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index 09612c8dbf..b779aed763 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -5262,7 +5262,7 @@ void InstructionCodeGeneratorX86::VisitArrayGet(HArrayGet* instruction) { // Branch cases into compressed and uncompressed for each index's type. uint32_t count_offset = mirror::String::CountOffset().Uint32Value(); NearLabel done, not_compressed; - __ testl(Address(obj, count_offset), Immediate(1)); + __ testb(Address(obj, count_offset), Immediate(1)); codegen_->MaybeRecordImplicitNullCheck(instruction); static_assert(static_cast<uint32_t>(mirror::StringCompressionFlag::kCompressed) == 0u, "Expecting 0=compressed, 1=uncompressed"); diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc index 0879992e32..179bf6d3d1 100644 --- a/compiler/optimizing/code_generator_x86_64.cc +++ b/compiler/optimizing/code_generator_x86_64.cc @@ -4720,7 +4720,7 @@ void InstructionCodeGeneratorX86_64::VisitArrayGet(HArrayGet* instruction) { // Branch cases into compressed and uncompressed for each index's type. uint32_t count_offset = mirror::String::CountOffset().Uint32Value(); NearLabel done, not_compressed; - __ testl(Address(obj, count_offset), Immediate(1)); + __ testb(Address(obj, count_offset), Immediate(1)); codegen_->MaybeRecordImplicitNullCheck(instruction); static_assert(static_cast<uint32_t>(mirror::StringCompressionFlag::kCompressed) == 0u, "Expecting 0=compressed, 1=uncompressed"); diff --git a/disassembler/disassembler_x86.cc b/disassembler/disassembler_x86.cc index ff05733345..a289433af5 100644 --- a/disassembler/disassembler_x86.cc +++ b/disassembler/disassembler_x86.cc @@ -1306,7 +1306,7 @@ DISASSEMBLER_ENTRY(cmp, has_modrm = true; reg_is_opcode = true; store = true; - immediate_bytes = ((instr[1] & 0x38) == 0) ? 1 : 0; + immediate_bytes = ((instr[1] & 0x38) == 0) ? (instr[0] == 0xF7 ? 4 : 1) : 0; break; case 0xFF: { |