diff options
| author | 2016-03-11 15:22:18 +0100 | |
|---|---|---|
| committer | 2016-03-11 17:16:37 +0100 | |
| commit | ddc4055abab40740e689d91e9a4fe20a7b8e5d28 (patch) | |
| tree | df455aa113ce912e45ea54ed546d988cae89af58 /compiler/optimizing | |
| parent | 62a9841469f99810b2b39b0748cb113af0e8913a (diff) | |
MIPS: Don't use $t8 for calling entrypoints
When jumping to entrypoints, $t9 register must be used. Value of $gp
is calculated based on value from $t9 and it should contain the
address of the first instruction of the entrypoint.
This CL enables MIPS32 and MIPS64 to boot.
Change-Id: Idf0f7f479cceafabb88b1b087da190dbda86e1c3
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/intrinsics_mips.cc | 20 | ||||
| -rw-r--r-- | compiler/optimizing/intrinsics_mips64.cc | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/compiler/optimizing/intrinsics_mips.cc b/compiler/optimizing/intrinsics_mips.cc index f1a6e3de05..c306cf93a1 100644 --- a/compiler/optimizing/intrinsics_mips.cc +++ b/compiler/optimizing/intrinsics_mips.cc @@ -1548,11 +1548,11 @@ void IntrinsicCodeGeneratorMIPS::VisitStringCompareTo(HInvoke* invoke) { __ Beqz(argument, slow_path->GetEntryLabel()); __ LoadFromOffset(kLoadWord, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMipsWordSize, pStringCompareTo).Int32Value()); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); __ Bind(slow_path->GetExitLabel()); } @@ -1707,10 +1707,10 @@ static void GenerateStringIndexOf(HInvoke* invoke, } __ LoadFromOffset(kLoadWord, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMipsWordSize, pIndexOf).Int32Value()); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); if (slow_path != nullptr) { @@ -1793,10 +1793,10 @@ void IntrinsicCodeGeneratorMIPS::VisitStringNewStringFromBytes(HInvoke* invoke) __ Beqz(byte_array, slow_path->GetEntryLabel()); __ LoadFromOffset(kLoadWord, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMipsWordSize, pAllocStringFromBytes).Int32Value()); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); codegen_->RecordPcInfo(invoke, invoke->GetDexPc()); __ Bind(slow_path->GetExitLabel()); @@ -1826,10 +1826,10 @@ void IntrinsicCodeGeneratorMIPS::VisitStringNewStringFromChars(HInvoke* invoke) // all include a null check on `data` before calling that method. __ LoadFromOffset(kLoadWord, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMipsWordSize, pAllocStringFromChars).Int32Value()); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); codegen_->RecordPcInfo(invoke, invoke->GetDexPc()); } @@ -1855,10 +1855,10 @@ void IntrinsicCodeGeneratorMIPS::VisitStringNewStringFromString(HInvoke* invoke) __ Beqz(string_to_copy, slow_path->GetEntryLabel()); __ LoadFromOffset(kLoadWord, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMipsWordSize, pAllocStringFromString).Int32Value()); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); codegen_->RecordPcInfo(invoke, invoke->GetDexPc()); __ Bind(slow_path->GetExitLabel()); diff --git a/compiler/optimizing/intrinsics_mips64.cc b/compiler/optimizing/intrinsics_mips64.cc index 5ec5b86d1e..cf973aa841 100644 --- a/compiler/optimizing/intrinsics_mips64.cc +++ b/compiler/optimizing/intrinsics_mips64.cc @@ -1356,10 +1356,10 @@ void IntrinsicCodeGeneratorMIPS64::VisitStringCompareTo(HInvoke* invoke) { __ Beqzc(argument, slow_path->GetEntryLabel()); __ LoadFromOffset(kLoadDoubleword, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMips64DoublewordSize, pStringCompareTo).Int32Value()); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); __ Bind(slow_path->GetExitLabel()); } @@ -1506,11 +1506,11 @@ static void GenerateStringIndexOf(HInvoke* invoke, } __ LoadFromOffset(kLoadDoubleword, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMips64DoublewordSize, pIndexOf).Int32Value()); CheckEntrypointTypes<kQuickIndexOf, int32_t, void*, uint32_t, uint32_t>(); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); if (slow_path != nullptr) { @@ -1583,12 +1583,12 @@ void IntrinsicCodeGeneratorMIPS64::VisitStringNewStringFromBytes(HInvoke* invoke __ Beqzc(byte_array, slow_path->GetEntryLabel()); __ LoadFromOffset(kLoadDoubleword, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMips64DoublewordSize, pAllocStringFromBytes).Int32Value()); CheckEntrypointTypes<kQuickAllocStringFromBytes, void*, void*, int32_t, int32_t, int32_t>(); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); codegen_->RecordPcInfo(invoke, invoke->GetDexPc()); __ Bind(slow_path->GetExitLabel()); @@ -1617,12 +1617,12 @@ void IntrinsicCodeGeneratorMIPS64::VisitStringNewStringFromChars(HInvoke* invoke // // all include a null check on `data` before calling that method. __ LoadFromOffset(kLoadDoubleword, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMips64DoublewordSize, pAllocStringFromChars).Int32Value()); CheckEntrypointTypes<kQuickAllocStringFromChars, void*, int32_t, int32_t, void*>(); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); codegen_->RecordPcInfo(invoke, invoke->GetDexPc()); } @@ -1648,12 +1648,12 @@ void IntrinsicCodeGeneratorMIPS64::VisitStringNewStringFromString(HInvoke* invok __ Beqzc(string_to_copy, slow_path->GetEntryLabel()); __ LoadFromOffset(kLoadDoubleword, - TMP, + T9, TR, QUICK_ENTRYPOINT_OFFSET(kMips64DoublewordSize, pAllocStringFromString).Int32Value()); CheckEntrypointTypes<kQuickAllocStringFromString, void*, void*>(); - __ Jalr(TMP); + __ Jalr(T9); __ Nop(); codegen_->RecordPcInfo(invoke, invoke->GetDexPc()); __ Bind(slow_path->GetExitLabel()); |