mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1286517: Rename AsmJS{Load,Store}GlobalVar to Wasm{Load,Store}GlobalVar; r=luke
MozReview-Commit-ID: E7vPsXm1WDs --HG-- extra : rebase_source : fe1d7e145352b0ba445e4633a1e9c3507eef28f7 extra : histedit_source : def439dcbda77437fdf9cbc0f76e4d9d18e52379
This commit is contained in:
parent
9b9c643025
commit
eb4fb58bdc
@ -2062,7 +2062,7 @@ class BaseCompiler
|
||||
{
|
||||
ScratchI32 scratch(*this);
|
||||
CodeOffset label = masm.loadRipRelativeInt64(scratch);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
masm.loadPtr(Operand(scratch, ptrReg, ScalePointer, 0), ptrReg);
|
||||
}
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
@ -2070,7 +2070,7 @@ class BaseCompiler
|
||||
{
|
||||
ScratchI32 scratch(*this);
|
||||
CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), scratch);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
masm.loadPtr(Operand(scratch, ptrReg, ScalePointer), ptrReg);
|
||||
}
|
||||
#else
|
||||
@ -2089,11 +2089,11 @@ class BaseCompiler
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
// CodeGeneratorX64::visitAsmJSLoadFFIFunc()
|
||||
CodeOffset label = masm.loadRipRelativeInt64(ptrReg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
// CodeGeneratorX86::visitAsmJSLoadFFIFunc()
|
||||
CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), ptrReg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: ffiCall");
|
||||
#endif
|
||||
@ -2665,10 +2665,10 @@ class BaseCompiler
|
||||
{
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
CodeOffset label = masm.loadRipRelativeInt32(r.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), r.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: loadGlobalVarI32");
|
||||
#endif
|
||||
@ -2678,7 +2678,7 @@ class BaseCompiler
|
||||
{
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
CodeOffset label = masm.loadRipRelativeInt64(r.reg.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: loadGlobalVarI64");
|
||||
#endif
|
||||
@ -2688,10 +2688,10 @@ class BaseCompiler
|
||||
{
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
CodeOffset label = masm.loadRipRelativeFloat32(r.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
CodeOffset label = masm.vmovssWithPatch(PatchedAbsoluteAddress(), r.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: loadGlobalVarF32");
|
||||
#endif
|
||||
@ -2701,10 +2701,10 @@ class BaseCompiler
|
||||
{
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
CodeOffset label = masm.loadRipRelativeDouble(r.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
CodeOffset label = masm.vmovsdWithPatch(PatchedAbsoluteAddress(), r.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: loadGlobalVarF32");
|
||||
#endif
|
||||
@ -2716,10 +2716,10 @@ class BaseCompiler
|
||||
{
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
CodeOffset label = masm.storeRipRelativeInt32(r.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
CodeOffset label = masm.movlWithPatch(r.reg, PatchedAbsoluteAddress());
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: storeGlobalVarI32");
|
||||
#endif
|
||||
@ -2729,7 +2729,7 @@ class BaseCompiler
|
||||
{
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
CodeOffset label = masm.storeRipRelativeInt64(r.reg.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: storeGlobalVarI64");
|
||||
#endif
|
||||
@ -2739,10 +2739,10 @@ class BaseCompiler
|
||||
{
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
CodeOffset label = masm.storeRipRelativeFloat32(r.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
CodeOffset label = masm.vmovssWithPatch(r.reg, PatchedAbsoluteAddress());
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: storeGlobalVarF32");
|
||||
#endif
|
||||
@ -2752,10 +2752,10 @@ class BaseCompiler
|
||||
{
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
CodeOffset label = masm.storeRipRelativeDouble(r.reg);
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
CodeOffset label = masm.vmovsdWithPatch(r.reg, PatchedAbsoluteAddress());
|
||||
masm.append(AsmJSGlobalAccess(label, globalDataOffset));
|
||||
masm.append(GlobalAccess(label, globalDataOffset));
|
||||
#else
|
||||
MOZ_CRASH("BaseCompiler platform hook: storeGlobalVarF64");
|
||||
#endif
|
||||
|
@ -517,8 +517,7 @@ ModuleGenerator::finishLinkData(Bytes& code)
|
||||
// Global data accesses in x86 need to be patched with the absolute
|
||||
// address of the global. Globals are allocated sequentially after the
|
||||
// code section so we can just use an InternalLink.
|
||||
for (size_t i = 0; i < masm_.numAsmJSGlobalAccesses(); i++) {
|
||||
AsmJSGlobalAccess a = masm_.asmJSGlobalAccess(i);
|
||||
for (GlobalAccess a : masm_.globalAccesses()) {
|
||||
LinkData::InternalLink inLink(LinkData::InternalLink::RawPointer);
|
||||
inLink.patchAtOffset = masm_.labelToPatchOffset(a.patchAt);
|
||||
inLink.targetOffset = code.length() + a.globalDataOffset;
|
||||
@ -528,15 +527,14 @@ ModuleGenerator::finishLinkData(Bytes& code)
|
||||
#elif defined(JS_CODEGEN_X64)
|
||||
// Global data accesses on x64 use rip-relative addressing and thus we can
|
||||
// patch here, now that we know the final codeLength.
|
||||
for (size_t i = 0; i < masm_.numAsmJSGlobalAccesses(); i++) {
|
||||
AsmJSGlobalAccess a = masm_.asmJSGlobalAccess(i);
|
||||
for (GlobalAccess a : masm_.globalAccesses()) {
|
||||
void* from = code.begin() + a.patchAt.offset();
|
||||
void* to = code.end() + a.globalDataOffset;
|
||||
X86Encoding::SetRel32(from, to);
|
||||
}
|
||||
#else
|
||||
// Global access is performed using the GlobalReg and requires no patching.
|
||||
MOZ_ASSERT(masm_.numAsmJSGlobalAccesses() == 0);
|
||||
MOZ_ASSERT(masm_.globalAccesses().length() == 0);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
@ -696,7 +696,7 @@ class FunctionCompiler
|
||||
if (inDeadCode())
|
||||
return nullptr;
|
||||
|
||||
auto* load = MAsmJSLoadGlobalVar::New(alloc(), type, globalDataOffset, isConst);
|
||||
auto* load = MWasmLoadGlobalVar::New(alloc(), type, globalDataOffset, isConst);
|
||||
curBlock_->add(load);
|
||||
return load;
|
||||
}
|
||||
@ -705,7 +705,7 @@ class FunctionCompiler
|
||||
{
|
||||
if (inDeadCode())
|
||||
return;
|
||||
curBlock_->add(MAsmJSStoreGlobalVar::New(alloc(), globalDataOffset, v));
|
||||
curBlock_->add(MWasmStoreGlobalVar::New(alloc(), globalDataOffset, v));
|
||||
}
|
||||
|
||||
void addInterruptCheck()
|
||||
|
@ -564,9 +564,9 @@ wasm::GenerateJitExit(MacroAssembler& masm, const FuncImport& fi, bool usesHeap)
|
||||
// 2.1. Get ExitDatum
|
||||
uint32_t globalDataOffset = fi.exitGlobalDataOffset();
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
masm.append(AsmJSGlobalAccess(masm.leaRipRelative(callee), globalDataOffset));
|
||||
masm.append(GlobalAccess(masm.leaRipRelative(callee), globalDataOffset));
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
masm.append(AsmJSGlobalAccess(masm.movlWithPatch(Imm32(0), callee), globalDataOffset));
|
||||
masm.append(GlobalAccess(masm.movlWithPatch(Imm32(0), callee), globalDataOffset));
|
||||
#elif defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64) || \
|
||||
defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
|
||||
masm.computeEffectiveAddress(Address(GlobalReg, globalDataOffset - AsmJSGlobalRegBias), callee);
|
||||
|
@ -146,8 +146,8 @@ GetObject(const MDefinition* ins)
|
||||
case MDefinition::Op_WasmStore:
|
||||
case MDefinition::Op_AsmJSCompareExchangeHeap:
|
||||
case MDefinition::Op_AsmJSAtomicBinopHeap:
|
||||
case MDefinition::Op_AsmJSLoadGlobalVar:
|
||||
case MDefinition::Op_AsmJSStoreGlobalVar:
|
||||
case MDefinition::Op_WasmLoadGlobalVar:
|
||||
case MDefinition::Op_WasmStoreGlobalVar:
|
||||
case MDefinition::Op_ArrayJoin:
|
||||
return nullptr;
|
||||
default:
|
||||
|
@ -4081,15 +4081,15 @@ LIRGenerator::visitHasClass(MHasClass* ins)
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitAsmJSLoadGlobalVar(MAsmJSLoadGlobalVar* ins)
|
||||
LIRGenerator::visitWasmLoadGlobalVar(MWasmLoadGlobalVar* ins)
|
||||
{
|
||||
define(new(alloc()) LAsmJSLoadGlobalVar, ins);
|
||||
define(new(alloc()) LWasmLoadGlobalVar, ins);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitAsmJSStoreGlobalVar(MAsmJSStoreGlobalVar* ins)
|
||||
LIRGenerator::visitWasmStoreGlobalVar(MWasmStoreGlobalVar* ins)
|
||||
{
|
||||
add(new(alloc()) LAsmJSStoreGlobalVar(useRegisterAtStart(ins->value())), ins);
|
||||
add(new(alloc()) LWasmStoreGlobalVar(useRegisterAtStart(ins->value())), ins);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -281,8 +281,8 @@ class LIRGenerator : public LIRGeneratorSpecific
|
||||
void visitIsConstructor(MIsConstructor* ins);
|
||||
void visitIsObject(MIsObject* ins);
|
||||
void visitHasClass(MHasClass* ins);
|
||||
void visitAsmJSLoadGlobalVar(MAsmJSLoadGlobalVar* ins);
|
||||
void visitAsmJSStoreGlobalVar(MAsmJSStoreGlobalVar* ins);
|
||||
void visitWasmLoadGlobalVar(MWasmLoadGlobalVar* ins);
|
||||
void visitWasmStoreGlobalVar(MWasmStoreGlobalVar* ins);
|
||||
void visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr* ins);
|
||||
void visitAsmJSLoadFFIFunc(MAsmJSLoadFFIFunc* ins);
|
||||
void visitAsmJSParameter(MAsmJSParameter* ins);
|
||||
|
@ -4899,10 +4899,11 @@ MAsmJSLoadHeap::congruentTo(const MDefinition* ins) const
|
||||
}
|
||||
|
||||
MDefinition::AliasType
|
||||
MAsmJSLoadGlobalVar::mightAlias(const MDefinition* def) const
|
||||
MWasmLoadGlobalVar::mightAlias(const MDefinition* def) const
|
||||
{
|
||||
if (def->isAsmJSStoreGlobalVar()) {
|
||||
const MAsmJSStoreGlobalVar* store = def->toAsmJSStoreGlobalVar();
|
||||
if (def->isWasmStoreGlobalVar()) {
|
||||
const MWasmStoreGlobalVar* store = def->toWasmStoreGlobalVar();
|
||||
// Global variables can't alias each other or be type-reinterpreted.
|
||||
return (store->globalDataOffset() == globalDataOffset_) ? AliasType::MayAlias :
|
||||
AliasType::NoAlias;
|
||||
}
|
||||
@ -4910,7 +4911,7 @@ MAsmJSLoadGlobalVar::mightAlias(const MDefinition* def) const
|
||||
}
|
||||
|
||||
HashNumber
|
||||
MAsmJSLoadGlobalVar::valueHash() const
|
||||
MWasmLoadGlobalVar::valueHash() const
|
||||
{
|
||||
HashNumber hash = MDefinition::valueHash();
|
||||
hash = addU32ToHash(hash, globalDataOffset_);
|
||||
@ -4918,22 +4919,20 @@ MAsmJSLoadGlobalVar::valueHash() const
|
||||
}
|
||||
|
||||
bool
|
||||
MAsmJSLoadGlobalVar::congruentTo(const MDefinition* ins) const
|
||||
MWasmLoadGlobalVar::congruentTo(const MDefinition* ins) const
|
||||
{
|
||||
if (ins->isAsmJSLoadGlobalVar()) {
|
||||
const MAsmJSLoadGlobalVar* load = ins->toAsmJSLoadGlobalVar();
|
||||
return globalDataOffset_ == load->globalDataOffset_;
|
||||
}
|
||||
if (ins->isWasmLoadGlobalVar())
|
||||
return globalDataOffset_ == ins->toWasmLoadGlobalVar()->globalDataOffset_;
|
||||
return false;
|
||||
}
|
||||
|
||||
MDefinition*
|
||||
MAsmJSLoadGlobalVar::foldsTo(TempAllocator& alloc)
|
||||
MWasmLoadGlobalVar::foldsTo(TempAllocator& alloc)
|
||||
{
|
||||
if (!dependency() || !dependency()->isAsmJSStoreGlobalVar())
|
||||
if (!dependency() || !dependency()->isWasmStoreGlobalVar())
|
||||
return this;
|
||||
|
||||
MAsmJSStoreGlobalVar* store = dependency()->toAsmJSStoreGlobalVar();
|
||||
MWasmStoreGlobalVar* store = dependency()->toWasmStoreGlobalVar();
|
||||
if (!store->block()->dominates(block()))
|
||||
return this;
|
||||
|
||||
|
@ -13281,9 +13281,9 @@ class MAsmJSAtomicBinopHeap
|
||||
}
|
||||
};
|
||||
|
||||
class MAsmJSLoadGlobalVar : public MNullaryInstruction
|
||||
class MWasmLoadGlobalVar : public MNullaryInstruction
|
||||
{
|
||||
MAsmJSLoadGlobalVar(MIRType type, unsigned globalDataOffset, bool isConstant)
|
||||
MWasmLoadGlobalVar(MIRType type, unsigned globalDataOffset, bool isConstant)
|
||||
: globalDataOffset_(globalDataOffset), isConstant_(isConstant)
|
||||
{
|
||||
MOZ_ASSERT(IsNumberType(type) || IsSimdType(type));
|
||||
@ -13295,7 +13295,7 @@ class MAsmJSLoadGlobalVar : public MNullaryInstruction
|
||||
bool isConstant_;
|
||||
|
||||
public:
|
||||
INSTRUCTION_HEADER(AsmJSLoadGlobalVar)
|
||||
INSTRUCTION_HEADER(WasmLoadGlobalVar)
|
||||
TRIVIAL_NEW_WRAPPERS
|
||||
|
||||
unsigned globalDataOffset() const { return globalDataOffset_; }
|
||||
@ -13311,18 +13311,18 @@ class MAsmJSLoadGlobalVar : public MNullaryInstruction
|
||||
AliasType mightAlias(const MDefinition* def) const override;
|
||||
};
|
||||
|
||||
class MAsmJSStoreGlobalVar
|
||||
class MWasmStoreGlobalVar
|
||||
: public MUnaryInstruction,
|
||||
public NoTypePolicy::Data
|
||||
{
|
||||
MAsmJSStoreGlobalVar(unsigned globalDataOffset, MDefinition* v)
|
||||
MWasmStoreGlobalVar(unsigned globalDataOffset, MDefinition* v)
|
||||
: MUnaryInstruction(v), globalDataOffset_(globalDataOffset)
|
||||
{}
|
||||
|
||||
unsigned globalDataOffset_;
|
||||
|
||||
public:
|
||||
INSTRUCTION_HEADER(AsmJSStoreGlobalVar)
|
||||
INSTRUCTION_HEADER(WasmStoreGlobalVar)
|
||||
TRIVIAL_NEW_WRAPPERS
|
||||
|
||||
unsigned globalDataOffset() const { return globalDataOffset_; }
|
||||
|
@ -278,8 +278,8 @@ namespace jit {
|
||||
_(AsmJSUnsignedToFloat32) \
|
||||
_(AsmJSLoadHeap) \
|
||||
_(AsmJSStoreHeap) \
|
||||
_(AsmJSLoadGlobalVar) \
|
||||
_(AsmJSStoreGlobalVar) \
|
||||
_(WasmLoadGlobalVar) \
|
||||
_(WasmStoreGlobalVar) \
|
||||
_(AsmJSLoadFuncPtr) \
|
||||
_(AsmJSLoadFFIFunc) \
|
||||
_(AsmJSReturn) \
|
||||
|
@ -2695,9 +2695,9 @@ CodeGeneratorARM::visitEffectiveAddress(LEffectiveAddress* ins)
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorARM::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins)
|
||||
CodeGeneratorARM::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins)
|
||||
{
|
||||
const MAsmJSLoadGlobalVar* mir = ins->mir();
|
||||
const MWasmLoadGlobalVar* mir = ins->mir();
|
||||
unsigned addr = mir->globalDataOffset() - AsmJSGlobalRegBias;
|
||||
if (mir->type() == MIRType::Int32) {
|
||||
masm.ma_dtr(IsLoad, GlobalReg, Imm32(addr), ToRegister(ins->output()));
|
||||
@ -2705,14 +2705,15 @@ CodeGeneratorARM::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins)
|
||||
VFPRegister vd(ToFloatRegister(ins->output()));
|
||||
masm.ma_vldr(Address(GlobalReg, addr), vd.singleOverlay());
|
||||
} else {
|
||||
MOZ_ASSERT(mir->type() == MIRType::Double);
|
||||
masm.ma_vldr(Address(GlobalReg, addr), ToFloatRegister(ins->output()));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorARM::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins)
|
||||
CodeGeneratorARM::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins)
|
||||
{
|
||||
const MAsmJSStoreGlobalVar* mir = ins->mir();
|
||||
const MWasmStoreGlobalVar* mir = ins->mir();
|
||||
|
||||
MIRType type = mir->value()->type();
|
||||
MOZ_ASSERT(IsNumberType(type));
|
||||
@ -2724,6 +2725,7 @@ CodeGeneratorARM::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins)
|
||||
VFPRegister vd(ToFloatRegister(ins->value()));
|
||||
masm.ma_vstr(vd.singleOverlay(), Address(GlobalReg, addr));
|
||||
} else {
|
||||
MOZ_ASSERT(mir->type() == MIRType::Double);
|
||||
masm.ma_vstr(ToFloatRegister(ins->value()), Address(GlobalReg, addr));
|
||||
}
|
||||
}
|
||||
|
@ -206,6 +206,8 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
||||
void visitWasmBoundsCheck(LWasmBoundsCheck* ins);
|
||||
void visitWasmLoad(LWasmLoad* ins);
|
||||
void visitWasmStore(LWasmStore* ins);
|
||||
void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins);
|
||||
void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins);
|
||||
void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
|
||||
void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
|
||||
void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap* ins);
|
||||
@ -215,8 +217,6 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
||||
void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins);
|
||||
void visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEffect* ins);
|
||||
void visitAsmJSAtomicBinopCallout(LAsmJSAtomicBinopCallout* ins);
|
||||
void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins);
|
||||
void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins);
|
||||
void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins);
|
||||
void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins);
|
||||
void visitAsmJSPassStackArg(LAsmJSPassStackArg* ins);
|
||||
|
@ -692,15 +692,15 @@ CodeGeneratorARM64::visitEffectiveAddress(LEffectiveAddress* ins)
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorARM64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins)
|
||||
CodeGeneratorARM64::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins)
|
||||
{
|
||||
MOZ_CRASH("visitAsmJSLoadGlobalVar");
|
||||
MOZ_CRASH("visitWasmLoadGlobalVar");
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorARM64::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins)
|
||||
CodeGeneratorARM64::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins)
|
||||
{
|
||||
MOZ_CRASH("visitAsmJSStoreGlobalVar");
|
||||
MOZ_CRASH("visitWasmStoreGlobalVar");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -203,12 +203,13 @@ class CodeGeneratorARM64 : public CodeGeneratorShared
|
||||
void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
|
||||
void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap* ins);
|
||||
void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins);
|
||||
void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins);
|
||||
void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins);
|
||||
void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins);
|
||||
void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins);
|
||||
void visitAsmJSPassStackArg(LAsmJSPassStackArg* ins);
|
||||
|
||||
void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins);
|
||||
void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins);
|
||||
|
||||
void generateInvalidateEpilogue();
|
||||
|
||||
void setReturnDoubleRegs(LiveRegisterSet* regs);
|
||||
|
@ -2105,9 +2105,9 @@ CodeGeneratorMIPSShared::visitEffectiveAddress(LEffectiveAddress* ins)
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorMIPSShared::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins)
|
||||
CodeGeneratorMIPSShared::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins)
|
||||
{
|
||||
const MAsmJSLoadGlobalVar* mir = ins->mir();
|
||||
const MWasmLoadGlobalVar* mir = ins->mir();
|
||||
unsigned addr = mir->globalDataOffset() - AsmJSGlobalRegBias;
|
||||
if (mir->type() == MIRType::Int32)
|
||||
masm.load32(Address(GlobalReg, addr), ToRegister(ins->output()));
|
||||
@ -2118,9 +2118,9 @@ CodeGeneratorMIPSShared::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins)
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorMIPSShared::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins)
|
||||
CodeGeneratorMIPSShared::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins)
|
||||
{
|
||||
const MAsmJSStoreGlobalVar* mir = ins->mir();
|
||||
const MWasmStoreGlobalVar* mir = ins->mir();
|
||||
|
||||
MOZ_ASSERT(IsNumberType(mir->value()->type()));
|
||||
unsigned addr = mir->globalDataOffset() - AsmJSGlobalRegBias;
|
||||
|
@ -165,6 +165,8 @@ class CodeGeneratorMIPSShared : public CodeGeneratorShared
|
||||
virtual void visitTruncateFToInt32(LTruncateFToInt32* ins);
|
||||
|
||||
void visitWasmTruncateToInt32(LWasmTruncateToInt32* lir);
|
||||
void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins);
|
||||
void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins);
|
||||
|
||||
// Out of line visitors.
|
||||
virtual void visitOutOfLineBailout(OutOfLineBailout* ool) = 0;
|
||||
@ -199,8 +201,6 @@ class CodeGeneratorMIPSShared : public CodeGeneratorShared
|
||||
void visitAsmJSAtomicExchangeHeap(LAsmJSAtomicExchangeHeap* ins);
|
||||
void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins);
|
||||
void visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEffect* ins);
|
||||
void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins);
|
||||
void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins);
|
||||
void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins);
|
||||
void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins);
|
||||
|
||||
|
@ -680,16 +680,6 @@ struct AsmJSFrame
|
||||
static_assert(sizeof(AsmJSFrame) == 2 * sizeof(void*), "?!");
|
||||
static const uint32_t AsmJSFrameBytesAfterReturnAddress = sizeof(void*);
|
||||
|
||||
struct AsmJSGlobalAccess
|
||||
{
|
||||
CodeOffset patchAt;
|
||||
unsigned globalDataOffset;
|
||||
|
||||
AsmJSGlobalAccess(CodeOffset patchAt, unsigned globalDataOffset)
|
||||
: patchAt(patchAt), globalDataOffset(globalDataOffset)
|
||||
{}
|
||||
};
|
||||
|
||||
// Represents an instruction to be patched and the intended pointee. These
|
||||
// links are accumulated in the MacroAssembler, but patching is done outside
|
||||
// the MacroAssembler (in Module::staticallyLink).
|
||||
@ -702,6 +692,29 @@ struct AsmJSAbsoluteAddress
|
||||
wasm::SymbolicAddress target;
|
||||
};
|
||||
|
||||
} // namespace jit
|
||||
|
||||
namespace wasm {
|
||||
|
||||
// Summarizes a global access for a mutable (in asm.js) or immutable value (in
|
||||
// asm.js or the MVP) that needs to get patched later.
|
||||
|
||||
struct GlobalAccess
|
||||
{
|
||||
GlobalAccess(jit::CodeOffset patchAt, unsigned globalDataOffset)
|
||||
: patchAt(patchAt), globalDataOffset(globalDataOffset)
|
||||
{}
|
||||
|
||||
jit::CodeOffset patchAt;
|
||||
unsigned globalDataOffset;
|
||||
};
|
||||
|
||||
typedef Vector<GlobalAccess, 0, SystemAllocPolicy> GlobalAccessVector;
|
||||
|
||||
} // namespace wasm
|
||||
|
||||
namespace jit {
|
||||
|
||||
// The base class of all Assemblers for all archs.
|
||||
class AssemblerShared
|
||||
{
|
||||
@ -709,7 +722,7 @@ class AssemblerShared
|
||||
wasm::JumpSiteArray jumpsites_;
|
||||
wasm::MemoryAccessVector memoryAccesses_;
|
||||
wasm::BoundsCheckVector boundsChecks_;
|
||||
Vector<AsmJSGlobalAccess, 0, SystemAllocPolicy> asmJSGlobalAccesses_;
|
||||
wasm::GlobalAccessVector globalAccesses_;
|
||||
Vector<AsmJSAbsoluteAddress, 0, SystemAllocPolicy> asmJSAbsoluteAddresses_;
|
||||
|
||||
protected:
|
||||
@ -762,9 +775,8 @@ class AssemblerShared
|
||||
void append(wasm::BoundsCheck check) { enoughMemory_ &= boundsChecks_.append(check); }
|
||||
wasm::BoundsCheckVector&& extractBoundsChecks() { return Move(boundsChecks_); }
|
||||
|
||||
void append(AsmJSGlobalAccess access) { enoughMemory_ &= asmJSGlobalAccesses_.append(access); }
|
||||
size_t numAsmJSGlobalAccesses() const { return asmJSGlobalAccesses_.length(); }
|
||||
AsmJSGlobalAccess asmJSGlobalAccess(size_t i) const { return asmJSGlobalAccesses_[i]; }
|
||||
void append(wasm::GlobalAccess access) { enoughMemory_ &= globalAccesses_.append(access); }
|
||||
const wasm::GlobalAccessVector& globalAccesses() const { return globalAccesses_; }
|
||||
|
||||
void append(AsmJSAbsoluteAddress link) { enoughMemory_ &= asmJSAbsoluteAddresses_.append(link); }
|
||||
size_t numAsmJSAbsoluteAddresses() const { return asmJSAbsoluteAddresses_.length(); }
|
||||
@ -808,10 +820,10 @@ class AssemblerShared
|
||||
for (; i < boundsChecks_.length(); i++)
|
||||
boundsChecks_[i].offsetBy(delta);
|
||||
|
||||
i = asmJSGlobalAccesses_.length();
|
||||
enoughMemory_ &= asmJSGlobalAccesses_.appendAll(other.asmJSGlobalAccesses_);
|
||||
for (; i < asmJSGlobalAccesses_.length(); i++)
|
||||
asmJSGlobalAccesses_[i].patchAt.offsetBy(delta);
|
||||
i = globalAccesses_.length();
|
||||
enoughMemory_ &= globalAccesses_.appendAll(other.globalAccesses_);
|
||||
for (; i < globalAccesses_.length(); i++)
|
||||
globalAccesses_[i].patchAt.offsetBy(delta);
|
||||
|
||||
i = asmJSAbsoluteAddresses_.length();
|
||||
enoughMemory_ &= asmJSAbsoluteAddresses_.appendAll(other.asmJSAbsoluteAddresses_);
|
||||
|
@ -8046,24 +8046,24 @@ class LAsmJSAtomicBinopHeapForEffect : public LInstructionHelper<0, 2, 5>
|
||||
}
|
||||
};
|
||||
|
||||
class LAsmJSLoadGlobalVar : public LInstructionHelper<1, 0, 0>
|
||||
class LWasmLoadGlobalVar : public LInstructionHelper<1, 0, 0>
|
||||
{
|
||||
public:
|
||||
LIR_HEADER(AsmJSLoadGlobalVar);
|
||||
MAsmJSLoadGlobalVar* mir() const {
|
||||
return mir_->toAsmJSLoadGlobalVar();
|
||||
LIR_HEADER(WasmLoadGlobalVar);
|
||||
MWasmLoadGlobalVar* mir() const {
|
||||
return mir_->toWasmLoadGlobalVar();
|
||||
}
|
||||
};
|
||||
|
||||
class LAsmJSStoreGlobalVar : public LInstructionHelper<0, 1, 0>
|
||||
class LWasmStoreGlobalVar : public LInstructionHelper<0, 1, 0>
|
||||
{
|
||||
public:
|
||||
LIR_HEADER(AsmJSStoreGlobalVar);
|
||||
explicit LAsmJSStoreGlobalVar(const LAllocation& value) {
|
||||
LIR_HEADER(WasmStoreGlobalVar);
|
||||
explicit LWasmStoreGlobalVar(const LAllocation& value) {
|
||||
setOperand(0, value);
|
||||
}
|
||||
MAsmJSStoreGlobalVar* mir() const {
|
||||
return mir_->toAsmJSStoreGlobalVar();
|
||||
MWasmStoreGlobalVar* mir() const {
|
||||
return mir_->toWasmStoreGlobalVar();
|
||||
}
|
||||
const LAllocation* value() {
|
||||
return getOperand(0);
|
||||
|
@ -389,11 +389,11 @@
|
||||
_(WasmLoadI64) \
|
||||
_(WasmStore) \
|
||||
_(WasmBoundsCheck) \
|
||||
_(WasmLoadGlobalVar) \
|
||||
_(WasmStoreGlobalVar) \
|
||||
_(AsmJSLoadHeap) \
|
||||
_(AsmJSStoreHeap) \
|
||||
_(AsmJSLoadFuncPtr) \
|
||||
_(AsmJSLoadGlobalVar) \
|
||||
_(AsmJSStoreGlobalVar) \
|
||||
_(AsmJSLoadFFIFunc) \
|
||||
_(AsmJSParameter) \
|
||||
_(AsmJSReturn) \
|
||||
|
@ -827,11 +827,11 @@ class Assembler : public AssemblerX86Shared
|
||||
|
||||
void loadWasmActivation(Register dest) {
|
||||
CodeOffset label = loadRipRelativeInt64(dest);
|
||||
append(AsmJSGlobalAccess(label, wasm::ActivationGlobalDataOffset));
|
||||
append(wasm::GlobalAccess(label, wasm::ActivationGlobalDataOffset));
|
||||
}
|
||||
void loadAsmJSHeapRegisterFromGlobalData() {
|
||||
CodeOffset label = loadRipRelativeInt64(HeapReg);
|
||||
append(AsmJSGlobalAccess(label, wasm::HeapGlobalDataOffset));
|
||||
append(wasm::GlobalAccess(label, wasm::HeapGlobalDataOffset));
|
||||
}
|
||||
|
||||
void cmpq(Register rhs, Register lhs) {
|
||||
|
@ -1173,9 +1173,9 @@ CodeGeneratorX64::visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEff
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins)
|
||||
CodeGeneratorX64::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins)
|
||||
{
|
||||
MAsmJSLoadGlobalVar* mir = ins->mir();
|
||||
MWasmLoadGlobalVar* mir = ins->mir();
|
||||
|
||||
MIRType type = mir->type();
|
||||
MOZ_ASSERT(IsNumberType(type) || IsSimdType(type));
|
||||
@ -1205,16 +1205,16 @@ CodeGeneratorX64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins)
|
||||
label = masm.loadRipRelativeFloat32x4(ToFloatRegister(ins->output()));
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected type in visitAsmJSLoadGlobalVar");
|
||||
MOZ_CRASH("unexpected type in visitWasmLoadGlobalVar");
|
||||
}
|
||||
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
masm.append(wasm::GlobalAccess(label, mir->globalDataOffset()));
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins)
|
||||
CodeGeneratorX64::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins)
|
||||
{
|
||||
MAsmJSStoreGlobalVar* mir = ins->mir();
|
||||
MWasmStoreGlobalVar* mir = ins->mir();
|
||||
|
||||
MIRType type = mir->value()->type();
|
||||
MOZ_ASSERT(IsNumberType(type) || IsSimdType(type));
|
||||
@ -1240,10 +1240,10 @@ CodeGeneratorX64::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins)
|
||||
label = masm.storeRipRelativeFloat32x4(ToFloatRegister(ins->value()));
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected type in visitAsmJSStoreGlobalVar");
|
||||
MOZ_CRASH("unexpected type in visitWasmStoreGlobalVar");
|
||||
}
|
||||
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
masm.append(wasm::GlobalAccess(label, mir->globalDataOffset()));
|
||||
}
|
||||
|
||||
void
|
||||
@ -1260,7 +1260,7 @@ CodeGeneratorX64::visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins)
|
||||
}
|
||||
|
||||
CodeOffset label = masm.loadRipRelativeInt64(out);
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
masm.append(wasm::GlobalAccess(label, mir->globalDataOffset()));
|
||||
|
||||
masm.loadPtr(Operand(out, index, ScalePointer, 0), out);
|
||||
}
|
||||
@ -1271,7 +1271,7 @@ CodeGeneratorX64::visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins)
|
||||
MAsmJSLoadFFIFunc* mir = ins->mir();
|
||||
|
||||
CodeOffset label = masm.loadRipRelativeInt64(ToRegister(ins->output()));
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
masm.append(wasm::GlobalAccess(label, mir->globalDataOffset()));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -75,6 +75,8 @@ class CodeGeneratorX64 : public CodeGeneratorX86Shared
|
||||
void visitWasmLoad(LWasmLoad* ins);
|
||||
void visitWasmLoadI64(LWasmLoadI64* ins);
|
||||
void visitWasmStore(LWasmStore* ins);
|
||||
void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins);
|
||||
void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins);
|
||||
void visitAsmSelectI64(LAsmSelectI64* ins);
|
||||
void visitAsmJSCall(LAsmJSCall* ins);
|
||||
void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
|
||||
@ -83,8 +85,6 @@ class CodeGeneratorX64 : public CodeGeneratorX86Shared
|
||||
void visitAsmJSAtomicExchangeHeap(LAsmJSAtomicExchangeHeap* ins);
|
||||
void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins);
|
||||
void visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEffect* ins);
|
||||
void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins);
|
||||
void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins);
|
||||
void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins);
|
||||
void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins);
|
||||
void visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble* lir);
|
||||
|
@ -922,7 +922,7 @@ class Assembler : public AssemblerX86Shared
|
||||
|
||||
void loadWasmActivation(Register dest) {
|
||||
CodeOffset label = movlWithPatch(PatchedAbsoluteAddress(), dest);
|
||||
append(AsmJSGlobalAccess(label, wasm::ActivationGlobalDataOffset));
|
||||
append(wasm::GlobalAccess(label, wasm::ActivationGlobalDataOffset));
|
||||
}
|
||||
void loadAsmJSHeapRegisterFromGlobalData() {
|
||||
// x86 doesn't have a pinned heap register.
|
||||
|
@ -831,9 +831,9 @@ CodeGeneratorX86::visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEff
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins)
|
||||
CodeGeneratorX86::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins)
|
||||
{
|
||||
MAsmJSLoadGlobalVar* mir = ins->mir();
|
||||
MWasmLoadGlobalVar* mir = ins->mir();
|
||||
MIRType type = mir->type();
|
||||
MOZ_ASSERT(IsNumberType(type) || IsSimdType(type));
|
||||
|
||||
@ -862,15 +862,15 @@ CodeGeneratorX86::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins)
|
||||
label = masm.vmovapsWithPatch(PatchedAbsoluteAddress(), ToFloatRegister(ins->output()));
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected type in visitAsmJSLoadGlobalVar");
|
||||
MOZ_CRASH("unexpected type in visitWasmLoadGlobalVar");
|
||||
}
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
masm.append(wasm::GlobalAccess(label, mir->globalDataOffset()));
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins)
|
||||
CodeGeneratorX86::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins)
|
||||
{
|
||||
MAsmJSStoreGlobalVar* mir = ins->mir();
|
||||
MWasmStoreGlobalVar* mir = ins->mir();
|
||||
|
||||
MIRType type = mir->value()->type();
|
||||
MOZ_ASSERT(IsNumberType(type) || IsSimdType(type));
|
||||
@ -896,9 +896,9 @@ CodeGeneratorX86::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins)
|
||||
label = masm.vmovapsWithPatch(ToFloatRegister(ins->value()), PatchedAbsoluteAddress());
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected type in visitAsmJSStoreGlobalVar");
|
||||
MOZ_CRASH("unexpected type in visitWasmStoreGlobalVar");
|
||||
}
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
masm.append(wasm::GlobalAccess(label, mir->globalDataOffset()));
|
||||
}
|
||||
|
||||
void
|
||||
@ -915,7 +915,7 @@ CodeGeneratorX86::visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins)
|
||||
}
|
||||
|
||||
CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), out);
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
masm.append(wasm::GlobalAccess(label, mir->globalDataOffset()));
|
||||
|
||||
masm.loadPtr(Operand(out, index, ScalePointer), out);
|
||||
}
|
||||
@ -927,7 +927,7 @@ CodeGeneratorX86::visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins)
|
||||
|
||||
Register out = ToRegister(ins->output());
|
||||
CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), out);
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
masm.append(wasm::GlobalAccess(label, mir->globalDataOffset()));
|
||||
}
|
||||
|
||||
namespace js {
|
||||
|
@ -60,14 +60,14 @@ class CodeGeneratorX86 : public CodeGeneratorX86Shared
|
||||
void visitAsmJSCall(LAsmJSCall* ins);
|
||||
void visitWasmLoad(LWasmLoad* ins);
|
||||
void visitWasmStore(LWasmStore* ins);
|
||||
void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins);
|
||||
void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins);
|
||||
void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
|
||||
void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
|
||||
void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap* ins);
|
||||
void visitAsmJSAtomicExchangeHeap(LAsmJSAtomicExchangeHeap* ins);
|
||||
void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins);
|
||||
void visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEffect* ins);
|
||||
void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins);
|
||||
void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins);
|
||||
void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins);
|
||||
void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins);
|
||||
void visitWasmTruncateToInt32(LWasmTruncateToInt32* ins);
|
||||
|
Loading…
Reference in New Issue
Block a user