mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1301400: Baseline Wasm Compiler: Part 17: Implement Cmp64Set, r=lth
This commit is contained in:
parent
19568675cf
commit
1868b7b280
@ -2838,6 +2838,14 @@ class BaseCompiler
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
masm.cmpq(rhs.reg.reg, lhs.reg.reg);
|
||||
masm.emitSet(cond, dest.reg);
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
Label done, condTrue;
|
||||
masm.branch64(cond, lhs.reg, rhs.reg, &condTrue);
|
||||
masm.move32(Imm32(0), dest.reg);
|
||||
masm.jump(&done);
|
||||
masm.bind(&condTrue);
|
||||
masm.move32(Imm32(1), dest.reg);
|
||||
masm.bind(&done);
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: cmp64Set");
|
||||
#endif
|
||||
@ -4171,6 +4179,7 @@ BaseCompiler::emitEqzI64()
|
||||
RegI32 i0 = fromI64(r0);
|
||||
cmp64Set(Assembler::Equal, r0, r1, i0);
|
||||
freeI64(r1);
|
||||
freeI64Except(r0, i0);
|
||||
pushI32(i0);
|
||||
}
|
||||
|
||||
@ -6053,6 +6062,7 @@ BaseCompiler::emitCompareI64(JSOp compareOp, MCompare::CompareType compareType)
|
||||
MOZ_CRASH("Compiler bug: Unexpected compare opcode");
|
||||
}
|
||||
freeI64(r1);
|
||||
freeI64Except(r0, i0);
|
||||
pushI32(i0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user