Bug 1446766 part 1 - Use a macro to declare CodeGenerator visit methods. r=nbp

This commit is contained in:
Jan de Mooij 2018-03-19 14:30:50 +01:00
Родитель a93be87a5c
Коммит 989e24aa7d
24 изменённых файлов: 1638 добавлений и 1657 удалений

Просмотреть файл

@ -3035,6 +3035,12 @@ CodeGenerator::visitOsiPoint(LOsiPoint* lir)
#endif
}
void
CodeGenerator::visitPhi(LPhi* lir)
{
MOZ_CRASH("Unexpected LPhi in CodeGenerator");
}
void
CodeGenerator::visitGoto(LGoto* lir)
{
@ -5803,9 +5809,11 @@ CodeGenerator::generateBody()
#endif
switch (iter->op()) {
#define LIROP(op) case LNode::Opcode::op: visit##op(iter->to##op()); break;
#ifndef JS_CODEGEN_NONE
# define LIROP(op) case LNode::Opcode::op: visit##op(iter->to##op()); break;
LIR_OPCODE_LIST(LIROP)
#undef LIROP
# undef LIROP
#endif
case LNode::Opcode::Invalid:
default:
MOZ_CRASH("Invalid LIR op");

Просмотреть файл

@ -72,122 +72,68 @@ class CodeGenerator final : public CodeGeneratorSpecific
CodeGenerator(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm = nullptr);
~CodeGenerator();
public:
MOZ_MUST_USE bool generate();
MOZ_MUST_USE bool generateWasm(wasm::SigIdDesc sigId, wasm::BytecodeOffset trapOffset,
wasm::FuncOffsets* offsets);
MOZ_MUST_USE bool link(JSContext* cx, CompilerConstraintList* constraints);
MOZ_MUST_USE bool linkSharedStubs(JSContext* cx);
void visitOsiPoint(LOsiPoint* lir);
void visitGoto(LGoto* lir);
void visitTableSwitch(LTableSwitch* ins);
void visitTableSwitchV(LTableSwitchV* ins);
void visitCloneLiteral(LCloneLiteral* lir);
void visitParameter(LParameter* lir);
void visitCallee(LCallee* lir);
void visitIsConstructing(LIsConstructing* lir);
void visitStart(LStart* lir);
void visitReturn(LReturn* ret);
void visitDefVar(LDefVar* lir);
void visitDefLexical(LDefLexical* lir);
void visitDefFun(LDefFun* lir);
void visitOsrEntry(LOsrEntry* lir);
void visitOsrEnvironmentChain(LOsrEnvironmentChain* lir);
void visitOsrValue(LOsrValue* lir);
void visitOsrReturnValue(LOsrReturnValue* lir);
void visitOsrArgumentsObject(LOsrArgumentsObject* lir);
void visitStackArgT(LStackArgT* lir);
void visitStackArgV(LStackArgV* lir);
void visitMoveGroup(LMoveGroup* group);
void visitValueToInt32(LValueToInt32* lir);
void visitValueToDouble(LValueToDouble* lir);
void visitValueToFloat32(LValueToFloat32* lir);
void visitFloat32ToDouble(LFloat32ToDouble* lir);
void visitDoubleToFloat32(LDoubleToFloat32* lir);
void visitInt32ToFloat32(LInt32ToFloat32* lir);
void visitInt32ToDouble(LInt32ToDouble* lir);
void emitOOLTestObject(Register objreg, Label* ifTruthy, Label* ifFalsy, Register scratch);
void visitTestOAndBranch(LTestOAndBranch* lir);
void visitTestVAndBranch(LTestVAndBranch* lir);
void visitFunctionDispatch(LFunctionDispatch* lir);
void visitObjectGroupDispatch(LObjectGroupDispatch* lir);
void visitBooleanToString(LBooleanToString* lir);
void emitIntToString(Register input, Register output, Label* ool);
void visitIntToString(LIntToString* lir);
void visitDoubleToString(LDoubleToString* lir);
void visitValueToString(LValueToString* lir);
void visitValueToObject(LValueToObject* lir);
void visitValueToObjectOrNull(LValueToObjectOrNull* lir);
void visitInteger(LInteger* lir);
void visitInteger64(LInteger64* lir);
void visitRegExp(LRegExp* lir);
void visitRegExpMatcher(LRegExpMatcher* lir);
void visitOutOfLineRegExpMatcher(OutOfLineRegExpMatcher* ool);
void visitRegExpSearcher(LRegExpSearcher* lir);
void visitOutOfLineRegExpSearcher(OutOfLineRegExpSearcher* ool);
void visitRegExpTester(LRegExpTester* lir);
void visitOutOfLineRegExpTester(OutOfLineRegExpTester* ool);
void visitRegExpPrototypeOptimizable(LRegExpPrototypeOptimizable* lir);
void visitOutOfLineRegExpPrototypeOptimizable(OutOfLineRegExpPrototypeOptimizable* ool);
void visitRegExpInstanceOptimizable(LRegExpInstanceOptimizable* lir);
void visitOutOfLineRegExpInstanceOptimizable(OutOfLineRegExpInstanceOptimizable* ool);
void visitGetFirstDollarIndex(LGetFirstDollarIndex* lir);
void visitStringReplace(LStringReplace* lir);
void emitSharedStub(ICStub::Kind kind, LInstruction* lir);
void visitBinarySharedStub(LBinarySharedStub* lir);
void visitUnarySharedStub(LUnarySharedStub* lir);
void visitNullarySharedStub(LNullarySharedStub* lir);
void visitClassConstructor(LClassConstructor* lir);
void visitLambda(LLambda* lir);
void visitOutOfLineLambdaArrow(OutOfLineLambdaArrow* ool);
void visitLambdaArrow(LLambdaArrow* lir);
void visitLambdaForSingleton(LLambdaForSingleton* lir);
void visitSetFunName(LSetFunName* lir);
void visitPointer(LPointer* lir);
void visitKeepAliveObject(LKeepAliveObject* lir);
void visitSlots(LSlots* lir);
void visitLoadSlotT(LLoadSlotT* lir);
void visitLoadSlotV(LLoadSlotV* lir);
void visitStoreSlotT(LStoreSlotT* lir);
void visitStoreSlotV(LStoreSlotV* lir);
void visitElements(LElements* lir);
void visitConvertElementsToDoubles(LConvertElementsToDoubles* lir);
void visitMaybeToDoubleElement(LMaybeToDoubleElement* lir);
void visitMaybeCopyElementsForWrite(LMaybeCopyElementsForWrite* lir);
void visitGuardShape(LGuardShape* guard);
void visitGuardObjectGroup(LGuardObjectGroup* guard);
void visitGuardObjectIdentity(LGuardObjectIdentity* guard);
void visitGuardReceiverPolymorphic(LGuardReceiverPolymorphic* lir);
void visitGuardUnboxedExpando(LGuardUnboxedExpando* lir);
void visitLoadUnboxedExpando(LLoadUnboxedExpando* lir);
void visitTypeBarrierV(LTypeBarrierV* lir);
void visitTypeBarrierO(LTypeBarrierO* lir);
void visitOutOfLineTypeOfV(OutOfLineTypeOfV* ool);
template <SwitchTableType tableType>
void visitOutOfLineSwitch(OutOfLineSwitch<tableType>* ool);
void visitOutOfLineIsCallable(OutOfLineIsCallable* ool);
void visitOutOfLineIsConstructor(OutOfLineIsConstructor* ool);
void visitOutOfLineNaNToZero(OutOfLineNaNToZero* ool);
void visitCheckOverRecursedFailure(CheckOverRecursedFailure* ool);
void visitOutOfLineUnboxFloatingPoint(OutOfLineUnboxFloatingPoint* ool);
void visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool);
void visitOutOfLineICFallback(OutOfLineICFallback* ool);
void visitOutOfLineInterruptCheckImplicit(OutOfLineInterruptCheckImplicit* ins);
void visitOutOfLineCallPostWriteBarrier(OutOfLineCallPostWriteBarrier* ool);
void visitOutOfLineCallPostWriteElementBarrier(OutOfLineCallPostWriteElementBarrier* ool);
void visitOutOfLineNewArray(OutOfLineNewArray* ool);
void visitOutOfLineNewObject(OutOfLineNewObject* ool);
private:
void emitSharedStub(ICStub::Kind kind, LInstruction* lir);
void emitPostWriteBarrier(const LAllocation* obj);
void emitPostWriteBarrier(Register objreg);
void emitPostWriteBarrierS(Address address, Register prev, Register next);
template <class LPostBarrierType, MIRType nurseryType>
void visitPostWriteBarrierCommon(LPostBarrierType* lir, OutOfLineCode* ool);
template <class LPostBarrierType>
void visitPostWriteBarrierCommonV(LPostBarrierType* lir, OutOfLineCode* ool);
void visitPostWriteBarrierO(LPostWriteBarrierO* lir);
void visitPostWriteElementBarrierO(LPostWriteElementBarrierO* lir);
void visitPostWriteBarrierV(LPostWriteBarrierV* lir);
void visitPostWriteElementBarrierV(LPostWriteElementBarrierV* lir);
void visitPostWriteBarrierS(LPostWriteBarrierS* lir);
void visitPostWriteElementBarrierS(LPostWriteElementBarrierS* lir);
void visitOutOfLineCallPostWriteBarrier(OutOfLineCallPostWriteBarrier* ool);
void visitOutOfLineCallPostWriteElementBarrier(OutOfLineCallPostWriteElementBarrier* ool);
void visitCallNative(LCallNative* call);
void emitCallInvokeFunction(LInstruction* call, Register callereg,
bool isConstructing, bool ignoresReturnValue,
uint32_t argc, uint32_t unusedStack);
void visitCallGeneric(LCallGeneric* call);
void emitCallInvokeFunctionShuffleNewTarget(LCallKnown *call,
Register calleeReg,
uint32_t numFormals,
uint32_t unusedStack);
void visitCallKnown(LCallKnown* call);
template<typename T> void emitApplyGeneric(T* apply);
template<typename T> void emitCallInvokeFunction(T* apply, Register extraStackSize);
void emitAllocateSpaceForApply(Register argcreg, Register extraStackSpace, Label* end);
@ -195,286 +141,50 @@ class CodeGenerator final : public CodeGeneratorSpecific
size_t argvSrcOffset, size_t argvDstOffset);
void emitPopArguments(Register extraStackSize);
void emitPushArguments(LApplyArgsGeneric* apply, Register extraStackSpace);
void visitApplyArgsGeneric(LApplyArgsGeneric* apply);
void emitPushArguments(LApplyArrayGeneric* apply, Register extraStackSpace);
void visitApplyArrayGeneric(LApplyArrayGeneric* apply);
void visitBail(LBail* lir);
void visitUnreachable(LUnreachable* unreachable);
void visitEncodeSnapshot(LEncodeSnapshot* lir);
void visitGetDynamicName(LGetDynamicName* lir);
void visitCallDirectEval(LCallDirectEval* lir);
void visitDoubleToInt32(LDoubleToInt32* lir);
void visitFloat32ToInt32(LFloat32ToInt32* lir);
void visitNewArrayCallVM(LNewArray* lir);
void visitNewArray(LNewArray* lir);
void visitOutOfLineNewArray(OutOfLineNewArray* ool);
void visitNewArrayCopyOnWrite(LNewArrayCopyOnWrite* lir);
void visitNewArrayDynamicLength(LNewArrayDynamicLength* lir);
void visitNewIterator(LNewIterator* lir);
void visitNewTypedArray(LNewTypedArray* lir);
void visitNewTypedArrayDynamicLength(LNewTypedArrayDynamicLength* lir);
void visitNewObjectVMCall(LNewObject* lir);
void visitNewObject(LNewObject* lir);
void visitOutOfLineNewObject(OutOfLineNewObject* ool);
void visitNewTypedObject(LNewTypedObject* lir);
void visitSimdBox(LSimdBox* lir);
void visitSimdUnbox(LSimdUnbox* lir);
void visitNewNamedLambdaObject(LNewNamedLambdaObject* lir);
void visitNewCallObject(LNewCallObject* lir);
void visitNewSingletonCallObject(LNewSingletonCallObject* lir);
void visitNewStringObject(LNewStringObject* lir);
void visitNewDerivedTypedObject(LNewDerivedTypedObject* lir);
void visitInitElem(LInitElem* lir);
void visitInitElemGetterSetter(LInitElemGetterSetter* lir);
void visitMutateProto(LMutateProto* lir);
void visitInitPropGetterSetter(LInitPropGetterSetter* lir);
void visitCreateThis(LCreateThis* lir);
void visitCreateThisWithProto(LCreateThisWithProto* lir);
void visitCreateThisWithTemplate(LCreateThisWithTemplate* lir);
void visitCreateArgumentsObject(LCreateArgumentsObject* lir);
void visitGetArgumentsObjectArg(LGetArgumentsObjectArg* lir);
void visitSetArgumentsObjectArg(LSetArgumentsObjectArg* lir);
void visitReturnFromCtor(LReturnFromCtor* lir);
void visitComputeThis(LComputeThis* lir);
void visitImplicitThis(LImplicitThis* lir);
void visitArrayLength(LArrayLength* lir);
void visitSetArrayLength(LSetArrayLength* lir);
void visitGetNextEntryForIterator(LGetNextEntryForIterator* lir);
void visitTypedArrayLength(LTypedArrayLength* lir);
void visitTypedArrayElements(LTypedArrayElements* lir);
void visitSetDisjointTypedElements(LSetDisjointTypedElements* lir);
void visitTypedObjectElements(LTypedObjectElements* lir);
void visitSetTypedObjectOffset(LSetTypedObjectOffset* lir);
void visitTypedObjectDescr(LTypedObjectDescr* ins);
void visitStringLength(LStringLength* lir);
void visitSubstr(LSubstr* lir);
void visitInitializedLength(LInitializedLength* lir);
void visitSetInitializedLength(LSetInitializedLength* lir);
void visitNotO(LNotO* ins);
void visitNotV(LNotV* ins);
void visitBoundsCheck(LBoundsCheck* lir);
void visitBoundsCheckRange(LBoundsCheckRange* lir);
void visitBoundsCheckLower(LBoundsCheckLower* lir);
void visitSpectreMaskIndex(LSpectreMaskIndex* lir);
void visitLoadFixedSlotV(LLoadFixedSlotV* ins);
void visitLoadFixedSlotAndUnbox(LLoadFixedSlotAndUnbox* lir);
void visitLoadFixedSlotT(LLoadFixedSlotT* ins);
void visitStoreFixedSlotV(LStoreFixedSlotV* ins);
void visitStoreFixedSlotT(LStoreFixedSlotT* ins);
void emitGetPropertyPolymorphic(LInstruction* lir, Register obj, Register expandoScratch,
Register scratch, const TypedOrValueRegister& output);
void visitGetPropertyPolymorphicV(LGetPropertyPolymorphicV* ins);
void visitGetPropertyPolymorphicT(LGetPropertyPolymorphicT* ins);
void emitSetPropertyPolymorphic(LInstruction* lir, Register obj, Register expandoScratch,
Register scratch, const ConstantOrRegister& value);
void visitSetPropertyPolymorphicV(LSetPropertyPolymorphicV* ins);
void visitSetPropertyPolymorphicT(LSetPropertyPolymorphicT* ins);
void visitAbsI(LAbsI* lir);
void visitAtan2D(LAtan2D* lir);
void visitHypot(LHypot* lir);
void visitPowI(LPowI* lir);
void visitPowD(LPowD* lir);
void visitPowV(LPowV* lir);
void visitMathFunctionD(LMathFunctionD* ins);
void visitMathFunctionF(LMathFunctionF* ins);
void visitModD(LModD* ins);
void visitMinMaxI(LMinMaxI* lir);
void visitBinaryV(LBinaryV* lir);
void emitCompareS(LInstruction* lir, JSOp op, Register left, Register right, Register output);
void visitCompareS(LCompareS* lir);
void visitCompareStrictS(LCompareStrictS* lir);
void visitCompareVM(LCompareVM* lir);
void visitIsNullOrLikeUndefinedV(LIsNullOrLikeUndefinedV* lir);
void visitIsNullOrLikeUndefinedT(LIsNullOrLikeUndefinedT* lir);
void visitIsNullOrLikeUndefinedAndBranchV(LIsNullOrLikeUndefinedAndBranchV* lir);
void visitIsNullOrLikeUndefinedAndBranchT(LIsNullOrLikeUndefinedAndBranchT* lir);
void emitSameValue(FloatRegister left, FloatRegister right, FloatRegister temp,
Register output);
void visitSameValueD(LSameValueD* lir);
void visitSameValueV(LSameValueV* lir);
void visitSameValueVM(LSameValueVM* lir);
void emitConcat(LInstruction* lir, Register lhs, Register rhs, Register output);
void visitConcat(LConcat* lir);
void visitCharCodeAt(LCharCodeAt* lir);
void visitFromCharCode(LFromCharCode* lir);
void visitFromCodePoint(LFromCodePoint* lir);
void visitStringConvertCase(LStringConvertCase* lir);
void visitSinCos(LSinCos *lir);
void visitStringSplit(LStringSplit* lir);
void visitFunctionEnvironment(LFunctionEnvironment* lir);
void visitHomeObject(LHomeObject* lir);
void visitHomeObjectSuperBase(LHomeObjectSuperBase* lir);
void visitNewLexicalEnvironmentObject(LNewLexicalEnvironmentObject* lir);
void visitCopyLexicalEnvironmentObject(LCopyLexicalEnvironmentObject* lir);
void visitCallGetProperty(LCallGetProperty* lir);
void visitCallGetElement(LCallGetElement* lir);
void visitCallSetElement(LCallSetElement* lir);
void visitCallInitElementArray(LCallInitElementArray* lir);
void visitThrow(LThrow* lir);
void visitTypeOfV(LTypeOfV* lir);
void visitOutOfLineTypeOfV(OutOfLineTypeOfV* ool);
void visitToAsync(LToAsync* lir);
void visitToAsyncGen(LToAsyncGen* lir);
void visitToAsyncIter(LToAsyncIter* lir);
void visitToIdV(LToIdV* lir);
template<typename T> void emitLoadElementT(LLoadElementT* lir, const T& source);
void visitLoadElementT(LLoadElementT* lir);
void visitLoadElementV(LLoadElementV* load);
void visitLoadElementHole(LLoadElementHole* lir);
void visitLoadUnboxedPointerV(LLoadUnboxedPointerV* lir);
void visitLoadUnboxedPointerT(LLoadUnboxedPointerT* lir);
void visitUnboxObjectOrNull(LUnboxObjectOrNull* lir);
template <SwitchTableType tableType>
void visitOutOfLineSwitch(OutOfLineSwitch<tableType>* ool);
void visitLoadElementFromStateV(LLoadElementFromStateV* lir);
void visitStoreElementT(LStoreElementT* lir);
void visitStoreElementV(LStoreElementV* lir);
template <typename T> void emitStoreElementHoleT(T* lir);
template <typename T> void emitStoreElementHoleV(T* lir);
void visitStoreElementHoleT(LStoreElementHoleT* lir);
void visitStoreElementHoleV(LStoreElementHoleV* lir);
void visitFallibleStoreElementV(LFallibleStoreElementV* lir);
void visitFallibleStoreElementT(LFallibleStoreElementT* lir);
void visitStoreUnboxedPointer(LStoreUnboxedPointer* lir);
void visitConvertUnboxedObjectToNative(LConvertUnboxedObjectToNative* lir);
void emitArrayPopShift(LInstruction* lir, const MArrayPopShift* mir, Register obj,
Register elementsTemp, Register lengthTemp, TypedOrValueRegister out);
void visitArrayPopShiftV(LArrayPopShiftV* lir);
void visitArrayPopShiftT(LArrayPopShiftT* lir);
void emitArrayPush(LInstruction* lir, Register obj,
const ConstantOrRegister& value, Register elementsTemp, Register length);
void visitArrayPushV(LArrayPushV* lir);
void visitArrayPushT(LArrayPushT* lir);
void visitArraySlice(LArraySlice* lir);
void visitArrayJoin(LArrayJoin* lir);
void visitLoadUnboxedScalar(LLoadUnboxedScalar* lir);
void visitLoadTypedArrayElementHole(LLoadTypedArrayElementHole* lir);
void visitStoreUnboxedScalar(LStoreUnboxedScalar* lir);
void visitStoreTypedArrayElementHole(LStoreTypedArrayElementHole* lir);
void visitAtomicIsLockFree(LAtomicIsLockFree* lir);
void visitGuardSharedTypedArray(LGuardSharedTypedArray* lir);
void visitClampIToUint8(LClampIToUint8* lir);
void visitClampDToUint8(LClampDToUint8* lir);
void visitClampVToUint8(LClampVToUint8* lir);
void visitGetIteratorCache(LGetIteratorCache* lir);
void visitIteratorMore(LIteratorMore* lir);
void visitIsNoIterAndBranch(LIsNoIterAndBranch* lir);
void visitIteratorEnd(LIteratorEnd* lir);
void visitArgumentsLength(LArgumentsLength* lir);
void visitGetFrameArgument(LGetFrameArgument* lir);
void visitSetFrameArgumentT(LSetFrameArgumentT* lir);
void visitSetFrameArgumentC(LSetFrameArgumentC* lir);
void visitSetFrameArgumentV(LSetFrameArgumentV* lir);
void visitRunOncePrologue(LRunOncePrologue* lir);
void emitRest(LInstruction* lir, Register array, Register numActuals,
Register temp0, Register temp1, unsigned numFormals,
JSObject* templateObject, bool saveAndRestore, Register resultreg);
void visitRest(LRest* lir);
void visitCallSetProperty(LCallSetProperty* ins);
void visitCallDeleteProperty(LCallDeleteProperty* lir);
void visitCallDeleteElement(LCallDeleteElement* lir);
void visitBitNotV(LBitNotV* lir);
void visitBitOpV(LBitOpV* lir);
void emitInstanceOf(LInstruction* ins, JSObject* prototypeObject);
void visitInCache(LInCache* ins);
void visitInArray(LInArray* ins);
void visitInstanceOfO(LInstanceOfO* ins);
void visitInstanceOfV(LInstanceOfV* ins);
void visitInstanceOfCache(LInstanceOfCache* ins);
void visitGetDOMProperty(LGetDOMProperty* lir);
void visitGetDOMMemberV(LGetDOMMemberV* lir);
void visitGetDOMMemberT(LGetDOMMemberT* lir);
void visitSetDOMProperty(LSetDOMProperty* lir);
void visitCallDOMNative(LCallDOMNative* lir);
void visitCallGetIntrinsicValue(LCallGetIntrinsicValue* lir);
void visitCallBindVar(LCallBindVar* lir);
enum CallableOrConstructor {
Callable,
Constructor
};
template <CallableOrConstructor mode>
void emitIsCallableOrConstructor(Register object, Register output, Label* failure);
void visitIsCallableO(LIsCallableO* lir);
void visitIsCallableV(LIsCallableV* lir);
void visitOutOfLineIsCallable(OutOfLineIsCallable* ool);
void visitIsConstructor(LIsConstructor* lir);
void visitOutOfLineIsConstructor(OutOfLineIsConstructor* ool);
void visitIsArrayO(LIsArrayO* lir);
void visitIsArrayV(LIsArrayV* lir);
void visitIsTypedArray(LIsTypedArray* lir);
void visitIsObject(LIsObject* lir);
void visitIsObjectAndBranch(LIsObjectAndBranch* lir);
void visitHasClass(LHasClass* lir);
void visitObjectClassToString(LObjectClassToString* lir);
void visitWasmParameter(LWasmParameter* lir);
void visitWasmParameterI64(LWasmParameterI64* lir);
void visitWasmReturn(LWasmReturn* ret);
void visitWasmReturnI64(LWasmReturnI64* ret);
void visitWasmReturnVoid(LWasmReturnVoid* ret);
void visitLexicalCheck(LLexicalCheck* ins);
void visitThrowRuntimeLexicalError(LThrowRuntimeLexicalError* ins);
void visitGlobalNameConflictsCheck(LGlobalNameConflictsCheck* ins);
void visitDebugger(LDebugger* ins);
void visitNewTarget(LNewTarget* ins);
void visitArrowNewTarget(LArrowNewTarget* ins);
void visitCheckReturn(LCheckReturn* ins);
void visitCheckIsObj(LCheckIsObj* ins);
void visitCheckIsCallable(LCheckIsCallable* ins);
void visitCheckObjCoercible(LCheckObjCoercible* ins);
void visitDebugCheckSelfHosted(LDebugCheckSelfHosted* ins);
void visitNaNToZero(LNaNToZero* ins);
void visitOutOfLineNaNToZero(OutOfLineNaNToZero* ool);
void visitFinishBoundFunctionInit(LFinishBoundFunctionInit* lir);
void visitIsPackedArray(LIsPackedArray* lir);
void visitGetPrototypeOf(LGetPrototypeOf* lir);
void visitCheckOverRecursed(LCheckOverRecursed* lir);
void visitCheckOverRecursedFailure(CheckOverRecursedFailure* ool);
void visitUnboxFloatingPoint(LUnboxFloatingPoint* lir);
void visitOutOfLineUnboxFloatingPoint(OutOfLineUnboxFloatingPoint* ool);
void visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool);
void loadJSScriptForBlock(MBasicBlock* block, Register reg);
void loadOutermostJSScript(Register reg);
void visitOutOfLineICFallback(OutOfLineICFallback* ool);
void visitGetPropertyCacheV(LGetPropertyCacheV* ins);
void visitGetPropertyCacheT(LGetPropertyCacheT* ins);
void visitGetPropSuperCacheV(LGetPropSuperCacheV* ins);
void visitBindNameCache(LBindNameCache* ins);
void visitCallSetProperty(LInstruction* ins);
void visitSetPropertyCache(LSetPropertyCache* ins);
void visitGetNameCache(LGetNameCache* ins);
void visitHasOwnCache(LHasOwnCache* ins);
void visitAssertRangeI(LAssertRangeI* ins);
void visitAssertRangeD(LAssertRangeD* ins);
void visitAssertRangeF(LAssertRangeF* ins);
void visitAssertRangeV(LAssertRangeV* ins);
void visitAssertResultV(LAssertResultV* ins);
void visitAssertResultT(LAssertResultT* ins);
#ifdef DEBUG
void emitAssertResultV(const ValueOperand output, const TemporaryTypeSet* typeset);
void emitAssertObjectOrStringResult(Register input, MIRType type, const TemporaryTypeSet* typeset);
#endif
void visitInterruptCheck(LInterruptCheck* lir);
void visitOutOfLineInterruptCheckImplicit(OutOfLineInterruptCheckImplicit* ins);
void visitWasmInterruptCheck(LWasmInterruptCheck* lir);
void visitWasmTrap(LWasmTrap* lir);
void visitWasmLoadTls(LWasmLoadTls* ins);
void visitWasmBoundsCheck(LWasmBoundsCheck* ins);
void visitWasmAlignmentCheck(LWasmAlignmentCheck* ins);
void visitRecompileCheck(LRecompileCheck* ins);
void visitRotate(LRotate* ins);
void visitRandom(LRandom* ins);
void visitSignExtendInt32(LSignExtendInt32* ins);
#ifdef DEBUG
void emitDebugForceBailing(LInstruction* lir);
#endif
@ -485,7 +195,6 @@ class CodeGenerator final : public CodeGeneratorSpecific
return counts;
}
private:
void addGetPropertyCache(LInstruction* ins, LiveRegisterSet liveRegs,
TypedOrValueRegister value, const ConstantOrRegister& id,
TypedOrValueRegister output, Register maybeTemp,
@ -625,6 +334,10 @@ class CodeGenerator final : public CodeGeneratorSpecific
uint32_t compartmentStubsToReadBarrier_;
void addSimdTemplateToReadBarrier(SimdType simdType);
#define LIR_OP(op) void visit##op(L##op* ins);
LIR_OPCODE_LIST(LIR_OP)
#undef LIR_OP
};
} // namespace jit

