зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446315 - Use a macro to declare all visit functions in Lowering.h. r=nbp
This commit is contained in:
Родитель
eec502d797
Коммит
aafdb7cac4
|
@ -5195,6 +5195,61 @@ LIRGenerator::visitGetPrototypeOf(MGetPrototypeOf* ins)
|
|||
assignSafepoint(lir, ins);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitConstant(MConstant* ins)
|
||||
{
|
||||
if (!IsFloatingPointType(ins->type()) && ins->canEmitAtUses()) {
|
||||
emitAtUses(ins);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (ins->type()) {
|
||||
case MIRType::Double:
|
||||
define(new(alloc()) LDouble(ins->toDouble()), ins);
|
||||
break;
|
||||
case MIRType::Float32:
|
||||
define(new(alloc()) LFloat32(ins->toFloat32()), ins);
|
||||
break;
|
||||
case MIRType::Boolean:
|
||||
define(new(alloc()) LInteger(ins->toBoolean()), ins);
|
||||
break;
|
||||
case MIRType::Int32:
|
||||
define(new(alloc()) LInteger(ins->toInt32()), ins);
|
||||
break;
|
||||
case MIRType::Int64:
|
||||
defineInt64(new(alloc()) LInteger64(ins->toInt64()), ins);
|
||||
break;
|
||||
case MIRType::String:
|
||||
define(new(alloc()) LPointer(ins->toString()), ins);
|
||||
break;
|
||||
case MIRType::Symbol:
|
||||
define(new(alloc()) LPointer(ins->toSymbol()), ins);
|
||||
break;
|
||||
case MIRType::Object:
|
||||
define(new(alloc()) LPointer(&ins->toObject()), ins);
|
||||
break;
|
||||
default:
|
||||
// Constants of special types (undefined, null) should never flow into
|
||||
// here directly. Operations blindly consuming them require a Box.
|
||||
MOZ_CRASH("unexpected constant type");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitWasmFloatConstant(MWasmFloatConstant* ins)
|
||||
{
|
||||
switch (ins->type()) {
|
||||
case MIRType::Double:
|
||||
define(new(alloc()) LDouble(ins->toDouble()), ins);
|
||||
break;
|
||||
case MIRType::Float32:
|
||||
define(new(alloc()) LFloat32(ins->toFloat32()), ins);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected constant type");
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef JS_JITSPEW
|
||||
static void
|
||||
SpewResumePoint(MBasicBlock* block, MInstruction* ins, MResumePoint* resumePoint)
|
||||
|
@ -5228,13 +5283,19 @@ SpewResumePoint(MBasicBlock* block, MInstruction* ins, MResumePoint* resumePoint
|
|||
void
|
||||
LIRGenerator::visitInstructionDispatch(MInstruction* ins)
|
||||
{
|
||||
#ifdef JS_CODEGEN_NONE
|
||||
// Don't compile the switch-statement below so that we don't have to define
|
||||
// the platform-specific visit* methods for the none-backend.
|
||||
MOZ_CRASH();
|
||||
#else
|
||||
switch (ins->op()) {
|
||||
#define MIR_OP(op) case MDefinition::Opcode::op: visit##op(ins->to##op()); break;
|
||||
# define MIR_OP(op) case MDefinition::Opcode::op: visit##op(ins->to##op()); break;
|
||||
MIR_OPCODE_LIST(MIR_OP)
|
||||
#undef MIR_OP
|
||||
# undef MIR_OP
|
||||
default:
|
||||
MOZ_CRASH("Invalid instruction");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -66,297 +66,15 @@ class LIRGenerator final : public LIRGeneratorSpecific
|
|||
template <typename LClass>
|
||||
LInstruction* lowerWasmCall(MWasmCall* ins, bool needsBoundsCheck);
|
||||
|
||||
public:
|
||||
friend class LIRGeneratorShared;
|
||||
void visitInstructionDispatch(MInstruction* ins);
|
||||
|
||||
MOZ_MUST_USE bool visitInstruction(MInstruction* ins);
|
||||
MOZ_MUST_USE bool visitBlock(MBasicBlock* block);
|
||||
|
||||
// Visitor hooks are explicit, to give CPU-specific versions a chance to
|
||||
// intercept without a bunch of explicit gunk in the .cpp.
|
||||
void visitCloneLiteral(MCloneLiteral* ins);
|
||||
void visitParameter(MParameter* param);
|
||||
void visitCallee(MCallee* callee);
|
||||
void visitIsConstructing(MIsConstructing* ins);
|
||||
void visitGoto(MGoto* ins);
|
||||
void visitTableSwitch(MTableSwitch* tableswitch);
|
||||
void visitNewArray(MNewArray* ins);
|
||||
void visitNewArrayCopyOnWrite(MNewArrayCopyOnWrite* ins);
|
||||
void visitNewArrayDynamicLength(MNewArrayDynamicLength* ins);
|
||||
void visitNewIterator(MNewIterator* ins);
|
||||
void visitNewTypedArray(MNewTypedArray* ins);
|
||||
void visitNewTypedArrayDynamicLength(MNewTypedArrayDynamicLength* ins);
|
||||
void visitNewObject(MNewObject* ins);
|
||||
void visitNewTypedObject(MNewTypedObject* ins);
|
||||
void visitNewNamedLambdaObject(MNewNamedLambdaObject* ins);
|
||||
void visitNewCallObject(MNewCallObject* ins);
|
||||
void visitNewSingletonCallObject(MNewSingletonCallObject* ins);
|
||||
void visitNewStringObject(MNewStringObject* ins);
|
||||
void visitNewDerivedTypedObject(MNewDerivedTypedObject* ins);
|
||||
void visitInitElem(MInitElem* ins);
|
||||
void visitInitElemGetterSetter(MInitElemGetterSetter* ins);
|
||||
void visitMutateProto(MMutateProto* ins);
|
||||
void visitInitPropGetterSetter(MInitPropGetterSetter* ins);
|
||||
void visitCheckOverRecursed(MCheckOverRecursed* ins);
|
||||
void visitDefVar(MDefVar* ins);
|
||||
void visitDefLexical(MDefLexical* ins);
|
||||
void visitDefFun(MDefFun* ins);
|
||||
void visitCreateThisWithTemplate(MCreateThisWithTemplate* ins);
|
||||
void visitCreateThisWithProto(MCreateThisWithProto* ins);
|
||||
void visitCreateThis(MCreateThis* ins);
|
||||
void visitCreateArgumentsObject(MCreateArgumentsObject* ins);
|
||||
void visitGetArgumentsObjectArg(MGetArgumentsObjectArg* ins);
|
||||
void visitSetArgumentsObjectArg(MSetArgumentsObjectArg* ins);
|
||||
void visitReturnFromCtor(MReturnFromCtor* ins);
|
||||
void visitComputeThis(MComputeThis* ins);
|
||||
void visitImplicitThis(MImplicitThis* ins);
|
||||
void visitCall(MCall* call);
|
||||
void visitApplyArgs(MApplyArgs* apply);
|
||||
void visitApplyArray(MApplyArray* apply);
|
||||
void visitBail(MBail* bail);
|
||||
void visitUnreachable(MUnreachable* unreachable);
|
||||
void visitEncodeSnapshot(MEncodeSnapshot* ins);
|
||||
void visitAssertFloat32(MAssertFloat32* ins);
|
||||
void visitAssertRecoveredOnBailout(MAssertRecoveredOnBailout* ins);
|
||||
void visitGetDynamicName(MGetDynamicName* ins);
|
||||
void visitCallDirectEval(MCallDirectEval* ins);
|
||||
void visitTest(MTest* test);
|
||||
void visitGotoWithFake(MGotoWithFake* ins);
|
||||
void visitFunctionDispatch(MFunctionDispatch* ins);
|
||||
void visitObjectGroupDispatch(MObjectGroupDispatch* ins);
|
||||
void visitCompare(MCompare* comp);
|
||||
void visitSameValue(MSameValue* comp);
|
||||
void visitTypeOf(MTypeOf* ins);
|
||||
void visitToAsync(MToAsync* ins);
|
||||
void visitToAsyncGen(MToAsyncGen* ins);
|
||||
void visitToAsyncIter(MToAsyncIter* ins);
|
||||
void visitToId(MToId* ins);
|
||||
void visitBitNot(MBitNot* ins);
|
||||
void visitBitAnd(MBitAnd* ins);
|
||||
void visitBitOr(MBitOr* ins);
|
||||
void visitBitXor(MBitXor* ins);
|
||||
void visitLsh(MLsh* ins);
|
||||
void visitRsh(MRsh* ins);
|
||||
void visitUrsh(MUrsh* ins);
|
||||
void visitSignExtendInt32(MSignExtendInt32* ins);
|
||||
void visitRotate(MRotate* ins);
|
||||
void visitFloor(MFloor* ins);
|
||||
void visitCeil(MCeil* ins);
|
||||
void visitRound(MRound* ins);
|
||||
void visitNearbyInt(MNearbyInt* ins);
|
||||
void visitMinMax(MMinMax* ins);
|
||||
void visitAbs(MAbs* ins);
|
||||
void visitClz(MClz* ins);
|
||||
void visitCtz(MCtz* ins);
|
||||
void visitSqrt(MSqrt* ins);
|
||||
void visitPopcnt(MPopcnt* ins);
|
||||
void visitAtan2(MAtan2* ins);
|
||||
void visitHypot(MHypot* ins);
|
||||
void visitPow(MPow* ins);
|
||||
void visitMathFunction(MMathFunction* ins);
|
||||
void visitAdd(MAdd* ins);
|
||||
void visitSub(MSub* ins);
|
||||
void visitMul(MMul* ins);
|
||||
void visitDiv(MDiv* ins);
|
||||
void visitMod(MMod* ins);
|
||||
void visitConcat(MConcat* ins);
|
||||
void visitCharCodeAt(MCharCodeAt* ins);
|
||||
void visitFromCharCode(MFromCharCode* ins);
|
||||
void visitFromCodePoint(MFromCodePoint* ins);
|
||||
void visitStringConvertCase(MStringConvertCase* ins);
|
||||
void visitSinCos(MSinCos *ins);
|
||||
void visitStringSplit(MStringSplit* ins);
|
||||
void visitStart(MStart* start);
|
||||
void visitOsrEntry(MOsrEntry* entry);
|
||||
void visitNop(MNop* nop);
|
||||
void visitLimitedTruncate(MLimitedTruncate* nop);
|
||||
void visitOsrValue(MOsrValue* value);
|
||||
void visitOsrEnvironmentChain(MOsrEnvironmentChain* object);
|
||||
void visitOsrReturnValue(MOsrReturnValue* value);
|
||||
void visitOsrArgumentsObject(MOsrArgumentsObject* object);
|
||||
void visitToDouble(MToDouble* convert);
|
||||
void visitToFloat32(MToFloat32* convert);
|
||||
void visitToNumberInt32(MToNumberInt32* convert);
|
||||
void visitTruncateToInt32(MTruncateToInt32* truncate);
|
||||
void visitWasmTruncateToInt32(MWasmTruncateToInt32* truncate);
|
||||
void visitWrapInt64ToInt32(MWrapInt64ToInt32* ins);
|
||||
void visitToString(MToString* convert);
|
||||
void visitToObject(MToObject* convert);
|
||||
void visitToObjectOrNull(MToObjectOrNull* convert);
|
||||
void visitRegExp(MRegExp* ins);
|
||||
void visitRegExpMatcher(MRegExpMatcher* ins);
|
||||
void visitRegExpSearcher(MRegExpSearcher* ins);
|
||||
void visitRegExpTester(MRegExpTester* ins);
|
||||
void visitRegExpPrototypeOptimizable(MRegExpPrototypeOptimizable* ins);
|
||||
void visitRegExpInstanceOptimizable(MRegExpInstanceOptimizable* ins);
|
||||
void visitGetFirstDollarIndex(MGetFirstDollarIndex* ins);
|
||||
void visitStringReplace(MStringReplace* ins);
|
||||
void visitBinarySharedStub(MBinarySharedStub* ins);
|
||||
void visitUnarySharedStub(MUnarySharedStub* ins);
|
||||
void visitNullarySharedStub(MNullarySharedStub* ins);
|
||||
void visitClassConstructor(MClassConstructor* ins);
|
||||
void visitLambda(MLambda* ins);
|
||||
void visitLambdaArrow(MLambdaArrow* ins);
|
||||
void visitSetFunName(MSetFunName* ins);
|
||||
void visitNewLexicalEnvironmentObject(MNewLexicalEnvironmentObject* ins);
|
||||
void visitCopyLexicalEnvironmentObject(MCopyLexicalEnvironmentObject* ins);
|
||||
void visitKeepAliveObject(MKeepAliveObject* ins);
|
||||
void visitSlots(MSlots* ins);
|
||||
void visitElements(MElements* ins);
|
||||
void visitConstantElements(MConstantElements* ins);
|
||||
void visitConvertElementsToDoubles(MConvertElementsToDoubles* ins);
|
||||
void visitMaybeToDoubleElement(MMaybeToDoubleElement* ins);
|
||||
void visitMaybeCopyElementsForWrite(MMaybeCopyElementsForWrite* ins);
|
||||
void visitLoadSlot(MLoadSlot* ins);
|
||||
void visitLoadFixedSlotAndUnbox(MLoadFixedSlotAndUnbox* ins);
|
||||
void visitFunctionEnvironment(MFunctionEnvironment* ins);
|
||||
void visitHomeObject(MHomeObject* ins);
|
||||
void visitHomeObjectSuperBase(MHomeObjectSuperBase* ins);
|
||||
void visitInterruptCheck(MInterruptCheck* ins);
|
||||
void visitWasmInterruptCheck(MWasmInterruptCheck* ins);
|
||||
void visitWasmTrap(MWasmTrap* ins);
|
||||
void visitWasmReinterpret(MWasmReinterpret* ins);
|
||||
void visitStoreSlot(MStoreSlot* ins);
|
||||
void visitFilterTypeSet(MFilterTypeSet* ins);
|
||||
void visitTypeBarrier(MTypeBarrier* ins);
|
||||
void visitPostWriteBarrier(MPostWriteBarrier* ins);
|
||||
void visitPostWriteElementBarrier(MPostWriteElementBarrier* ins);
|
||||
void visitArrayLength(MArrayLength* ins);
|
||||
void visitSetArrayLength(MSetArrayLength* ins);
|
||||
void visitGetNextEntryForIterator(MGetNextEntryForIterator* ins);
|
||||
void visitTypedArrayLength(MTypedArrayLength* ins);
|
||||
void visitTypedArrayElements(MTypedArrayElements* ins);
|
||||
void visitSetDisjointTypedElements(MSetDisjointTypedElements* ins);
|
||||
void visitTypedObjectElements(MTypedObjectElements* ins);
|
||||
void visitSetTypedObjectOffset(MSetTypedObjectOffset* ins);
|
||||
void visitTypedObjectDescr(MTypedObjectDescr* ins);
|
||||
void visitInitializedLength(MInitializedLength* ins);
|
||||
void visitSetInitializedLength(MSetInitializedLength* ins);
|
||||
void visitNot(MNot* ins);
|
||||
void visitBoundsCheck(MBoundsCheck* ins);
|
||||
void visitBoundsCheckLower(MBoundsCheckLower* ins);
|
||||
void visitSpectreMaskIndex(MSpectreMaskIndex* ins);
|
||||
void visitLoadElement(MLoadElement* ins);
|
||||
void visitLoadElementHole(MLoadElementHole* ins);
|
||||
void visitLoadUnboxedObjectOrNull(MLoadUnboxedObjectOrNull* ins);
|
||||
void visitLoadUnboxedString(MLoadUnboxedString* ins);
|
||||
void visitLoadElementFromState(MLoadElementFromState* ins);
|
||||
void visitStoreElement(MStoreElement* ins);
|
||||
void visitStoreElementHole(MStoreElementHole* ins);
|
||||
void visitFallibleStoreElement(MFallibleStoreElement* ins);
|
||||
void visitStoreUnboxedObjectOrNull(MStoreUnboxedObjectOrNull* ins);
|
||||
void visitStoreUnboxedString(MStoreUnboxedString* ins);
|
||||
void visitConvertUnboxedObjectToNative(MConvertUnboxedObjectToNative* ins);
|
||||
void visitEffectiveAddress(MEffectiveAddress* ins);
|
||||
void visitArrayPopShift(MArrayPopShift* ins);
|
||||
void visitArrayPush(MArrayPush* ins);
|
||||
void visitArraySlice(MArraySlice* ins);
|
||||
void visitArrayJoin(MArrayJoin* ins);
|
||||
void visitLoadUnboxedScalar(MLoadUnboxedScalar* ins);
|
||||
void visitLoadTypedArrayElementHole(MLoadTypedArrayElementHole* ins);
|
||||
void visitLoadTypedArrayElementStatic(MLoadTypedArrayElementStatic* ins);
|
||||
void visitStoreUnboxedScalar(MStoreUnboxedScalar* ins);
|
||||
void visitStoreTypedArrayElementHole(MStoreTypedArrayElementHole* ins);
|
||||
void visitClampToUint8(MClampToUint8* ins);
|
||||
void visitLoadFixedSlot(MLoadFixedSlot* ins);
|
||||
void visitStoreFixedSlot(MStoreFixedSlot* ins);
|
||||
void visitGetPropSuperCache(MGetPropSuperCache* ins);
|
||||
void visitGetPropertyCache(MGetPropertyCache* ins);
|
||||
void visitGetPropertyPolymorphic(MGetPropertyPolymorphic* ins);
|
||||
void visitSetPropertyPolymorphic(MSetPropertyPolymorphic* ins);
|
||||
void visitBindNameCache(MBindNameCache* ins);
|
||||
void visitCallBindVar(MCallBindVar* ins);
|
||||
void visitGuardObjectIdentity(MGuardObjectIdentity* ins);
|
||||
void visitGuardShape(MGuardShape* ins);
|
||||
void visitGuardObjectGroup(MGuardObjectGroup* ins);
|
||||
void visitGuardObject(MGuardObject* ins);
|
||||
void visitGuardString(MGuardString* ins);
|
||||
void visitGuardReceiverPolymorphic(MGuardReceiverPolymorphic* ins);
|
||||
void visitGuardUnboxedExpando(MGuardUnboxedExpando* ins);
|
||||
void visitLoadUnboxedExpando(MLoadUnboxedExpando* ins);
|
||||
void visitPolyInlineGuard(MPolyInlineGuard* ins);
|
||||
void visitAssertRange(MAssertRange* ins);
|
||||
void visitCallGetProperty(MCallGetProperty* ins);
|
||||
void visitDeleteProperty(MDeleteProperty* ins);
|
||||
void visitDeleteElement(MDeleteElement* ins);
|
||||
void visitGetNameCache(MGetNameCache* ins);
|
||||
void visitCallGetIntrinsicValue(MCallGetIntrinsicValue* ins);
|
||||
void visitCallGetElement(MCallGetElement* ins);
|
||||
void visitCallSetElement(MCallSetElement* ins);
|
||||
void visitCallInitElementArray(MCallInitElementArray* ins);
|
||||
void visitSetPropertyCache(MSetPropertyCache* ins);
|
||||
void visitCallSetProperty(MCallSetProperty* ins);
|
||||
void visitGetIteratorCache(MGetIteratorCache* ins);
|
||||
void visitIteratorMore(MIteratorMore* ins);
|
||||
void visitIsNoIter(MIsNoIter* ins);
|
||||
void visitIteratorEnd(MIteratorEnd* ins);
|
||||
void visitStringLength(MStringLength* ins);
|
||||
void visitArgumentsLength(MArgumentsLength* ins);
|
||||
void visitGetFrameArgument(MGetFrameArgument* ins);
|
||||
void visitSetFrameArgument(MSetFrameArgument* ins);
|
||||
void visitRunOncePrologue(MRunOncePrologue* ins);
|
||||
void visitRest(MRest* ins);
|
||||
void visitThrow(MThrow* ins);
|
||||
void visitInCache(MInCache* ins);
|
||||
void visitInArray(MInArray* ins);
|
||||
void visitHasOwnCache(MHasOwnCache* ins);
|
||||
void visitInstanceOf(MInstanceOf* ins);
|
||||
void visitInstanceOfCache(MInstanceOfCache* ins);
|
||||
void visitIsCallable(MIsCallable* ins);
|
||||
void visitIsConstructor(MIsConstructor* ins);
|
||||
void visitIsArray(MIsArray* ins);
|
||||
void visitIsTypedArray(MIsTypedArray* ins);
|
||||
void visitIsObject(MIsObject* ins);
|
||||
void visitHasClass(MHasClass* ins);
|
||||
void visitObjectClassToString(MObjectClassToString* ins);
|
||||
void visitWasmAddOffset(MWasmAddOffset* ins);
|
||||
void visitWasmLoadTls(MWasmLoadTls* ins);
|
||||
void visitWasmBoundsCheck(MWasmBoundsCheck* ins);
|
||||
void visitWasmAlignmentCheck(MWasmAlignmentCheck* ins);
|
||||
void visitWasmLoadGlobalVar(MWasmLoadGlobalVar* ins);
|
||||
void visitWasmStoreGlobalVar(MWasmStoreGlobalVar* ins);
|
||||
void visitWasmParameter(MWasmParameter* ins);
|
||||
void visitWasmReturn(MWasmReturn* ins);
|
||||
void visitWasmReturnVoid(MWasmReturnVoid* ins);
|
||||
void visitWasmStackArg(MWasmStackArg* ins);
|
||||
void visitWasmCall(MWasmCall* ins);
|
||||
void visitSetDOMProperty(MSetDOMProperty* ins);
|
||||
void visitGetDOMProperty(MGetDOMProperty* ins);
|
||||
void visitGetDOMMember(MGetDOMMember* ins);
|
||||
void visitRecompileCheck(MRecompileCheck* ins);
|
||||
void visitSimdBox(MSimdBox* ins);
|
||||
void visitSimdUnbox(MSimdUnbox* ins);
|
||||
void visitSimdUnaryArith(MSimdUnaryArith* ins);
|
||||
void visitSimdBinaryComp(MSimdBinaryComp* ins);
|
||||
void visitSimdBinaryBitwise(MSimdBinaryBitwise* ins);
|
||||
void visitSimdShift(MSimdShift* ins);
|
||||
void visitSimdConstant(MSimdConstant* ins);
|
||||
void visitSimdConvert(MSimdConvert* ins);
|
||||
void visitSimdReinterpretCast(MSimdReinterpretCast* ins);
|
||||
void visitSimdAllTrue(MSimdAllTrue* ins);
|
||||
void visitSimdAnyTrue(MSimdAnyTrue* ins);
|
||||
void visitPhi(MPhi* ins);
|
||||
void visitBeta(MBeta* ins);
|
||||
void visitObjectState(MObjectState* ins);
|
||||
void visitArrayState(MArrayState* ins);
|
||||
void visitArgumentState(MArgumentState* ins);
|
||||
void visitUnknownValue(MUnknownValue* ins);
|
||||
void visitLexicalCheck(MLexicalCheck* ins);
|
||||
void visitThrowRuntimeLexicalError(MThrowRuntimeLexicalError* ins);
|
||||
void visitGlobalNameConflictsCheck(MGlobalNameConflictsCheck* ins);
|
||||
void visitDebugger(MDebugger* ins);
|
||||
void visitNewTarget(MNewTarget* ins);
|
||||
void visitArrowNewTarget(MArrowNewTarget* ins);
|
||||
void visitNaNToZero(MNaNToZero *ins);
|
||||
void visitAtomicIsLockFree(MAtomicIsLockFree* ins);
|
||||
void visitGuardSharedTypedArray(MGuardSharedTypedArray* ins);
|
||||
void visitCheckReturn(MCheckReturn* ins);
|
||||
void visitCheckIsObj(MCheckIsObj* ins);
|
||||
void visitCheckIsCallable(MCheckIsCallable* ins);
|
||||
void visitCheckObjCoercible(MCheckObjCoercible* ins);
|
||||
void visitDebugCheckSelfHosted(MDebugCheckSelfHosted* ins);
|
||||
void visitFinishBoundFunctionInit(MFinishBoundFunctionInit* ins);
|
||||
void visitIsPackedArray(MIsPackedArray* ins);
|
||||
void visitGetPrototypeOf(MGetPrototypeOf* ins);
|
||||
#define MIR_OP(op) void visit##op(M##op* ins);
|
||||
MIR_OPCODE_LIST(MIR_OP)
|
||||
#undef MIR_OP
|
||||
};
|
||||
|
||||
} // namespace jit
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "jit/arm/Lowering-arm.h"
|
||||
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
|
||||
#include "jit/arm/Assembler-arm.h"
|
||||
#include "jit/Lowering.h"
|
||||
#include "jit/MIR.h"
|
||||
|
||||
#include "jit/shared/Lowering-shared-inl.h"
|
||||
|
||||
using namespace js;
|
||||
|
@ -53,7 +54,7 @@ LIRGeneratorARM::tempByteOpRegister()
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitBox(MBox* box)
|
||||
LIRGenerator::visitBox(MBox* box)
|
||||
{
|
||||
MDefinition* inner = box->getOperand(0);
|
||||
|
||||
|
@ -93,7 +94,7 @@ LIRGeneratorARM::visitBox(MBox* box)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitUnbox(MUnbox* unbox)
|
||||
LIRGenerator::visitUnbox(MUnbox* unbox)
|
||||
{
|
||||
MDefinition* inner = unbox->getOperand(0);
|
||||
|
||||
|
@ -137,7 +138,7 @@ LIRGeneratorARM::visitUnbox(MUnbox* unbox)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitReturn(MReturn* ret)
|
||||
LIRGenerator::visitReturn(MReturn* ret)
|
||||
{
|
||||
MDefinition* opd = ret->getOperand(0);
|
||||
MOZ_ASSERT(opd->type() == MIRType::Value);
|
||||
|
@ -458,7 +459,7 @@ LIRGeneratorARM::lowerUModI64(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitPowHalf(MPowHalf* ins)
|
||||
LIRGenerator::visitPowHalf(MPowHalf* ins)
|
||||
{
|
||||
MDefinition* input = ins->input();
|
||||
MOZ_ASSERT(input->type() == MIRType::Double);
|
||||
|
@ -494,7 +495,7 @@ LIRGeneratorARM::lowerUrshD(MUrsh* mir)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmSelect(MWasmSelect* ins)
|
||||
LIRGenerator::visitWasmSelect(MWasmSelect* ins)
|
||||
{
|
||||
if (ins->type() == MIRType::Int64) {
|
||||
auto* lir = new(alloc()) LWasmSelectI64(useInt64RegisterAtStart(ins->trueExpr()),
|
||||
|
@ -513,7 +514,7 @@ LIRGeneratorARM::visitWasmSelect(MWasmSelect* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmNeg(MWasmNeg* ins)
|
||||
LIRGenerator::visitWasmNeg(MWasmNeg* ins)
|
||||
{
|
||||
if (ins->type() == MIRType::Int32) {
|
||||
define(new(alloc()) LNegI(useRegisterAtStart(ins->input())), ins);
|
||||
|
@ -576,7 +577,7 @@ LIRGeneratorARM::lowerUMod(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
LIRGenerator::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->input()->type() == MIRType::Int32);
|
||||
LWasmUint32ToDouble* lir = new(alloc()) LWasmUint32ToDouble(useRegisterAtStart(ins->input()));
|
||||
|
@ -584,7 +585,7 @@ LIRGeneratorARM::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
LIRGenerator::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->input()->type() == MIRType::Int32);
|
||||
LWasmUint32ToFloat32* lir = new(alloc()) LWasmUint32ToFloat32(useRegisterAtStart(ins->input()));
|
||||
|
@ -592,7 +593,7 @@ LIRGeneratorARM::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmLoad(MWasmLoad* ins)
|
||||
LIRGenerator::visitWasmLoad(MWasmLoad* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -650,7 +651,7 @@ LIRGeneratorARM::visitWasmLoad(MWasmLoad* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmStore(MWasmStore* ins)
|
||||
LIRGenerator::visitWasmStore(MWasmStore* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -711,7 +712,7 @@ LIRGeneratorARM::visitWasmStore(MWasmStore* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
LIRGenerator::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->offset() == 0);
|
||||
|
||||
|
@ -739,7 +740,7 @@ LIRGeneratorARM::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
LIRGenerator::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->offset() == 0);
|
||||
|
||||
|
@ -784,13 +785,13 @@ LIRGeneratorARM::lowerTruncateFToInt32(MTruncateToInt32* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
LIRGenerator::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
{
|
||||
MOZ_ASSERT(HasLDSTREXBHD());
|
||||
MOZ_ASSERT(ins->arrayType() <= Scalar::Uint32);
|
||||
|
@ -818,7 +819,7 @@ LIRGeneratorARM::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayE
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
LIRGenerator::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->arrayType() != Scalar::Uint8Clamped);
|
||||
MOZ_ASSERT(ins->arrayType() != Scalar::Float32);
|
||||
|
@ -860,7 +861,7 @@ LIRGeneratorARM::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->arrayType() != Scalar::Float32);
|
||||
MOZ_ASSERT(ins->arrayType() != Scalar::Float64);
|
||||
|
@ -891,7 +892,7 @@ LIRGeneratorARM::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArra
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -919,7 +920,7 @@ LIRGeneratorARM::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->base()->type() == MIRType::Int32);
|
||||
|
||||
|
@ -943,7 +944,7 @@ LIRGeneratorARM::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
{
|
||||
if (ins->access().type() == Scalar::Int64) {
|
||||
auto* lir = new(alloc()) LWasmAtomicBinopI64(useRegister(ins->base()),
|
||||
|
@ -981,7 +982,7 @@ LIRGeneratorARM::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitSubstr(MSubstr* ins)
|
||||
LIRGenerator::visitSubstr(MSubstr* ins)
|
||||
{
|
||||
LSubstr* lir = new (alloc()) LSubstr(useRegister(ins->string()),
|
||||
useRegister(ins->begin()),
|
||||
|
@ -994,7 +995,7 @@ LIRGeneratorARM::visitSubstr(MSubstr* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitRandom(MRandom* ins)
|
||||
LIRGenerator::visitRandom(MRandom* ins)
|
||||
{
|
||||
LRandom *lir = new(alloc()) LRandom(temp(),
|
||||
temp(),
|
||||
|
@ -1005,7 +1006,7 @@ LIRGeneratorARM::visitRandom(MRandom* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
LIRGenerator::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
{
|
||||
MDefinition* opd = ins->input();
|
||||
MOZ_ASSERT(opd->type() == MIRType::Double || opd->type() == MIRType::Float32);
|
||||
|
@ -1014,7 +1015,7 @@ LIRGeneratorARM::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
LIRGenerator::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->type() == MIRType::Double || ins->type() == MIRType::Float32);
|
||||
|
||||
|
@ -1024,7 +1025,7 @@ LIRGeneratorARM::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitCopySign(MCopySign* ins)
|
||||
LIRGenerator::visitCopySign(MCopySign* ins)
|
||||
{
|
||||
MDefinition* lhs = ins->lhs();
|
||||
MDefinition* rhs = ins->rhs();
|
||||
|
@ -1046,7 +1047,7 @@ LIRGeneratorARM::visitCopySign(MCopySign* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
LIRGenerator::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
{
|
||||
auto* lir = new(alloc()) LExtendInt32ToInt64(useRegisterAtStart(ins->input()));
|
||||
defineInt64(lir, ins);
|
||||
|
@ -1059,7 +1060,67 @@ LIRGeneratorARM::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
LIRGenerator::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
{
|
||||
defineInt64(new(alloc()) LSignExtendInt64(useInt64RegisterAtStart(ins->input())), ins);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdInsertElement(MSimdInsertElement*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdExtractElement(MSimdExtractElement*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdBinaryArith(MSimdBinaryArith*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdSelect(MSimdSelect*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdSplat(MSimdSplat*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdValueX4(MSimdValueX4*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdBinarySaturating(MSimdBinarySaturating*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdSwizzle(MSimdSwizzle*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdShuffle(MSimdShuffle*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdGeneralShuffle(MSimdGeneralShuffle*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
|
|
@ -14,12 +14,11 @@ namespace jit {
|
|||
|
||||
class LIRGeneratorARM : public LIRGeneratorShared
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
LIRGeneratorARM(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
|
||||
: LIRGeneratorShared(gen, graph, lirGraph)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
// Returns a box allocation with type set to reg1 and payload set to reg2.
|
||||
LBoxAllocation useBoxFixed(MDefinition* mir, Register reg1, Register reg2,
|
||||
bool useAtStart = false);
|
||||
|
@ -88,39 +87,12 @@ class LIRGeneratorARM : public LIRGeneratorShared
|
|||
void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs);
|
||||
void lowerUDiv(MDiv* div);
|
||||
void lowerUMod(MMod* mod);
|
||||
void visitPowHalf(MPowHalf* ins);
|
||||
void visitWasmNeg(MWasmNeg* ins);
|
||||
|
||||
LTableSwitch* newLTableSwitch(const LAllocation& in, const LDefinition& inputCopy,
|
||||
MTableSwitch* ins);
|
||||
LTableSwitchV* newLTableSwitchV(MTableSwitch* ins);
|
||||
|
||||
public:
|
||||
void visitBox(MBox* box);
|
||||
void visitUnbox(MUnbox* unbox);
|
||||
void visitReturn(MReturn* ret);
|
||||
void lowerPhi(MPhi* phi);
|
||||
void visitWasmSelect(MWasmSelect* ins);
|
||||
void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins);
|
||||
void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins);
|
||||
void visitWasmLoad(MWasmLoad* ins);
|
||||
void visitWasmStore(MWasmStore* ins);
|
||||
void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins);
|
||||
void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
|
||||
void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins);
|
||||
void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins);
|
||||
void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins);
|
||||
void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
|
||||
void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
|
||||
void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
|
||||
void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
|
||||
void visitSubstr(MSubstr* ins);
|
||||
void visitRandom(MRandom* ins);
|
||||
void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
|
||||
void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
|
||||
void visitCopySign(MCopySign* ins);
|
||||
void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins);
|
||||
void visitSignExtendInt64(MSignExtendInt64* ins);
|
||||
};
|
||||
|
||||
typedef LIRGeneratorARM LIRGeneratorSpecific;
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
#include "jit/arm64/Lowering-arm64.h"
|
||||
|
||||
#include "jit/arm64/Assembler-arm64.h"
|
||||
#include "jit/Lowering.h"
|
||||
#include "jit/MIR.h"
|
||||
|
||||
#include "jit/shared/Lowering-shared-inl.h"
|
||||
|
||||
using namespace js;
|
||||
|
@ -42,19 +41,19 @@ LIRGeneratorARM64::useByteOpRegisterOrNonDoubleConstant(MDefinition* mir)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitBox(MBox* box)
|
||||
LIRGenerator::visitBox(MBox* box)
|
||||
{
|
||||
MOZ_CRASH("visitBox");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitUnbox(MUnbox* unbox)
|
||||
LIRGenerator::visitUnbox(MUnbox* unbox)
|
||||
{
|
||||
MOZ_CRASH("visitUnbox");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitReturn(MReturn* ret)
|
||||
LIRGenerator::visitReturn(MReturn* ret)
|
||||
{
|
||||
MOZ_CRASH("visitReturn");
|
||||
}
|
||||
|
@ -179,7 +178,7 @@ LIRGeneratorARM64::lowerModI64(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitPowHalf(MPowHalf* ins)
|
||||
LIRGenerator::visitPowHalf(MPowHalf* ins)
|
||||
{
|
||||
MOZ_CRASH("visitPowHalf");
|
||||
}
|
||||
|
@ -204,13 +203,13 @@ LIRGeneratorARM64::lowerUrshD(MUrsh* mir)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmNeg(MWasmNeg* ins)
|
||||
LIRGenerator::visitWasmNeg(MWasmNeg* ins)
|
||||
{
|
||||
MOZ_CRASH("visitWasmNeg");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmSelect(MWasmSelect* ins)
|
||||
LIRGenerator::visitWasmSelect(MWasmSelect* ins)
|
||||
{
|
||||
MOZ_CRASH("visitWasmSelect");
|
||||
}
|
||||
|
@ -228,43 +227,43 @@ LIRGeneratorARM64::lowerUMod(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
LIRGenerator::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
{
|
||||
MOZ_CRASH("visitWasmUnsignedToDouble");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
LIRGenerator::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
{
|
||||
MOZ_CRASH("visitWasmUnsignedToFloat32");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
LIRGenerator::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
{
|
||||
MOZ_CRASH("visitAsmJSLoadHeap");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
LIRGenerator::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
{
|
||||
MOZ_CRASH("visitAsmJSStoreHeap");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
{
|
||||
MOZ_CRASH("visitWasmCompareExchangeHeap");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
{
|
||||
MOZ_CRASH("visitWasmAtomicExchangeHeap");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
{
|
||||
MOZ_CRASH("visitWasmAtomicBinopHeap");
|
||||
}
|
||||
|
@ -282,37 +281,37 @@ LIRGeneratorARM64::lowerTruncateFToInt32(MTruncateToInt32* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
LIRGenerator::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
LIRGenerator::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitSubstr(MSubstr* ins)
|
||||
LIRGenerator::visitSubstr(MSubstr* ins)
|
||||
{
|
||||
MOZ_CRASH("visitSubstr");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitRandom(MRandom* ins)
|
||||
LIRGenerator::visitRandom(MRandom* ins)
|
||||
{
|
||||
LRandom *lir = new(alloc()) LRandom(temp(),
|
||||
temp(),
|
||||
|
@ -321,43 +320,103 @@ LIRGeneratorARM64::visitRandom(MRandom* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
{
|
||||
MOZ_CRASH("NY");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmLoad(MWasmLoad* ins)
|
||||
{
|
||||
MOZ_CRASH("NY");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitWasmStore(MWasmStore* ins)
|
||||
{
|
||||
MOZ_CRASH("NY");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
{
|
||||
MOZ_CRASH("NY");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitCopySign(MCopySign* ins)
|
||||
{
|
||||
MOZ_CRASH("NY");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
LIRGenerator::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorARM64::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
LIRGenerator::visitWasmLoad(MWasmLoad* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitWasmStore(MWasmStore* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitCopySign(MCopySign* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdInsertElement(MSimdInsertElement*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdExtractElement(MSimdExtractElement*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdBinaryArith(MSimdBinaryArith*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdSelect(MSimdSelect*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdSplat(MSimdSplat*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdValueX4(MSimdValueX4*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdBinarySaturating(MSimdBinarySaturating*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdSwizzle(MSimdSwizzle*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdShuffle(MSimdShuffle*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdGeneralShuffle(MSimdGeneralShuffle*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
|
|
@ -14,12 +14,11 @@ namespace jit {
|
|||
|
||||
class LIRGeneratorARM64 : public LIRGeneratorShared
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
LIRGeneratorARM64(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
|
||||
: LIRGeneratorShared(gen, graph, lirGraph)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
// Returns a box allocation. reg2 is ignored on 64-bit platforms.
|
||||
LBoxAllocation useBoxFixed(MDefinition* mir, Register reg1, Register reg2,
|
||||
bool useAtStart = false);
|
||||
|
@ -87,40 +86,13 @@ class LIRGeneratorARM64 : public LIRGeneratorShared
|
|||
void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs);
|
||||
void lowerUDiv(MDiv* div);
|
||||
void lowerUMod(MMod* mod);
|
||||
void visitPowHalf(MPowHalf* ins);
|
||||
void visitWasmNeg(MWasmNeg* ins);
|
||||
void visitWasmSelect(MWasmSelect* ins);
|
||||
|
||||
LTableSwitchV* newLTableSwitchV(MTableSwitch* ins);
|
||||
LTableSwitch* newLTableSwitch(const LAllocation& in,
|
||||
const LDefinition& inputCopy,
|
||||
MTableSwitch* ins);
|
||||
|
||||
public:
|
||||
void visitBox(MBox* box);
|
||||
void visitUnbox(MUnbox* unbox);
|
||||
void visitReturn(MReturn* ret);
|
||||
void lowerPhi(MPhi* phi);
|
||||
void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins);
|
||||
void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins);
|
||||
void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins);
|
||||
void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
|
||||
void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins);
|
||||
void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins);
|
||||
void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins);
|
||||
void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
|
||||
void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
|
||||
void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
|
||||
void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
|
||||
void visitSubstr(MSubstr* ins);
|
||||
void visitRandom(MRandom* ins);
|
||||
void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
|
||||
void visitWasmLoad(MWasmLoad* ins);
|
||||
void visitWasmStore(MWasmStore* ins);
|
||||
void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
|
||||
void visitCopySign(MCopySign* ins);
|
||||
void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins);
|
||||
void visitSignExtendInt64(MSignExtendInt64* ins);
|
||||
};
|
||||
|
||||
typedef LIRGeneratorARM64 LIRGeneratorSpecific;
|
||||
|
|
|
@ -265,7 +265,7 @@ LIRGeneratorMIPSShared::lowerModI(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitPowHalf(MPowHalf* ins)
|
||||
LIRGenerator::visitPowHalf(MPowHalf* ins)
|
||||
{
|
||||
MDefinition* input = ins->input();
|
||||
MOZ_ASSERT(input->type() == MIRType::Double);
|
||||
|
@ -301,7 +301,7 @@ LIRGeneratorMIPSShared::lowerUrshD(MUrsh* mir)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitWasmNeg(MWasmNeg* ins)
|
||||
LIRGenerator::visitWasmNeg(MWasmNeg* ins)
|
||||
{
|
||||
if (ins->type() == MIRType::Int32) {
|
||||
define(new(alloc()) LNegI(useRegisterAtStart(ins->input())), ins);
|
||||
|
@ -314,7 +314,7 @@ LIRGeneratorMIPSShared::visitWasmNeg(MWasmNeg* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitWasmLoad(MWasmLoad* ins)
|
||||
LIRGenerator::visitWasmLoad(MWasmLoad* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -370,7 +370,7 @@ LIRGeneratorMIPSShared::visitWasmLoad(MWasmLoad* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitWasmStore(MWasmStore* ins)
|
||||
LIRGenerator::visitWasmStore(MWasmStore* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -428,7 +428,7 @@ LIRGeneratorMIPSShared::visitWasmStore(MWasmStore* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitWasmSelect(MWasmSelect* ins)
|
||||
LIRGenerator::visitWasmSelect(MWasmSelect* ins)
|
||||
{
|
||||
if (ins->type() == MIRType::Int64) {
|
||||
auto* lir = new(alloc()) LWasmSelectI64(useInt64RegisterAtStart(ins->trueExpr()),
|
||||
|
@ -477,7 +477,7 @@ LIRGeneratorMIPSShared::lowerUMod(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
LIRGenerator::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->input()->type() == MIRType::Int32);
|
||||
LWasmUint32ToDouble* lir = new(alloc()) LWasmUint32ToDouble(useRegisterAtStart(ins->input()));
|
||||
|
@ -485,7 +485,7 @@ LIRGeneratorMIPSShared::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
LIRGenerator::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->input()->type() == MIRType::Int32);
|
||||
LWasmUint32ToFloat32* lir = new(alloc()) LWasmUint32ToFloat32(useRegisterAtStart(ins->input()));
|
||||
|
@ -493,7 +493,7 @@ LIRGeneratorMIPSShared::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
LIRGenerator::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->access().offset() == 0);
|
||||
|
||||
|
@ -520,7 +520,7 @@ LIRGeneratorMIPSShared::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
LIRGenerator::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->access().offset() == 0);
|
||||
|
||||
|
@ -544,7 +544,7 @@ LIRGeneratorMIPSShared::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitSubstr(MSubstr* ins)
|
||||
LIRGenerator::visitSubstr(MSubstr* ins)
|
||||
{
|
||||
LSubstr* lir = new (alloc()) LSubstr(useRegister(ins->string()),
|
||||
useRegister(ins->begin()),
|
||||
|
@ -557,13 +557,13 @@ LIRGeneratorMIPSShared::visitSubstr(MSubstr* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
LIRGenerator::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->arrayType() != Scalar::Float32);
|
||||
MOZ_ASSERT(ins->arrayType() != Scalar::Float64);
|
||||
|
@ -602,7 +602,7 @@ LIRGeneratorMIPSShared::visitCompareExchangeTypedArrayElement(MCompareExchangeTy
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->arrayType() <= Scalar::Uint32);
|
||||
|
||||
|
@ -640,7 +640,7 @@ LIRGeneratorMIPSShared::visitAtomicExchangeTypedArrayElement(MAtomicExchangeType
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->base()->type() == MIRType::Int32);
|
||||
|
||||
|
@ -672,7 +672,7 @@ LIRGeneratorMIPSShared::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* i
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->base()->type() == MIRType::Int32);
|
||||
|
||||
|
@ -701,7 +701,7 @@ LIRGeneratorMIPSShared::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->base()->type() == MIRType::Int32);
|
||||
|
||||
|
@ -744,7 +744,7 @@ LIRGeneratorMIPSShared::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
LIRGenerator::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->arrayType() != Scalar::Uint8Clamped);
|
||||
MOZ_ASSERT(ins->arrayType() != Scalar::Float32);
|
||||
|
@ -789,9 +789,8 @@ LIRGeneratorMIPSShared::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayEleme
|
|||
define(lir, ins);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitCopySign(MCopySign* ins)
|
||||
LIRGenerator::visitCopySign(MCopySign* ins)
|
||||
{
|
||||
MDefinition* lhs = ins->lhs();
|
||||
MDefinition* rhs = ins->rhs();
|
||||
|
@ -815,13 +814,73 @@ LIRGeneratorMIPSShared::visitCopySign(MCopySign* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
LIRGenerator::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
{
|
||||
defineInt64(new(alloc()) LExtendInt32ToInt64(useRegisterAtStart(ins->input())), ins);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPSShared::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
LIRGenerator::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
{
|
||||
defineInt64(new(alloc()) LSignExtendInt64(useInt64RegisterAtStart(ins->input())), ins);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdInsertElement(MSimdInsertElement*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdExtractElement(MSimdExtractElement*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdBinaryArith(MSimdBinaryArith*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdSelect(MSimdSelect*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdSplat(MSimdSplat*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdValueX4(MSimdValueX4*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdBinarySaturating(MSimdBinarySaturating*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdSwizzle(MSimdSwizzle*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdShuffle(MSimdShuffle*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGenerator::visitSimdGeneralShuffle(MSimdGeneralShuffle*)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ class LIRGeneratorMIPSShared : public LIRGeneratorShared
|
|||
: LIRGeneratorShared(gen, graph, lirGraph)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
// x86 has constraints on what registers can be formatted for 1-byte
|
||||
// stores and loads; on MIPS all registers are okay.
|
||||
LAllocation useByteOpRegister(MDefinition* mir);
|
||||
|
@ -69,34 +68,12 @@ class LIRGeneratorMIPSShared : public LIRGeneratorShared
|
|||
void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs);
|
||||
void lowerUDiv(MDiv* div);
|
||||
void lowerUMod(MMod* mod);
|
||||
void visitPowHalf(MPowHalf* ins);
|
||||
void visitWasmNeg(MWasmNeg* ins);
|
||||
void visitWasmLoad(MWasmLoad* ins);
|
||||
void visitWasmStore(MWasmStore* ins);
|
||||
void visitWasmSelect(MWasmSelect* ins);
|
||||
|
||||
LTableSwitch* newLTableSwitch(const LAllocation& in, const LDefinition& inputCopy,
|
||||
MTableSwitch* ins);
|
||||
LTableSwitchV* newLTableSwitchV(MTableSwitch* ins);
|
||||
|
||||
public:
|
||||
void lowerPhi(MPhi* phi);
|
||||
void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins);
|
||||
void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins);
|
||||
void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins);
|
||||
void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
|
||||
void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins);
|
||||
void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins);
|
||||
void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins);
|
||||
void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
|
||||
void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
|
||||
void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
|
||||
void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
|
||||
void visitSubstr(MSubstr* ins);
|
||||
void visitCopySign(MCopySign* ins);
|
||||
void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins);
|
||||
void visitSignExtendInt64(MSignExtendInt64* ins);
|
||||
|
||||
};
|
||||
|
||||
} // namespace jit
|
||||
|
|
|
@ -27,7 +27,7 @@ LIRGeneratorMIPS::useBoxFixed(MDefinition* mir, Register reg1, Register reg2, bo
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS::visitBox(MBox* box)
|
||||
LIRGenerator::visitBox(MBox* box)
|
||||
{
|
||||
MDefinition* inner = box->getOperand(0);
|
||||
|
||||
|
@ -67,7 +67,7 @@ LIRGeneratorMIPS::visitBox(MBox* box)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS::visitUnbox(MUnbox* unbox)
|
||||
LIRGenerator::visitUnbox(MUnbox* unbox)
|
||||
{
|
||||
MDefinition* inner = unbox->getOperand(0);
|
||||
|
||||
|
@ -112,7 +112,7 @@ LIRGeneratorMIPS::visitUnbox(MUnbox* unbox)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS::visitReturn(MReturn* ret)
|
||||
LIRGenerator::visitReturn(MReturn* ret)
|
||||
{
|
||||
MDefinition* opd = ret->getOperand(0);
|
||||
MOZ_ASSERT(opd->type() == MIRType::Value);
|
||||
|
@ -247,7 +247,7 @@ LIRGeneratorMIPS::lowerUModI64(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS::visitRandom(MRandom* ins)
|
||||
LIRGenerator::visitRandom(MRandom* ins)
|
||||
{
|
||||
LRandom *lir = new(alloc()) LRandom(temp(),
|
||||
temp(),
|
||||
|
@ -259,7 +259,7 @@ LIRGeneratorMIPS::visitRandom(MRandom* ins)
|
|||
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
LIRGenerator::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
{
|
||||
MDefinition* opd = ins->input();
|
||||
MOZ_ASSERT(opd->type() == MIRType::Double || opd->type() == MIRType::Float32);
|
||||
|
@ -268,7 +268,7 @@ LIRGeneratorMIPS::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
LIRGenerator::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
{
|
||||
MDefinition* opd = ins->input();
|
||||
MOZ_ASSERT(opd->type() == MIRType::Int64);
|
||||
|
|
|
@ -19,7 +19,6 @@ class LIRGeneratorMIPS : public LIRGeneratorMIPSShared
|
|||
: LIRGeneratorMIPSShared(gen, graph, lirGraph)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
// Returns a box allocation with type set to reg1 and payload set to reg2.
|
||||
LBoxAllocation useBoxFixed(MDefinition* mir, Register reg1, Register reg2,
|
||||
bool useAtStart = false);
|
||||
|
@ -41,14 +40,6 @@ class LIRGeneratorMIPS : public LIRGeneratorMIPSShared
|
|||
void lowerModI64(MMod* mod);
|
||||
void lowerUDivI64(MDiv* div);
|
||||
void lowerUModI64(MMod* mod);
|
||||
|
||||
public:
|
||||
void visitBox(MBox* box);
|
||||
void visitUnbox(MUnbox* unbox);
|
||||
void visitReturn(MReturn* ret);
|
||||
void visitRandom(MRandom* ins);
|
||||
void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
|
||||
void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
|
||||
};
|
||||
|
||||
typedef LIRGeneratorMIPS LIRGeneratorSpecific;
|
||||
|
|
|
@ -82,7 +82,7 @@ LIRGeneratorMIPS64::lowerUModI64(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS64::visitBox(MBox* box)
|
||||
LIRGenerator::visitBox(MBox* box)
|
||||
{
|
||||
MDefinition* opd = box->getOperand(0);
|
||||
|
||||
|
@ -101,7 +101,7 @@ LIRGeneratorMIPS64::visitBox(MBox* box)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS64::visitUnbox(MUnbox* unbox)
|
||||
LIRGenerator::visitUnbox(MUnbox* unbox)
|
||||
{
|
||||
MDefinition* box = unbox->getOperand(0);
|
||||
|
||||
|
@ -133,7 +133,7 @@ LIRGeneratorMIPS64::visitUnbox(MUnbox* unbox)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS64::visitReturn(MReturn* ret)
|
||||
LIRGenerator::visitReturn(MReturn* ret)
|
||||
{
|
||||
MDefinition* opd = ret->getOperand(0);
|
||||
MOZ_ASSERT(opd->type() == MIRType::Value);
|
||||
|
@ -177,7 +177,7 @@ LIRGeneratorMIPS64::lowerTruncateFToInt32(MTruncateToInt32* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS64::visitRandom(MRandom* ins)
|
||||
LIRGenerator::visitRandom(MRandom* ins)
|
||||
{
|
||||
LRandom *lir = new(alloc()) LRandom(temp(), temp(), temp());
|
||||
defineFixed(lir, ins, LFloatReg(ReturnDoubleReg));
|
||||
|
@ -185,7 +185,7 @@ LIRGeneratorMIPS64::visitRandom(MRandom* ins)
|
|||
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS64::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
LIRGenerator::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
{
|
||||
MDefinition* opd = ins->input();
|
||||
MOZ_ASSERT(opd->type() == MIRType::Double || opd->type() == MIRType::Float32);
|
||||
|
@ -194,7 +194,7 @@ LIRGeneratorMIPS64::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorMIPS64::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
LIRGenerator::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
{
|
||||
MDefinition* opd = ins->input();
|
||||
MOZ_ASSERT(opd->type() == MIRType::Int64);
|
||||
|
|
|
@ -19,7 +19,6 @@ class LIRGeneratorMIPS64 : public LIRGeneratorMIPSShared
|
|||
: LIRGeneratorMIPSShared(gen, graph, lirGraph)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
void lowerInt64PhiInput(MPhi*, uint32_t, LBlock*, size_t);
|
||||
void defineInt64Phi(MPhi*, size_t);
|
||||
|
||||
|
@ -41,14 +40,6 @@ class LIRGeneratorMIPS64 : public LIRGeneratorMIPSShared
|
|||
void lowerModI64(MMod* mod);
|
||||
void lowerUDivI64(MDiv* div);
|
||||
void lowerUModI64(MMod* mod);
|
||||
|
||||
public:
|
||||
void visitBox(MBox* box);
|
||||
void visitUnbox(MUnbox* unbox);
|
||||
void visitReturn(MReturn* ret);
|
||||
void visitRandom(MRandom* ins);
|
||||
void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
|
||||
void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
|
||||
};
|
||||
|
||||
typedef LIRGeneratorMIPS64 LIRGeneratorSpecific;
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace jit {
|
|||
|
||||
class LIRGeneratorNone : public LIRGeneratorShared
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
LIRGeneratorNone(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
|
||||
: LIRGeneratorShared(gen, graph, lirGraph)
|
||||
{
|
||||
|
@ -70,43 +70,9 @@ class LIRGeneratorNone : public LIRGeneratorShared
|
|||
void lowerMulI(MMul*, MDefinition*, MDefinition*) { MOZ_CRASH(); }
|
||||
void lowerUDiv(MDiv*) { MOZ_CRASH(); }
|
||||
void lowerUMod(MMod*) { MOZ_CRASH(); }
|
||||
void visitBox(MBox* box) { MOZ_CRASH(); }
|
||||
void visitUnbox(MUnbox* unbox) { MOZ_CRASH(); }
|
||||
void visitReturn(MReturn* ret) { MOZ_CRASH(); }
|
||||
void visitPowHalf(MPowHalf*) { MOZ_CRASH(); }
|
||||
void visitWasmNeg(MWasmNeg*) { MOZ_CRASH(); }
|
||||
void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins) { MOZ_CRASH(); }
|
||||
void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins) { MOZ_CRASH(); }
|
||||
void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins) { MOZ_CRASH(); }
|
||||
void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins) { MOZ_CRASH(); }
|
||||
void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins) { MOZ_CRASH(); }
|
||||
void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins) { MOZ_CRASH(); }
|
||||
void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins) { MOZ_CRASH(); }
|
||||
void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins) { MOZ_CRASH(); }
|
||||
void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins) { MOZ_CRASH(); }
|
||||
void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins) { MOZ_CRASH(); }
|
||||
void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins) { MOZ_CRASH(); }
|
||||
void visitWasmSelect(MWasmSelect*) { MOZ_CRASH(); }
|
||||
void visitWasmBoundsCheck(MWasmBoundsCheck* ins) { MOZ_CRASH(); }
|
||||
void visitWasmLoad(MWasmLoad* ins) { MOZ_CRASH(); }
|
||||
void visitWasmStore(MWasmStore* ins) { MOZ_CRASH(); }
|
||||
|
||||
LTableSwitch* newLTableSwitch(LAllocation, LDefinition, MTableSwitch*) { MOZ_CRASH(); }
|
||||
LTableSwitchV* newLTableSwitchV(MTableSwitch*) { MOZ_CRASH(); }
|
||||
void visitSimdSelect(MSimdSelect* ins) { MOZ_CRASH(); }
|
||||
void visitSimdSplat(MSimdSplat* ins) { MOZ_CRASH(); }
|
||||
void visitSimdSwizzle(MSimdSwizzle* ins) { MOZ_CRASH(); }
|
||||
void visitSimdShuffle(MSimdShuffle* ins) { MOZ_CRASH(); }
|
||||
void visitSimdValueX4(MSimdValueX4* lir) { MOZ_CRASH(); }
|
||||
void visitSubstr(MSubstr*) { MOZ_CRASH(); }
|
||||
void visitSimdBinaryArith(js::jit::MSimdBinaryArith*) { MOZ_CRASH(); }
|
||||
void visitSimdBinarySaturating(MSimdBinarySaturating* ins) { MOZ_CRASH(); }
|
||||
void visitRandom(js::jit::MRandom*) { MOZ_CRASH(); }
|
||||
void visitCopySign(js::jit::MCopySign*) { MOZ_CRASH(); }
|
||||
void visitWasmTruncateToInt64(MWasmTruncateToInt64*) { MOZ_CRASH(); }
|
||||
void visitInt64ToFloatingPoint(MInt64ToFloatingPoint*) { MOZ_CRASH(); }
|
||||
void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins) { MOZ_CRASH(); }
|
||||
void visitSignExtendInt64(MSignExtendInt64* ins) { MOZ_CRASH(); }
|
||||
};
|
||||
|
||||
typedef LIRGeneratorNone LIRGeneratorSpecific;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "jit/shared/Lowering-shared-inl.h"
|
||||
|
||||
#include "jit/LIR.h"
|
||||
#include "jit/Lowering.h"
|
||||
#include "jit/MIR.h"
|
||||
|
||||
#include "vm/SymbolType.h"
|
||||
|
@ -71,61 +72,6 @@ LIRGeneratorShared::ReorderCommutative(MDefinition** lhsp, MDefinition** rhsp, M
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorShared::visitConstant(MConstant* ins)
|
||||
{
|
||||
if (!IsFloatingPointType(ins->type()) && ins->canEmitAtUses()) {
|
||||
emitAtUses(ins);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (ins->type()) {
|
||||
case MIRType::Double:
|
||||
define(new(alloc()) LDouble(ins->toDouble()), ins);
|
||||
break;
|
||||
case MIRType::Float32:
|
||||
define(new(alloc()) LFloat32(ins->toFloat32()), ins);
|
||||
break;
|
||||
case MIRType::Boolean:
|
||||
define(new(alloc()) LInteger(ins->toBoolean()), ins);
|
||||
break;
|
||||
case MIRType::Int32:
|
||||
define(new(alloc()) LInteger(ins->toInt32()), ins);
|
||||
break;
|
||||
case MIRType::Int64:
|
||||
defineInt64(new(alloc()) LInteger64(ins->toInt64()), ins);
|
||||
break;
|
||||
case MIRType::String:
|
||||
define(new(alloc()) LPointer(ins->toString()), ins);
|
||||
break;
|
||||
case MIRType::Symbol:
|
||||
define(new(alloc()) LPointer(ins->toSymbol()), ins);
|
||||
break;
|
||||
case MIRType::Object:
|
||||
define(new(alloc()) LPointer(&ins->toObject()), ins);
|
||||
break;
|
||||
default:
|
||||
// Constants of special types (undefined, null) should never flow into
|
||||
// here directly. Operations blindly consuming them require a Box.
|
||||
MOZ_CRASH("unexpected constant type");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorShared::visitWasmFloatConstant(MWasmFloatConstant* ins)
|
||||
{
|
||||
switch (ins->type()) {
|
||||
case MIRType::Double:
|
||||
define(new(alloc()) LDouble(ins->toDouble()), ins);
|
||||
break;
|
||||
case MIRType::Float32:
|
||||
define(new(alloc()) LFloat32(ins->toFloat32()), ins);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected constant type");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorShared::defineTypedPhi(MPhi* phi, size_t lirIndex)
|
||||
{
|
||||
|
|
|
@ -33,7 +33,6 @@ class LIRGeneratorShared
|
|||
LRecoverInfo* cachedRecoverInfo_;
|
||||
LOsiPoint* osiPoint_;
|
||||
|
||||
public:
|
||||
LIRGeneratorShared(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
|
||||
: gen(gen),
|
||||
graph(graph),
|
||||
|
@ -63,8 +62,6 @@ class LIRGeneratorShared
|
|||
gen->setOffThreadStatus(reason_);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
static void ReorderCommutative(MDefinition** lhsp, MDefinition** rhsp, MInstruction* ins);
|
||||
static bool ShouldReorderCommutative(MDefinition* lhs, MDefinition* rhs, MInstruction* ins);
|
||||
|
||||
|
@ -281,7 +278,6 @@ class LIRGeneratorShared
|
|||
void assignSafepoint(LInstruction* ins, MInstruction* mir,
|
||||
BailoutKind kind = Bailout_DuringVMCall);
|
||||
|
||||
public:
|
||||
void lowerConstantDouble(double d, MInstruction* mir) {
|
||||
define(new(alloc()) LDouble(d), mir);
|
||||
}
|
||||
|
@ -289,9 +285,7 @@ class LIRGeneratorShared
|
|||
define(new(alloc()) LFloat32(f), mir);
|
||||
}
|
||||
|
||||
void visitConstant(MConstant* ins);
|
||||
void visitWasmFloatConstant(MWasmFloatConstant* ins);
|
||||
|
||||
public:
|
||||
// Whether to generate typed reads for element accesses with hole checks.
|
||||
static bool allowTypedElementHoleCheck() {
|
||||
return false;
|
||||
|
@ -301,22 +295,6 @@ class LIRGeneratorShared
|
|||
static bool allowStaticTypedArrayAccesses() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Provide NYI default implementations of the SIMD visitor functions.
|
||||
// Many targets don't implement SIMD at all, and we don't want to duplicate
|
||||
// these stubs in the specific sub-classes.
|
||||
// Some SIMD visitors are implemented in LIRGenerator in Lowering.cpp. These
|
||||
// shared implementations are not included here.
|
||||
void visitSimdInsertElement(MSimdInsertElement*) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdExtractElement(MSimdExtractElement*) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryArith(MSimdBinaryArith*) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSelect(MSimdSelect*) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSplat(MSimdSplat*) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdValueX4(MSimdValueX4*) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinarySaturating(MSimdBinarySaturating*) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSwizzle(MSimdSwizzle*) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdShuffle(MSimdShuffle*) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdGeneralShuffle(MSimdGeneralShuffle*) { MOZ_CRASH("NYI"); }
|
||||
};
|
||||
|
||||
} // namespace jit
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "jit/x64/Lowering-x64.h"
|
||||
|
||||
#include "jit/Lowering.h"
|
||||
#include "jit/MIR.h"
|
||||
#include "jit/x64/Assembler-x64.h"
|
||||
|
||||
|
@ -74,7 +75,7 @@ LIRGeneratorX64::lowerForMulInt64(LMulI64* ins, MMul* mir, MDefinition* lhs, MDe
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitBox(MBox* box)
|
||||
LIRGenerator::visitBox(MBox* box)
|
||||
{
|
||||
MDefinition* opd = box->getOperand(0);
|
||||
|
||||
|
@ -93,7 +94,7 @@ LIRGeneratorX64::visitBox(MBox* box)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitUnbox(MUnbox* unbox)
|
||||
LIRGenerator::visitUnbox(MUnbox* unbox)
|
||||
{
|
||||
MDefinition* box = unbox->getOperand(0);
|
||||
|
||||
|
@ -125,7 +126,7 @@ LIRGeneratorX64::visitUnbox(MUnbox* unbox)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitReturn(MReturn* ret)
|
||||
LIRGenerator::visitReturn(MReturn* ret)
|
||||
{
|
||||
MDefinition* opd = ret->getOperand(0);
|
||||
MOZ_ASSERT(opd->type() == MIRType::Value);
|
||||
|
@ -160,25 +161,25 @@ LIRGeneratorX64::lowerInt64PhiInput(MPhi* phi, uint32_t inputPosition, LBlock* b
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
{
|
||||
lowerCompareExchangeTypedArrayElement(ins, /* useI386ByteRegisters = */ false);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
{
|
||||
lowerAtomicExchangeTypedArrayElement(ins, /* useI386ByteRegisters = */ false);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
LIRGenerator::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
{
|
||||
lowerAtomicTypedArrayElementBinop(ins, /* useI386ByteRegisters = */ false);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
LIRGenerator::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->input()->type() == MIRType::Int32);
|
||||
LWasmUint32ToDouble* lir = new(alloc()) LWasmUint32ToDouble(useRegisterAtStart(ins->input()));
|
||||
|
@ -186,7 +187,7 @@ LIRGeneratorX64::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
LIRGenerator::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->input()->type() == MIRType::Int32);
|
||||
LWasmUint32ToFloat32* lir = new(alloc()) LWasmUint32ToFloat32(useRegisterAtStart(ins->input()));
|
||||
|
@ -194,7 +195,7 @@ LIRGeneratorX64::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitWasmLoad(MWasmLoad* ins)
|
||||
LIRGenerator::visitWasmLoad(MWasmLoad* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -210,7 +211,7 @@ LIRGeneratorX64::visitWasmLoad(MWasmLoad* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitWasmStore(MWasmStore* ins)
|
||||
LIRGenerator::visitWasmStore(MWasmStore* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -252,7 +253,7 @@ LIRGeneratorX64::visitWasmStore(MWasmStore* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
LIRGenerator::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -261,7 +262,7 @@ LIRGeneratorX64::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
LIRGenerator::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -295,7 +296,7 @@ LIRGeneratorX64::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -315,7 +316,7 @@ LIRGeneratorX64::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->base()->type() == MIRType::Int32);
|
||||
|
||||
|
@ -332,7 +333,7 @@ LIRGeneratorX64::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -403,7 +404,7 @@ LIRGeneratorX64::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitSubstr(MSubstr* ins)
|
||||
LIRGenerator::visitSubstr(MSubstr* ins)
|
||||
{
|
||||
LSubstr* lir = new (alloc()) LSubstr(useRegister(ins->string()),
|
||||
useRegister(ins->begin()),
|
||||
|
@ -416,13 +417,13 @@ LIRGeneratorX64::visitSubstr(MSubstr* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
LIRGenerator::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitRandom(MRandom* ins)
|
||||
LIRGenerator::visitRandom(MRandom* ins)
|
||||
{
|
||||
LRandom *lir = new(alloc()) LRandom(temp(),
|
||||
temp(),
|
||||
|
@ -475,7 +476,7 @@ LIRGeneratorX64::lowerUModI64(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
LIRGenerator::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
{
|
||||
MDefinition* opd = ins->input();
|
||||
MOZ_ASSERT(opd->type() == MIRType::Double || opd->type() == MIRType::Float32);
|
||||
|
@ -485,7 +486,7 @@ LIRGeneratorX64::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
LIRGenerator::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
{
|
||||
MDefinition* opd = ins->input();
|
||||
MOZ_ASSERT(opd->type() == MIRType::Int64);
|
||||
|
@ -496,13 +497,13 @@ LIRGeneratorX64::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
LIRGenerator::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
{
|
||||
defineInt64(new(alloc()) LExtendInt32ToInt64(useAtStart(ins->input())), ins);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX64::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
LIRGenerator::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
{
|
||||
defineInt64(new(alloc()) LSignExtendInt64(useInt64RegisterAtStart(ins->input())), ins);
|
||||
}
|
||||
|
|
|
@ -14,12 +14,11 @@ namespace jit {
|
|||
|
||||
class LIRGeneratorX64 : public LIRGeneratorX86Shared
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
LIRGeneratorX64(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
|
||||
: LIRGeneratorX86Shared(gen, graph, lirGraph)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
void lowerUntypedPhiInput(MPhi* phi, uint32_t inputPosition, LBlock* block, size_t lirIndex);
|
||||
void defineUntypedPhi(MPhi* phi, size_t lirIndex);
|
||||
void lowerInt64PhiInput(MPhi* phi, uint32_t inputPosition, LBlock* block, size_t lirIndex);
|
||||
|
@ -47,30 +46,6 @@ class LIRGeneratorX64 : public LIRGeneratorX86Shared
|
|||
void lowerModI64(MMod* mod);
|
||||
void lowerUDivI64(MDiv* div);
|
||||
void lowerUModI64(MMod* mod);
|
||||
|
||||
public:
|
||||
void visitBox(MBox* box);
|
||||
void visitUnbox(MUnbox* unbox);
|
||||
void visitReturn(MReturn* ret);
|
||||
void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
|
||||
void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
|
||||
void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
|
||||
void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins);
|
||||
void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins);
|
||||
void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins);
|
||||
void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
|
||||
void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins);
|
||||
void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins);
|
||||
void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins);
|
||||
void visitWasmLoad(MWasmLoad* ins);
|
||||
void visitWasmStore(MWasmStore* ins);
|
||||
void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
|
||||
void visitSubstr(MSubstr* ins);
|
||||
void visitRandom(MRandom* ins);
|
||||
void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
|
||||
void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
|
||||
void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins);
|
||||
void visitSignExtendInt64(MSignExtendInt64* ins);
|
||||
};
|
||||
|
||||
typedef LIRGeneratorX64 LIRGeneratorSpecific;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
|
||||
#include "jit/Lowering.h"
|
||||
#include "jit/MIR.h"
|
||||
|
||||
#include "jit/shared/Lowering-shared-inl.h"
|
||||
|
@ -34,7 +35,7 @@ LIRGeneratorX86Shared::newLTableSwitchV(MTableSwitch* tableswitch)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitPowHalf(MPowHalf* ins)
|
||||
LIRGenerator::visitPowHalf(MPowHalf* ins)
|
||||
{
|
||||
MDefinition* input = ins->input();
|
||||
MOZ_ASSERT(input->type() == MIRType::Double);
|
||||
|
@ -266,7 +267,7 @@ LIRGeneratorX86Shared::lowerModI(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitWasmSelect(MWasmSelect* ins)
|
||||
LIRGenerator::visitWasmSelect(MWasmSelect* ins)
|
||||
{
|
||||
if (ins->type() == MIRType::Int64) {
|
||||
auto* lir = new(alloc()) LWasmSelectI64(useInt64RegisterAtStart(ins->trueExpr()),
|
||||
|
@ -285,7 +286,7 @@ LIRGeneratorX86Shared::visitWasmSelect(MWasmSelect* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitWasmNeg(MWasmNeg* ins)
|
||||
LIRGenerator::visitWasmNeg(MWasmNeg* ins)
|
||||
{
|
||||
switch (ins->type()) {
|
||||
case MIRType::Int32:
|
||||
|
@ -610,7 +611,7 @@ LIRGeneratorX86Shared::lowerAtomicTypedArrayElementBinop(MAtomicTypedArrayElemen
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdInsertElement(MSimdInsertElement* ins)
|
||||
LIRGenerator::visitSimdInsertElement(MSimdInsertElement* ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->type()));
|
||||
|
||||
|
@ -643,7 +644,7 @@ LIRGeneratorX86Shared::visitSimdInsertElement(MSimdInsertElement* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdExtractElement(MSimdExtractElement* ins)
|
||||
LIRGenerator::visitSimdExtractElement(MSimdExtractElement* ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->input()->type()));
|
||||
MOZ_ASSERT(!IsSimdType(ins->type()));
|
||||
|
@ -695,7 +696,7 @@ LIRGeneratorX86Shared::visitSimdExtractElement(MSimdExtractElement* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdBinaryArith(MSimdBinaryArith* ins)
|
||||
LIRGenerator::visitSimdBinaryArith(MSimdBinaryArith* ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->lhs()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->rhs()->type()));
|
||||
|
@ -749,7 +750,7 @@ LIRGeneratorX86Shared::visitSimdBinaryArith(MSimdBinaryArith* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdBinarySaturating(MSimdBinarySaturating* ins)
|
||||
LIRGenerator::visitSimdBinarySaturating(MSimdBinarySaturating* ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->lhs()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->rhs()->type()));
|
||||
|
@ -766,7 +767,7 @@ LIRGeneratorX86Shared::visitSimdBinarySaturating(MSimdBinarySaturating* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdSelect(MSimdSelect* ins)
|
||||
LIRGenerator::visitSimdSelect(MSimdSelect* ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->type()));
|
||||
|
||||
|
@ -784,7 +785,7 @@ LIRGeneratorX86Shared::visitSimdSelect(MSimdSelect* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdSplat(MSimdSplat* ins)
|
||||
LIRGenerator::visitSimdSplat(MSimdSplat* ins)
|
||||
{
|
||||
LAllocation x = useRegisterAtStart(ins->getOperand(0));
|
||||
|
||||
|
@ -815,7 +816,7 @@ LIRGeneratorX86Shared::visitSimdSplat(MSimdSplat* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdValueX4(MSimdValueX4* ins)
|
||||
LIRGenerator::visitSimdValueX4(MSimdValueX4* ins)
|
||||
{
|
||||
switch (ins->type()) {
|
||||
case MIRType::Float32x4: {
|
||||
|
@ -846,7 +847,7 @@ LIRGeneratorX86Shared::visitSimdValueX4(MSimdValueX4* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdSwizzle(MSimdSwizzle* ins)
|
||||
LIRGenerator::visitSimdSwizzle(MSimdSwizzle* ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->input()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->type()));
|
||||
|
@ -877,7 +878,7 @@ LIRGeneratorX86Shared::visitSimdSwizzle(MSimdSwizzle* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdShuffle(MSimdShuffle* ins)
|
||||
LIRGenerator::visitSimdShuffle(MSimdShuffle* ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->lhs()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->rhs()->type()));
|
||||
|
@ -916,7 +917,7 @@ LIRGeneratorX86Shared::visitSimdShuffle(MSimdShuffle* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdGeneralShuffle(MSimdGeneralShuffle* ins)
|
||||
LIRGenerator::visitSimdGeneralShuffle(MSimdGeneralShuffle* ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->type()));
|
||||
|
||||
|
@ -962,7 +963,7 @@ LIRGeneratorX86Shared::visitSimdGeneralShuffle(MSimdGeneralShuffle* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86Shared::visitCopySign(MCopySign* ins)
|
||||
LIRGenerator::visitCopySign(MCopySign* ins)
|
||||
{
|
||||
MDefinition* lhs = ins->lhs();
|
||||
MDefinition* rhs = ins->rhs();
|
||||
|
|
|
@ -23,7 +23,6 @@ class LIRGeneratorX86Shared : public LIRGeneratorShared
|
|||
MTableSwitch* ins);
|
||||
LTableSwitchV* newLTableSwitchV(MTableSwitch* ins);
|
||||
|
||||
void visitPowHalf(MPowHalf* ins);
|
||||
void lowerForShift(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir, MDefinition* lhs,
|
||||
MDefinition* rhs);
|
||||
void lowerForALU(LInstructionHelper<1, 1, 0>* ins, MDefinition* mir, MDefinition* input);
|
||||
|
@ -43,8 +42,6 @@ class LIRGeneratorX86Shared : public LIRGeneratorShared
|
|||
MDefinition* lhs, MDefinition* rhs);
|
||||
void lowerForBitAndAndBranch(LBitAndAndBranch* baab, MInstruction* mir,
|
||||
MDefinition* lhs, MDefinition* rhs);
|
||||
void visitWasmNeg(MWasmNeg* ins);
|
||||
void visitWasmSelect(MWasmSelect* ins);
|
||||
void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs);
|
||||
void lowerDivI(MDiv* div);
|
||||
void lowerModI(MMod* mod);
|
||||
|
@ -53,23 +50,12 @@ class LIRGeneratorX86Shared : public LIRGeneratorShared
|
|||
void lowerUrshD(MUrsh* mir);
|
||||
void lowerTruncateDToInt32(MTruncateToInt32* ins);
|
||||
void lowerTruncateFToInt32(MTruncateToInt32* ins);
|
||||
void visitSimdInsertElement(MSimdInsertElement* ins);
|
||||
void visitSimdExtractElement(MSimdExtractElement* ins);
|
||||
void visitSimdBinaryArith(MSimdBinaryArith* ins);
|
||||
void visitSimdBinarySaturating(MSimdBinarySaturating* ins);
|
||||
void visitSimdSelect(MSimdSelect* ins);
|
||||
void visitSimdSplat(MSimdSplat* ins);
|
||||
void visitSimdSwizzle(MSimdSwizzle* ins);
|
||||
void visitSimdShuffle(MSimdShuffle* ins);
|
||||
void visitSimdGeneralShuffle(MSimdGeneralShuffle* ins);
|
||||
void visitSimdValueX4(MSimdValueX4* ins);
|
||||
void lowerCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins,
|
||||
bool useI386ByteRegisters);
|
||||
void lowerAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins,
|
||||
bool useI386ByteRegisters);
|
||||
void lowerAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins,
|
||||
bool useI386ByteRegisters);
|
||||
void visitCopySign(MCopySign* ins);
|
||||
};
|
||||
|
||||
} // namespace jit
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "jit/x86/Lowering-x86.h"
|
||||
|
||||
#include "jit/Lowering.h"
|
||||
#include "jit/MIR.h"
|
||||
#include "jit/x86/Assembler-x86.h"
|
||||
|
||||
|
@ -50,7 +51,7 @@ LIRGeneratorX86::tempByteOpRegister()
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitBox(MBox* box)
|
||||
LIRGenerator::visitBox(MBox* box)
|
||||
{
|
||||
MDefinition* inner = box->getOperand(0);
|
||||
|
||||
|
@ -90,7 +91,7 @@ LIRGeneratorX86::visitBox(MBox* box)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitUnbox(MUnbox* unbox)
|
||||
LIRGenerator::visitUnbox(MUnbox* unbox)
|
||||
{
|
||||
MDefinition* inner = unbox->getOperand(0);
|
||||
|
||||
|
@ -145,7 +146,7 @@ LIRGeneratorX86::visitUnbox(MUnbox* unbox)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitReturn(MReturn* ret)
|
||||
LIRGenerator::visitReturn(MReturn* ret)
|
||||
{
|
||||
MDefinition* opd = ret->getOperand(0);
|
||||
MOZ_ASSERT(opd->type() == MIRType::Value);
|
||||
|
@ -250,25 +251,25 @@ LIRGeneratorX86::lowerForMulInt64(LMulI64* ins, MMul* mir, MDefinition* lhs, MDe
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins)
|
||||
{
|
||||
lowerCompareExchangeTypedArrayElement(ins, /* useI386ByteRegisters = */ true);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
LIRGenerator::visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins)
|
||||
{
|
||||
lowerAtomicExchangeTypedArrayElement(ins, /*useI386ByteRegisters=*/ true);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
LIRGenerator::visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins)
|
||||
{
|
||||
lowerAtomicTypedArrayElementBinop(ins, /* useI386ByteRegisters = */ true);
|
||||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
LIRGenerator::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->input()->type() == MIRType::Int32);
|
||||
LWasmUint32ToDouble* lir = new(alloc()) LWasmUint32ToDouble(useRegisterAtStart(ins->input()), temp());
|
||||
|
@ -276,7 +277,7 @@ LIRGeneratorX86::visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
LIRGenerator::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
||||
{
|
||||
MOZ_ASSERT(ins->input()->type() == MIRType::Int32);
|
||||
LWasmUint32ToFloat32* lir = new(alloc()) LWasmUint32ToFloat32(useRegisterAtStart(ins->input()), temp());
|
||||
|
@ -284,7 +285,7 @@ LIRGeneratorX86::visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitWasmLoad(MWasmLoad* ins)
|
||||
LIRGenerator::visitWasmLoad(MWasmLoad* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -334,7 +335,7 @@ LIRGeneratorX86::visitWasmLoad(MWasmLoad* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitWasmStore(MWasmStore* ins)
|
||||
LIRGenerator::visitWasmStore(MWasmStore* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -395,7 +396,7 @@ LIRGeneratorX86::visitWasmStore(MWasmStore* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
LIRGenerator::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -420,7 +421,7 @@ LIRGeneratorX86::visitAsmJSLoadHeap(MAsmJSLoadHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
LIRGenerator::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -469,7 +470,7 @@ LIRGeneratorX86::visitAsmJSStoreHeap(MAsmJSStoreHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
LIRGenerator::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins)
|
||||
{
|
||||
// The code generated for StoreTypedArrayElementStatic is identical to that
|
||||
// for AsmJSStoreHeap, and the same concerns apply.
|
||||
|
@ -493,7 +494,7 @@ LIRGeneratorX86::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -541,7 +542,7 @@ LIRGeneratorX86::visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
||||
{
|
||||
MDefinition* memoryBase = ins->memoryBase();
|
||||
MOZ_ASSERT(memoryBase->type() == MIRType::Pointer);
|
||||
|
@ -572,7 +573,7 @@ LIRGeneratorX86::visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
LIRGenerator::visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins)
|
||||
{
|
||||
MDefinition* base = ins->base();
|
||||
MOZ_ASSERT(base->type() == MIRType::Int32);
|
||||
|
@ -723,7 +724,7 @@ LIRGeneratorX86::lowerUModI64(MMod* mod)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitSubstr(MSubstr* ins)
|
||||
LIRGenerator::visitSubstr(MSubstr* ins)
|
||||
{
|
||||
// Due to lack of registers on x86, we reuse the string register as
|
||||
// temporary. As a result we only need two temporary registers and take a
|
||||
|
@ -739,7 +740,7 @@ LIRGeneratorX86::visitSubstr(MSubstr* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitRandom(MRandom* ins)
|
||||
LIRGenerator::visitRandom(MRandom* ins)
|
||||
{
|
||||
LRandom *lir = new(alloc()) LRandom(temp(),
|
||||
temp(),
|
||||
|
@ -750,7 +751,7 @@ LIRGeneratorX86::visitRandom(MRandom* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
LIRGenerator::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
||||
{
|
||||
MDefinition* opd = ins->input();
|
||||
MOZ_ASSERT(opd->type() == MIRType::Double || opd->type() == MIRType::Float32);
|
||||
|
@ -760,7 +761,7 @@ LIRGeneratorX86::visitWasmTruncateToInt64(MWasmTruncateToInt64* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
LIRGenerator::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
||||
{
|
||||
MDefinition* opd = ins->input();
|
||||
MOZ_ASSERT(opd->type() == MIRType::Int64);
|
||||
|
@ -776,7 +777,7 @@ LIRGeneratorX86::visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
LIRGenerator::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
||||
{
|
||||
if (ins->isUnsigned()) {
|
||||
defineInt64(new(alloc()) LExtendInt32ToInt64(useRegisterAtStart(ins->input())), ins);
|
||||
|
@ -789,7 +790,7 @@ LIRGeneratorX86::visitExtendInt32ToInt64(MExtendInt32ToInt64* ins)
|
|||
}
|
||||
|
||||
void
|
||||
LIRGeneratorX86::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
LIRGenerator::visitSignExtendInt64(MSignExtendInt64* ins)
|
||||
{
|
||||
// Here we'll end up using cdq which requires input and output in (edx,eax).
|
||||
LSignExtendInt64* lir =
|
||||
|
|
|
@ -14,12 +14,11 @@ namespace jit {
|
|||
|
||||
class LIRGeneratorX86 : public LIRGeneratorX86Shared
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
LIRGeneratorX86(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
|
||||
: LIRGeneratorX86Shared(gen, graph, lirGraph)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
// Returns a box allocation with type set to reg1 and payload set to reg2.
|
||||
LBoxAllocation useBoxFixed(MDefinition* mir, Register reg1, Register reg2,
|
||||
bool useAtStart = false);
|
||||
|
@ -55,35 +54,12 @@ class LIRGeneratorX86 : public LIRGeneratorX86Shared
|
|||
void lowerUDivI64(MDiv* div);
|
||||
void lowerUModI64(MMod* mod);
|
||||
|
||||
public:
|
||||
void visitBox(MBox* box);
|
||||
void visitUnbox(MUnbox* unbox);
|
||||
void visitReturn(MReturn* ret);
|
||||
void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
|
||||
void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
|
||||
void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
|
||||
void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins);
|
||||
void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins);
|
||||
void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins);
|
||||
void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
|
||||
void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins);
|
||||
void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins);
|
||||
void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins);
|
||||
void visitWasmLoad(MWasmLoad* ins);
|
||||
void visitWasmStore(MWasmStore* ins);
|
||||
void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
|
||||
void visitSubstr(MSubstr* ins);
|
||||
void visitRandom(MRandom* ins);
|
||||
void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
|
||||
void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
|
||||
void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins);
|
||||
void visitSignExtendInt64(MSignExtendInt64* ins);
|
||||
void lowerPhi(MPhi* phi);
|
||||
|
||||
public:
|
||||
static bool allowTypedElementHoleCheck() {
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool allowStaticTypedArrayAccesses() {
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче