LowerMD.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. class Lowerer;
  7. ///---------------------------------------------------------------------------
  8. ///
  9. /// class LowererMD
  10. ///
  11. ///---------------------------------------------------------------------------
  12. #ifdef DBG
  13. #define INSERTDEBUGBREAK(instrInsert)\
  14. {\
  15. IR::Instr *int3 = IR::Instr::New(Js::OpCode::DEBUGBREAK, m_func);\
  16. instrInsert->InsertBefore(int3);\
  17. }
  18. #else
  19. #define INSERTDEBUGBREAK(instrInsert)
  20. #endif
  21. class LowererMD
  22. {
  23. public:
  24. static const int MaxArgumentsToHelper = 16;
  25. LowererMD(Func *func) :
  26. m_func(func),
  27. helperCallArgsCount(0),
  28. helperCallDoubleArgsCount(0)
  29. {
  30. }
  31. static bool IsUnconditionalBranch(const IR::Instr *instr);
  32. static bool IsAssign(const IR::Instr *instr);
  33. static bool IsCall(const IR::Instr *instr);
  34. static bool IsIndirectBranch(const IR::Instr *instr);
  35. static bool IsReturnInstr(const IR::Instr *instr);
  36. static void InvertBranch(IR::BranchInstr *instr);
  37. static Js::OpCode MDBranchOpcode(Js::OpCode opcode);
  38. static Js::OpCode MDUnsignedBranchOpcode(Js::OpCode opcode);
  39. static Js::OpCode MDCompareWithZeroBranchOpcode(Js::OpCode opcode);
  40. static Js::OpCode MDConvertFloat64ToInt32Opcode(const RoundMode roundMode);
  41. static void ChangeToAdd(IR::Instr *const instr, const bool needFlags);
  42. static void ChangeToSub(IR::Instr *const instr, const bool needFlags);
  43. static void ChangeToShift(IR::Instr *const instr, const bool needFlags);
  44. static const uint16 GetFormalParamOffset();
  45. static const Js::OpCode MDUncondBranchOpcode;
  46. static const Js::OpCode MDMultiBranchOpcode;
  47. static const Js::OpCode MDTestOpcode;
  48. static const Js::OpCode MDOrOpcode;
  49. static const Js::OpCode MDXorOpcode;
  50. static const Js::OpCode MDOverflowBranchOpcode;
  51. static const Js::OpCode MDNotOverflowBranchOpcode;
  52. static const Js::OpCode MDConvertFloat32ToFloat64Opcode;
  53. static const Js::OpCode MDConvertFloat64ToFloat32Opcode;
  54. static const Js::OpCode MDCallOpcode;
  55. static const Js::OpCode MDImulOpcode;
  56. static const Js::OpCode MDLea;
  57. static const Js::OpCode MDSpecBlockNEOpcode;
  58. static const Js::OpCode MDSpecBlockFNEOpcode;
  59. public:
  60. void Init(Lowerer *lowerer);
  61. void FinalLower();
  62. bool FinalLowerAssign(IR::Instr* instr);
  63. IR::Opnd * GenerateMemRef(intptr_t addr, IRType type, IR::Instr *instr, bool dontEncode = false);
  64. IR::Instr * ChangeToHelperCall(IR::Instr * instr, IR::JnHelperMethod helperMethod, IR::LabelInstr *labelBailOut = nullptr,
  65. IR::Opnd *opndInstance = nullptr, IR::PropertySymOpnd * propSymOpnd = nullptr, bool isHelperContinuation = false);
  66. IR::Instr * ChangeToHelperCallMem(IR::Instr * instr, IR::JnHelperMethod helperMethod);
  67. static IR::Instr * ChangeToAssign(IR::Instr * instr);
  68. static IR::Instr * ChangeToAssignNoBarrierCheck(IR::Instr * instr);
  69. static IR::Instr * ForceDstToReg(IR::Instr *instr);
  70. static void ImmedSrcToReg(IR::Instr * instr, IR::Opnd * newOpnd, int srcNum);
  71. IR::Instr * LoadArgumentCount(IR::Instr * instr);
  72. IR::Instr * LoadStackArgPtr(IR::Instr * instr);
  73. IR::Instr * LoadHeapArguments(IR::Instr * instrArgs);
  74. IR::Instr * LoadHeapArgsCached(IR::Instr * instr);
  75. IR::Instr * LoadInputParamPtr(IR::Instr * instrInsert, IR::RegOpnd * optionalDstOpnd = nullptr);
  76. IR::Instr * LoadInputParamCount(IR::Instr * instr, int adjust = 0, bool needFlags = false);
  77. IR::Instr * LoadArgumentsFromFrame(IR::Instr * instr);
  78. IR::Instr * LowerRet(IR::Instr * instr);
  79. IR::Instr * LowerCondBranch(IR::Instr * instr);
  80. IR::Instr * LoadFunctionObjectOpnd(IR::Instr *instr, IR::Opnd *&functionObjOpnd);
  81. IR::Instr * GenerateSmIntPairTest(IR::Instr * instrInsert, IR::Opnd * opndSrc1, IR::Opnd * opndSrc2, IR::LabelInstr * labelFail);
  82. #if DBG
  83. static void GenerateDebugBreak(IR::Instr * insertInstr);
  84. #endif
  85. void GenerateTaggedZeroTest( IR::Opnd * opndSrc, IR::Instr * instrInsert, IR::LabelInstr * labelHelper = nullptr);
  86. bool GenerateObjectTest(IR::Opnd * opndSrc, IR::Instr * insertInstr, IR::LabelInstr * labelTarget, bool fContinueLabel = false);
  87. bool GenerateFastCmSrEqConst(IR::Instr *instr);
  88. void GenerateFastCmXxI4(IR::Instr *instr);
  89. void GenerateFastCmXxR8(IR::Instr *instr);
  90. void GenerateFastCmXx(IR::Instr *instr);
  91. bool GenerateFastCmXxTaggedInt(IR::Instr *instr, bool isInHelper = false);
  92. IR::Instr * GenerateConvBool(IR::Instr *instr);
  93. void GenerateClz(IR::Instr * instr);
  94. void GenerateCtz(IR::Instr * instr) { Assert(UNREACHED); }
  95. void GeneratePopCnt(IR::Instr * instr) { Assert(UNREACHED); }
  96. template <bool Saturate>
  97. void GenerateTruncWithCheck(IR::Instr * instr) { Assert(UNREACHED); }
  98. void GenerateFastDivByPow2(IR::Instr *instr);
  99. bool GenerateFastDivAndRem(IR::Instr* instrDiv, IR::LabelInstr* bailOutLabel = false);
  100. bool GenerateFastAdd(IR::Instr * instrAdd);
  101. bool GenerateFastSub(IR::Instr * instrSub);
  102. bool GenerateFastMul(IR::Instr * instrMul);
  103. bool GenerateFastAnd(IR::Instr * instrAnd);
  104. bool GenerateFastXor(IR::Instr * instrXor);
  105. bool GenerateFastOr(IR::Instr * instrOr);
  106. bool GenerateFastNot(IR::Instr * instrNot);
  107. bool GenerateFastNeg(IR::Instr * instrNeg);
  108. bool GenerateFastShiftLeft(IR::Instr * instrShift);
  109. bool GenerateFastShiftRight(IR::Instr * instrShift);
  110. void GenerateFastBrS(IR::BranchInstr *brInstr);
  111. void GenerateFastInlineBuiltInCall(IR::Instr* instr, IR::JnHelperMethod helperMethod);
  112. void HelperCallForAsmMathBuiltin(IR::Instr* instr, IR::JnHelperMethod helperMethodFloat, IR::JnHelperMethod helperMethodDouble) { Assert(UNREACHED); } // only for asm.js
  113. IR::Opnd * CreateStackArgumentsSlotOpnd();
  114. void GenerateSmIntTest(IR::Opnd *opndSrc, IR::Instr *insertInstr, IR::LabelInstr *labelHelper, IR::Instr **instrFirst = nullptr, bool fContinueLabel = false);
  115. IR::RegOpnd * LoadNonnegativeIndex(IR::RegOpnd *indexOpnd, const bool skipNegativeCheck, IR::LabelInstr *const notTaggedIntLabel, IR::LabelInstr *const negativeLabel, IR::Instr *const insertBeforeInstr);
  116. IR::RegOpnd * GenerateUntagVar(IR::RegOpnd * opnd, IR::LabelInstr * labelFail, IR::Instr * insertBeforeInstr, bool generateTagCheck = true);
  117. void GenerateInt32ToVarConversion( IR::Opnd * opndSrc, IR::Instr * insertInstr );
  118. IR::Instr * GenerateFastScopedFld(IR::Instr * instrScopedFld, bool isLoad);
  119. IR::Instr * GenerateFastScopedLdFld(IR::Instr * instrLdFld);
  120. IR::Instr * GenerateFastScopedStFld(IR::Instr * instrStFld);
  121. void GenerateFastAbs(IR::Opnd *dst, IR::Opnd *src, IR::Instr *callInstr, IR::Instr *insertInstr, IR::LabelInstr *labelHelper, IR::LabelInstr *doneLabel);
  122. bool TryGenerateFastMulAdd(IR::Instr * instrAdd, IR::Instr ** pInstrPrev);
  123. void GenerateFloatTest(IR::RegOpnd * opndSrc, IR::Instr * insertInstr, IR::LabelInstr* labelHelper, const bool checkForNullInLoopBody = false);
  124. IR::RegOpnd* CheckFloatAndUntag(IR::RegOpnd * opndSrc, IR::Instr * insertInstr, IR::LabelInstr* labelHelper);
  125. static void EmitInt4Instr(IR::Instr *instr);
  126. void EmitLoadVar(IR::Instr *instr, bool isFromUint32 = false, bool isHelper = false);
  127. bool EmitLoadInt32(IR::Instr *instr, bool conversionFromObjectAllowed, bool bailOutOnHelper = false, IR::LabelInstr * labelBailOut = nullptr);
  128. static void LowerInt4NegWithBailOut(IR::Instr *const instr, const IR::BailOutKind bailOutKind, IR::LabelInstr *const bailOutLabel, IR::LabelInstr *const skipBailOutLabel);
  129. static void LowerInt4AddWithBailOut(IR::Instr *const instr, const IR::BailOutKind bailOutKind, IR::LabelInstr *const bailOutLabel, IR::LabelInstr *const skipBailOutLabel);
  130. static void LowerInt4SubWithBailOut(IR::Instr *const instr, const IR::BailOutKind bailOutKind, IR::LabelInstr *const bailOutLabel, IR::LabelInstr *const skipBailOutLabel);
  131. static void LowerInt4MulWithBailOut(IR::Instr *const instr, const IR::BailOutKind bailOutKind, IR::LabelInstr *const bailOutLabel, IR::LabelInstr *const skipBailOutLabel);
  132. void LowerInt4RemWithBailOut(IR::Instr *const instr, const IR::BailOutKind bailOutKind, IR::LabelInstr *const bailOutLabel, IR::LabelInstr *const skipBailOutLabel) const;
  133. void GenerateFastRecyclerAlloc(size_t allocSize, IR::RegOpnd* newObjDst, IR::Instr* insertionPointInstr, IR::LabelInstr* allocHelperLabel, IR::LabelInstr* allocDoneLabel);
  134. #ifdef _CONTROL_FLOW_GUARD
  135. void GenerateCFGCheck(IR::Opnd * entryPointOpnd, IR::Instr * insertBeforeInstr);
  136. #endif
  137. void SaveDoubleToVar(IR::RegOpnd * dstOpnd, IR::RegOpnd *opndFloat, IR::Instr *instrOrig, IR::Instr *instrInsert, bool isHelper = false);
  138. void EmitLoadFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *insertInstr, IR::Instr * instrBailOut = nullptr, IR::LabelInstr * labelBailOut = nullptr);
  139. IR::Instr * LoadCheckedFloat(IR::RegOpnd *opndOrig, IR::RegOpnd *opndFloat, IR::LabelInstr *labelInline, IR::LabelInstr *labelHelper, IR::Instr *instrInsert, const bool checkForNullInLoopBody = false);
  140. IR::Instr * LowerCallHelper(IR::Instr *instrCall);
  141. IR::LabelInstr *GetBailOutStackRestoreLabel(BailOutInfo * bailOutInfo, IR::LabelInstr * exitTargetInstr);
  142. StackSym * GetImplicitParamSlotSym(Js::ArgSlot argSlot);
  143. static StackSym * GetImplicitParamSlotSym(Js::ArgSlot argSlot, Func * func);
  144. IR::Instr * LowerDivI4AndBailOnReminder(IR::Instr * instr, IR::LabelInstr * bailOutLabel);
  145. public:
  146. IR::Instr * LowerCall(IR::Instr * callInstr, Js::ArgSlot argCount);
  147. IR::Instr * LowerCallI(IR::Instr * callInstr, ushort callFlags, bool isHelper = false, IR::Instr* insertBeforeInstrForCFG = nullptr);
  148. int32 LowerCallArgs(IR::Instr * callInstr, IR::Instr * stackParamInsert, ushort callFlags, Js::ArgSlot extraParams = 1 /* for function object */, IR::IntConstOpnd **callInfoOpndRef = nullptr);
  149. int32 LowerCallArgs(IR::Instr * callInstr, ushort callFlags, Js::ArgSlot extraParams = 1 /* for function object */, IR::IntConstOpnd **callInfoOpndRef = nullptr) { return LowerCallArgs(callInstr, callInstr, callFlags, extraParams, callInfoOpndRef); }
  150. IR::Instr * LowerStartCall(IR::Instr * instr);
  151. IR::Instr * LowerAsmJsCallI(IR::Instr * callInstr) { Assert(UNREACHED); return nullptr; }
  152. IR::Instr * LowerAsmJsCallE(IR::Instr * callInstr) { Assert(UNREACHED); return nullptr; }
  153. IR::Instr * LowerWasmArrayBoundsCheck(IR::Instr * instr, IR::Opnd *addrOpnd) { Assert(UNREACHED); return nullptr; }
  154. void LowerAtomicStore(IR::Opnd * dst, IR::Opnd * src1, IR::Instr * insertBeforeInstr) { Assert(UNREACHED); }
  155. void LowerAtomicLoad(IR::Opnd* dst, IR::Opnd* src1, IR::Instr* insertBeforeInstr) { Assert(UNREACHED); }
  156. IR::Instr * LowerAsmJsStElemHelper(IR::Instr * callInstr) { Assert(UNREACHED); return nullptr; }
  157. IR::Instr * LowerAsmJsLdElemHelper(IR::Instr * callInstr) { Assert(UNREACHED); return nullptr; }
  158. IR::Instr * LowerCallIDynamic(IR::Instr *callInstr, IR::Instr*saveThisArgOutInstr, IR::Opnd *argsLength, ushort callFlags, IR::Instr * insertBeforeInstrForCFG = nullptr);
  159. IR::Instr * LoadHelperArgument(IR::Instr * instr, IR::Opnd * opndArg);
  160. IR::Instr * LoadDynamicArgument(IR::Instr * instr, uint argNumber = 1);
  161. IR::Instr * LoadDynamicArgumentUsingLength(IR::Instr *instr);
  162. IR::Instr * LoadDoubleHelperArgument(IR::Instr * instr, IR::Opnd * opndArg);
  163. IR::Instr * LoadFloatHelperArgument(IR::Instr * instr, IR::Opnd * opndArg) { Assert(UNREACHED); return nullptr; } // only used for asm.js right now
  164. IR::Instr * LowerToFloat(IR::Instr *instr);
  165. static IR::BranchInstr * LowerFloatCondBranch(IR::BranchInstr *instrBranch, bool ignoreNaN = false);
  166. void ConvertFloatToInt32(IR::Opnd* intOpnd, IR::Opnd* floatOpnd, IR::LabelInstr * labelHelper, IR::LabelInstr * labelDone, IR::Instr * instInsert);
  167. void CheckOverflowOnFloatToInt32(IR::Instr* instrInsert, IR::Opnd* intOpnd, IR::LabelInstr * labelHelper, IR::LabelInstr * labelDone);
  168. void EmitLoadVarNoCheck(IR::RegOpnd * dst, IR::RegOpnd * src, IR::Instr *instrLoad, bool isFromUint32, bool isHelper);
  169. void EmitIntToFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert);
  170. void EmitUIntToFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert);
  171. void EmitFloatToInt(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert, IR::Instr * instrBailOut = nullptr, IR::LabelInstr * labelBailOut = nullptr);
  172. void EmitFloat32ToFloat64(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert) { Assert(UNREACHED); }
  173. void EmitInt64toFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert) { Assert(UNREACHED); }
  174. static IR::Instr * InsertConvertFloat64ToInt32(const RoundMode roundMode, IR::Opnd *const dst, IR::Opnd *const src, IR::Instr *const insertBeforeInstr);
  175. void EmitIntToLong(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert);
  176. void EmitUIntToLong(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert);
  177. void EmitLongToInt(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert);
  178. void EmitSignExtend(IR::Instr * instr) { Assert(UNREACHED); }
  179. void EmitReinterpretPrimitive(IR::Opnd* dst, IR::Opnd* src, IR::Instr* insertBeforeInstr) { Assert(UNREACHED); }
  180. void EmitLoadFloatFromNumber(IR::Opnd *dst, IR::Opnd *src, IR::Instr *insertInstr);
  181. IR::LabelInstr* EmitLoadFloatCommon(IR::Opnd *dst, IR::Opnd *src, IR::Instr *insertInstr, bool needHelperLabel);
  182. static IR::Instr * LoadFloatZero(IR::Opnd * opndDst, IR::Instr * instrInsert);
  183. static IR::Instr * LoadFloatValue(IR::Opnd * opndDst, double value, IR::Instr * instrInsert);
  184. IR::Instr * LowerEntryInstr(IR::EntryInstr * entryInstr);
  185. IR::Instr * LowerExitInstr(IR::ExitInstr * exitInstr);
  186. IR::Instr * LowerExitInstrAsmJs(IR::ExitInstr * exitInstr) { Assert(UNREACHED); return nullptr; }
  187. IR::Instr * LoadNewScObjFirstArg(IR::Instr * instr, IR::Opnd * dst, ushort extraArgs = 0);
  188. IR::Instr * LowerTry(IR::Instr *instr, IR::JnHelperMethod helperMethod);
  189. IR::Instr * LowerLeaveNull(IR::Instr *instr);
  190. IR::LabelInstr * EnsureEHEpilogLabel();
  191. IR::Instr * LowerEHRegionReturn(IR::Instr * insertBeforeInstr, IR::Opnd * targetOpnd);
  192. void FinishArgLowering();
  193. IR::Opnd * GetOpndForArgSlot(Js::ArgSlot argSlot, IR::Opnd * argOpnd = nullptr);
  194. bool GenerateStackAllocation(IR::Instr *instr, uint32 allocSize, uint32 probeSize);
  195. void GenerateStackDeallocation(IR::Instr *instr, uint32 allocSize);
  196. void GenerateStackProbe(IR::Instr *instr, bool afterProlog);
  197. IR::Opnd* GenerateArgOutForStackArgs(IR::Instr* callInstr, IR::Instr* stackArgsInstr);
  198. template <bool verify = false>
  199. static void Legalize(IR::Instr *const instr, bool fPostRegAlloc = false);
  200. void GenerateFastInlineBuiltInMathAbs(IR::Instr *callInstr);
  201. void GenerateFastInlineBuiltInMathRound(IR::Instr *callInstr);
  202. void GenerateFastInlineBuiltInMathFloorCeil(IR::Instr *callInstr);
  203. void GenerateFastInlineBuiltInMathMinMax(IR::Instr *callInstr);
  204. static void GenerateFastInlineMathFround(IR::Instr* instr);
  205. static RegNum GetRegStackPointer() { return RegSP; }
  206. static RegNum GetRegFramePointer() { return RegFP; }
  207. static RegNum GetRegReturn(IRType type) { return IRType_IsFloat(type) ? RegNOREG : RegR0; }
  208. static RegNum GetRegArgI4(int32 argNum) { return RegNOREG; }
  209. static RegNum GetRegArgR8(int32 argNum) { return RegNOREG; }
  210. static Js::OpCode GetLoadOp(IRType type) { return IRType_IsFloat(type) ? Js::OpCode::FLDR : Js::OpCode::LDR; }
  211. static Js::OpCode GetStoreOp(IRType type) { return IRType_IsFloat(type) ? Js::OpCode::FSTR : Js::OpCode::STR; }
  212. static BYTE GetDefaultIndirScale()
  213. {
  214. return IndirScale8;
  215. }
  216. // -16 is to avoid alignment issues popping up, we are conservative here.
  217. static bool IsSmallStack(uint32 size) { return (size < (PAGESIZE - MachStackAlignment)); }
  218. static void GenerateLoadTaggedType(IR::Instr * instrLdSt, IR::RegOpnd * opndType, IR::RegOpnd * opndTaggedType);
  219. static void GenerateLoadPolymorphicInlineCacheSlot(IR::Instr * instrLdSt, IR::RegOpnd * opndInlineCache, IR::RegOpnd * opndType, uint polymorphicInlineCacheSize);
  220. static void GenerateStFldFromLocalInlineCache(IR::Instr * instrStFld, IR::RegOpnd * opndBase, IR::Opnd * opndSrc, IR::RegOpnd * opndInlineCache, IR::LabelInstr * labelFallThru, bool isInlineSlot);
  221. void GenerateFunctionObjectTest(IR::Instr * callInstr, IR::RegOpnd *functionOpnd, bool isHelper, IR::LabelInstr* continueAfterExLabel = nullptr);
  222. static IR::Instr * ChangeToWriteBarrierAssign(IR::Instr * assignInstr, const Func* func);
  223. int GetHelperArgsCount() { return this->helperCallArgsCount; }
  224. void ResetHelperArgsCount() { this->helperCallArgsCount = 0; }
  225. void LowerInlineSpreadArgOutLoop(IR::Instr *callInstr, IR::RegOpnd *indexOpnd, IR::RegOpnd *arrayElementsStartOpnd);
  226. void LowerTypeof(IR::Instr * typeOfInstr);
  227. void GenerateMemInit(IR::RegOpnd * opnd, int32 offset, size_t value, IR::Instr * insertBeforeInstr, bool isZeroed = false);
  228. static void InsertObjectPoison(IR::Opnd* poisonedOpnd, IR::BranchInstr* branchInstr, IR::Instr* insertInstr, bool isForStore);
  229. IR::BranchInstr* InsertMissingItemCompareBranch(IR::Opnd* compareSrc, IR::Opnd* missingItemOpnd, Js::OpCode opcode, IR::LabelInstr* target, IR::Instr* insertBeforeInstr);
  230. private:
  231. static IR::Instr * ChangeToAssign(IR::Instr * instr, IRType destType);
  232. void GenerateAssignForBuiltinArg(
  233. RegNum dstReg,
  234. IR::Opnd* srcOpnd,
  235. IR::Instr* instr);
  236. IR::Instr* GeneratePreCall(IR::Instr * callInstr, IR::Opnd *functionOpnd, IR::Instr * insertBeforeInstrForCFGCheck);
  237. void SetMaxArgSlots(Js::ArgSlot actualCount /*including this*/);
  238. // Data
  239. protected:
  240. Func * m_func;
  241. Lowerer * m_lowerer;
  242. //
  243. // Support to load helper arguments.
  244. //
  245. static const int MaxDoubleArgumentsToHelper = 8;
  246. // Only 8 double values can be passed through double registers, rest has to go through stack and
  247. // need to following a different calling convention. We should never hit that case as there is no helper call with more
  248. // than 8 double arguments.
  249. uint16 helperCallArgsCount; //consists of both integer & double arguments
  250. uint16 helperCallDoubleArgsCount; //consists of only double arguments
  251. IR::Opnd * helperCallArgs[MaxArgumentsToHelper];
  252. void FlipHelperCallArgsOrder();
  253. };