HLInst* X86Compiler::newInst(uint32_t code, const Operand& o0, const Operand& o1, const Operand& o2, const Operand& o3, const Operand& o4) { size_t size = X86Compiler_getInstSize(code); HLInst* inst = static_cast<HLInst*>(_zoneAllocator.alloc(size + 5 * sizeof(Operand))); if (inst == NULL) goto _NoMemory; { Operand* opList = reinterpret_cast<Operand*>(reinterpret_cast<uint8_t*>(inst) + size); opList[0] = o0; opList[1] = o1; opList[2] = o2; opList[3] = o3; opList[4] = o4; ASMJIT_ASSERT_OPERAND(o0); ASMJIT_ASSERT_OPERAND(o1); ASMJIT_ASSERT_OPERAND(o2); ASMJIT_ASSERT_OPERAND(o3); ASMJIT_ASSERT_OPERAND(o4); return X86Compiler_newInst(this, inst, code, getInstOptionsAndReset(), opList, 5); } _NoMemory: setLastError(kErrorNoHeapMemory); return NULL; }
HLInst* X86Compiler::newInst(uint32_t code, const Operand& o0, const Operand& o1) noexcept { size_t size = X86Compiler_getInstSize(code); HLInst* inst = static_cast<HLInst*>(_zoneAllocator.alloc(size + 2 * sizeof(Operand))); if (inst == nullptr) goto _NoMemory; { Operand* opList = reinterpret_cast<Operand*>(reinterpret_cast<uint8_t*>(inst) + size); opList[0] = o0; opList[1] = o1; ASMJIT_ASSERT_OPERAND(o0); ASMJIT_ASSERT_OPERAND(o1); return X86Compiler_newInst(this, inst, code, getInstOptionsAndReset(), opList, 2); } _NoMemory: setLastError(kErrorNoHeapMemory); return nullptr; }