Просмотреть файл

@ -944,10 +944,6 @@ class LElementVisitor
lastPC_(nullptr),
lastNotInlinedPC_(nullptr)
{}
#define VISIT_INS(op) void visit##op(L##op*) { MOZ_CRASH("NYI: " #op); }
LIR_OPCODE_LIST(VISIT_INS)
#undef VISIT_INS
};
typedef InlineList<LInstruction>::iterator LInstructionIterator;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -23,9 +23,9 @@ class CodeGeneratorARM : public CodeGeneratorShared
{
friend class MoveResolverARM;
CodeGeneratorARM* thisFromCtor() {return this;}
protected:
CodeGeneratorARM(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
NonAssertingLabel deoptLabel_;
MoveOperand toMoveOperand(LAllocation a) const;
@ -62,7 +62,6 @@ class CodeGeneratorARM : public CodeGeneratorShared
void generateUDivModZeroCheck(Register rhs, Register output, Label* done, LSnapshot* snapshot,
T* mir);
protected:
bool generateOutOfLineCode();
void emitRoundDouble(FloatRegister src, Register dest, Label* fail);
@ -108,97 +107,6 @@ class CodeGeneratorARM : public CodeGeneratorShared
template <typename T>
void emitWasmUnalignedStore(T* ins);
public:
// Instruction visitors.
void visitMinMaxD(LMinMaxD* ins);
void visitMinMaxF(LMinMaxF* ins);
void visitAbsD(LAbsD* ins);
void visitAbsF(LAbsF* ins);
void visitSqrtD(LSqrtD* ins);
void visitSqrtF(LSqrtF* ins);
void visitAddI(LAddI* ins);
void visitSubI(LSubI* ins);
void visitBitNotI(LBitNotI* ins);
void visitBitOpI(LBitOpI* ins);
void visitMulI(LMulI* ins);
void visitDivI(LDivI* ins);
void visitSoftDivI(LSoftDivI* ins);
void visitDivPowTwoI(LDivPowTwoI* ins);
void visitModI(LModI* ins);
void visitSoftModI(LSoftModI* ins);
void visitModPowTwoI(LModPowTwoI* ins);
void visitModMaskI(LModMaskI* ins);
void visitPowHalfD(LPowHalfD* ins);
void visitShiftI(LShiftI* ins);
void visitShiftI64(LShiftI64* ins);
void visitUrshD(LUrshD* ins);
void visitClzI(LClzI* ins);
void visitCtzI(LCtzI* ins);
void visitPopcntI(LPopcntI* ins);
void visitTestIAndBranch(LTestIAndBranch* test);
void visitCompare(LCompare* comp);
void visitCompareAndBranch(LCompareAndBranch* comp);
void visitTestDAndBranch(LTestDAndBranch* test);
void visitTestFAndBranch(LTestFAndBranch* test);
void visitCompareD(LCompareD* comp);
void visitCompareF(LCompareF* comp);
void visitCompareDAndBranch(LCompareDAndBranch* comp);
void visitCompareFAndBranch(LCompareFAndBranch* comp);
void visitCompareB(LCompareB* lir);
void visitCompareBAndBranch(LCompareBAndBranch* lir);
void visitCompareBitwise(LCompareBitwise* lir);
void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
void visitBitAndAndBranch(LBitAndAndBranch* baab);
void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir);
void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir);
void visitNotI(LNotI* ins);
void visitNotD(LNotD* ins);
void visitNotF(LNotF* ins);
void visitMathD(LMathD* math);
void visitMathF(LMathF* math);
void visitFloor(LFloor* lir);
void visitFloorF(LFloorF* lir);
void visitCeil(LCeil* lir);
void visitCeilF(LCeilF* lir);
void visitRound(LRound* lir);
void visitRoundF(LRoundF* lir);
void visitTruncateDToInt32(LTruncateDToInt32* ins);
void visitTruncateFToInt32(LTruncateFToInt32* ins);
void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir);
void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir);
void visitSignExtendInt64(LSignExtendInt64* ins);
void visitAddI64(LAddI64* lir);
void visitSubI64(LSubI64* lir);
void visitMulI64(LMulI64* lir);
void visitDivOrModI64(LDivOrModI64* lir);
void visitUDivOrModI64(LUDivOrModI64* lir);
void visitCompareI64(LCompareI64* lir);
void visitCompareI64AndBranch(LCompareI64AndBranch* lir);
void visitBitOpI64(LBitOpI64* lir);
void visitRotateI64(LRotateI64* lir);
void visitWasmStackArgI64(LWasmStackArgI64* lir);
void visitWasmSelectI64(LWasmSelectI64* lir);
void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir);
void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir);
void visitPopcntI64(LPopcntI64* ins);
void visitClzI64(LClzI64* ins);
void visitCtzI64(LCtzI64* ins);
void visitNotI64(LNotI64* ins);
void visitWasmTruncateToInt64(LWasmTruncateToInt64* ins);
void visitInt64ToFloatingPointCall(LInt64ToFloatingPointCall* lir);
void visitTestI64AndBranch(LTestI64AndBranch* lir);
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
protected:
ValueOperand ToValue(LInstruction* ins, size_t pos);
ValueOperand ToTempValue(LInstruction* ins, size_t pos);
@ -212,50 +120,6 @@ class CodeGeneratorARM : public CodeGeneratorShared
void modICommon(MMod* mir, Register lhs, Register rhs, Register output, LSnapshot* snapshot,
Label& done);
public:
CodeGeneratorARM(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
public:
void visitBox(LBox* box);
void visitBoxFloatingPoint(LBoxFloatingPoint* box);
void visitUnbox(LUnbox* unbox);
void visitValue(LValue* value);
void visitDouble(LDouble* ins);
void visitFloat32(LFloat32* ins);
void visitNegI(LNegI* lir);
void visitNegD(LNegD* lir);
void visitNegF(LNegF* lir);
void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins);
void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins);
void visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir);
void visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir);
void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir);
void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir);
void visitWasmSelect(LWasmSelect* ins);
void visitWasmReinterpret(LWasmReinterpret* ins);
void visitWasmLoad(LWasmLoad* ins);
void visitWasmLoadI64(LWasmLoadI64* ins);
void visitWasmUnalignedLoad(LWasmUnalignedLoad* ins);
void visitWasmUnalignedLoadI64(LWasmUnalignedLoadI64* ins);
void visitWasmAddOffset(LWasmAddOffset* ins);
void visitWasmStore(LWasmStore* ins);
void visitWasmStoreI64(LWasmStoreI64* ins);
void visitWasmUnalignedStore(LWasmUnalignedStore* ins);
void visitWasmUnalignedStoreI64(LWasmUnalignedStoreI64* ins);
void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins);
void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins);
void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins);
void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins);
void visitWasmStackArg(LWasmStackArg* ins);
void visitWasmTruncateToInt32(LWasmTruncateToInt32* ins);
void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool);
void visitCopySignD(LCopySignD* ins);
void visitCopySignF(LCopySignF* ins);
void visitMemoryBarrier(LMemoryBarrier* ins);
void generateInvalidateEpilogue();
void setReturnDoubleRegs(LiveRegisterSet* regs);
@ -271,35 +135,10 @@ class CodeGeneratorARM : public CodeGeneratorShared
void atomicBinopToTypedIntArray(AtomicOp op, Scalar::Type arrayType, const S& value,
const T& mem, Register flagTemp);
void visitWasmAtomicLoadI64(LWasmAtomicLoadI64* lir);
void visitWasmAtomicStoreI64(LWasmAtomicStoreI64* lir);
void visitWasmCompareExchangeI64(LWasmCompareExchangeI64* lir);
void visitWasmAtomicBinopI64(LWasmAtomicBinopI64* lir);
void visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* lir);
protected:
void visitEffectiveAddress(LEffectiveAddress* ins);
void visitUDiv(LUDiv* ins);
void visitUMod(LUMod* ins);
void visitSoftUDivOrMod(LSoftUDivOrMod* ins);
public:
// Unimplemented SIMD instructions
void visitSimdSplatX4(LSimdSplatX4* lir) { MOZ_CRASH("NYI"); }
void visitSimd128Int(LSimd128Int* ins) { MOZ_CRASH("NYI"); }
void visitSimd128Float(LSimd128Float* ins) { MOZ_CRASH("NYI"); }
void visitSimdReinterpretCast(LSimdReinterpretCast* ins) { MOZ_CRASH("NYI"); }
void visitSimdExtractElementI(LSimdExtractElementI* ins) { MOZ_CRASH("NYI"); }
void visitSimdExtractElementF(LSimdExtractElementF* ins) { MOZ_CRASH("NYI"); }
void visitSimdGeneralShuffleI(LSimdGeneralShuffleI* lir) { MOZ_CRASH("NYI"); }
void visitSimdGeneralShuffleF(LSimdGeneralShuffleF* lir) { MOZ_CRASH("NYI"); }
void visitSimdSwizzleI(LSimdSwizzleI* lir) { MOZ_CRASH("NYI"); }
void visitSimdSwizzleF(LSimdSwizzleF* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir) { MOZ_CRASH("NYI"); }
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool);
};
typedef CodeGeneratorARM CodeGeneratorSpecific;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -20,12 +20,9 @@ class CodeGeneratorARM64 : public CodeGeneratorShared
{
friend class MoveResolverARM64;
CodeGeneratorARM64* thisFromCtor() { return this; }
public:
protected:
CodeGeneratorARM64(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
protected:
NonAssertingLabel deoptLabel_;
MoveOperand toMoveOperand(const LAllocation a) const;
@ -58,7 +55,6 @@ class CodeGeneratorARM64 : public CodeGeneratorShared
return bailoutIf(Assembler::Zero, snapshot);
}
protected:
bool generateOutOfLineCode();
void emitRoundDouble(FloatRegister src, Register dest, Label* fail);
@ -95,68 +91,6 @@ class CodeGeneratorARM64 : public CodeGeneratorShared
void emitTableSwitchDispatch(MTableSwitch* mir, Register index, Register base);
public:
// Instruction visitors.
void visitMinMaxD(LMinMaxD* ins);
void visitMinMaxF(LMinMaxF* math);
void visitAbsD(LAbsD* ins);
void visitAbsF(LAbsF* ins);
void visitSqrtD(LSqrtD* ins);
void visitSqrtF(LSqrtF* ins);
void visitAddI(LAddI* ins);
void visitSubI(LSubI* ins);
void visitBitNotI(LBitNotI* ins);
void visitBitOpI(LBitOpI* ins);
void visitMulI(LMulI* ins);
void visitDivI(LDivI* ins);
void visitDivPowTwoI(LDivPowTwoI* ins);
void visitModI(LModI* ins);
void visitModPowTwoI(LModPowTwoI* ins);
void visitModMaskI(LModMaskI* ins);
void visitPowHalfD(LPowHalfD* ins);
void visitShiftI(LShiftI* ins);
void visitUrshD(LUrshD* ins);
void visitTestIAndBranch(LTestIAndBranch* test);
void visitCompare(LCompare* comp);
void visitCompareAndBranch(LCompareAndBranch* comp);
void visitTestDAndBranch(LTestDAndBranch* test);
void visitTestFAndBranch(LTestFAndBranch* test);
void visitCompareD(LCompareD* comp);
void visitCompareF(LCompareF* comp);
void visitCompareDAndBranch(LCompareDAndBranch* comp);
void visitCompareFAndBranch(LCompareFAndBranch* comp);
void visitCompareB(LCompareB* lir);
void visitCompareBAndBranch(LCompareBAndBranch* lir);
void visitCompareBitwise(LCompareBitwise* lir);
void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
void visitBitAndAndBranch(LBitAndAndBranch* baab);
void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir);
void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir);
void visitNotI(LNotI* ins);
void visitNotD(LNotD* ins);
void visitNotF(LNotF* ins);
void visitMathD(LMathD* math);
void visitMathF(LMathF* math);
void visitFloor(LFloor* lir);
void visitFloorF(LFloorF* lir);
void visitCeil(LCeil* lir);
void visitCeilF(LCeilF* lir);
void visitRound(LRound* lir);
void visitRoundF(LRoundF* lir);
void visitTruncateDToInt32(LTruncateDToInt32* ins);
void visitTruncateFToInt32(LTruncateFToInt32* ins);
void visitClzI(LClzI* lir);
void visitCtzI(LCtzI* lir);
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
protected:
ValueOperand ToValue(LInstruction* ins, size_t pos);
ValueOperand ToTempValue(LInstruction* ins, size_t pos);
@ -171,59 +105,17 @@ class CodeGeneratorARM64 : public CodeGeneratorShared
void modICommon(MMod* mir, Register lhs, Register rhs, Register output, LSnapshot* snapshot,
Label& done);
public:
void visitBox(LBox* box);
void visitUnbox(LUnbox* unbox);
void visitValue(LValue* value);
void visitDouble(LDouble* ins);
void visitFloat32(LFloat32* ins);
void visitLoadSlotV(LLoadSlotV* load);
void visitLoadSlotT(LLoadSlotT* load);
void visitStoreSlotT(LStoreSlotT* load);
void visitLoadElementT(LLoadElementT* load);
void visitInterruptCheck(LInterruptCheck* lir);
void visitNegI(LNegI* lir);
void visitNegD(LNegD* lir);
void visitNegF(LNegF* lir);
void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins);
void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins);
void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir);
void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir);
void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins);
void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins);
void visitWasmStackArg(LWasmStackArg* ins);
void generateInvalidateEpilogue();
void setReturnDoubleRegs(LiveRegisterSet* regs);
protected:
void postWasmCall(LWasmCall* lir) {
MOZ_CRASH("postWasmCall");
}
void visitEffectiveAddress(LEffectiveAddress* ins);
void visitUDiv(LUDiv* ins);
void visitUMod(LUMod* ins);
public:
// Unimplemented SIMD instructions.
void visitSimdSplatX4(LSimdSplatX4* lir) { MOZ_CRASH("NYI"); }
void visitSimd128Int(LSimd128Int* ins) { MOZ_CRASH("NYI"); }
void visitSimd128Float(LSimd128Float* ins) { MOZ_CRASH("NYI"); }
void visitSimdExtractElementI(LSimdExtractElementI* ins) { MOZ_CRASH("NYI"); }
void visitSimdExtractElementF(LSimdExtractElementF* ins) { MOZ_CRASH("NYI"); }
void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir) { MOZ_CRASH("NYI"); }
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
};
typedef CodeGeneratorARM64 CodeGeneratorSpecific;

Просмотреть файл

