зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1258910 - OdinMonkey: MIPS64: Implement AsmSelectI64. r=bbouvier
--- js/src/jit/mips64/CodeGenerator-mips64.cpp | 21 +++++++++++++++++++++ js/src/jit/mips64/CodeGenerator-mips64.h | 1 + 2 files changed, 22 insertions(+)
This commit is contained in:
Родитель
2de1fdd4f0
Коммит
83da00f716
|
@ -278,6 +278,27 @@ CodeGeneratorMIPS64::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
|
|||
emitBranch(lhs.valueReg(), rhs.valueReg(), cond, lir->ifTrue(), lir->ifFalse());
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorMIPS64::visitAsmSelectI64(LAsmSelectI64* lir)
|
||||
{
|
||||
MOZ_ASSERT(lir->mir()->type() == MIRType_Int64);
|
||||
|
||||
Register cond = ToRegister(lir->condExpr());
|
||||
Operand falseExpr = ToOperand(lir->falseExpr());
|
||||
|
||||
Register out = ToRegister(lir->output());
|
||||
MOZ_ASSERT(ToRegister(lir->trueExpr()) == out, "true expr is reused for input");
|
||||
|
||||
if (falseExpr.getTag() == Operand::REG) {
|
||||
masm.as_movz(out, falseExpr.toReg(), cond);
|
||||
} else {
|
||||
Label done;
|
||||
masm.ma_b(cond, cond, &done, Assembler::NonZero, ShortJump);
|
||||
masm.loadPtr(falseExpr.toAddress(), out);
|
||||
masm.bind(&done);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorMIPS64::setReturnDoubleRegs(LiveRegisterSet* regs)
|
||||
{
|
||||
|
|
|
@ -44,6 +44,7 @@ class CodeGeneratorMIPS64 : public CodeGeneratorMIPSShared
|
|||
virtual void visitCompareBAndBranch(LCompareBAndBranch* lir);
|
||||
virtual void visitCompareBitwise(LCompareBitwise* lir);
|
||||
virtual void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
|
||||
virtual void visitAsmSelectI64(LAsmSelectI64* ins);
|
||||
|
||||
// Out of line visitors.
|
||||
void visitOutOfLineBailout(OutOfLineBailout* ool);
|
||||
|
|
Загрузка…
Ссылка в новой задаче