зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1583088 - [MIPS64]Fix visitCompareI64{AndBranch}, handle the case that rhs operand is on the stack. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D46755 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
95fa8bcf2b
Коммит
22b71a7d58
|
@ -186,12 +186,16 @@ void CodeGenerator::visitCompareI64(LCompareI64* lir) {
|
|||
Register lhsReg = ToRegister64(lhs).reg;
|
||||
Register output = ToRegister(lir->output());
|
||||
Register rhsReg;
|
||||
ScratchRegisterScope scratch(masm);
|
||||
|
||||
if (IsConstant(rhs)) {
|
||||
rhsReg = ScratchRegister;
|
||||
rhsReg = scratch;
|
||||
masm.ma_li(rhsReg, ImmWord(ToInt64(rhs)));
|
||||
} else {
|
||||
} else if (rhs.value().isGeneralReg()) {
|
||||
rhsReg = ToRegister64(rhs).reg;
|
||||
} else {
|
||||
rhsReg = scratch;
|
||||
masm.loadPtr(ToAddress(rhs.value()), rhsReg);
|
||||
}
|
||||
|
||||
bool isSigned = mir->compareType() == MCompare::Compare_Int64;
|
||||
|
@ -208,12 +212,16 @@ void CodeGenerator::visitCompareI64AndBranch(LCompareI64AndBranch* lir) {
|
|||
const LInt64Allocation rhs = lir->getInt64Operand(LCompareI64::Rhs);
|
||||
Register lhsReg = ToRegister64(lhs).reg;
|
||||
Register rhsReg;
|
||||
ScratchRegisterScope scratch(masm);
|
||||
|
||||
if (IsConstant(rhs)) {
|
||||
rhsReg = ScratchRegister;
|
||||
rhsReg = scratch;
|
||||
masm.ma_li(rhsReg, ImmWord(ToInt64(rhs)));
|
||||
} else {
|
||||
} else if (rhs.value().isGeneralReg()) {
|
||||
rhsReg = ToRegister64(rhs).reg;
|
||||
} else {
|
||||
rhsReg = scratch;
|
||||
masm.loadPtr(ToAddress(rhs.value()), rhsReg);
|
||||
}
|
||||
|
||||
bool isSigned = mir->compareType() == MCompare::Compare_Int64;
|
||||
|
|
Загрузка…
Ссылка в новой задаче