@ -136,7 +136,7 @@ OutOfLineBailout::accept(CodeGeneratorMIPSShared* codegen)
}
void
CodeGeneratorMIPSShared::visitTestIAndBranch(LTestIAndBranch* test)
CodeGenerator::visitTestIAndBranch(LTestIAndBranch* test)
{
const LAllocation* opd = test->getOperand(0);
MBasicBlock* ifTrue = test->ifTrue();
@ -146,7 +146,7 @@ CodeGeneratorMIPSShared::visitTestIAndBranch(LTestIAndBranch* test)
}
void
CodeGeneratorMIPSShared::visitCompare(LCompare* comp)
CodeGenerator::visitCompare(LCompare* comp)
{
MCompare* mir = comp->mir();
Assembler::Condition cond = JSOpToCondition(mir->compareType(), comp->jsop());
@ -175,7 +175,7 @@ CodeGeneratorMIPSShared::visitCompare(LCompare* comp)
}
void
CodeGeneratorMIPSShared::visitCompareAndBranch(LCompareAndBranch* comp)
CodeGenerator::visitCompareAndBranch(LCompareAndBranch* comp)
{
MCompare* mir = comp->cmpMir();
Assembler::Condition cond = JSOpToCondition(mir->compareType(), comp->jsop());
@ -265,7 +265,7 @@ CodeGeneratorMIPSShared::bailout(LSnapshot* snapshot)
}
void
CodeGeneratorMIPSShared::visitMinMaxD(LMinMaxD* ins)
CodeGenerator::visitMinMaxD(LMinMaxD* ins)
{
FloatRegister first = ToFloatRegister(ins->first());
FloatRegister second = ToFloatRegister(ins->second());
@ -279,7 +279,7 @@ CodeGeneratorMIPSShared::visitMinMaxD(LMinMaxD* ins)
}
void
CodeGeneratorMIPSShared::visitMinMaxF(LMinMaxF* ins)
CodeGenerator::visitMinMaxF(LMinMaxF* ins)
{
FloatRegister first = ToFloatRegister(ins->first());
FloatRegister second = ToFloatRegister(ins->second());
@ -293,7 +293,7 @@ CodeGeneratorMIPSShared::visitMinMaxF(LMinMaxF* ins)
}
void
CodeGeneratorMIPSShared::visitAbsD(LAbsD* ins)
CodeGenerator::visitAbsD(LAbsD* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
MOZ_ASSERT(input == ToFloatRegister(ins->output()));
@ -301,7 +301,7 @@ CodeGeneratorMIPSShared::visitAbsD(LAbsD* ins)
}
void
CodeGeneratorMIPSShared::visitAbsF(LAbsF* ins)
CodeGenerator::visitAbsF(LAbsF* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
MOZ_ASSERT(input == ToFloatRegister(ins->output()));
@ -309,7 +309,7 @@ CodeGeneratorMIPSShared::visitAbsF(LAbsF* ins)
}
void
CodeGeneratorMIPSShared::visitSqrtD(LSqrtD* ins)
CodeGenerator::visitSqrtD(LSqrtD* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -317,7 +317,7 @@ CodeGeneratorMIPSShared::visitSqrtD(LSqrtD* ins)
}
void
CodeGeneratorMIPSShared::visitSqrtF(LSqrtF* ins)
CodeGenerator::visitSqrtF(LSqrtF* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -325,7 +325,7 @@ CodeGeneratorMIPSShared::visitSqrtF(LSqrtF* ins)
}
void
CodeGeneratorMIPSShared::visitAddI(LAddI* ins)
CodeGenerator::visitAddI(LAddI* ins)
{
const LAllocation* lhs = ins->getOperand(0);
const LAllocation* rhs = ins->getOperand(1);
@ -352,7 +352,7 @@ CodeGeneratorMIPSShared::visitAddI(LAddI* ins)
}
void
CodeGeneratorMIPSShared::visitAddI64(LAddI64* lir)
CodeGenerator::visitAddI64(LAddI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LAddI64::Lhs);
const LInt64Allocation rhs = lir->getInt64Operand(LAddI64::Rhs);
@ -368,7 +368,7 @@ CodeGeneratorMIPSShared::visitAddI64(LAddI64* lir)
}
void
CodeGeneratorMIPSShared::visitSubI(LSubI* ins)
CodeGenerator::visitSubI(LSubI* ins)
{
const LAllocation* lhs = ins->getOperand(0);
const LAllocation* rhs = ins->getOperand(1);
@ -395,7 +395,7 @@ CodeGeneratorMIPSShared::visitSubI(LSubI* ins)
}
void
CodeGeneratorMIPSShared::visitSubI64(LSubI64* lir)
CodeGenerator::visitSubI64(LSubI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LSubI64::Lhs);
const LInt64Allocation rhs = lir->getInt64Operand(LSubI64::Rhs);
@ -411,7 +411,7 @@ CodeGeneratorMIPSShared::visitSubI64(LSubI64* lir)
}
void
CodeGeneratorMIPSShared::visitMulI(LMulI* ins)
CodeGenerator::visitMulI(LMulI* ins)
{
const LAllocation* lhs = ins->lhs();
const LAllocation* rhs = ins->rhs();
@ -533,7 +533,7 @@ CodeGeneratorMIPSShared::visitMulI(LMulI* ins)
}
void
CodeGeneratorMIPSShared::visitMulI64(LMulI64* lir)
CodeGenerator::visitMulI64(LMulI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LMulI64::Lhs);
const LInt64Allocation rhs = lir->getInt64Operand(LMulI64::Rhs);
@ -581,7 +581,7 @@ CodeGeneratorMIPSShared::visitMulI64(LMulI64* lir)
}
void
CodeGeneratorMIPSShared::visitDivI(LDivI* ins)
CodeGenerator::visitDivI(LDivI* ins)
{
// Extract the registers from this instruction
Register lhs = ToRegister(ins->lhs());
@ -664,7 +664,7 @@ CodeGeneratorMIPSShared::visitDivI(LDivI* ins)
}
void
CodeGeneratorMIPSShared::visitDivPowTwoI(LDivPowTwoI* ins)
CodeGenerator::visitDivPowTwoI(LDivPowTwoI* ins)
{
Register lhs = ToRegister(ins->numerator());
Register dest = ToRegister(ins->output());
@ -706,7 +706,7 @@ CodeGeneratorMIPSShared::visitDivPowTwoI(LDivPowTwoI* ins)
}
void
CodeGeneratorMIPSShared::visitModI(LModI* ins)
CodeGenerator::visitModI(LModI* ins)
{
// Extract the registers from this instruction
Register lhs = ToRegister(ins->lhs());
@ -803,7 +803,7 @@ CodeGeneratorMIPSShared::visitModI(LModI* ins)
}
void
CodeGeneratorMIPSShared::visitModPowTwoI(LModPowTwoI* ins)
CodeGenerator::visitModPowTwoI(LModPowTwoI* ins)
{
Register in = ToRegister(ins->getOperand(0));
Register out = ToRegister(ins->getDef(0));
@ -839,7 +839,7 @@ CodeGeneratorMIPSShared::visitModPowTwoI(LModPowTwoI* ins)
}
void
CodeGeneratorMIPSShared::visitModMaskI(LModMaskI* ins)
CodeGenerator::visitModMaskI(LModMaskI* ins)
{
Register src = ToRegister(ins->getOperand(0));
Register dest = ToRegister(ins->getDef(0));
@ -859,7 +859,7 @@ CodeGeneratorMIPSShared::visitModMaskI(LModMaskI* ins)
}
void
CodeGeneratorMIPSShared::visitBitNotI(LBitNotI* ins)
CodeGenerator::visitBitNotI(LBitNotI* ins)
{
const LAllocation* input = ins->getOperand(0);
const LDefinition* dest = ins->getDef(0);
@ -869,7 +869,7 @@ CodeGeneratorMIPSShared::visitBitNotI(LBitNotI* ins)
}
void
CodeGeneratorMIPSShared::visitBitOpI(LBitOpI* ins)
CodeGenerator::visitBitOpI(LBitOpI* ins)
{
const LAllocation* lhs = ins->getOperand(0);
const LAllocation* rhs = ins->getOperand(1);
@ -900,7 +900,7 @@ CodeGeneratorMIPSShared::visitBitOpI(LBitOpI* ins)
}
void
CodeGeneratorMIPSShared::visitBitOpI64(LBitOpI64* lir)
CodeGenerator::visitBitOpI64(LBitOpI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LBitOpI64::Lhs);
const LInt64Allocation rhs = lir->getInt64Operand(LBitOpI64::Rhs);
@ -932,7 +932,7 @@ CodeGeneratorMIPSShared::visitBitOpI64(LBitOpI64* lir)
}
void
CodeGeneratorMIPSShared::visitShiftI(LShiftI* ins)
CodeGenerator::visitShiftI(LShiftI* ins)
{
Register lhs = ToRegister(ins->lhs());
const LAllocation* rhs = ins->rhs();
@ -991,7 +991,7 @@ CodeGeneratorMIPSShared::visitShiftI(LShiftI* ins)
}
void
CodeGeneratorMIPSShared::visitShiftI64(LShiftI64* lir)
CodeGenerator::visitShiftI64(LShiftI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LShiftI64::Lhs);
LAllocation* rhs = lir->getOperand(LShiftI64::Rhs);
@ -1035,7 +1035,7 @@ CodeGeneratorMIPSShared::visitShiftI64(LShiftI64* lir)
}
void
CodeGeneratorMIPSShared::visitRotateI64(LRotateI64* lir)
CodeGenerator::visitRotateI64(LRotateI64* lir)
{
MRotate* mir = lir->mir();
LAllocation* count = lir->count();
@ -1069,7 +1069,7 @@ CodeGeneratorMIPSShared::visitRotateI64(LRotateI64* lir)
}
void
CodeGeneratorMIPSShared::visitUrshD(LUrshD* ins)
CodeGenerator::visitUrshD(LUrshD* ins)
{
Register lhs = ToRegister(ins->lhs());
Register temp = ToRegister(ins->temp());
@ -1087,7 +1087,7 @@ CodeGeneratorMIPSShared::visitUrshD(LUrshD* ins)
}
void
CodeGeneratorMIPSShared::visitClzI(LClzI* ins)
CodeGenerator::visitClzI(LClzI* ins)
{
Register input = ToRegister(ins->input());
Register output = ToRegister(ins->output());
@ -1096,7 +1096,7 @@ CodeGeneratorMIPSShared::visitClzI(LClzI* ins)
}
void
CodeGeneratorMIPSShared::visitCtzI(LCtzI* ins)
CodeGenerator::visitCtzI(LCtzI* ins)
{
Register input = ToRegister(ins->input());
Register output = ToRegister(ins->output());
@ -1105,7 +1105,7 @@ CodeGeneratorMIPSShared::visitCtzI(LCtzI* ins)
}
void
CodeGeneratorMIPSShared::visitPopcntI(LPopcntI* ins)
CodeGenerator::visitPopcntI(LPopcntI* ins)
{
Register input = ToRegister(ins->input());
Register output = ToRegister(ins->output());
@ -1115,7 +1115,7 @@ CodeGeneratorMIPSShared::visitPopcntI(LPopcntI* ins)
}
void
CodeGeneratorMIPSShared::visitPopcntI64(LPopcntI64* ins)
CodeGenerator::visitPopcntI64(LPopcntI64* ins)
{
Register64 input = ToRegister64(ins->getInt64Operand(0));
Register64 output = ToOutRegister64(ins);
@ -1125,7 +1125,7 @@ CodeGeneratorMIPSShared::visitPopcntI64(LPopcntI64* ins)
}
void
CodeGeneratorMIPSShared::visitPowHalfD(LPowHalfD* ins)
CodeGenerator::visitPowHalfD(LPowHalfD* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -1163,7 +1163,7 @@ CodeGeneratorMIPSShared::toMoveOperand(LAllocation a) const
}
void
CodeGeneratorMIPSShared::visitMathD(LMathD* math)
CodeGenerator::visitMathD(LMathD* math)
{
FloatRegister src1 = ToFloatRegister(math->getOperand(0));
FloatRegister src2 = ToFloatRegister(math->getOperand(1));
@ -1188,7 +1188,7 @@ CodeGeneratorMIPSShared::visitMathD(LMathD* math)
}
void
CodeGeneratorMIPSShared::visitMathF(LMathF* math)
CodeGenerator::visitMathF(LMathF* math)
{
FloatRegister src1 = ToFloatRegister(math->getOperand(0));
FloatRegister src2 = ToFloatRegister(math->getOperand(1));
@ -1213,7 +1213,7 @@ CodeGeneratorMIPSShared::visitMathF(LMathF* math)
}
void
CodeGeneratorMIPSShared::visitFloor(LFloor* lir)
CodeGenerator::visitFloor(LFloor* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister scratch = ScratchDoubleReg;
@ -1244,7 +1244,7 @@ CodeGeneratorMIPSShared::visitFloor(LFloor* lir)
}
void
CodeGeneratorMIPSShared::visitFloorF(LFloorF* lir)
CodeGenerator::visitFloorF(LFloorF* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister scratch = ScratchFloat32Reg;
@ -1275,7 +1275,7 @@ CodeGeneratorMIPSShared::visitFloorF(LFloorF* lir)
}
void
CodeGeneratorMIPSShared::visitCeil(LCeil* lir)
CodeGenerator::visitCeil(LCeil* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister scratch = ScratchDoubleReg;
@ -1308,7 +1308,7 @@ CodeGeneratorMIPSShared::visitCeil(LCeil* lir)
}
void
CodeGeneratorMIPSShared::visitCeilF(LCeilF* lir)
CodeGenerator::visitCeilF(LCeilF* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister scratch = ScratchFloat32Reg;
@ -1341,7 +1341,7 @@ CodeGeneratorMIPSShared::visitCeilF(LCeilF* lir)
}
void
CodeGeneratorMIPSShared::visitRound(LRound* lir)
CodeGenerator::visitRound(LRound* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister temp = ToFloatRegister(lir->temp());
@ -1408,7 +1408,7 @@ CodeGeneratorMIPSShared::visitRound(LRound* lir)
}
void
CodeGeneratorMIPSShared::visitRoundF(LRoundF* lir)
CodeGenerator::visitRoundF(LRoundF* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister temp = ToFloatRegister(lir->temp());
@ -1475,21 +1475,21 @@ CodeGeneratorMIPSShared::visitRoundF(LRoundF* lir)
}
void
CodeGeneratorMIPSShared::visitTruncateDToInt32(LTruncateDToInt32* ins)
CodeGenerator::visitTruncateDToInt32(LTruncateDToInt32* ins)
{
emitTruncateDouble(ToFloatRegister(ins->input()), ToRegister(ins->output()),
ins->mir());
}
void
CodeGeneratorMIPSShared::visitTruncateFToInt32(LTruncateFToInt32* ins)
CodeGenerator::visitTruncateFToInt32(LTruncateFToInt32* ins)
{
emitTruncateFloat32(ToFloatRegister(ins->input()), ToRegister(ins->output()),
ins->mir());
}
void
CodeGeneratorMIPSShared::visitWasmTruncateToInt32(LWasmTruncateToInt32* lir)
CodeGenerator::visitWasmTruncateToInt32(LWasmTruncateToInt32* lir)
{
auto input = ToFloatRegister(lir->input());
auto output = ToRegister(lir->output());
@ -1551,7 +1551,7 @@ CodeGeneratorMIPSShared::visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCh
}
void
CodeGeneratorMIPSShared::visitCopySignF(LCopySignF* ins)
CodeGenerator::visitCopySignF(LCopySignF* ins)
{
FloatRegister lhs = ToFloatRegister(ins->getOperand(0));
FloatRegister rhs = ToFloatRegister(ins->getOperand(1));
@ -1570,7 +1570,7 @@ CodeGeneratorMIPSShared::visitCopySignF(LCopySignF* ins)
}
void
CodeGeneratorMIPSShared::visitCopySignD(LCopySignD* ins)
CodeGenerator::visitCopySignD(LCopySignD* ins)
{
FloatRegister lhs = ToFloatRegister(ins->getOperand(0));
FloatRegister rhs = ToFloatRegister(ins->getOperand(1));
@ -1590,7 +1590,7 @@ CodeGeneratorMIPSShared::visitCopySignD(LCopySignD* ins)
}
void
CodeGeneratorMIPSShared::visitValue(LValue* value)
CodeGenerator::visitValue(LValue* value)
{
const ValueOperand out = ToOutValue(value);
@ -1598,7 +1598,7 @@ CodeGeneratorMIPSShared::visitValue(LValue* value)
}
void
CodeGeneratorMIPSShared::visitDouble(LDouble* ins)
CodeGenerator::visitDouble(LDouble* ins)
{
const LDefinition* out = ins->getDef(0);
@ -1606,14 +1606,14 @@ CodeGeneratorMIPSShared::visitDouble(LDouble* ins)
}
void
CodeGeneratorMIPSShared::visitFloat32(LFloat32* ins)
CodeGenerator::visitFloat32(LFloat32* ins)
{
const LDefinition* out = ins->getDef(0);
masm.loadConstantFloat32(ins->getFloat(), ToFloatRegister(out));
}
void
CodeGeneratorMIPSShared::visitTestDAndBranch(LTestDAndBranch* test)
CodeGenerator::visitTestDAndBranch(LTestDAndBranch* test)
{
FloatRegister input = ToFloatRegister(test->input());
@ -1634,7 +1634,7 @@ CodeGeneratorMIPSShared::visitTestDAndBranch(LTestDAndBranch* test)
}
void
CodeGeneratorMIPSShared::visitTestFAndBranch(LTestFAndBranch* test)
CodeGenerator::visitTestFAndBranch(LTestFAndBranch* test)
{
FloatRegister input = ToFloatRegister(test->input());
@ -1655,7 +1655,7 @@ CodeGeneratorMIPSShared::visitTestFAndBranch(LTestFAndBranch* test)
}
void
CodeGeneratorMIPSShared::visitCompareD(LCompareD* comp)
CodeGenerator::visitCompareD(LCompareD* comp)
{
FloatRegister lhs = ToFloatRegister(comp->left());
FloatRegister rhs = ToFloatRegister(comp->right());
@ -1666,7 +1666,7 @@ CodeGeneratorMIPSShared::visitCompareD(LCompareD* comp)
}
void
CodeGeneratorMIPSShared::visitCompareF(LCompareF* comp)
CodeGenerator::visitCompareF(LCompareF* comp)
{
FloatRegister lhs = ToFloatRegister(comp->left());
FloatRegister rhs = ToFloatRegister(comp->right());
@ -1677,7 +1677,7 @@ CodeGeneratorMIPSShared::visitCompareF(LCompareF* comp)
}
void
CodeGeneratorMIPSShared::visitCompareDAndBranch(LCompareDAndBranch* comp)
CodeGenerator::visitCompareDAndBranch(LCompareDAndBranch* comp)
{
FloatRegister lhs = ToFloatRegister(comp->left());
FloatRegister rhs = ToFloatRegister(comp->right());
@ -1696,7 +1696,7 @@ CodeGeneratorMIPSShared::visitCompareDAndBranch(LCompareDAndBranch* comp)
}
void
CodeGeneratorMIPSShared::visitCompareFAndBranch(LCompareFAndBranch* comp)
CodeGenerator::visitCompareFAndBranch(LCompareFAndBranch* comp)
{
FloatRegister lhs = ToFloatRegister(comp->left());
FloatRegister rhs = ToFloatRegister(comp->right());
@ -1715,7 +1715,7 @@ CodeGeneratorMIPSShared::visitCompareFAndBranch(LCompareFAndBranch* comp)
}
void
CodeGeneratorMIPSShared::visitBitAndAndBranch(LBitAndAndBranch* lir)
CodeGenerator::visitBitAndAndBranch(LBitAndAndBranch* lir)
{
if (lir->right()->isConstant())
masm.ma_and(ScratchRegister, ToRegister(lir->left()), Imm32(ToInt32(lir->right())));
@ -1726,26 +1726,26 @@ CodeGeneratorMIPSShared::visitBitAndAndBranch(LBitAndAndBranch* lir)
}
void
CodeGeneratorMIPSShared::visitWasmUint32ToDouble(LWasmUint32ToDouble* lir)
CodeGenerator::visitWasmUint32ToDouble(LWasmUint32ToDouble* lir)
{
masm.convertUInt32ToDouble(ToRegister(lir->input()), ToFloatRegister(lir->output()));
}
void
CodeGeneratorMIPSShared::visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir)
CodeGenerator::visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir)
{
masm.convertUInt32ToFloat32(ToRegister(lir->input()), ToFloatRegister(lir->output()));
}
void
CodeGeneratorMIPSShared::visitNotI(LNotI* ins)
CodeGenerator::visitNotI(LNotI* ins)
{
masm.cmp32Set(Assembler::Equal, ToRegister(ins->input()), Imm32(0),
ToRegister(ins->output()));
}
void
CodeGeneratorMIPSShared::visitNotD(LNotD* ins)
CodeGenerator::visitNotD(LNotD* ins)
{
// Since this operation is not, we want to set a bit if
// the double is falsey, which means 0.0, -0.0 or NaN.
@ -1757,7 +1757,7 @@ CodeGeneratorMIPSShared::visitNotD(LNotD* ins)
}
void
CodeGeneratorMIPSShared::visitNotF(LNotF* ins)
CodeGenerator::visitNotF(LNotF* ins)
{
// Since this operation is not, we want to set a bit if
// the float32 is falsey, which means 0.0, -0.0 or NaN.
@ -1769,7 +1769,7 @@ CodeGeneratorMIPSShared::visitNotF(LNotF* ins)
}
void
CodeGeneratorMIPSShared::visitMemoryBarrier(LMemoryBarrier* ins)
CodeGenerator::visitMemoryBarrier(LMemoryBarrier* ins)
{
masm.memoryBarrier(ins->type());
}
@ -1801,13 +1801,13 @@ CodeGeneratorMIPSShared::generateInvalidateEpilogue()
}
void
CodeGeneratorMIPSShared::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins)
CodeGenerator::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins)
{
MOZ_CRASH("NYI");
}
void
CodeGeneratorMIPSShared::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins)
CodeGenerator::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins)
{
MOZ_CRASH("NYI");
}
@ -1914,13 +1914,13 @@ CodeGeneratorMIPSShared::emitWasmLoad(T* lir)
}
void
CodeGeneratorMIPSShared::visitWasmLoad(LWasmLoad* lir)
CodeGenerator::visitWasmLoad(LWasmLoad* lir)
{
emitWasmLoad(lir);
}
void
CodeGeneratorMIPSShared::visitWasmUnalignedLoad(LWasmUnalignedLoad* lir)
CodeGenerator::visitWasmUnalignedLoad(LWasmUnalignedLoad* lir)
{
emitWasmLoad(lir);
}
@ -1954,19 +1954,19 @@ CodeGeneratorMIPSShared::emitWasmStore(T* lir)
}
void
CodeGeneratorMIPSShared::visitWasmStore(LWasmStore* lir)
CodeGenerator::visitWasmStore(LWasmStore* lir)
{
emitWasmStore(lir);
}
void
CodeGeneratorMIPSShared::visitWasmUnalignedStore(LWasmUnalignedStore* lir)
CodeGenerator::visitWasmUnalignedStore(LWasmUnalignedStore* lir)
{
emitWasmStore(lir);
}
void
CodeGeneratorMIPSShared::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
CodeGenerator::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
{
const MAsmJSLoadHeap* mir = ins->mir();
const LAllocation* ptr = ins->ptr();
@ -2049,7 +2049,7 @@ CodeGeneratorMIPSShared::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
}
void
CodeGeneratorMIPSShared::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
CodeGenerator::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
{
const MAsmJSStoreHeap* mir = ins->mir();
const LAllocation* value = ins->value();
@ -2127,7 +2127,7 @@ CodeGeneratorMIPSShared::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
}
void
CodeGeneratorMIPSShared::visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins)
CodeGenerator::visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins)
{
MWasmCompareExchangeHeap* mir = ins->mir();
Scalar::Type vt = mir->access().type();
@ -2146,7 +2146,7 @@ CodeGeneratorMIPSShared::visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap*
}
void
CodeGeneratorMIPSShared::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins)
CodeGenerator::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins)
{
MWasmAtomicExchangeHeap* mir = ins->mir();
Scalar::Type vt = mir->access().type();
@ -2164,7 +2164,7 @@ CodeGeneratorMIPSShared::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* in
}
void
CodeGeneratorMIPSShared::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins)
CodeGenerator::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins)
{
MOZ_ASSERT(ins->mir()->hasUses());
MOZ_ASSERT(ins->addrTemp()->isBogusTemp());
@ -2183,7 +2183,7 @@ CodeGeneratorMIPSShared::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins)
}
void
CodeGeneratorMIPSShared::visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins)
CodeGenerator::visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins)
{
MOZ_ASSERT(!ins->mir()->hasUses());
MOZ_ASSERT(ins->addrTemp()->isBogusTemp());
@ -2201,7 +2201,7 @@ CodeGeneratorMIPSShared::visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapF
}
void
CodeGeneratorMIPSShared::visitWasmStackArg(LWasmStackArg* ins)
CodeGenerator::visitWasmStackArg(LWasmStackArg* ins)
{
const MWasmStackArg* mir = ins->mir();
if (ins->arg()->isConstant()) {
@ -2220,7 +2220,7 @@ CodeGeneratorMIPSShared::visitWasmStackArg(LWasmStackArg* ins)
}
void
CodeGeneratorMIPSShared::visitWasmStackArgI64(LWasmStackArgI64* ins)
CodeGenerator::visitWasmStackArgI64(LWasmStackArgI64* ins)
{
const MWasmStackArg* mir = ins->mir();
Address dst(StackPointer, mir->spOffset());
@ -2231,7 +2231,7 @@ CodeGeneratorMIPSShared::visitWasmStackArgI64(LWasmStackArgI64* ins)
}
void
CodeGeneratorMIPSShared::visitWasmSelect(LWasmSelect* ins)
CodeGenerator::visitWasmSelect(LWasmSelect* ins)
{
MIRType mirType = ins->mir()->type();
@ -2271,7 +2271,7 @@ CodeGeneratorMIPSShared::visitWasmSelect(LWasmSelect* ins)
}
void
CodeGeneratorMIPSShared::visitWasmReinterpret(LWasmReinterpret* lir)
CodeGenerator::visitWasmReinterpret(LWasmReinterpret* lir)
{
MOZ_ASSERT(gen->compilingWasm());
MWasmReinterpret* ins = lir->mir();
@ -2297,7 +2297,7 @@ CodeGeneratorMIPSShared::visitWasmReinterpret(LWasmReinterpret* lir)
}
void
CodeGeneratorMIPSShared::visitUDivOrMod(LUDivOrMod* ins)
CodeGenerator::visitUDivOrMod(LUDivOrMod* ins)
{
Register lhs = ToRegister(ins->lhs());
Register rhs = ToRegister(ins->rhs());
@ -2343,7 +2343,7 @@ CodeGeneratorMIPSShared::visitUDivOrMod(LUDivOrMod* ins)
}
void
CodeGeneratorMIPSShared::visitEffectiveAddress(LEffectiveAddress* ins)
CodeGenerator::visitEffectiveAddress(LEffectiveAddress* ins)
{
const MEffectiveAddress* mir = ins->mir();
Register base = ToRegister(ins->base());
@ -2355,7 +2355,7 @@ CodeGeneratorMIPSShared::visitEffectiveAddress(LEffectiveAddress* ins)
}
void
CodeGeneratorMIPSShared::visitNegI(LNegI* ins)
CodeGenerator::visitNegI(LNegI* ins)
{
Register input = ToRegister(ins->input());
Register output = ToRegister(ins->output());
@ -2364,7 +2364,7 @@ CodeGeneratorMIPSShared::visitNegI(LNegI* ins)
}
void
CodeGeneratorMIPSShared::visitNegD(LNegD* ins)
CodeGenerator::visitNegD(LNegD* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -2373,7 +2373,7 @@ CodeGeneratorMIPSShared::visitNegD(LNegD* ins)
}
void
CodeGeneratorMIPSShared::visitNegF(LNegF* ins)
CodeGenerator::visitNegF(LNegF* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -2382,7 +2382,7 @@ CodeGeneratorMIPSShared::visitNegF(LNegF* ins)
}
void
CodeGeneratorMIPSShared::visitWasmAddOffset(LWasmAddOffset* lir)
CodeGenerator::visitWasmAddOffset(LWasmAddOffset* lir)
{
MWasmAddOffset* mir = lir->mir();
Register base = ToRegister(lir->base());
@ -2393,7 +2393,7 @@ CodeGeneratorMIPSShared::visitWasmAddOffset(LWasmAddOffset* lir)
void
CodeGeneratorMIPSShared::visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir)
CodeGenerator::visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir)
{
MOZ_ASSERT(lir->mir()->hasUses());
@ -2420,7 +2420,7 @@ CodeGeneratorMIPSShared::visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElem
}
void
CodeGeneratorMIPSShared::visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir)
CodeGenerator::visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir)
{
MOZ_ASSERT(!lir->mir()->hasUses());
@ -2444,7 +2444,7 @@ CodeGeneratorMIPSShared::visitAtomicTypedArrayElementBinopForEffect(LAtomicTyped
}
void
CodeGeneratorMIPSShared::visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir)
CodeGenerator::visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir)
{
Register elements = ToRegister(lir->elements());
AnyRegister output = ToAnyRegister(lir->output());
@ -2471,7 +2471,7 @@ CodeGeneratorMIPSShared::visitCompareExchangeTypedArrayElement(LCompareExchangeT
}
void
CodeGeneratorMIPSShared::visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir)
CodeGenerator::visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir)
{
Register elements = ToRegister(lir->elements());
AnyRegister output = ToAnyRegister(lir->output());
@ -2498,7 +2498,7 @@ CodeGeneratorMIPSShared::visitAtomicExchangeTypedArrayElement(LAtomicExchangeTyp
void
CodeGeneratorMIPSShared::visitWasmCompareExchangeI64(LWasmCompareExchangeI64* lir)
CodeGenerator::visitWasmCompareExchangeI64(LWasmCompareExchangeI64* lir)
{
Register ptr = ToRegister(lir->ptr());
Register64 oldValue = ToRegister64(lir->oldValue());
@ -2511,7 +2511,7 @@ CodeGeneratorMIPSShared::visitWasmCompareExchangeI64(LWasmCompareExchangeI64* li
}
void
CodeGeneratorMIPSShared::visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* lir)
CodeGenerator::visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* lir)
{
Register ptr = ToRegister(lir->ptr());
Register64 value = ToRegister64(lir->value());
@ -2523,7 +2523,7 @@ CodeGeneratorMIPSShared::visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* lir)
}
void
CodeGeneratorMIPSShared::visitWasmAtomicBinopI64(LWasmAtomicBinopI64* lir)
CodeGenerator::visitWasmAtomicBinopI64(LWasmAtomicBinopI64* lir)
{
Register ptr = ToRegister(lir->ptr());
Register64 value = ToRegister64(lir->value());
@ -2540,3 +2540,249 @@ CodeGeneratorMIPSShared::visitWasmAtomicBinopI64(LWasmAtomicBinopI64* lir)
masm.atomicFetchOp64(Synchronization::Full(), lir->mir()->operation(), value, addr, temp,
output);
}
void
CodeGenerator::visitSimdSplatX4(LSimdSplatX4* lir)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimd128Int(LSimd128Int* ins)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimd128Float(LSimd128Float* ins)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdExtractElementI(LSimdExtractElementI* ins)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdExtractElementF(LSimdExtractElementF* ins)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinaryBitwise(LSimdBinaryBitwise* lir)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitNearbyInt(LNearbyInt*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdShift(LSimdShift*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitNearbyIntF(LNearbyIntF*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdSelect(LSimdSelect*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdAllTrue(LSimdAllTrue*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdAnyTrue(LSimdAnyTrue*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdShuffle(LSimdShuffle*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdSplatX8(LSimdSplatX8*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdSplatX16(LSimdSplatX16*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdSwizzleF(LSimdSwizzleF*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdSwizzleI(LSimdSwizzleI*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdShuffleX4(LSimdShuffleX4*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinaryCompIx8(LSimdBinaryCompIx8*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdUnaryArithFx4(LSimdUnaryArithFx4*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdUnaryArithIx4(LSimdUnaryArithIx4*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdUnaryArithIx8(LSimdUnaryArithIx8*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitFloat32x4ToInt32x4(LFloat32x4ToInt32x4*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitInt32x4ToFloat32x4(LInt32x4ToFloat32x4*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinaryArithIx8(LSimdBinaryArithIx8*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinaryCompIx16(LSimdBinaryCompIx16*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdInsertElementF(LSimdInsertElementF*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdInsertElementI(LSimdInsertElementI*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdUnaryArithIx16(LSimdUnaryArithIx16*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitFloat32x4ToUint32x4(LFloat32x4ToUint32x4*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinaryArithIx16(LSimdBinaryArithIx16*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdExtractElementB(LSimdExtractElementB*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdGeneralShuffleF(LSimdGeneralShuffleF*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdGeneralShuffleI(LSimdGeneralShuffleI*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdReinterpretCast(LSimdReinterpretCast*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdBinarySaturating(LSimdBinarySaturating*)
{
MOZ_CRASH("NYI");
}
void
CodeGenerator::visitSimdExtractElementU2D(LSimdExtractElementU2D*)
{
MOZ_CRASH("NYI");
}

Просмотреть файл

@ -22,11 +22,9 @@ class CodeGeneratorMIPSShared : public CodeGeneratorShared
{
friend class MoveResolverMIPS;
CodeGeneratorMIPSShared* thisFromCtor() {
return this;
}
protected:
CodeGeneratorMIPSShared(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
NonAssertingLabel deoptLabel_;
Operand ToOperand(const LAllocation& a);
@ -73,7 +71,6 @@ class CodeGeneratorMIPSShared : public CodeGeneratorShared
void bailoutFrom(Label* label, LSnapshot* snapshot);
void bailout(LSnapshot* snapshot);
protected:
bool generateOutOfLineCode();
template <typename T>
@ -129,111 +126,6 @@ class CodeGeneratorMIPSShared : public CodeGeneratorShared
template <typename T>
void emitWasmStore(T* ins);
public:
// Instruction visitors.
void visitMinMaxD(LMinMaxD* ins);
void visitMinMaxF(LMinMaxF* ins);
void visitAbsD(LAbsD* ins);
void visitAbsF(LAbsF* ins);
void visitSqrtD(LSqrtD* ins);
void visitSqrtF(LSqrtF* ins);
void visitAddI(LAddI* ins);
void visitAddI64(LAddI64* ins);
void visitSubI(LSubI* ins);
void visitSubI64(LSubI64* ins);
void visitBitNotI(LBitNotI* ins);
void visitBitOpI(LBitOpI* ins);
void visitBitOpI64(LBitOpI64* ins);
void visitMulI(LMulI* ins);
void visitMulI64(LMulI64* ins);
void visitDivI(LDivI* ins);
void visitDivPowTwoI(LDivPowTwoI* ins);
void visitModI(LModI* ins);
void visitModPowTwoI(LModPowTwoI* ins);
void visitModMaskI(LModMaskI* ins);
void visitPowHalfD(LPowHalfD* ins);
void visitShiftI(LShiftI* ins);
void visitShiftI64(LShiftI64* ins);
void visitRotateI64(LRotateI64* lir);
void visitUrshD(LUrshD* ins);
void visitClzI(LClzI* ins);
void visitCtzI(LCtzI* ins);
void visitPopcntI(LPopcntI* ins);
void visitPopcntI64(LPopcntI64* lir);
void visitTestIAndBranch(LTestIAndBranch* test);
void visitCompare(LCompare* comp);
void visitCompareAndBranch(LCompareAndBranch* comp);
void visitTestDAndBranch(LTestDAndBranch* test);
void visitTestFAndBranch(LTestFAndBranch* test);
void visitCompareD(LCompareD* comp);
void visitCompareF(LCompareF* comp);
void visitCompareDAndBranch(LCompareDAndBranch* comp);
void visitCompareFAndBranch(LCompareFAndBranch* comp);
void visitBitAndAndBranch(LBitAndAndBranch* lir);
void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir);
void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir);
void visitNotI(LNotI* ins);
void visitNotD(LNotD* ins);
void visitNotF(LNotF* ins);
void visitMathD(LMathD* math);
void visitMathF(LMathF* math);
void visitFloor(LFloor* lir);
void visitFloorF(LFloorF* lir);
void visitCeil(LCeil* lir);
void visitCeilF(LCeilF* lir);
void visitRound(LRound* lir);
void visitRoundF(LRoundF* lir);
void visitTruncateDToInt32(LTruncateDToInt32* ins);
void visitTruncateFToInt32(LTruncateFToInt32* ins);
void visitWasmTruncateToInt32(LWasmTruncateToInt32* lir);
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool);
void visitCopySignD(LCopySignD* ins);
void visitCopySignF(LCopySignF* ins);
public:
CodeGeneratorMIPSShared(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
void visitValue(LValue* value);
void visitDouble(LDouble* ins);
void visitFloat32(LFloat32* ins);
void visitNegI(LNegI* lir);
void visitNegD(LNegD* lir);
void visitNegF(LNegF* lir);
void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins);
void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins);
void visitWasmLoad(LWasmLoad* ins);
void visitWasmUnalignedLoad(LWasmUnalignedLoad* ins);
void visitWasmStore(LWasmStore* ins);
void visitWasmUnalignedStore(LWasmUnalignedStore* ins);
void visitWasmAddOffset(LWasmAddOffset* ins);
void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins);
void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins);
void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins);
void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins);
void visitWasmStackArg(LWasmStackArg* ins);
void visitWasmStackArgI64(LWasmStackArgI64* ins);
void visitWasmSelect(LWasmSelect* ins);
void visitWasmReinterpret(LWasmReinterpret* ins);
void visitMemoryBarrier(LMemoryBarrier* ins);
void visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir);
void visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir);
void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir);
void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir);
void generateInvalidateEpilogue();
// Generating a result.
@ -249,29 +141,11 @@ class CodeGeneratorMIPSShared : public CodeGeneratorShared
const T& mem, Register flagTemp, Register valueTemp,
Register offsetTemp, Register maskTemp);
void visitWasmCompareExchangeI64(LWasmCompareExchangeI64* lir);
void visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* lir);
void visitWasmAtomicBinopI64(LWasmAtomicBinopI64* lir);
protected:
void visitEffectiveAddress(LEffectiveAddress* ins);
void visitUDivOrMod(LUDivOrMod* ins);
public:
// Unimplemented SIMD instructions
void visitSimdSplatX4(LSimdSplatX4* lir) { MOZ_CRASH("NYI"); }
void visitSimd128Int(LSimd128Int* ins) { MOZ_CRASH("NYI"); }
void visitSimd128Float(LSimd128Float* ins) { MOZ_CRASH("NYI"); }
void visitSimdReinterpretCast(LSimdReinterpretCast* ins) { MOZ_CRASH("NYI"); }
void visitSimdExtractElementI(LSimdExtractElementI* ins) { MOZ_CRASH("NYI"); }
void visitSimdExtractElementF(LSimdExtractElementF* ins) { MOZ_CRASH("NYI"); }
void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir) { MOZ_CRASH("NYI"); }
void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir) { MOZ_CRASH("NYI"); }
void visitSimdGeneralShuffleI(LSimdGeneralShuffleI* lir) { MOZ_CRASH("NYI"); }
void visitSimdGeneralShuffleF(LSimdGeneralShuffleF* lir) { MOZ_CRASH("NYI"); }
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool);
};
// An out-of-line bailout thunk.

Просмотреть файл

@ -40,7 +40,7 @@ CodeGeneratorMIPS::ToTempValue(LInstruction* ins, size_t pos)
}
void
CodeGeneratorMIPS::visitBox(LBox* box)
CodeGenerator::visitBox(LBox* box)
{
const LDefinition* type = box->getDef(TYPE_INDEX);
@ -53,7 +53,7 @@ CodeGeneratorMIPS::visitBox(LBox* box)
}
void
CodeGeneratorMIPS::visitBoxFloatingPoint(LBoxFloatingPoint* box)
CodeGenerator::visitBoxFloatingPoint(LBoxFloatingPoint* box)
{
const AnyRegister in = ToAnyRegister(box->getOperand(0));
const ValueOperand out = ToOutValue(box);
@ -62,7 +62,7 @@ CodeGeneratorMIPS::visitBoxFloatingPoint(LBoxFloatingPoint* box)
}
void
CodeGeneratorMIPS::visitUnbox(LUnbox* unbox)
CodeGenerator::visitUnbox(LUnbox* unbox)
{
// Note that for unbox, the type and payload indexes are switched on the
// inputs.
@ -82,7 +82,7 @@ CodeGeneratorMIPS::splitTagForTest(const ValueOperand& value, ScratchTagScope& t
}
void
CodeGeneratorMIPS::visitCompareB(LCompareB* lir)
CodeGenerator::visitCompareB(LCompareB* lir)
{
MCompare* mir = lir->mir();
@ -112,7 +112,7 @@ CodeGeneratorMIPS::visitCompareB(LCompareB* lir)
}
void
CodeGeneratorMIPS::visitCompareBAndBranch(LCompareBAndBranch* lir)
CodeGenerator::visitCompareBAndBranch(LCompareBAndBranch* lir)
{
MCompare* mir = lir->cmpMir();
const ValueOperand lhs = ToValue(lir, LCompareBAndBranch::Lhs);
@ -132,7 +132,7 @@ CodeGeneratorMIPS::visitCompareBAndBranch(LCompareBAndBranch* lir)
}
void
CodeGeneratorMIPS::visitCompareBitwise(LCompareBitwise* lir)
CodeGenerator::visitCompareBitwise(LCompareBitwise* lir)
{
MCompare* mir = lir->mir();
Assembler::Condition cond = JSOpToCondition(mir->compareType(), mir->jsop());
@ -157,7 +157,7 @@ CodeGeneratorMIPS::visitCompareBitwise(LCompareBitwise* lir)
}
void
CodeGeneratorMIPS::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
CodeGenerator::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
{
MCompare* mir = lir->cmpMir();
Assembler::Condition cond = JSOpToCondition(mir->compareType(), mir->jsop());
@ -174,7 +174,7 @@ CodeGeneratorMIPS::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
}
void
CodeGeneratorMIPS::visitCompareI64(LCompareI64* lir)
CodeGenerator::visitCompareI64(LCompareI64* lir)
{
MCompare* mir = lir->mir();
MOZ_ASSERT(mir->compareType() == MCompare::Compare_Int64 ||
@ -198,7 +198,7 @@ CodeGeneratorMIPS::visitCompareI64(LCompareI64* lir)
}
void
CodeGeneratorMIPS::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
CodeGenerator::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
{
MCompare* mir = lir->cmpMir();
MOZ_ASSERT(mir->compareType() == MCompare::Compare_Int64 ||
@ -232,7 +232,7 @@ CodeGeneratorMIPS::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
}
void
CodeGeneratorMIPS::visitDivOrModI64(LDivOrModI64* lir)
CodeGenerator::visitDivOrModI64(LDivOrModI64* lir)
{
Register64 lhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Lhs));
Register64 rhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Rhs));
@ -280,7 +280,7 @@ CodeGeneratorMIPS::visitDivOrModI64(LDivOrModI64* lir)
}
void
CodeGeneratorMIPS::visitUDivOrModI64(LUDivOrModI64* lir)
CodeGenerator::visitUDivOrModI64(LUDivOrModI64* lir)
{
Register64 lhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Lhs));
Register64 rhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Rhs));
@ -329,13 +329,13 @@ CodeGeneratorMIPS::emitWasmLoadI64(T* lir)
}
void
CodeGeneratorMIPS::visitWasmLoadI64(LWasmLoadI64* lir)
CodeGenerator::visitWasmLoadI64(LWasmLoadI64* lir)
{
emitWasmLoadI64(lir);
}
void
CodeGeneratorMIPS::visitWasmUnalignedLoadI64(LWasmUnalignedLoadI64* lir)
CodeGenerator::visitWasmUnalignedLoadI64(LWasmUnalignedLoadI64* lir)
{
emitWasmLoadI64(lir);
}
@ -361,19 +361,19 @@ CodeGeneratorMIPS::emitWasmStoreI64(T* lir)
}
void
CodeGeneratorMIPS::visitWasmStoreI64(LWasmStoreI64* lir)
CodeGenerator::visitWasmStoreI64(LWasmStoreI64* lir)
{
emitWasmStoreI64(lir);
}
void
CodeGeneratorMIPS::visitWasmUnalignedStoreI64(LWasmUnalignedStoreI64* lir)
CodeGenerator::visitWasmUnalignedStoreI64(LWasmUnalignedStoreI64* lir)
{
emitWasmStoreI64(lir);
}
void
CodeGeneratorMIPS::visitWasmSelectI64(LWasmSelectI64* lir)
CodeGenerator::visitWasmSelectI64(LWasmSelectI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Int64);
Register cond = ToRegister(lir->condExpr());
@ -397,7 +397,7 @@ CodeGeneratorMIPS::visitWasmSelectI64(LWasmSelectI64* lir)
}
void
CodeGeneratorMIPS::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
CodeGenerator::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Double);
MOZ_ASSERT(lir->mir()->input()->type() == MIRType::Int64);
@ -409,7 +409,7 @@ CodeGeneratorMIPS::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
}
void
CodeGeneratorMIPS::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
CodeGenerator::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Int64);
MOZ_ASSERT(lir->mir()->input()->type() == MIRType::Double);
@ -421,7 +421,7 @@ CodeGeneratorMIPS::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
}
void
CodeGeneratorMIPS::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
CodeGenerator::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
{
Register input = ToRegister(lir->input());
Register64 output = ToOutRegister64(lir);
@ -435,7 +435,7 @@ CodeGeneratorMIPS::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
}
void
CodeGeneratorMIPS::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
CodeGenerator::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
{
const LInt64Allocation& input = lir->getInt64Operand(0);
Register output = ToRegister(lir->output());
@ -447,7 +447,7 @@ CodeGeneratorMIPS::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
}
void
CodeGeneratorMIPS::visitSignExtendInt64(LSignExtendInt64* lir)
CodeGenerator::visitSignExtendInt64(LSignExtendInt64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -466,7 +466,7 @@ CodeGeneratorMIPS::visitSignExtendInt64(LSignExtendInt64* lir)
}
void
CodeGeneratorMIPS::visitClzI64(LClzI64* lir)
CodeGenerator::visitClzI64(LClzI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -475,7 +475,7 @@ CodeGeneratorMIPS::visitClzI64(LClzI64* lir)
}
void
CodeGeneratorMIPS::visitCtzI64(LCtzI64* lir)
CodeGenerator::visitCtzI64(LCtzI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -484,7 +484,7 @@ CodeGeneratorMIPS::visitCtzI64(LCtzI64* lir)
}
void
CodeGeneratorMIPS::visitNotI64(LNotI64* lir)
CodeGenerator::visitNotI64(LNotI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register output = ToRegister(lir->output());
@ -494,7 +494,7 @@ CodeGeneratorMIPS::visitNotI64(LNotI64* lir)
}
void
CodeGeneratorMIPS::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
CodeGenerator::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister arg = input;
@ -541,7 +541,7 @@ CodeGeneratorMIPS::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
}
void
CodeGeneratorMIPS::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
CodeGenerator::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
mozilla::DebugOnly<FloatRegister> output = ToFloatRegister(lir->output());
@ -569,7 +569,7 @@ CodeGeneratorMIPS::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
}
void
CodeGeneratorMIPS::visitTestI64AndBranch(LTestI64AndBranch* lir)
CodeGenerator::visitTestI64AndBranch(LTestI64AndBranch* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
@ -586,7 +586,7 @@ CodeGeneratorMIPS::setReturnDoubleRegs(LiveRegisterSet* regs)
}
void
CodeGeneratorMIPS::visitWasmAtomicLoadI64(LWasmAtomicLoadI64* lir)
CodeGenerator::visitWasmAtomicLoadI64(LWasmAtomicLoadI64* lir)
{
Register ptr = ToRegister(lir->ptr());
Register64 output = ToOutRegister64(lir);
@ -598,7 +598,7 @@ CodeGeneratorMIPS::visitWasmAtomicLoadI64(LWasmAtomicLoadI64* lir)
}
void
CodeGeneratorMIPS::visitWasmAtomicStoreI64(LWasmAtomicStoreI64* lir)
CodeGenerator::visitWasmAtomicStoreI64(LWasmAtomicStoreI64* lir)
{
Register ptr = ToRegister(lir->ptr());
Register64 value = ToRegister64(lir->value());

Просмотреть файл

@ -15,6 +15,10 @@ namespace jit {
class CodeGeneratorMIPS : public CodeGeneratorMIPSShared
{
protected:
CodeGeneratorMIPS(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm)
: CodeGeneratorMIPSShared(gen, graph, masm)
{ }
void testNullEmitBranch(Assembler::Condition cond, const ValueOperand& value,
MBasicBlock* ifTrue, MBasicBlock* ifFalse)
{
@ -36,53 +40,13 @@ class CodeGeneratorMIPS : public CodeGeneratorMIPSShared
template <typename T>
void emitWasmStoreI64(T* ins);
public:
void visitCompareB(LCompareB* lir);
void visitCompareBAndBranch(LCompareBAndBranch* lir);
void visitCompareBitwise(LCompareBitwise* lir);
void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
void visitCompareI64(LCompareI64* lir);
void visitCompareI64AndBranch(LCompareI64AndBranch* lir);
void visitDivOrModI64(LDivOrModI64* lir);
void visitUDivOrModI64(LUDivOrModI64* lir);
void visitWasmLoadI64(LWasmLoadI64* ins);
void visitWasmUnalignedLoadI64(LWasmUnalignedLoadI64* lir);
void visitWasmStoreI64(LWasmStoreI64* ins);
void visitWasmUnalignedStoreI64(LWasmUnalignedStoreI64* ins);
void visitWasmSelectI64(LWasmSelectI64* lir);
void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir);
void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir);
void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir);
void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir);
void visitSignExtendInt64(LSignExtendInt64* ins);
void visitClzI64(LClzI64* ins);
void visitCtzI64(LCtzI64* ins);
void visitNotI64(LNotI64* ins);
void visitWasmTruncateToInt64(LWasmTruncateToInt64* ins);
void visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir);
void visitTestI64AndBranch(LTestI64AndBranch* lir);
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
protected:
ValueOperand ToValue(LInstruction* ins, size_t pos);
ValueOperand ToTempValue(LInstruction* ins, size_t pos);
// Functions for LTestVAndBranch.
void splitTagForTest(const ValueOperand& value, ScratchTagScope& tag);
public:
CodeGeneratorMIPS(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm)
: CodeGeneratorMIPSShared(gen, graph, masm)
{ }
public:
void visitBox(LBox* box);
void visitBoxFloatingPoint(LBoxFloatingPoint* box);
void visitUnbox(LUnbox* unbox);
void setReturnDoubleRegs(LiveRegisterSet* regs);
void visitWasmAtomicLoadI64(LWasmAtomicLoadI64* lir);
void visitWasmAtomicStoreI64(LWasmAtomicStoreI64* lir);
};
typedef CodeGeneratorMIPS CodeGeneratorSpecific;

