зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1289054 - Part 13: Implement the 64bit variant of AsmSelect on arm, r=bbouvier
This commit is contained in:
Родитель
3c2a7487ec
Коммит
7753e2a880
|
@ -3368,3 +3368,23 @@ CodeGeneratorARM::visitAsmJSPassStackArgI64(LAsmJSPassStackArgI64* ins)
|
|||
else
|
||||
masm.store64(ToRegister64(ins->arg()), dst);
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorARM::visitAsmSelectI64(LAsmSelectI64* lir)
|
||||
{
|
||||
Register cond = ToRegister(lir->condExpr());
|
||||
const LInt64Allocation falseExpr = lir->falseExpr();
|
||||
|
||||
Register64 out = ToOutRegister64(lir);
|
||||
MOZ_ASSERT(ToRegister64(lir->trueExpr()) == out, "true expr is reused for input");
|
||||
|
||||
masm.ma_cmp(cond, Imm32(0));
|
||||
if (falseExpr.low().isRegister()) {
|
||||
masm.ma_mov(ToRegister(falseExpr.low()), out.low, LeaveCC, Assembler::Equal);
|
||||
masm.ma_mov(ToRegister(falseExpr.high()), out.high, LeaveCC, Assembler::Equal);
|
||||
} else {
|
||||
masm.ma_ldr(ToAddress(falseExpr.low()), out.low, Offset, Assembler::Equal);
|
||||
masm.ma_ldr(ToAddress(falseExpr.high()), out.high, Offset, Assembler::Equal);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -170,6 +170,7 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
|||
virtual void visitBitOpI64(LBitOpI64* lir);
|
||||
virtual void visitRotateI64(LRotateI64* lir);
|
||||
virtual void visitAsmJSPassStackArgI64(LAsmJSPassStackArgI64* lir);
|
||||
virtual void visitAsmSelectI64(LAsmSelectI64* lir);
|
||||
|
||||
// Out of line visitors.
|
||||
void visitOutOfLineBailout(OutOfLineBailout* ool);
|
||||
|
|
|
@ -511,7 +511,15 @@ LIRGeneratorARM::lowerUrshD(MUrsh* mir)
|
|||
void
|
||||
LIRGeneratorARM::visitAsmSelect(MAsmSelect* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->type() != MIRType::Int64);
|
||||
if (ins->type() == MIRType::Int64) {
|
||||
auto* lir = new(alloc()) LAsmSelectI64(useInt64RegisterAtStart(ins->trueExpr()),
|
||||
useInt64(ins->falseExpr()),
|
||||
useRegister(ins->condExpr())
|
||||
);
|
||||
|
||||
defineInt64ReuseInput(lir, ins, LAsmSelectI64::TrueExprIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
auto* lir = new(alloc()) LAsmSelect(useRegisterAtStart(ins->trueExpr()),
|
||||
useRegister(ins->falseExpr()),
|
||||
|
|
Загрузка…
Ссылка в новой задаче