summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator_mips.cc
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-03-02 12:20:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-03-02 12:20:27 +0000
commit540ca5084604c0eff5912783876bcfb128d7d8e7 (patch)
treed701847dab8c56c98989e035d37f827d40490963 /compiler/optimizing/code_generator_mips.cc
parent3c18f4e9dc0829762ccf3910e74d14d1d86aa221 (diff)
parent3177e104e727b802770cebe59dd19d708e0942a7 (diff)
Merge "MIPS: Use sltiu instead of LoadConst32() + sltu"
Diffstat (limited to 'compiler/optimizing/code_generator_mips.cc')
-rw-r--r--compiler/optimizing/code_generator_mips.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/optimizing/code_generator_mips.cc b/compiler/optimizing/code_generator_mips.cc
index d01b895446..87e6d6834b 100644
--- a/compiler/optimizing/code_generator_mips.cc
+++ b/compiler/optimizing/code_generator_mips.cc
@@ -1929,8 +1929,8 @@ void InstructionCodeGeneratorMIPS::GenerateClassInitializationCheck(SlowPathCode
enum_cast<uint32_t>(ClassStatus::kInitialized) << (status_lsb_position % kBitsPerByte);
__ LoadFromOffset(kLoadUnsignedByte, TMP, class_reg, status_byte_offset);
- __ LoadConst32(AT, shifted_initialized_value);
- __ Bltu(TMP, AT, slow_path->GetEntryLabel());
+ __ Sltiu(TMP, TMP, shifted_initialized_value);
+ __ Bnez(TMP, slow_path->GetEntryLabel());
// Even if the initialized flag is set, we need to ensure consistent memory ordering.
__ Sync(0);
__ Bind(slow_path->GetExitLabel());
@@ -7635,10 +7635,6 @@ void InstructionCodeGeneratorMIPS::VisitInvokeInterface(HInvokeInterface* invoke
uint32_t class_offset = mirror::Object::ClassOffset().Int32Value();
Offset entry_point = ArtMethod::EntryPointFromQuickCompiledCodeOffset(kMipsPointerSize);
- // Set the hidden argument.
- __ LoadConst32(invoke->GetLocations()->GetTemp(1).AsRegister<Register>(),
- invoke->GetDexMethodIndex());
-
// temp = object->GetClass();
if (receiver.IsStackSlot()) {
__ LoadFromOffset(kLoadWord, temp, SP, receiver.GetStackIndex());
@@ -7663,6 +7659,9 @@ void InstructionCodeGeneratorMIPS::VisitInvokeInterface(HInvokeInterface* invoke
__ LoadFromOffset(kLoadWord, temp, temp, method_offset);
// T9 = temp->GetEntryPoint();
__ LoadFromOffset(kLoadWord, T9, temp, entry_point.Int32Value());
+ // Set the hidden argument.
+ __ LoadConst32(invoke->GetLocations()->GetTemp(1).AsRegister<Register>(),
+ invoke->GetDexMethodIndex());
// T9();
__ Jalr(T9);
__ NopIfNoReordering();