Просмотреть файл

@ -36,7 +36,7 @@ CodeGeneratorMIPS64::ToTempValue(LInstruction* ins, size_t pos)
}
void
CodeGeneratorMIPS64::visitBox(LBox* box)
CodeGenerator::visitBox(LBox* box)
{
const LAllocation* in = box->getOperand(0);
const LDefinition* result = box->getDef(0);
@ -54,7 +54,7 @@ CodeGeneratorMIPS64::visitBox(LBox* box)
}
void
CodeGeneratorMIPS64::visitUnbox(LUnbox* unbox)
CodeGenerator::visitUnbox(LUnbox* unbox)
{
MUnbox* mir = unbox->mir();
@ -120,7 +120,7 @@ CodeGeneratorMIPS64::splitTagForTest(const ValueOperand& value, ScratchTagScope&
}
void
CodeGeneratorMIPS64::visitCompareB(LCompareB* lir)
CodeGenerator::visitCompareB(LCompareB* lir)
{
MCompare* mir = lir->mir();
@ -142,7 +142,7 @@ CodeGeneratorMIPS64::visitCompareB(LCompareB* lir)
}
void
CodeGeneratorMIPS64::visitCompareBAndBranch(LCompareBAndBranch* lir)
CodeGenerator::visitCompareBAndBranch(LCompareBAndBranch* lir)
{
MCompare* mir = lir->cmpMir();
const ValueOperand lhs = ToValue(lir, LCompareBAndBranch::Lhs);
@ -162,7 +162,7 @@ CodeGeneratorMIPS64::visitCompareBAndBranch(LCompareBAndBranch* lir)
}
void
CodeGeneratorMIPS64::visitCompareBitwise(LCompareBitwise* lir)
CodeGenerator::visitCompareBitwise(LCompareBitwise* lir)
{
MCompare* mir = lir->mir();
Assembler::Condition cond = JSOpToCondition(mir->compareType(), mir->jsop());
@ -176,7 +176,7 @@ CodeGeneratorMIPS64::visitCompareBitwise(LCompareBitwise* lir)
}
void
CodeGeneratorMIPS64::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
CodeGenerator::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
{
MCompare* mir = lir->cmpMir();
Assembler::Condition cond = JSOpToCondition(mir->compareType(), mir->jsop());
@ -190,7 +190,7 @@ CodeGeneratorMIPS64::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
}
void
CodeGeneratorMIPS64::visitCompareI64(LCompareI64* lir)
CodeGenerator::visitCompareI64(LCompareI64* lir)
{
MCompare* mir = lir->mir();
MOZ_ASSERT(mir->compareType() == MCompare::Compare_Int64 ||
@ -214,7 +214,7 @@ CodeGeneratorMIPS64::visitCompareI64(LCompareI64* lir)
}
void
CodeGeneratorMIPS64::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
CodeGenerator::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
{
MCompare* mir = lir->cmpMir();
MOZ_ASSERT(mir->compareType() == MCompare::Compare_Int64 ||
@ -238,7 +238,7 @@ CodeGeneratorMIPS64::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
}
void
CodeGeneratorMIPS64::visitDivOrModI64(LDivOrModI64* lir)
CodeGenerator::visitDivOrModI64(LDivOrModI64* lir)
{
Register lhs = ToRegister(lir->lhs());
Register rhs = ToRegister(lir->rhs());
@ -278,7 +278,7 @@ CodeGeneratorMIPS64::visitDivOrModI64(LDivOrModI64* lir)
}
void
CodeGeneratorMIPS64::visitUDivOrModI64(LUDivOrModI64* lir)
CodeGenerator::visitUDivOrModI64(LUDivOrModI64* lir)
{
Register lhs = ToRegister(lir->lhs());
Register rhs = ToRegister(lir->rhs());
@ -325,13 +325,13 @@ CodeGeneratorMIPS64::emitWasmLoadI64(T* lir)
}
void
CodeGeneratorMIPS64::visitWasmLoadI64(LWasmLoadI64* lir)
CodeGenerator::visitWasmLoadI64(LWasmLoadI64* lir)
{
emitWasmLoadI64(lir);
}
void
CodeGeneratorMIPS64::visitWasmUnalignedLoadI64(LWasmUnalignedLoadI64* lir)
CodeGenerator::visitWasmUnalignedLoadI64(LWasmUnalignedLoadI64* lir)
{
emitWasmLoadI64(lir);
}
@ -357,19 +357,19 @@ CodeGeneratorMIPS64::emitWasmStoreI64(T* lir)
}
void
CodeGeneratorMIPS64::visitWasmStoreI64(LWasmStoreI64* lir)
CodeGenerator::visitWasmStoreI64(LWasmStoreI64* lir)
{
emitWasmStoreI64(lir);
}
void
CodeGeneratorMIPS64::visitWasmUnalignedStoreI64(LWasmUnalignedStoreI64* lir)
CodeGenerator::visitWasmUnalignedStoreI64(LWasmUnalignedStoreI64* lir)
{
emitWasmStoreI64(lir);
}
void
CodeGeneratorMIPS64::visitWasmSelectI64(LWasmSelectI64* lir)
CodeGenerator::visitWasmSelectI64(LWasmSelectI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Int64);
@ -390,7 +390,7 @@ CodeGeneratorMIPS64::visitWasmSelectI64(LWasmSelectI64* lir)
}
void
CodeGeneratorMIPS64::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
CodeGenerator::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Double);
MOZ_ASSERT(lir->mir()->input()->type() == MIRType::Int64);
@ -398,7 +398,7 @@ CodeGeneratorMIPS64::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
}
void
CodeGeneratorMIPS64::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
CodeGenerator::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Int64);
MOZ_ASSERT(lir->mir()->input()->type() == MIRType::Double);
@ -406,7 +406,7 @@ CodeGeneratorMIPS64::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
}
void
CodeGeneratorMIPS64::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
CodeGenerator::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
{
const LAllocation* input = lir->getOperand(0);
Register output = ToRegister(lir->output());
@ -418,7 +418,7 @@ CodeGeneratorMIPS64::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
}
void
CodeGeneratorMIPS64::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
CodeGenerator::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
{
const LAllocation* input = lir->getOperand(0);
Register output = ToRegister(lir->output());
@ -434,7 +434,7 @@ CodeGeneratorMIPS64::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
}
void
CodeGeneratorMIPS64::visitSignExtendInt64(LSignExtendInt64* lir)
CodeGenerator::visitSignExtendInt64(LSignExtendInt64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -454,7 +454,7 @@ CodeGeneratorMIPS64::visitSignExtendInt64(LSignExtendInt64* lir)
}
void
CodeGeneratorMIPS64::visitClzI64(LClzI64* lir)
CodeGenerator::visitClzI64(LClzI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -462,7 +462,7 @@ CodeGeneratorMIPS64::visitClzI64(LClzI64* lir)
}
void
CodeGeneratorMIPS64::visitCtzI64(LCtzI64* lir)
CodeGenerator::visitCtzI64(LCtzI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -470,7 +470,7 @@ CodeGeneratorMIPS64::visitCtzI64(LCtzI64* lir)
}
void
CodeGeneratorMIPS64::visitNotI64(LNotI64* lir)
CodeGenerator::visitNotI64(LNotI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register output = ToRegister(lir->output());
@ -479,7 +479,7 @@ CodeGeneratorMIPS64::visitNotI64(LNotI64* lir)
}
void
CodeGeneratorMIPS64::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
CodeGenerator::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
Register64 output = ToOutRegister64(lir);
@ -514,7 +514,7 @@ CodeGeneratorMIPS64::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
}
void
CodeGeneratorMIPS64::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
CodeGenerator::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
FloatRegister output = ToFloatRegister(lir->output());
@ -536,7 +536,7 @@ CodeGeneratorMIPS64::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
}
void
CodeGeneratorMIPS64::visitTestI64AndBranch(LTestI64AndBranch* lir)
CodeGenerator::visitTestI64AndBranch(LTestI64AndBranch* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
MBasicBlock* ifTrue = lir->ifTrue();

Просмотреть файл

@ -15,6 +15,10 @@ namespace jit {
class CodeGeneratorMIPS64 : public CodeGeneratorMIPSShared
{
protected:
CodeGeneratorMIPS64(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm)
: CodeGeneratorMIPSShared(gen, graph, masm)
{ }
void testNullEmitBranch(Assembler::Condition cond, const ValueOperand& value,
MBasicBlock* ifTrue, MBasicBlock* ifFalse)
{
@ -43,50 +47,12 @@ class CodeGeneratorMIPS64 : public CodeGeneratorMIPSShared
template <typename T>
void emitWasmStoreI64(T* ins);
public:
void visitCompareB(LCompareB* lir);
void visitCompareBAndBranch(LCompareBAndBranch* lir);
void visitCompareBitwise(LCompareBitwise* lir);
void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
void visitCompareI64(LCompareI64* lir);
void visitCompareI64AndBranch(LCompareI64AndBranch* lir);
void visitDivOrModI64(LDivOrModI64* lir);
void visitUDivOrModI64(LUDivOrModI64* lir);
void visitWasmLoadI64(LWasmLoadI64* lir);
void visitWasmUnalignedLoadI64(LWasmUnalignedLoadI64* lir);
void visitWasmStoreI64(LWasmStoreI64* ins);
void visitWasmUnalignedStoreI64(LWasmUnalignedStoreI64* ins);
void visitWasmSelectI64(LWasmSelectI64* ins);
void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir);
void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir);
void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir);
void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir);
void visitSignExtendInt64(LSignExtendInt64* ins);
void visitClzI64(LClzI64* lir);
void visitCtzI64(LCtzI64* lir);
void visitNotI64(LNotI64* lir);
void visitWasmTruncateToInt64(LWasmTruncateToInt64* lir);
void visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir);
void visitTestI64AndBranch(LTestI64AndBranch* lir);
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
protected:
ValueOperand ToValue(LInstruction* ins, size_t pos);
ValueOperand ToTempValue(LInstruction* ins, size_t pos);
// Functions for LTestVAndBranch.
void splitTagForTest(const ValueOperand& value, ScratchTagScope& tag);
public:
CodeGeneratorMIPS64(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm)
: CodeGeneratorMIPSShared(gen, graph, masm)
{ }
public:
void visitBox(LBox* box);
void visitUnbox(LUnbox* unbox);
void setReturnDoubleRegs(LiveRegisterSet* regs);
};

