Bug 1608771 - Part 2, BigInt<>I64 conversion for inlined calls r=lth,wingo

This is part 2 of implementing the Wasm BigInt<>I64 conversion proposal for inlined Ion to Wasm calls.

This part adds an I64 return value case for LIonToWasmCall, which is needed in general because an I64
result may require multiple defs for the instruction.

Differential Revision: https://phabricator.services.mozilla.com/D65234
This commit is contained in:
Asumu Takikawa 2020-04-23 14:35:43 +00:00
parent 232bc61244
commit 7fb9908559
3 changed files with 13 additions and 0 deletions

View File

@ -14243,6 +14243,9 @@ void CodeGenerator::visitIonToWasmCall(LIonToWasmCall* lir) {
void CodeGenerator::visitIonToWasmCallV(LIonToWasmCallV* lir) {
emitIonToWasmCallBase(lir);
}
void CodeGenerator::visitIonToWasmCallI64(LIonToWasmCallI64* lir) {
emitIonToWasmCallBase(lir);
}
void CodeGenerator::visitWasmNullConstant(LWasmNullConstant* lir) {
masm.xorPtr(ToRegister(lir->output()), ToRegister(lir->output()));

View File

@ -5196,6 +5196,8 @@ void LIRGenerator::visitIonToWasmCall(MIonToWasmCall* ins) {
LInstruction* lir;
if (ins->type() == MIRType::Value) {
lir = allocateVariadic<LIonToWasmCallV>(ins->numOperands(), scratch, fp);
} else if (ins->type() == MIRType::Int64) {
lir = allocateVariadic<LIonToWasmCallI64>(ins->numOperands(), scratch, fp);
} else {
lir = allocateVariadic<LIonToWasmCall>(ins->numOperands(), scratch, fp);
}

View File

@ -7386,6 +7386,14 @@ class LIonToWasmCallV : public LIonToWasmCallBase<BOX_PIECES> {
: LIonToWasmCallBase<BOX_PIECES>(classOpcode, numOperands, temp, fp) {}
};
class LIonToWasmCallI64 : public LIonToWasmCallBase<INT64_PIECES> {
public:
LIR_HEADER(IonToWasmCallI64);
LIonToWasmCallI64(uint32_t numOperands, const LDefinition& temp,
const LDefinition& fp)
: LIonToWasmCallBase<INT64_PIECES>(classOpcode, numOperands, temp, fp) {}
};
class LWasmBoxValue : public LInstructionHelper<1, BOX_PIECES, 0> {
public:
LIR_HEADER(WasmBoxValue)