Просмотреть файл

@ -14,7 +14,7 @@ namespace jit {
class CodeGeneratorNone : public CodeGeneratorShared
{
public:
protected:
CodeGeneratorNone(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm)
: CodeGeneratorShared(gen, graph, masm)
{

Просмотреть файл

@ -13,6 +13,7 @@ namespace jit {
class LUnboxFloatingPoint : public LInstruction
{
public:
LIR_HEADER(UnboxFloatingPoint)
static const size_t Input = 0;
MUnbox* mir() const { MOZ_CRASH(); }
@ -24,6 +25,7 @@ class LUnboxFloatingPoint : public LInstruction
class LTableSwitch : public LInstruction
{
public:
LIR_HEADER(TableSwitch)
MTableSwitch* mir() { MOZ_CRASH(); }
const LAllocation* index() { MOZ_CRASH(); }
@ -34,6 +36,7 @@ class LTableSwitch : public LInstruction
class LTableSwitchV : public LInstruction
{
public:
LIR_HEADER(TableSwitchV)
MTableSwitch* mir() { MOZ_CRASH(); }
const LDefinition* tempInt() { MOZ_CRASH(); }

Просмотреть файл

@ -8,6 +8,7 @@
#include "mozilla/DebugOnly.h"
#include "jit/CodeGenerator.h"
#include "jit/CompactBuffer.h"
#include "jit/JitcodeMap.h"
#include "jit/JitSpewer.h"
@ -1551,7 +1552,25 @@ CodeGeneratorShared::emitWasmCallBase(MWasmCall* mir, bool needsBoundsCheck)
}
void
CodeGeneratorShared::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins)
CodeGenerator::visitWasmCall(LWasmCall* ins)
{
emitWasmCallBase(ins->mir(), ins->needsBoundsCheck());
}
void
CodeGenerator::visitWasmCallVoid(LWasmCallVoid* ins)
{
emitWasmCallBase(ins->mir(), ins->needsBoundsCheck());
}
void
CodeGenerator::visitWasmCallI64(LWasmCallI64* ins)
{
emitWasmCallBase(ins->mir(), ins->needsBoundsCheck());
}
void
CodeGenerator::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins)
{
MWasmLoadGlobalVar* mir = ins->mir();
@ -1589,7 +1608,7 @@ CodeGeneratorShared::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins)
}
void
CodeGeneratorShared::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins)
CodeGenerator::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins)
{
MWasmStoreGlobalVar* mir = ins->mir();
@ -1627,7 +1646,7 @@ CodeGeneratorShared::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins)
}
void
CodeGeneratorShared::visitWasmLoadGlobalVarI64(LWasmLoadGlobalVarI64* ins)
CodeGenerator::visitWasmLoadGlobalVarI64(LWasmLoadGlobalVarI64* ins)
{
MWasmLoadGlobalVar* mir = ins->mir();
MOZ_ASSERT(mir->type() == MIRType::Int64);
@ -1640,7 +1659,7 @@ CodeGeneratorShared::visitWasmLoadGlobalVarI64(LWasmLoadGlobalVarI64* ins)
}
void
CodeGeneratorShared::visitWasmStoreGlobalVarI64(LWasmStoreGlobalVarI64* ins)
CodeGenerator::visitWasmStoreGlobalVarI64(LWasmStoreGlobalVarI64* ins)
{
MWasmStoreGlobalVar* mir = ins->mir();
MOZ_ASSERT(mir->value()->type() == MIRType::Int64);

Просмотреть файл

@ -349,20 +349,6 @@ class CodeGeneratorShared : public LElementVisitor
void emitTruncateFloat32(FloatRegister src, Register dest, MTruncateToInt32* mir);
void emitWasmCallBase(MWasmCall* mir, bool needsBoundsCheck);
void visitWasmCall(LWasmCall* ins) {
emitWasmCallBase(ins->mir(), ins->needsBoundsCheck());
}
void visitWasmCallVoid(LWasmCallVoid* ins) {
emitWasmCallBase(ins->mir(), ins->needsBoundsCheck());
}
void visitWasmCallI64(LWasmCallI64* ins) {
emitWasmCallBase(ins->mir(), ins->needsBoundsCheck());
}
void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins);
void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins);
void visitWasmLoadGlobalVarI64(LWasmLoadGlobalVarI64* ins);
void visitWasmStoreGlobalVarI64(LWasmStoreGlobalVarI64* ins);
void emitPreBarrier(Register base, const LAllocation* index, int32_t offsetAdjustment);
void emitPreBarrier(Address address);
@ -394,7 +380,7 @@ class CodeGeneratorShared : public LElementVisitor
return true;
}
public:
protected:
// Save and restore all volatile registers to/from the stack, excluding the
// specified register(s), before a function call made using callWithABI and
// after storing the function call's return value to an output register.
@ -449,6 +435,7 @@ class CodeGeneratorShared : public LElementVisitor
inline void saveLiveVolatile(LInstruction* ins);
inline void restoreLiveVolatile(LInstruction* ins);
public:
template <typename T>
void pushArg(const T& t) {
masm.Push(t);
@ -478,6 +465,7 @@ class CodeGeneratorShared : public LElementVisitor
masm.storeCallResultValue(t);
}
protected:
void callVM(const VMFunction& f, LInstruction* ins, const Register* dynStack = nullptr);
template <class ArgSeq, class StoreOutputTo>

Просмотреть файл

@ -8,6 +8,7 @@
#include "mozilla/MathAlgorithms.h"
#include "jit/CodeGenerator.h"
#include "jit/MIR.h"
#include "jit/MacroAssembler-inl.h"
@ -65,14 +66,14 @@ FrameSizeClass::frameSize() const
}
void
CodeGeneratorX64::visitValue(LValue* value)
CodeGenerator::visitValue(LValue* value)
{
ValueOperand result = ToOutValue(value);
masm.moveValue(value->value(), result);
}
void
CodeGeneratorX64::visitBox(LBox* box)
CodeGenerator::visitBox(LBox* box)
{
const LAllocation* in = box->getOperand(0);
ValueOperand result = ToOutValue(box);
@ -81,7 +82,7 @@ CodeGeneratorX64::visitBox(LBox* box)
}
void
CodeGeneratorX64::visitUnbox(LUnbox* unbox)
CodeGenerator::visitUnbox(LUnbox* unbox)
{
MUnbox* mir = unbox->mir();
@ -144,7 +145,7 @@ CodeGeneratorX64::visitUnbox(LUnbox* unbox)
}
void
CodeGeneratorX64::visitCompareB(LCompareB* lir)
CodeGenerator::visitCompareB(LCompareB* lir)
{
MCompare* mir = lir->mir();
@ -167,7 +168,7 @@ CodeGeneratorX64::visitCompareB(LCompareB* lir)
}
void
CodeGeneratorX64::visitCompareBAndBranch(LCompareBAndBranch* lir)
CodeGenerator::visitCompareBAndBranch(LCompareBAndBranch* lir)
{
MCompare* mir = lir->cmpMir();
@ -189,7 +190,7 @@ CodeGeneratorX64::visitCompareBAndBranch(LCompareBAndBranch* lir)
}
void
CodeGeneratorX64::visitCompareBitwise(LCompareBitwise* lir)
CodeGenerator::visitCompareBitwise(LCompareBitwise* lir)
{
MCompare* mir = lir->mir();
const ValueOperand lhs = ToValue(lir, LCompareBitwise::LhsInput);
@ -203,7 +204,7 @@ CodeGeneratorX64::visitCompareBitwise(LCompareBitwise* lir)
}
void
CodeGeneratorX64::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
CodeGenerator::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
{
MCompare* mir = lir->cmpMir();
@ -218,7 +219,7 @@ CodeGeneratorX64::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
}
void
CodeGeneratorX64::visitCompareI64(LCompareI64* lir)
CodeGenerator::visitCompareI64(LCompareI64* lir)
{
MCompare* mir = lir->mir();
MOZ_ASSERT(mir->compareType() == MCompare::Compare_Int64 ||
@ -239,7 +240,7 @@ CodeGeneratorX64::visitCompareI64(LCompareI64* lir)
}
void
CodeGeneratorX64::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
CodeGenerator::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
{
MCompare* mir = lir->cmpMir();
MOZ_ASSERT(mir->compareType() == MCompare::Compare_Int64 ||
@ -259,7 +260,7 @@ CodeGeneratorX64::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
}
void
CodeGeneratorX64::visitDivOrModI64(LDivOrModI64* lir)
CodeGenerator::visitDivOrModI64(LDivOrModI64* lir)
{
Register lhs = ToRegister(lir->lhs());
Register rhs = ToRegister(lir->rhs());
@ -305,7 +306,7 @@ CodeGeneratorX64::visitDivOrModI64(LDivOrModI64* lir)
}
void
CodeGeneratorX64::visitUDivOrModI64(LUDivOrModI64* lir)
CodeGenerator::visitUDivOrModI64(LUDivOrModI64* lir)
{
Register lhs = ToRegister(lir->lhs());
Register rhs = ToRegister(lir->rhs());
@ -338,7 +339,7 @@ CodeGeneratorX64::visitUDivOrModI64(LUDivOrModI64* lir)
}
void
CodeGeneratorX64::visitWasmSelectI64(LWasmSelectI64* lir)
CodeGenerator::visitWasmSelectI64(LWasmSelectI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Int64);
@ -354,7 +355,7 @@ CodeGeneratorX64::visitWasmSelectI64(LWasmSelectI64* lir)
}
void
CodeGeneratorX64::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
CodeGenerator::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Double);
MOZ_ASSERT(lir->mir()->input()->type() == MIRType::Int64);
@ -362,7 +363,7 @@ CodeGeneratorX64::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
}
void
CodeGeneratorX64::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
CodeGenerator::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Int64);
MOZ_ASSERT(lir->mir()->input()->type() == MIRType::Double);
@ -370,25 +371,25 @@ CodeGeneratorX64::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
}
void
CodeGeneratorX64::visitWasmUint32ToDouble(LWasmUint32ToDouble* lir)
CodeGenerator::visitWasmUint32ToDouble(LWasmUint32ToDouble* lir)
{
masm.convertUInt32ToDouble(ToRegister(lir->input()), ToFloatRegister(lir->output()));
}
void
CodeGeneratorX64::visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir)
CodeGenerator::visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir)
{
masm.convertUInt32ToFloat32(ToRegister(lir->input()), ToFloatRegister(lir->output()));
}
void
CodeGeneratorX64::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins)
CodeGenerator::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins)
{
MOZ_CRASH("NYI");
}
void
CodeGeneratorX64::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins)
CodeGenerator::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins)
{
MOZ_CRASH("NYI");
}
@ -459,13 +460,13 @@ CodeGeneratorX64::emitWasmLoad(T* ins)
}
void
CodeGeneratorX64::visitWasmLoad(LWasmLoad* ins)
CodeGenerator::visitWasmLoad(LWasmLoad* ins)
{
emitWasmLoad(ins);
}
void
CodeGeneratorX64::visitWasmLoadI64(LWasmLoadI64* ins)
CodeGenerator::visitWasmLoadI64(LWasmLoadI64* ins)
{
emitWasmLoad(ins);
}
@ -490,19 +491,19 @@ CodeGeneratorX64::emitWasmStore(T* ins)
}
void
CodeGeneratorX64::visitWasmStore(LWasmStore* ins)
CodeGenerator::visitWasmStore(LWasmStore* ins)
{
emitWasmStore(ins);
}
void
CodeGeneratorX64::visitWasmStoreI64(LWasmStoreI64* ins)
CodeGenerator::visitWasmStoreI64(LWasmStoreI64* ins)
{
emitWasmStore(ins);
}
void
CodeGeneratorX64::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
CodeGenerator::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
{
const MAsmJSLoadHeap* mir = ins->mir();
MOZ_ASSERT(mir->offset() < wasm::OffsetGuardLimit);
@ -524,7 +525,7 @@ CodeGeneratorX64::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
}
void
CodeGeneratorX64::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
CodeGenerator::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
{
const MAsmJSStoreHeap* mir = ins->mir();
MOZ_ASSERT(mir->offset() < wasm::OffsetGuardLimit);
@ -548,7 +549,7 @@ CodeGeneratorX64::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
}
void
CodeGeneratorX64::visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins)
CodeGenerator::visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins)
{
MWasmCompareExchangeHeap* mir = ins->mir();
@ -571,7 +572,7 @@ CodeGeneratorX64::visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins)
}
void
CodeGeneratorX64::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins)
CodeGenerator::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins)
{
MWasmAtomicExchangeHeap* mir = ins->mir();
@ -594,7 +595,7 @@ CodeGeneratorX64::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins)
}
void
CodeGeneratorX64::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins)
CodeGenerator::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins)
{
MWasmAtomicBinopHeap* mir = ins->mir();
MOZ_ASSERT(mir->hasUses());
@ -627,7 +628,7 @@ CodeGeneratorX64::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins)
}
void
CodeGeneratorX64::visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins)
CodeGenerator::visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins)
{
MWasmAtomicBinopHeap* mir = ins->mir();
MOZ_ASSERT(!mir->hasUses());
@ -658,7 +659,7 @@ CodeGeneratorX64::visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffec
}
void
CodeGeneratorX64::visitTruncateDToInt32(LTruncateDToInt32* ins)
CodeGenerator::visitTruncateDToInt32(LTruncateDToInt32* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
Register output = ToRegister(ins->output());
@ -670,7 +671,7 @@ CodeGeneratorX64::visitTruncateDToInt32(LTruncateDToInt32* ins)
}
void
CodeGeneratorX64::visitTruncateFToInt32(LTruncateFToInt32* ins)
CodeGenerator::visitTruncateFToInt32(LTruncateFToInt32* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
Register output = ToRegister(ins->output());
@ -682,7 +683,7 @@ CodeGeneratorX64::visitTruncateFToInt32(LTruncateFToInt32* ins)
}
void
CodeGeneratorX64::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
CodeGenerator::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
{
const LAllocation* input = lir->getOperand(0);
Register output = ToRegister(lir->output());
@ -694,7 +695,7 @@ CodeGeneratorX64::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
}
void
CodeGeneratorX64::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
CodeGenerator::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
{
const LAllocation* input = lir->getOperand(0);
Register output = ToRegister(lir->output());
@ -706,7 +707,7 @@ CodeGeneratorX64::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
}
void
CodeGeneratorX64::visitSignExtendInt64(LSignExtendInt64* ins)
CodeGenerator::visitSignExtendInt64(LSignExtendInt64* ins)
{
Register64 input = ToRegister64(ins->getInt64Operand(0));
Register64 output = ToOutRegister64(ins);
@ -724,7 +725,7 @@ CodeGeneratorX64::visitSignExtendInt64(LSignExtendInt64* ins)
}
void
CodeGeneratorX64::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
CodeGenerator::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
Register64 output = ToOutRegister64(lir);
@ -760,7 +761,7 @@ CodeGeneratorX64::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
}
void
CodeGeneratorX64::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
CodeGenerator::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
FloatRegister output = ToFloatRegister(lir->output());
@ -786,14 +787,14 @@ CodeGeneratorX64::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
}
void
CodeGeneratorX64::visitNotI64(LNotI64* lir)
CodeGenerator::visitNotI64(LNotI64* lir)
{
masm.cmpq(Imm32(0), ToRegister(lir->input()));
masm.emitSet(Assembler::Equal, ToRegister(lir->output()));
}
void
CodeGeneratorX64::visitClzI64(LClzI64* lir)
CodeGenerator::visitClzI64(LClzI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -801,7 +802,7 @@ CodeGeneratorX64::visitClzI64(LClzI64* lir)
}
void
CodeGeneratorX64::visitCtzI64(LCtzI64* lir)
CodeGenerator::visitCtzI64(LCtzI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -809,7 +810,7 @@ CodeGeneratorX64::visitCtzI64(LCtzI64* lir)
}
void
CodeGeneratorX64::visitTestI64AndBranch(LTestI64AndBranch* lir)
CodeGenerator::visitTestI64AndBranch(LTestI64AndBranch* lir)
{
Register input = ToRegister(lir->input());
masm.testq(input, input);

Просмотреть файл

@ -14,11 +14,9 @@ namespace jit {
class CodeGeneratorX64 : public CodeGeneratorX86Shared
{
CodeGeneratorX64* thisFromCtor() {
return this;
}
protected:
CodeGeneratorX64(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
Operand ToOperand64(const LInt64Allocation& a);
ValueOperand ToValue(LInstruction* ins, size_t pos);
ValueOperand ToTempValue(LInstruction* ins, size_t pos);
@ -29,50 +27,6 @@ class CodeGeneratorX64 : public CodeGeneratorX86Shared
void wasmStore(const wasm::MemoryAccessDesc& access, const LAllocation* value, Operand dstAddr);
template <typename T> void emitWasmLoad(T* ins);
template <typename T> void emitWasmStore(T* ins);
public:
CodeGeneratorX64(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
public:
void visitValue(LValue* value);
void visitBox(LBox* box);
void visitUnbox(LUnbox* unbox);
void visitCompareB(LCompareB* lir);
void visitCompareBAndBranch(LCompareBAndBranch* lir);
void visitCompareBitwise(LCompareBitwise* lir);
void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
void visitCompareI64(LCompareI64* lir);
void visitCompareI64AndBranch(LCompareI64AndBranch* lir);
void visitDivOrModI64(LDivOrModI64* lir);
void visitUDivOrModI64(LUDivOrModI64* lir);
void visitNotI64(LNotI64* lir);
void visitClzI64(LClzI64* lir);
void visitCtzI64(LCtzI64* lir);
void visitTruncateDToInt32(LTruncateDToInt32* ins);
void visitTruncateFToInt32(LTruncateFToInt32* ins);
void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir);
void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir);
void visitSignExtendInt64(LSignExtendInt64* ins);
void visitWasmTruncateToInt64(LWasmTruncateToInt64* lir);
void visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir);
void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins);
void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins);
void visitWasmLoad(LWasmLoad* ins);
void visitWasmLoadI64(LWasmLoadI64* ins);
void visitWasmStore(LWasmStore* ins);
void visitWasmStoreI64(LWasmStoreI64* ins);
void visitWasmSelectI64(LWasmSelectI64* ins);
void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins);
void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins);
void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins);
void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins);
void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir);
void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir);
void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir);
void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir);
void visitTestI64AndBranch(LTestI64AndBranch* lir);
};
typedef CodeGeneratorX64 CodeGeneratorSpecific;

Просмотреть файл

@ -11,6 +11,7 @@
#include "jsmath.h"
#include "jit/CodeGenerator.h"
#include "jit/JitCompartment.h"
#include "jit/JitFrames.h"
#include "jit/Linker.h"
@ -79,21 +80,21 @@ CodeGeneratorX86Shared::emitBranch(Assembler::Condition cond, MBasicBlock* mirTr
}
void
CodeGeneratorX86Shared::visitDouble(LDouble* ins)
CodeGenerator::visitDouble(LDouble* ins)
{
const LDefinition* out = ins->getDef(0);
masm.loadConstantDouble(ins->getDouble(), ToFloatRegister(out));
}
void
CodeGeneratorX86Shared::visitFloat32(LFloat32* ins)
CodeGenerator::visitFloat32(LFloat32* ins)
{
const LDefinition* out = ins->getDef(0);
masm.loadConstantFloat32(ins->getFloat(), ToFloatRegister(out));
}
void
CodeGeneratorX86Shared::visitTestIAndBranch(LTestIAndBranch* test)
CodeGenerator::visitTestIAndBranch(LTestIAndBranch* test)
{
Register input = ToRegister(test->input());
masm.test32(input, input);
@ -101,7 +102,7 @@ CodeGeneratorX86Shared::visitTestIAndBranch(LTestIAndBranch* test)
}
void
CodeGeneratorX86Shared::visitTestDAndBranch(LTestDAndBranch* test)
CodeGenerator::visitTestDAndBranch(LTestDAndBranch* test)
{
const LAllocation* opd = test->input();
@ -122,7 +123,7 @@ CodeGeneratorX86Shared::visitTestDAndBranch(LTestDAndBranch* test)
}
void
CodeGeneratorX86Shared::visitTestFAndBranch(LTestFAndBranch* test)
CodeGenerator::visitTestFAndBranch(LTestFAndBranch* test)
{
const LAllocation* opd = test->input();
// vucomiss flags are the same as doubles; see comment above
@ -135,7 +136,7 @@ CodeGeneratorX86Shared::visitTestFAndBranch(LTestFAndBranch* test)
}
void
CodeGeneratorX86Shared::visitBitAndAndBranch(LBitAndAndBranch* baab)
CodeGenerator::visitBitAndAndBranch(LBitAndAndBranch* baab)
{
if (baab->right()->isConstant())
masm.test32(ToRegister(baab->left()), Imm32(ToInt32(baab->right())));
@ -161,7 +162,7 @@ CodeGeneratorX86Shared::emitCompare(MCompare::CompareType type, const LAllocatio
}
void
CodeGeneratorX86Shared::visitCompare(LCompare* comp)
CodeGenerator::visitCompare(LCompare* comp)
{
MCompare* mir = comp->mir();
emitCompare(mir->compareType(), comp->left(), comp->right());
@ -169,7 +170,7 @@ CodeGeneratorX86Shared::visitCompare(LCompare* comp)
}
void
CodeGeneratorX86Shared::visitCompareAndBranch(LCompareAndBranch* comp)
CodeGenerator::visitCompareAndBranch(LCompareAndBranch* comp)
{
MCompare* mir = comp->cmpMir();
emitCompare(mir->compareType(), comp->left(), comp->right());
@ -178,7 +179,7 @@ CodeGeneratorX86Shared::visitCompareAndBranch(LCompareAndBranch* comp)
}
void
CodeGeneratorX86Shared::visitCompareD(LCompareD* comp)
CodeGenerator::visitCompareD(LCompareD* comp)
{
FloatRegister lhs = ToFloatRegister(comp->left());
FloatRegister rhs = ToFloatRegister(comp->right());
@ -194,7 +195,7 @@ CodeGeneratorX86Shared::visitCompareD(LCompareD* comp)
}
void
CodeGeneratorX86Shared::visitCompareF(LCompareF* comp)
CodeGenerator::visitCompareF(LCompareF* comp)
{
FloatRegister lhs = ToFloatRegister(comp->left());
FloatRegister rhs = ToFloatRegister(comp->right());
@ -210,14 +211,14 @@ CodeGeneratorX86Shared::visitCompareF(LCompareF* comp)
}
void
CodeGeneratorX86Shared::visitNotI(LNotI* ins)
CodeGenerator::visitNotI(LNotI* ins)
{
masm.cmp32(ToRegister(ins->input()), Imm32(0));
masm.emitSet(Assembler::Equal, ToRegister(ins->output()));
}
void
CodeGeneratorX86Shared::visitNotD(LNotD* ins)
CodeGenerator::visitNotD(LNotD* ins)
{
FloatRegister opd = ToFloatRegister(ins->input());
@ -234,7 +235,7 @@ CodeGeneratorX86Shared::visitNotD(LNotD* ins)
}
void
CodeGeneratorX86Shared::visitNotF(LNotF* ins)
CodeGenerator::visitNotF(LNotF* ins)
{
FloatRegister opd = ToFloatRegister(ins->input());
@ -251,7 +252,7 @@ CodeGeneratorX86Shared::visitNotF(LNotF* ins)
}
void
CodeGeneratorX86Shared::visitCompareDAndBranch(LCompareDAndBranch* comp)
CodeGenerator::visitCompareDAndBranch(LCompareDAndBranch* comp)
{
FloatRegister lhs = ToFloatRegister(comp->left());
FloatRegister rhs = ToFloatRegister(comp->right());
@ -267,7 +268,7 @@ CodeGeneratorX86Shared::visitCompareDAndBranch(LCompareDAndBranch* comp)
}
void
CodeGeneratorX86Shared::visitCompareFAndBranch(LCompareFAndBranch* comp)
CodeGenerator::visitCompareFAndBranch(LCompareFAndBranch* comp)
{
FloatRegister lhs = ToFloatRegister(comp->left());
FloatRegister rhs = ToFloatRegister(comp->right());
@ -283,7 +284,7 @@ CodeGeneratorX86Shared::visitCompareFAndBranch(LCompareFAndBranch* comp)
}
void
CodeGeneratorX86Shared::visitWasmStackArg(LWasmStackArg* ins)
CodeGenerator::visitWasmStackArg(LWasmStackArg* ins)
{
const MWasmStackArg* mir = ins->mir();
Address dst(StackPointer, mir->spOffset());
@ -315,7 +316,7 @@ CodeGeneratorX86Shared::visitWasmStackArg(LWasmStackArg* ins)
}
void
CodeGeneratorX86Shared::visitWasmStackArgI64(LWasmStackArgI64* ins)
CodeGenerator::visitWasmStackArgI64(LWasmStackArgI64* ins)
{
const MWasmStackArg* mir = ins->mir();
Address dst(StackPointer, mir->spOffset());
@ -326,7 +327,7 @@ CodeGeneratorX86Shared::visitWasmStackArgI64(LWasmStackArgI64* ins)
}
void
CodeGeneratorX86Shared::visitWasmSelect(LWasmSelect* ins)
CodeGenerator::visitWasmSelect(LWasmSelect* ins)
{
MIRType mirType = ins->mir()->type();
@ -366,7 +367,7 @@ CodeGeneratorX86Shared::visitWasmSelect(LWasmSelect* ins)
}
void
CodeGeneratorX86Shared::visitWasmReinterpret(LWasmReinterpret* lir)
CodeGenerator::visitWasmReinterpret(LWasmReinterpret* lir)
{
MOZ_ASSERT(gen->compilingWasm());
MWasmReinterpret* ins = lir->mir();
@ -425,7 +426,7 @@ CodeGeneratorX86Shared::visitOutOfLineLoadTypedArrayOutOfBounds(OutOfLineLoadTyp
}
void
CodeGeneratorX86Shared::visitWasmAddOffset(LWasmAddOffset* lir)
CodeGenerator::visitWasmAddOffset(LWasmAddOffset* lir)
{
MWasmAddOffset* mir = lir->mir();
Register base = ToRegister(lir->base());
@ -439,7 +440,7 @@ CodeGeneratorX86Shared::visitWasmAddOffset(LWasmAddOffset* lir)
}
void
CodeGeneratorX86Shared::visitWasmTruncateToInt32(LWasmTruncateToInt32* lir)
CodeGenerator::visitWasmTruncateToInt32(LWasmTruncateToInt32* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
Register output = ToRegister(lir->output());
@ -597,7 +598,7 @@ CodeGeneratorX86Shared::visitOutOfLineBailout(OutOfLineBailout* ool)
}
void
CodeGeneratorX86Shared::visitMinMaxD(LMinMaxD* ins)
CodeGenerator::visitMinMaxD(LMinMaxD* ins)
{
FloatRegister first = ToFloatRegister(ins->first());
FloatRegister second = ToFloatRegister(ins->second());
@ -615,7 +616,7 @@ CodeGeneratorX86Shared::visitMinMaxD(LMinMaxD* ins)
}
void
CodeGeneratorX86Shared::visitMinMaxF(LMinMaxF* ins)
CodeGenerator::visitMinMaxF(LMinMaxF* ins)
{
FloatRegister first = ToFloatRegister(ins->first());
FloatRegister second = ToFloatRegister(ins->second());
@ -633,7 +634,7 @@ CodeGeneratorX86Shared::visitMinMaxF(LMinMaxF* ins)
}
void
CodeGeneratorX86Shared::visitAbsD(LAbsD* ins)
CodeGenerator::visitAbsD(LAbsD* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
MOZ_ASSERT(input == ToFloatRegister(ins->output()));
@ -644,7 +645,7 @@ CodeGeneratorX86Shared::visitAbsD(LAbsD* ins)
}
void
CodeGeneratorX86Shared::visitAbsF(LAbsF* ins)
CodeGenerator::visitAbsF(LAbsF* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
MOZ_ASSERT(input == ToFloatRegister(ins->output()));
@ -655,7 +656,7 @@ CodeGeneratorX86Shared::visitAbsF(LAbsF* ins)
}
void
CodeGeneratorX86Shared::visitClzI(LClzI* ins)
CodeGenerator::visitClzI(LClzI* ins)
{
Register input = ToRegister(ins->input());
Register output = ToRegister(ins->output());
@ -665,7 +666,7 @@ CodeGeneratorX86Shared::visitClzI(LClzI* ins)
}
void
CodeGeneratorX86Shared::visitCtzI(LCtzI* ins)
CodeGenerator::visitCtzI(LCtzI* ins)
{
Register input = ToRegister(ins->input());
Register output = ToRegister(ins->output());
@ -675,7 +676,7 @@ CodeGeneratorX86Shared::visitCtzI(LCtzI* ins)
}
void
CodeGeneratorX86Shared::visitPopcntI(LPopcntI* ins)
CodeGenerator::visitPopcntI(LPopcntI* ins)
{
Register input = ToRegister(ins->input());
Register output = ToRegister(ins->output());
@ -685,7 +686,7 @@ CodeGeneratorX86Shared::visitPopcntI(LPopcntI* ins)
}
void
CodeGeneratorX86Shared::visitSqrtD(LSqrtD* ins)
CodeGenerator::visitSqrtD(LSqrtD* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -693,7 +694,7 @@ CodeGeneratorX86Shared::visitSqrtD(LSqrtD* ins)
}
void
CodeGeneratorX86Shared::visitSqrtF(LSqrtF* ins)
CodeGenerator::visitSqrtF(LSqrtF* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -701,7 +702,7 @@ CodeGeneratorX86Shared::visitSqrtF(LSqrtF* ins)
}
void
CodeGeneratorX86Shared::visitPowHalfD(LPowHalfD* ins)
CodeGenerator::visitPowHalfD(LPowHalfD* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -757,7 +758,7 @@ class OutOfLineUndoALUOperation : public OutOfLineCodeBase<CodeGeneratorX86Share
};
void
CodeGeneratorX86Shared::visitAddI(LAddI* ins)
CodeGenerator::visitAddI(LAddI* ins)
{
if (ins->rhs()->isConstant())
masm.addl(Imm32(ToInt32(ins->rhs())), ToOperand(ins->lhs()));
@ -776,7 +777,7 @@ CodeGeneratorX86Shared::visitAddI(LAddI* ins)
}
void
CodeGeneratorX86Shared::visitAddI64(LAddI64* lir)
CodeGenerator::visitAddI64(LAddI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LAddI64::Lhs);
const LInt64Allocation rhs = lir->getInt64Operand(LAddI64::Rhs);
@ -792,7 +793,7 @@ CodeGeneratorX86Shared::visitAddI64(LAddI64* lir)
}
void
CodeGeneratorX86Shared::visitSubI(LSubI* ins)
CodeGenerator::visitSubI(LSubI* ins)
{
if (ins->rhs()->isConstant())
masm.subl(Imm32(ToInt32(ins->rhs())), ToOperand(ins->lhs()));
@ -811,7 +812,7 @@ CodeGeneratorX86Shared::visitSubI(LSubI* ins)
}
void
CodeGeneratorX86Shared::visitSubI64(LSubI64* lir)
CodeGenerator::visitSubI64(LSubI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LSubI64::Lhs);
const LInt64Allocation rhs = lir->getInt64Operand(LSubI64::Rhs);
@ -878,7 +879,7 @@ class MulNegativeZeroCheck : public OutOfLineCodeBase<CodeGeneratorX86Shared>
};
void
CodeGeneratorX86Shared::visitMulI(LMulI* ins)
CodeGenerator::visitMulI(LMulI* ins)
{
const LAllocation* lhs = ins->lhs();
const LAllocation* rhs = ins->rhs();
@ -942,7 +943,7 @@ CodeGeneratorX86Shared::visitMulI(LMulI* ins)
}
void
CodeGeneratorX86Shared::visitMulI64(LMulI64* lir)
CodeGenerator::visitMulI64(LMulI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LMulI64::Lhs);
const LInt64Allocation rhs = lir->getInt64Operand(LMulI64::Rhs);
@ -1007,7 +1008,7 @@ CodeGeneratorX86Shared::visitReturnZero(ReturnZero* ool)
}
void
CodeGeneratorX86Shared::visitUDivOrMod(LUDivOrMod* ins)
CodeGenerator::visitUDivOrMod(LUDivOrMod* ins)
{
Register lhs = ToRegister(ins->lhs());
Register rhs = ToRegister(ins->rhs());
@ -1066,7 +1067,7 @@ CodeGeneratorX86Shared::visitUDivOrMod(LUDivOrMod* ins)
}
void
CodeGeneratorX86Shared::visitUDivOrModConstant(LUDivOrModConstant *ins) {
CodeGenerator::visitUDivOrModConstant(LUDivOrModConstant *ins) {
Register lhs = ToRegister(ins->numerator());
Register output = ToRegister(ins->output());
uint32_t d = ins->denominator();
@ -1163,7 +1164,7 @@ CodeGeneratorX86Shared::visitMulNegativeZeroCheck(MulNegativeZeroCheck* ool)
}
void
CodeGeneratorX86Shared::visitDivPowTwoI(LDivPowTwoI* ins)
CodeGenerator::visitDivPowTwoI(LDivPowTwoI* ins)
{
Register lhs = ToRegister(ins->numerator());
DebugOnly<Register> output = ToRegister(ins->output());
@ -1232,7 +1233,7 @@ CodeGeneratorX86Shared::visitDivPowTwoI(LDivPowTwoI* ins)
}
void
CodeGeneratorX86Shared::visitDivOrModConstantI(LDivOrModConstantI* ins) {
CodeGenerator::visitDivOrModConstantI(LDivOrModConstantI* ins) {
Register lhs = ToRegister(ins->numerator());
Register output = ToRegister(ins->output());
int32_t d = ins->denominator();
@ -1315,7 +1316,7 @@ CodeGeneratorX86Shared::visitDivOrModConstantI(LDivOrModConstantI* ins) {
}
void
CodeGeneratorX86Shared::visitDivI(LDivI* ins)
CodeGenerator::visitDivI(LDivI* ins)
{
Register remainder = ToRegister(ins->remainder());
Register lhs = ToRegister(ins->lhs());
@ -1407,7 +1408,7 @@ CodeGeneratorX86Shared::visitDivI(LDivI* ins)
}
void
CodeGeneratorX86Shared::visitModPowTwoI(LModPowTwoI* ins)
CodeGenerator::visitModPowTwoI(LModPowTwoI* ins)
{
Register lhs = ToRegister(ins->getOperand(0));
int32_t shift = ins->shift();
@ -1487,7 +1488,7 @@ CodeGeneratorX86Shared::visitModOverflowCheck(ModOverflowCheck* ool)
}
void
CodeGeneratorX86Shared::visitModI(LModI* ins)
CodeGenerator::visitModI(LModI* ins)
{
Register remainder = ToRegister(ins->remainder());
Register lhs = ToRegister(ins->lhs());
@ -1598,7 +1599,7 @@ CodeGeneratorX86Shared::visitModI(LModI* ins)
}
void
CodeGeneratorX86Shared::visitBitNotI(LBitNotI* ins)
CodeGenerator::visitBitNotI(LBitNotI* ins)
{
const LAllocation* input = ins->getOperand(0);
MOZ_ASSERT(!input->isConstant());
@ -1607,7 +1608,7 @@ CodeGeneratorX86Shared::visitBitNotI(LBitNotI* ins)
}
void
CodeGeneratorX86Shared::visitBitOpI(LBitOpI* ins)
CodeGenerator::visitBitOpI(LBitOpI* ins)
{
const LAllocation* lhs = ins->getOperand(0);
const LAllocation* rhs = ins->getOperand(1);
@ -1637,7 +1638,7 @@ CodeGeneratorX86Shared::visitBitOpI(LBitOpI* ins)
}
void
CodeGeneratorX86Shared::visitBitOpI64(LBitOpI64* lir)
CodeGenerator::visitBitOpI64(LBitOpI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LBitOpI64::Lhs);
const LInt64Allocation rhs = lir->getInt64Operand(LBitOpI64::Rhs);
@ -1669,7 +1670,7 @@ CodeGeneratorX86Shared::visitBitOpI64(LBitOpI64* lir)
}
void
CodeGeneratorX86Shared::visitShiftI(LShiftI* ins)
CodeGenerator::visitShiftI(LShiftI* ins)
{
Register lhs = ToRegister(ins->lhs());
const LAllocation* rhs = ins->rhs();
@ -1721,7 +1722,7 @@ CodeGeneratorX86Shared::visitShiftI(LShiftI* ins)
}
void
CodeGeneratorX86Shared::visitShiftI64(LShiftI64* lir)
CodeGenerator::visitShiftI64(LShiftI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LShiftI64::Lhs);
LAllocation* rhs = lir->getOperand(LShiftI64::Rhs);
@ -1766,7 +1767,7 @@ CodeGeneratorX86Shared::visitShiftI64(LShiftI64* lir)
}
void
CodeGeneratorX86Shared::visitUrshD(LUrshD* ins)
CodeGenerator::visitUrshD(LUrshD* ins)
{
Register lhs = ToRegister(ins->lhs());
MOZ_ASSERT(ToRegister(ins->temp()) == lhs);
@ -1893,7 +1894,7 @@ CodeGeneratorX86Shared::emitTableSwitchDispatch(MTableSwitch* mir, Register inde
}
void
CodeGeneratorX86Shared::visitMathD(LMathD* math)
CodeGenerator::visitMathD(LMathD* math)
{
FloatRegister lhs = ToFloatRegister(math->lhs());
Operand rhs = ToOperand(math->rhs());
@ -1918,7 +1919,7 @@ CodeGeneratorX86Shared::visitMathD(LMathD* math)
}
void
CodeGeneratorX86Shared::visitMathF(LMathF* math)
CodeGenerator::visitMathF(LMathF* math)
{
FloatRegister lhs = ToFloatRegister(math->lhs());
Operand rhs = ToOperand(math->rhs());
@ -1943,7 +1944,7 @@ CodeGeneratorX86Shared::visitMathF(LMathF* math)
}
void
CodeGeneratorX86Shared::visitFloor(LFloor* lir)
CodeGenerator::visitFloor(LFloor* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
Register output = ToRegister(lir->output());
@ -2007,7 +2008,7 @@ CodeGeneratorX86Shared::visitFloor(LFloor* lir)
}
void
CodeGeneratorX86Shared::visitFloorF(LFloorF* lir)
CodeGenerator::visitFloorF(LFloorF* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
Register output = ToRegister(lir->output());
@ -2071,7 +2072,7 @@ CodeGeneratorX86Shared::visitFloorF(LFloorF* lir)
}
void
CodeGeneratorX86Shared::visitCeil(LCeil* lir)
CodeGenerator::visitCeil(LCeil* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
ScratchDoubleScope scratch(masm);
@ -2123,7 +2124,7 @@ CodeGeneratorX86Shared::visitCeil(LCeil* lir)
}
void
CodeGeneratorX86Shared::visitCeilF(LCeilF* lir)
CodeGenerator::visitCeilF(LCeilF* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
ScratchFloat32Scope scratch(masm);
@ -2175,7 +2176,7 @@ CodeGeneratorX86Shared::visitCeilF(LCeilF* lir)
}
void
CodeGeneratorX86Shared::visitRound(LRound* lir)
CodeGenerator::visitRound(LRound* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister temp = ToFloatRegister(lir->temp());
@ -2264,7 +2265,7 @@ CodeGeneratorX86Shared::visitRound(LRound* lir)
}
void
CodeGeneratorX86Shared::visitRoundF(LRoundF* lir)
CodeGenerator::visitRoundF(LRoundF* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister temp = ToFloatRegister(lir->temp());
@ -2353,7 +2354,7 @@ CodeGeneratorX86Shared::visitRoundF(LRoundF* lir)
}
void
CodeGeneratorX86Shared::visitNearbyInt(LNearbyInt* lir)
CodeGenerator::visitNearbyInt(LNearbyInt* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister output = ToFloatRegister(lir->output());
@ -2363,7 +2364,7 @@ CodeGeneratorX86Shared::visitNearbyInt(LNearbyInt* lir)
}
void
CodeGeneratorX86Shared::visitNearbyIntF(LNearbyIntF* lir)
CodeGenerator::visitNearbyIntF(LNearbyIntF* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
FloatRegister output = ToFloatRegister(lir->output());
@ -2373,7 +2374,7 @@ CodeGeneratorX86Shared::visitNearbyIntF(LNearbyIntF* lir)
}
void
CodeGeneratorX86Shared::visitEffectiveAddress(LEffectiveAddress* ins)
CodeGenerator::visitEffectiveAddress(LEffectiveAddress* ins)
{
const MEffectiveAddress* mir = ins->mir();
Register base = ToRegister(ins->base());
@ -2405,7 +2406,7 @@ CodeGeneratorX86Shared::generateInvalidateEpilogue()
}
void
CodeGeneratorX86Shared::visitNegI(LNegI* ins)
CodeGenerator::visitNegI(LNegI* ins)
{
Register input = ToRegister(ins->input());
MOZ_ASSERT(input == ToRegister(ins->output()));
@ -2414,7 +2415,7 @@ CodeGeneratorX86Shared::visitNegI(LNegI* ins)
}
void
CodeGeneratorX86Shared::visitNegD(LNegD* ins)
CodeGenerator::visitNegD(LNegD* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
MOZ_ASSERT(input == ToFloatRegister(ins->output()));
@ -2423,7 +2424,7 @@ CodeGeneratorX86Shared::visitNegD(LNegD* ins)
}
void
CodeGeneratorX86Shared::visitNegF(LNegF* ins)
CodeGenerator::visitNegF(LNegF* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
MOZ_ASSERT(input == ToFloatRegister(ins->output()));
@ -2432,21 +2433,21 @@ CodeGeneratorX86Shared::visitNegF(LNegF* ins)
}
void
CodeGeneratorX86Shared::visitSimd128Int(LSimd128Int* ins)
CodeGenerator::visitSimd128Int(LSimd128Int* ins)
{
const LDefinition* out = ins->getDef(0);
masm.loadConstantSimd128Int(ins->getValue(), ToFloatRegister(out));
}
void
CodeGeneratorX86Shared::visitSimd128Float(LSimd128Float* ins)
CodeGenerator::visitSimd128Float(LSimd128Float* ins)
{
const LDefinition* out = ins->getDef(0);
masm.loadConstantSimd128Float(ins->getValue(), ToFloatRegister(out));
}
void
CodeGeneratorX86Shared::visitInt32x4ToFloat32x4(LInt32x4ToFloat32x4* ins)
CodeGenerator::visitInt32x4ToFloat32x4(LInt32x4ToFloat32x4* ins)
{
FloatRegister in = ToFloatRegister(ins->input());
FloatRegister out = ToFloatRegister(ins->output());
@ -2454,7 +2455,7 @@ CodeGeneratorX86Shared::visitInt32x4ToFloat32x4(LInt32x4ToFloat32x4* ins)
}
void
CodeGeneratorX86Shared::visitFloat32x4ToInt32x4(LFloat32x4ToInt32x4* ins)
CodeGenerator::visitFloat32x4ToInt32x4(LFloat32x4ToInt32x4* ins)
{
FloatRegister in = ToFloatRegister(ins->input());
FloatRegister out = ToFloatRegister(ins->output());
@ -2517,7 +2518,7 @@ CodeGeneratorX86Shared::visitOutOfLineSimdFloatToIntCheck(OutOfLineSimdFloatToIn
//
// If any input lane value is out of range or NaN, bail out.
void
CodeGeneratorX86Shared::visitFloat32x4ToUint32x4(LFloat32x4ToUint32x4* ins)
CodeGenerator::visitFloat32x4ToUint32x4(LFloat32x4ToUint32x4* ins)
{
const MSimdConvert* mir = ins->mir();
FloatRegister in = ToFloatRegister(ins->input());
@ -2596,7 +2597,7 @@ CodeGeneratorX86Shared::visitFloat32x4ToUint32x4(LFloat32x4ToUint32x4* ins)
}
void
CodeGeneratorX86Shared::visitSimdValueInt32x4(LSimdValueInt32x4* ins)
CodeGenerator::visitSimdValueInt32x4(LSimdValueInt32x4* ins)
{
MOZ_ASSERT(ins->mir()->type() == MIRType::Int32x4 || ins->mir()->type() == MIRType::Bool32x4);
@ -2620,7 +2621,7 @@ CodeGeneratorX86Shared::visitSimdValueInt32x4(LSimdValueInt32x4* ins)
}
void
CodeGeneratorX86Shared::visitSimdValueFloat32x4(LSimdValueFloat32x4* ins)
CodeGenerator::visitSimdValueFloat32x4(LSimdValueFloat32x4* ins)
{
MOZ_ASSERT(ins->mir()->type() == MIRType::Float32x4);
@ -2640,7 +2641,7 @@ CodeGeneratorX86Shared::visitSimdValueFloat32x4(LSimdValueFloat32x4* ins)
}
void
CodeGeneratorX86Shared::visitSimdSplatX16(LSimdSplatX16* ins)
CodeGenerator::visitSimdSplatX16(LSimdSplatX16* ins)
{
MOZ_ASSERT(SimdTypeToLength(ins->mir()->type()) == 16);
Register input = ToRegister(ins->getOperand(0));
@ -2662,7 +2663,7 @@ CodeGeneratorX86Shared::visitSimdSplatX16(LSimdSplatX16* ins)
}
void
CodeGeneratorX86Shared::visitSimdSplatX8(LSimdSplatX8* ins)
CodeGenerator::visitSimdSplatX8(LSimdSplatX8* ins)
{
MOZ_ASSERT(SimdTypeToLength(ins->mir()->type()) == 8);
Register input = ToRegister(ins->getOperand(0));
@ -2673,7 +2674,7 @@ CodeGeneratorX86Shared::visitSimdSplatX8(LSimdSplatX8* ins)
}
void
CodeGeneratorX86Shared::visitSimdSplatX4(LSimdSplatX4* ins)
CodeGenerator::visitSimdSplatX4(LSimdSplatX4* ins)
{
FloatRegister output = ToFloatRegister(ins->output());
@ -2693,7 +2694,7 @@ CodeGeneratorX86Shared::visitSimdSplatX4(LSimdSplatX4* ins)
}
void
CodeGeneratorX86Shared::visitSimdReinterpretCast(LSimdReinterpretCast* ins)
CodeGenerator::visitSimdReinterpretCast(LSimdReinterpretCast* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -2777,7 +2778,7 @@ CodeGeneratorX86Shared::emitSimdExtractLane8x16(FloatRegister input, Register ou
}
void
CodeGeneratorX86Shared::visitSimdExtractElementB(LSimdExtractElementB* ins)
CodeGenerator::visitSimdExtractElementB(LSimdExtractElementB* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
Register output = ToRegister(ins->output());
@ -2804,7 +2805,7 @@ CodeGeneratorX86Shared::visitSimdExtractElementB(LSimdExtractElementB* ins)
}
void
CodeGeneratorX86Shared::visitSimdExtractElementI(LSimdExtractElementI* ins)
CodeGenerator::visitSimdExtractElementI(LSimdExtractElementI* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
Register output = ToRegister(ins->output());
@ -2827,7 +2828,7 @@ CodeGeneratorX86Shared::visitSimdExtractElementI(LSimdExtractElementI* ins)
}
void
CodeGeneratorX86Shared::visitSimdExtractElementU2D(LSimdExtractElementU2D* ins)
CodeGenerator::visitSimdExtractElementU2D(LSimdExtractElementU2D* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -2839,7 +2840,7 @@ CodeGeneratorX86Shared::visitSimdExtractElementU2D(LSimdExtractElementU2D* ins)
}
void
CodeGeneratorX86Shared::visitSimdExtractElementF(LSimdExtractElementF* ins)
CodeGenerator::visitSimdExtractElementF(LSimdExtractElementF* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -2864,7 +2865,7 @@ CodeGeneratorX86Shared::visitSimdExtractElementF(LSimdExtractElementF* ins)
}
void
CodeGeneratorX86Shared::visitSimdInsertElementI(LSimdInsertElementI* ins)
CodeGenerator::visitSimdInsertElementI(LSimdInsertElementI* ins)
{
FloatRegister vector = ToFloatRegister(ins->vector());
Register value = ToRegister(ins->value());
@ -2914,7 +2915,7 @@ CodeGeneratorX86Shared::visitSimdInsertElementI(LSimdInsertElementI* ins)
}
void
CodeGeneratorX86Shared::visitSimdInsertElementF(LSimdInsertElementF* ins)
CodeGenerator::visitSimdInsertElementF(LSimdInsertElementF* ins)
{
FloatRegister vector = ToFloatRegister(ins->vector());
FloatRegister value = ToFloatRegister(ins->value());
@ -2944,7 +2945,7 @@ CodeGeneratorX86Shared::visitSimdInsertElementF(LSimdInsertElementF* ins)
}
void
CodeGeneratorX86Shared::visitSimdAllTrue(LSimdAllTrue* ins)
CodeGenerator::visitSimdAllTrue(LSimdAllTrue* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
Register output = ToRegister(ins->output());
@ -2957,7 +2958,7 @@ CodeGeneratorX86Shared::visitSimdAllTrue(LSimdAllTrue* ins)
}
void
CodeGeneratorX86Shared::visitSimdAnyTrue(LSimdAnyTrue* ins)
CodeGenerator::visitSimdAnyTrue(LSimdAnyTrue* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
Register output = ToRegister(ins->output());
@ -3026,7 +3027,7 @@ CodeGeneratorX86Shared::visitSimdGeneralShuffle(LSimdGeneralShuffleBase* ins, Re
}
void
CodeGeneratorX86Shared::visitSimdGeneralShuffleI(LSimdGeneralShuffleI* ins)
CodeGenerator::visitSimdGeneralShuffleI(LSimdGeneralShuffleI* ins)
{
switch (ins->mir()->type()) {
case MIRType::Int8x16:
@ -3040,14 +3041,14 @@ CodeGeneratorX86Shared::visitSimdGeneralShuffleI(LSimdGeneralShuffleI* ins)
}
}
void
CodeGeneratorX86Shared::visitSimdGeneralShuffleF(LSimdGeneralShuffleF* ins)
CodeGenerator::visitSimdGeneralShuffleF(LSimdGeneralShuffleF* ins)
{
ScratchFloat32Scope scratch(masm);
visitSimdGeneralShuffle<float, FloatRegister>(ins, scratch);
}
void
CodeGeneratorX86Shared::visitSimdSwizzleI(LSimdSwizzleI* ins)
CodeGenerator::visitSimdSwizzleI(LSimdSwizzleI* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -3097,7 +3098,7 @@ CodeGeneratorX86Shared::visitSimdSwizzleI(LSimdSwizzleI* ins)
}
void
CodeGeneratorX86Shared::visitSimdSwizzleF(LSimdSwizzleF* ins)
CodeGenerator::visitSimdSwizzleF(LSimdSwizzleF* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
@ -3154,7 +3155,7 @@ CodeGeneratorX86Shared::visitSimdSwizzleF(LSimdSwizzleF* ins)
}
void
CodeGeneratorX86Shared::visitSimdShuffle(LSimdShuffle* ins)
CodeGenerator::visitSimdShuffle(LSimdShuffle* ins)
{
FloatRegister lhs = ToFloatRegister(ins->lhs());
FloatRegister rhs = ToFloatRegister(ins->rhs());
@ -3212,7 +3213,7 @@ CodeGeneratorX86Shared::visitSimdShuffle(LSimdShuffle* ins)
}
void
CodeGeneratorX86Shared::visitSimdShuffleX4(LSimdShuffleX4* ins)
CodeGenerator::visitSimdShuffleX4(LSimdShuffleX4* ins)
{
FloatRegister lhs = ToFloatRegister(ins->lhs());
Operand rhs = ToOperand(ins->rhs());
@ -3445,7 +3446,7 @@ CodeGeneratorX86Shared::visitSimdShuffleX4(LSimdShuffleX4* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinaryCompIx16(LSimdBinaryCompIx16* ins)
CodeGenerator::visitSimdBinaryCompIx16(LSimdBinaryCompIx16* ins)
{
static const SimdConstant allOnes = SimdConstant::SplatX16(-1);
@ -3505,7 +3506,7 @@ CodeGeneratorX86Shared::visitSimdBinaryCompIx16(LSimdBinaryCompIx16* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinaryCompIx8(LSimdBinaryCompIx8* ins)
CodeGenerator::visitSimdBinaryCompIx8(LSimdBinaryCompIx8* ins)
{
static const SimdConstant allOnes = SimdConstant::SplatX8(-1);
@ -3565,7 +3566,7 @@ CodeGeneratorX86Shared::visitSimdBinaryCompIx8(LSimdBinaryCompIx8* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinaryCompIx4(LSimdBinaryCompIx4* ins)
CodeGenerator::visitSimdBinaryCompIx4(LSimdBinaryCompIx4* ins)
{
static const SimdConstant allOnes = SimdConstant::SplatX4(-1);
@ -3624,7 +3625,7 @@ CodeGeneratorX86Shared::visitSimdBinaryCompIx4(LSimdBinaryCompIx4* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinaryCompFx4(LSimdBinaryCompFx4* ins)
CodeGenerator::visitSimdBinaryCompFx4(LSimdBinaryCompFx4* ins)
{
FloatRegister lhs = ToFloatRegister(ins->lhs());
Operand rhs = ToOperand(ins->rhs());
@ -3654,7 +3655,7 @@ CodeGeneratorX86Shared::visitSimdBinaryCompFx4(LSimdBinaryCompFx4* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinaryArithIx16(LSimdBinaryArithIx16* ins)
CodeGenerator::visitSimdBinaryArithIx16(LSimdBinaryArithIx16* ins)
{
FloatRegister lhs = ToFloatRegister(ins->lhs());
Operand rhs = ToOperand(ins->rhs());
@ -3684,7 +3685,7 @@ CodeGeneratorX86Shared::visitSimdBinaryArithIx16(LSimdBinaryArithIx16* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinaryArithIx8(LSimdBinaryArithIx8* ins)
CodeGenerator::visitSimdBinaryArithIx8(LSimdBinaryArithIx8* ins)
{
FloatRegister lhs = ToFloatRegister(ins->lhs());
Operand rhs = ToOperand(ins->rhs());
@ -3712,7 +3713,7 @@ CodeGeneratorX86Shared::visitSimdBinaryArithIx8(LSimdBinaryArithIx8* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinaryArithIx4(LSimdBinaryArithIx4* ins)
CodeGenerator::visitSimdBinaryArithIx4(LSimdBinaryArithIx4* ins)
{
FloatRegister lhs = ToFloatRegister(ins->lhs());
Operand rhs = ToOperand(ins->rhs());
@ -3768,7 +3769,7 @@ CodeGeneratorX86Shared::visitSimdBinaryArithIx4(LSimdBinaryArithIx4* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinaryArithFx4(LSimdBinaryArithFx4* ins)
CodeGenerator::visitSimdBinaryArithFx4(LSimdBinaryArithFx4* ins)
{
FloatRegister lhs = ToFloatRegister(ins->lhs());
Operand rhs = ToOperand(ins->rhs());
@ -3879,7 +3880,7 @@ CodeGeneratorX86Shared::visitSimdBinaryArithFx4(LSimdBinaryArithFx4* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinarySaturating(LSimdBinarySaturating* ins)
CodeGenerator::visitSimdBinarySaturating(LSimdBinarySaturating* ins)
{
FloatRegister lhs = ToFloatRegister(ins->lhs());
Operand rhs = ToOperand(ins->rhs());
@ -3930,7 +3931,7 @@ CodeGeneratorX86Shared::visitSimdBinarySaturating(LSimdBinarySaturating* ins)
}
void
CodeGeneratorX86Shared::visitSimdUnaryArithIx16(LSimdUnaryArithIx16* ins)
CodeGenerator::visitSimdUnaryArithIx16(LSimdUnaryArithIx16* ins)
{
Operand in = ToOperand(ins->input());
FloatRegister out = ToFloatRegister(ins->output());
@ -3956,7 +3957,7 @@ CodeGeneratorX86Shared::visitSimdUnaryArithIx16(LSimdUnaryArithIx16* ins)
}
void
CodeGeneratorX86Shared::visitSimdUnaryArithIx8(LSimdUnaryArithIx8* ins)
CodeGenerator::visitSimdUnaryArithIx8(LSimdUnaryArithIx8* ins)
{
Operand in = ToOperand(ins->input());
FloatRegister out = ToFloatRegister(ins->output());
@ -3982,7 +3983,7 @@ CodeGeneratorX86Shared::visitSimdUnaryArithIx8(LSimdUnaryArithIx8* ins)
}
void
CodeGeneratorX86Shared::visitSimdUnaryArithIx4(LSimdUnaryArithIx4* ins)
CodeGenerator::visitSimdUnaryArithIx4(LSimdUnaryArithIx4* ins)
{
Operand in = ToOperand(ins->input());
FloatRegister out = ToFloatRegister(ins->output());
@ -4008,7 +4009,7 @@ CodeGeneratorX86Shared::visitSimdUnaryArithIx4(LSimdUnaryArithIx4* ins)
}
void
CodeGeneratorX86Shared::visitSimdUnaryArithFx4(LSimdUnaryArithFx4* ins)
CodeGenerator::visitSimdUnaryArithFx4(LSimdUnaryArithFx4* ins)
{
Operand in = ToOperand(ins->input());
FloatRegister out = ToFloatRegister(ins->output());
@ -4051,7 +4052,7 @@ CodeGeneratorX86Shared::visitSimdUnaryArithFx4(LSimdUnaryArithFx4* ins)
}
void
CodeGeneratorX86Shared::visitSimdBinaryBitwise(LSimdBinaryBitwise* ins)
CodeGenerator::visitSimdBinaryBitwise(LSimdBinaryBitwise* ins)
{
FloatRegister lhs = ToFloatRegister(ins->lhs());
Operand rhs = ToOperand(ins->rhs());
@ -4082,7 +4083,7 @@ CodeGeneratorX86Shared::visitSimdBinaryBitwise(LSimdBinaryBitwise* ins)
}
void
CodeGeneratorX86Shared::visitSimdShift(LSimdShift* ins)
CodeGenerator::visitSimdShift(LSimdShift* ins)
{
FloatRegister out = ToFloatRegister(ins->output());
MOZ_ASSERT(ToFloatRegister(ins->vector()) == out); // defineReuseInput(0);
@ -4171,7 +4172,7 @@ CodeGeneratorX86Shared::visitSimdShift(LSimdShift* ins)
}
void
CodeGeneratorX86Shared::visitSimdSelect(LSimdSelect* ins)
CodeGenerator::visitSimdSelect(LSimdSelect* ins)
{
FloatRegister mask = ToFloatRegister(ins->mask());
FloatRegister onTrue = ToFloatRegister(ins->lhs());
@ -4202,7 +4203,7 @@ CodeGeneratorX86Shared::visitSimdSelect(LSimdSelect* ins)
}
void
CodeGeneratorX86Shared::visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir)
CodeGenerator::visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir)
{
Register elements = ToRegister(lir->elements());
AnyRegister output = ToAnyRegister(lir->output());
@ -4224,7 +4225,7 @@ CodeGeneratorX86Shared::visitCompareExchangeTypedArrayElement(LCompareExchangeTy
}
void
CodeGeneratorX86Shared::visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir)
CodeGenerator::visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir)
{
Register elements = ToRegister(lir->elements());
AnyRegister output = ToAnyRegister(lir->output());
@ -4260,7 +4261,7 @@ AtomicBinopToTypedArray(MacroAssembler& masm, AtomicOp op, Scalar::Type arrayTyp
}
void
CodeGeneratorX86Shared::visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir)
CodeGenerator::visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir)
{
MOZ_ASSERT(lir->mir()->hasUses());
@ -4297,7 +4298,7 @@ AtomicBinopToTypedArray(MacroAssembler& masm, Scalar::Type arrayType, AtomicOp o
}
void
CodeGeneratorX86Shared::visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir)
CodeGenerator::visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir)
{
MOZ_ASSERT(!lir->mir()->hasUses());
@ -4316,7 +4317,7 @@ CodeGeneratorX86Shared::visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedA
}
void
CodeGeneratorX86Shared::visitMemoryBarrier(LMemoryBarrier* ins)
CodeGenerator::visitMemoryBarrier(LMemoryBarrier* ins)
{
if (ins->type() & MembarStoreLoad)
masm.storeLoadFence();
@ -4397,7 +4398,7 @@ CodeGeneratorX86Shared::canonicalizeIfDeterministic(Scalar::Type type, const LAl
}
void
CodeGeneratorX86Shared::visitCopySignF(LCopySignF* lir)
CodeGenerator::visitCopySignF(LCopySignF* lir)
{
FloatRegister lhs = ToFloatRegister(lir->getOperand(0));
FloatRegister rhs = ToFloatRegister(lir->getOperand(1));
@ -4424,7 +4425,7 @@ CodeGeneratorX86Shared::visitCopySignF(LCopySignF* lir)
}
void
CodeGeneratorX86Shared::visitCopySignD(LCopySignD* lir)
CodeGenerator::visitCopySignD(LCopySignD* lir)
{
FloatRegister lhs = ToFloatRegister(lir->getOperand(0));
FloatRegister rhs = ToFloatRegister(lir->getOperand(1));
@ -4451,7 +4452,7 @@ CodeGeneratorX86Shared::visitCopySignD(LCopySignD* lir)
}
void
CodeGeneratorX86Shared::visitRotateI64(LRotateI64* lir)
CodeGenerator::visitRotateI64(LRotateI64* lir)
{
MRotate* mir = lir->mir();
LAllocation* count = lir->count();
@ -4479,7 +4480,7 @@ CodeGeneratorX86Shared::visitRotateI64(LRotateI64* lir)
}
void
CodeGeneratorX86Shared::visitPopcntI64(LPopcntI64* lir)
CodeGenerator::visitPopcntI64(LPopcntI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);

Просмотреть файл

@ -27,14 +27,12 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
{
friend class MoveResolverX86;
CodeGeneratorX86Shared* thisFromCtor() {
return this;
}
template <typename T>
void bailout(const T& t, LSnapshot* snapshot);
protected:
CodeGeneratorX86Shared(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
// Load a NaN or zero into a register for an out of bounds AsmJS or static
// typed array load.
class OutOfLineLoadTypedArrayOutOfBounds : public OutOfLineCodeBase<CodeGeneratorX86Shared>
@ -78,7 +76,6 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
}
};
public:
NonAssertingLabel deoptLabel_;
Operand ToOperand(const LAllocation& a);
@ -137,7 +134,6 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
bailoutIf(Assembler::Overflow, snapshot);
}
protected:
bool generateOutOfLineCode();
void emitCompare(MCompare::CompareType type, const LAllocation* left, const LAllocation* right);
@ -183,135 +179,15 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
SimdSign signedness);
void emitSimdExtractLane32x4(FloatRegister input, Register output, unsigned lane);
public:
CodeGeneratorX86Shared(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
public:
// Instruction visitors.
void visitDouble(LDouble* ins);
void visitFloat32(LFloat32* ins);
void visitMinMaxD(LMinMaxD* ins);
void visitMinMaxF(LMinMaxF* ins);
void visitAbsD(LAbsD* ins);
void visitAbsF(LAbsF* ins);
void visitClzI(LClzI* ins);
void visitCtzI(LCtzI* ins);
void visitPopcntI(LPopcntI* ins);
void visitPopcntI64(LPopcntI64* lir);
void visitSqrtD(LSqrtD* ins);
void visitSqrtF(LSqrtF* ins);
void visitPowHalfD(LPowHalfD* ins);
void visitAddI(LAddI* ins);
void visitAddI64(LAddI64* ins);
void visitSubI(LSubI* ins);
void visitSubI64(LSubI64* ins);
void visitMulI(LMulI* ins);
void visitMulI64(LMulI64* ins);
void visitDivI(LDivI* ins);
void visitDivPowTwoI(LDivPowTwoI* ins);
void visitDivOrModConstantI(LDivOrModConstantI* ins);
void visitModI(LModI* ins);
void visitModPowTwoI(LModPowTwoI* ins);
void visitBitNotI(LBitNotI* ins);
void visitBitOpI(LBitOpI* ins);
void visitBitOpI64(LBitOpI64* ins);
void visitShiftI(LShiftI* ins);
void visitShiftI64(LShiftI64* ins);
void visitUrshD(LUrshD* ins);
void visitTestIAndBranch(LTestIAndBranch* test);
void visitTestDAndBranch(LTestDAndBranch* test);
void visitTestFAndBranch(LTestFAndBranch* test);
void visitCompare(LCompare* comp);
void visitCompareAndBranch(LCompareAndBranch* comp);
void visitCompareD(LCompareD* comp);
void visitCompareDAndBranch(LCompareDAndBranch* comp);
void visitCompareF(LCompareF* comp);
void visitCompareFAndBranch(LCompareFAndBranch* comp);
void visitBitAndAndBranch(LBitAndAndBranch* baab);
void visitNotI(LNotI* comp);
void visitNotD(LNotD* comp);
void visitNotF(LNotF* comp);
void visitMathD(LMathD* math);
void visitMathF(LMathF* math);
void visitFloor(LFloor* lir);
void visitFloorF(LFloorF* lir);
void visitCeil(LCeil* lir);
void visitCeilF(LCeilF* lir);
void visitRound(LRound* lir);
void visitRoundF(LRoundF* lir);
void visitNearbyInt(LNearbyInt* lir);
void visitNearbyIntF(LNearbyIntF* lir);
void visitEffectiveAddress(LEffectiveAddress* ins);
void visitUDivOrMod(LUDivOrMod* ins);
void visitUDivOrModConstant(LUDivOrModConstant *ins);
void visitWasmStackArg(LWasmStackArg* ins);
void visitWasmStackArgI64(LWasmStackArgI64* ins);
void visitWasmSelect(LWasmSelect* ins);
void visitWasmReinterpret(LWasmReinterpret* lir);
void visitMemoryBarrier(LMemoryBarrier* ins);
void visitWasmAddOffset(LWasmAddOffset* lir);
void visitWasmTruncateToInt32(LWasmTruncateToInt32* lir);
void visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir);
void visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir);
void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir);
void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir);
void visitCopySignD(LCopySignD* lir);
void visitCopySignF(LCopySignF* lir);
void visitRotateI64(LRotateI64* lir);
void visitOutOfLineLoadTypedArrayOutOfBounds(OutOfLineLoadTypedArrayOutOfBounds* ool);
void visitNegI(LNegI* lir);
void visitNegD(LNegD* lir);
void visitNegF(LNegF* lir);
void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool);
// SIMD operators
void visitSimdValueInt32x4(LSimdValueInt32x4* lir);
void visitSimdValueFloat32x4(LSimdValueFloat32x4* lir);
void visitSimdSplatX16(LSimdSplatX16* lir);
void visitSimdSplatX8(LSimdSplatX8* lir);
void visitSimdSplatX4(LSimdSplatX4* lir);
void visitSimd128Int(LSimd128Int* ins);
void visitSimd128Float(LSimd128Float* ins);
void visitInt32x4ToFloat32x4(LInt32x4ToFloat32x4* ins);
void visitFloat32x4ToInt32x4(LFloat32x4ToInt32x4* ins);
void visitFloat32x4ToUint32x4(LFloat32x4ToUint32x4* ins);
void visitSimdReinterpretCast(LSimdReinterpretCast* lir);
void visitSimdExtractElementB(LSimdExtractElementB* lir);
void visitSimdExtractElementI(LSimdExtractElementI* lir);
void visitSimdExtractElementU2D(LSimdExtractElementU2D* lir);
void visitSimdExtractElementF(LSimdExtractElementF* lir);
void visitSimdInsertElementI(LSimdInsertElementI* lir);
void visitSimdInsertElementF(LSimdInsertElementF* lir);
void visitSimdSwizzleI(LSimdSwizzleI* lir);
void visitSimdSwizzleF(LSimdSwizzleF* lir);
void visitSimdShuffleX4(LSimdShuffleX4* lir);
void visitSimdShuffle(LSimdShuffle* lir);
void visitSimdUnaryArithIx16(LSimdUnaryArithIx16* lir);
void visitSimdUnaryArithIx8(LSimdUnaryArithIx8* lir);
void visitSimdUnaryArithIx4(LSimdUnaryArithIx4* lir);
void visitSimdUnaryArithFx4(LSimdUnaryArithFx4* lir);
void visitSimdBinaryCompIx16(LSimdBinaryCompIx16* lir);
void visitSimdBinaryCompIx8(LSimdBinaryCompIx8* lir);
void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir);
void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir);
void visitSimdBinaryArithIx16(LSimdBinaryArithIx16* lir);
void visitSimdBinaryArithIx8(LSimdBinaryArithIx8* lir);
void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir);
void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir);
void visitSimdBinarySaturating(LSimdBinarySaturating* lir);
void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir);
void visitSimdShift(LSimdShift* lir);
void visitSimdSelect(LSimdSelect* ins);
void visitSimdAllTrue(LSimdAllTrue* ins);
void visitSimdAnyTrue(LSimdAnyTrue* ins);
template <class T, class Reg> void visitSimdGeneralShuffle(LSimdGeneralShuffleBase* lir, Reg temp);
void visitSimdGeneralShuffleI(LSimdGeneralShuffleI* lir);
void visitSimdGeneralShuffleF(LSimdGeneralShuffleF* lir);
void generateInvalidateEpilogue();
void setReturnDoubleRegs(LiveRegisterSet* regs);
void canonicalizeIfDeterministic(Scalar::Type type, const LAllocation* value);
public:
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineUndoALUOperation(OutOfLineUndoALUOperation* ool);
@ -320,11 +196,8 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
void visitReturnZero(ReturnZero* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
void visitOutOfLineSimdFloatToIntCheck(OutOfLineSimdFloatToIntCheck* ool);
void generateInvalidateEpilogue();
void setReturnDoubleRegs(LiveRegisterSet* regs);
void canonicalizeIfDeterministic(Scalar::Type type, const LAllocation* value);
void visitOutOfLineLoadTypedArrayOutOfBounds(OutOfLineLoadTypedArrayOutOfBounds* ool);
void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool);
};
// An out-of-line bailout thunk.

Просмотреть файл

@ -12,6 +12,7 @@
#include "jsnum.h"
#include "jit/CodeGenerator.h"
#include "jit/MIR.h"
#include "jit/MIRGraph.h"
#include "js/Conversions.h"
@ -79,14 +80,14 @@ CodeGeneratorX86::ToTempValue(LInstruction* ins, size_t pos)
}
void
CodeGeneratorX86::visitValue(LValue* value)
CodeGenerator::visitValue(LValue* value)
{
const ValueOperand out = ToOutValue(value);
masm.moveValue(value->value(), out);
}
void
CodeGeneratorX86::visitBox(LBox* box)
CodeGenerator::visitBox(LBox* box)
{
const LDefinition* type = box->getDef(TYPE_INDEX);
@ -100,7 +101,7 @@ CodeGeneratorX86::visitBox(LBox* box)
}
void
CodeGeneratorX86::visitBoxFloatingPoint(LBoxFloatingPoint* box)
CodeGenerator::visitBoxFloatingPoint(LBoxFloatingPoint* box)
{
const AnyRegister in = ToAnyRegister(box->getOperand(0));
const ValueOperand out = ToOutValue(box);
@ -109,7 +110,7 @@ CodeGeneratorX86::visitBoxFloatingPoint(LBoxFloatingPoint* box)
}
void
CodeGeneratorX86::visitUnbox(LUnbox* unbox)
CodeGenerator::visitUnbox(LUnbox* unbox)
{
// Note that for unbox, the type and payload indexes are switched on the
// inputs.
@ -138,7 +139,7 @@ CodeGeneratorX86::visitUnbox(LUnbox* unbox)
}
void
CodeGeneratorX86::visitCompareB(LCompareB* lir)
CodeGenerator::visitCompareB(LCompareB* lir)
{
MCompare* mir = lir->mir();
@ -167,7 +168,7 @@ CodeGeneratorX86::visitCompareB(LCompareB* lir)
}
void
CodeGeneratorX86::visitCompareBAndBranch(LCompareBAndBranch* lir)
CodeGenerator::visitCompareBAndBranch(LCompareBAndBranch* lir)
{
MCompare* mir = lir->cmpMir();
const ValueOperand lhs = ToValue(lir, LCompareBAndBranch::Lhs);
@ -186,7 +187,7 @@ CodeGeneratorX86::visitCompareBAndBranch(LCompareBAndBranch* lir)
}
void
CodeGeneratorX86::visitCompareBitwise(LCompareBitwise* lir)
CodeGenerator::visitCompareBitwise(LCompareBitwise* lir)
{
MCompare* mir = lir->mir();
Assembler::Condition cond = JSOpToCondition(mir->compareType(), mir->jsop());
@ -213,7 +214,7 @@ CodeGeneratorX86::visitCompareBitwise(LCompareBitwise* lir)
}
void
CodeGeneratorX86::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
CodeGenerator::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
{
MCompare* mir = lir->cmpMir();
Assembler::Condition cond = JSOpToCondition(mir->compareType(), mir->jsop());
@ -232,7 +233,7 @@ CodeGeneratorX86::visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir)
}
void
CodeGeneratorX86::visitWasmUint32ToDouble(LWasmUint32ToDouble* lir)
CodeGenerator::visitWasmUint32ToDouble(LWasmUint32ToDouble* lir)
{
Register input = ToRegister(lir->input());
Register temp = ToRegister(lir->temp());
@ -245,7 +246,7 @@ CodeGeneratorX86::visitWasmUint32ToDouble(LWasmUint32ToDouble* lir)
}
void
CodeGeneratorX86::visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir)
CodeGenerator::visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir)
{
Register input = ToRegister(lir->input());
Register temp = ToRegister(lir->temp());
@ -259,7 +260,7 @@ CodeGeneratorX86::visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir)
}
void
CodeGeneratorX86::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins)
CodeGenerator::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins)
{
const MLoadTypedArrayElementStatic* mir = ins->mir();
Scalar::Type accessType = mir->accessType();
@ -335,13 +336,13 @@ CodeGeneratorX86::emitWasmLoad(T* ins)
}
void
CodeGeneratorX86::visitWasmLoad(LWasmLoad* ins)
CodeGenerator::visitWasmLoad(LWasmLoad* ins)
{
emitWasmLoad(ins);
}
void
CodeGeneratorX86::visitWasmLoadI64(LWasmLoadI64* ins)
CodeGenerator::visitWasmLoadI64(LWasmLoadI64* ins)
{
emitWasmLoad(ins);
}
@ -375,19 +376,19 @@ CodeGeneratorX86::emitWasmStore(T* ins)
}
void
CodeGeneratorX86::visitWasmStore(LWasmStore* ins)
CodeGenerator::visitWasmStore(LWasmStore* ins)
{
emitWasmStore(ins);
}
void
CodeGeneratorX86::visitWasmStoreI64(LWasmStoreI64* ins)
CodeGenerator::visitWasmStoreI64(LWasmStoreI64* ins)
{
emitWasmStore(ins);
}
void
CodeGeneratorX86::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
CodeGenerator::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
{
const MAsmJSLoadHeap* mir = ins->mir();
MOZ_ASSERT(mir->access().offset() == 0);
@ -420,7 +421,7 @@ CodeGeneratorX86::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
}
void
CodeGeneratorX86::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins)
CodeGenerator::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins)
{
MStoreTypedArrayElementStatic* mir = ins->mir();
Scalar::Type accessType = mir->accessType();
@ -469,7 +470,7 @@ CodeGeneratorX86::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStati
}
void
CodeGeneratorX86::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
CodeGenerator::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
{
const MAsmJSStoreHeap* mir = ins->mir();
MOZ_ASSERT(mir->offset() == 0);
@ -500,7 +501,7 @@ CodeGeneratorX86::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
}
void
CodeGeneratorX86::visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins)
CodeGenerator::visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins)
{
MWasmCompareExchangeHeap* mir = ins->mir();
@ -519,7 +520,7 @@ CodeGeneratorX86::visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins)
}
void
CodeGeneratorX86::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins)
CodeGenerator::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins)
{
MWasmAtomicExchangeHeap* mir = ins->mir();
@ -537,7 +538,7 @@ CodeGeneratorX86::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins)
}
void
CodeGeneratorX86::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins)
CodeGenerator::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins)
{
MWasmAtomicBinopHeap* mir = ins->mir();
@ -563,7 +564,7 @@ CodeGeneratorX86::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins)
}
void
CodeGeneratorX86::visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins)
CodeGenerator::visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins)
{
MWasmAtomicBinopHeap* mir = ins->mir();
MOZ_ASSERT(!mir->hasUses());
@ -588,7 +589,7 @@ CodeGeneratorX86::visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffec
}
void
CodeGeneratorX86::visitWasmAtomicLoadI64(LWasmAtomicLoadI64* ins)
CodeGenerator::visitWasmAtomicLoadI64(LWasmAtomicLoadI64* ins)
{
uint32_t offset = ins->mir()->access().offset();
MOZ_ASSERT(offset < wasm::OffsetGuardLimit);
@ -611,7 +612,7 @@ CodeGeneratorX86::visitWasmAtomicLoadI64(LWasmAtomicLoadI64* ins)
}
void
CodeGeneratorX86::visitWasmCompareExchangeI64(LWasmCompareExchangeI64* ins)
CodeGenerator::visitWasmCompareExchangeI64(LWasmCompareExchangeI64* ins)
{
uint32_t offset = ins->mir()->access().offset();
MOZ_ASSERT(offset < wasm::OffsetGuardLimit);
@ -657,7 +658,7 @@ CodeGeneratorX86::emitWasmStoreOrExchangeAtomicI64(T* ins, uint32_t offset)
}
void
CodeGeneratorX86::visitWasmAtomicStoreI64(LWasmAtomicStoreI64* ins)
CodeGenerator::visitWasmAtomicStoreI64(LWasmAtomicStoreI64* ins)
{
MOZ_ASSERT(ToRegister(ins->t1()) == edx);
MOZ_ASSERT(ToRegister(ins->t2()) == eax);
@ -666,7 +667,7 @@ CodeGeneratorX86::visitWasmAtomicStoreI64(LWasmAtomicStoreI64* ins)
}
void
CodeGeneratorX86::visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* ins)
CodeGenerator::visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* ins)
{
MOZ_ASSERT(ToOutRegister64(ins).high == edx);
MOZ_ASSERT(ToOutRegister64(ins).low == eax);
@ -675,7 +676,7 @@ CodeGeneratorX86::visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* ins)
}
void
CodeGeneratorX86::visitWasmAtomicBinopI64(LWasmAtomicBinopI64* ins)
CodeGenerator::visitWasmAtomicBinopI64(LWasmAtomicBinopI64* ins)
{
uint32_t offset = ins->access().offset();
MOZ_ASSERT(offset < wasm::OffsetGuardLimit);
@ -751,7 +752,7 @@ class OutOfLineTruncateFloat32 : public OutOfLineCodeBase<CodeGeneratorX86>
} // namespace js
void
CodeGeneratorX86::visitTruncateDToInt32(LTruncateDToInt32* ins)
CodeGenerator::visitTruncateDToInt32(LTruncateDToInt32* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
Register output = ToRegister(ins->output());
@ -764,7 +765,7 @@ CodeGeneratorX86::visitTruncateDToInt32(LTruncateDToInt32* ins)
}
void
CodeGeneratorX86::visitTruncateFToInt32(LTruncateFToInt32* ins)
CodeGenerator::visitTruncateFToInt32(LTruncateFToInt32* ins)
{
FloatRegister input = ToFloatRegister(ins->input());
Register output = ToRegister(ins->output());
@ -954,7 +955,7 @@ CodeGeneratorX86::visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32* ool)
}
void
CodeGeneratorX86::visitCompareI64(LCompareI64* lir)
CodeGenerator::visitCompareI64(LCompareI64* lir)
{
MCompare* mir = lir->mir();
MOZ_ASSERT(mir->compareType() == MCompare::Compare_Int64 ||
@ -984,7 +985,7 @@ CodeGeneratorX86::visitCompareI64(LCompareI64* lir)
}
void
CodeGeneratorX86::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
CodeGenerator::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
{
MCompare* mir = lir->cmpMir();
MOZ_ASSERT(mir->compareType() == MCompare::Compare_Int64 ||
@ -1018,7 +1019,7 @@ CodeGeneratorX86::visitCompareI64AndBranch(LCompareI64AndBranch* lir)
}
void
CodeGeneratorX86::visitDivOrModI64(LDivOrModI64* lir)
CodeGenerator::visitDivOrModI64(LDivOrModI64* lir)
{
Register64 lhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Lhs));
Register64 rhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Rhs));
@ -1072,7 +1073,7 @@ CodeGeneratorX86::visitDivOrModI64(LDivOrModI64* lir)
}
void
CodeGeneratorX86::visitUDivOrModI64(LUDivOrModI64* lir)
CodeGenerator::visitUDivOrModI64(LUDivOrModI64* lir)
{
Register64 lhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Lhs));
Register64 rhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Rhs));
@ -1108,7 +1109,7 @@ CodeGeneratorX86::visitUDivOrModI64(LUDivOrModI64* lir)
}
void
CodeGeneratorX86::visitWasmSelectI64(LWasmSelectI64* lir)
CodeGenerator::visitWasmSelectI64(LWasmSelectI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Int64);
@ -1126,7 +1127,7 @@ CodeGeneratorX86::visitWasmSelectI64(LWasmSelectI64* lir)
}
void
CodeGeneratorX86::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
CodeGenerator::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Double);
MOZ_ASSERT(lir->mir()->input()->type() == MIRType::Int64);
@ -1139,7 +1140,7 @@ CodeGeneratorX86::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir)
}
void
CodeGeneratorX86::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
CodeGenerator::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
{
MOZ_ASSERT(lir->mir()->type() == MIRType::Int64);
MOZ_ASSERT(lir->mir()->input()->type() == MIRType::Double);
@ -1152,7 +1153,7 @@ CodeGeneratorX86::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir)
}
void
CodeGeneratorX86::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
CodeGenerator::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
{
Register64 output = ToOutRegister64(lir);
Register input = ToRegister(lir->input());
@ -1170,7 +1171,7 @@ CodeGeneratorX86::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir)
}
void
CodeGeneratorX86::visitSignExtendInt64(LSignExtendInt64* lir)
CodeGenerator::visitSignExtendInt64(LSignExtendInt64* lir)
{
#ifdef DEBUG
Register64 input = ToRegister64(lir->getInt64Operand(0));
@ -1194,7 +1195,7 @@ CodeGeneratorX86::visitSignExtendInt64(LSignExtendInt64* lir)
}
void
CodeGeneratorX86::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
CodeGenerator::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
{
const LInt64Allocation& input = lir->getInt64Operand(0);
Register output = ToRegister(lir->output());
@ -1206,7 +1207,7 @@ CodeGeneratorX86::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir)
}
void
CodeGeneratorX86::visitClzI64(LClzI64* lir)
CodeGenerator::visitClzI64(LClzI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -1216,7 +1217,7 @@ CodeGeneratorX86::visitClzI64(LClzI64* lir)
}
void
CodeGeneratorX86::visitCtzI64(LCtzI64* lir)
CodeGenerator::visitCtzI64(LCtzI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register64 output = ToOutRegister64(lir);
@ -1226,7 +1227,7 @@ CodeGeneratorX86::visitCtzI64(LCtzI64* lir)
}
void
CodeGeneratorX86::visitNotI64(LNotI64* lir)
CodeGenerator::visitNotI64(LNotI64* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
Register output = ToRegister(lir->output());
@ -1245,7 +1246,7 @@ CodeGeneratorX86::visitNotI64(LNotI64* lir)
}
void
CodeGeneratorX86::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
CodeGenerator::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
{
FloatRegister input = ToFloatRegister(lir->input());
Register64 output = ToOutRegister64(lir);
@ -1279,7 +1280,7 @@ CodeGeneratorX86::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir)
}
void
CodeGeneratorX86::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
CodeGenerator::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));
FloatRegister output = ToFloatRegister(lir->output());
@ -1302,7 +1303,7 @@ CodeGeneratorX86::visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir)
}
void
CodeGeneratorX86::visitTestI64AndBranch(LTestI64AndBranch* lir)
CodeGenerator::visitTestI64AndBranch(LTestI64AndBranch* lir)
{
Register64 input = ToRegister64(lir->getInt64Operand(0));

Просмотреть файл

@ -18,12 +18,9 @@ class OutOfLineTruncateFloat32;
class CodeGeneratorX86 : public CodeGeneratorX86Shared
{
private:
CodeGeneratorX86* thisFromCtor() {
return this;
}
protected:
CodeGeneratorX86(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
ValueOperand ToValue(LInstruction* ins, size_t pos);
ValueOperand ToTempValue(LInstruction* ins, size_t pos);
@ -32,59 +29,8 @@ class CodeGeneratorX86 : public CodeGeneratorX86Shared
template <typename T> void emitWasmStoreOrExchangeAtomicI64(T* ins, uint32_t offset);
public:
CodeGeneratorX86(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
public:
void visitBox(LBox* box);
void visitBoxFloatingPoint(LBoxFloatingPoint* box);
void visitUnbox(LUnbox* unbox);
void visitValue(LValue* value);
void visitCompareB(LCompareB* lir);
void visitCompareBAndBranch(LCompareBAndBranch* lir);
void visitCompareBitwise(LCompareBitwise* lir);
void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir);
void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir);
void visitTruncateDToInt32(LTruncateDToInt32* ins);
void visitTruncateFToInt32(LTruncateFToInt32* ins);
void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins);
void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins);
void visitWasmLoad(LWasmLoad* ins);
void visitWasmLoadI64(LWasmLoadI64* ins);
void visitWasmStore(LWasmStore* ins);
void visitWasmStoreI64(LWasmStoreI64* ins);
void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins);
void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins);
void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins);
void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins);
void visitWasmAtomicLoadI64(LWasmAtomicLoadI64* ins);
void visitWasmAtomicStoreI64(LWasmAtomicStoreI64* ins);
void visitWasmCompareExchangeI64(LWasmCompareExchangeI64* ins);
void visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* ins);
void visitWasmAtomicBinopI64(LWasmAtomicBinopI64* ins);
void visitOutOfLineTruncate(OutOfLineTruncate* ool);
void visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32* ool);
void visitCompareI64(LCompareI64* lir);
void visitCompareI64AndBranch(LCompareI64AndBranch* lir);
void visitDivOrModI64(LDivOrModI64* lir);
void visitUDivOrModI64(LUDivOrModI64* lir);
void visitWasmSelectI64(LWasmSelectI64* lir);
void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir);
void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir);
void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir);
void visitSignExtendInt64(LSignExtendInt64* ins);
void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir);
void visitClzI64(LClzI64* lir);
void visitCtzI64(LCtzI64* lir);
void visitNotI64(LNotI64* lir);
void visitWasmTruncateToInt64(LWasmTruncateToInt64* lir);
void visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir);
void visitTestI64AndBranch(LTestI64AndBranch* lir);
};
typedef CodeGeneratorX86 CodeGeneratorSpecific;

Просмотреть файл

@ -459,6 +459,7 @@ if CONFIG['ENABLE_TRACE_LOGGING']:
]
if not CONFIG['ENABLE_ION']:
LOpcodesGenerated.inputs += ['jit/none/LIR-none.h']
UNIFIED_SOURCES += [
'jit/none/Trampoline-none.cpp'
]