123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659 |
- /*
- * Copyright (C) 2008, 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- #ifndef MacroAssemblerX86_64_h
- #define MacroAssemblerX86_64_h
- #if ENABLE(ASSEMBLER) && CPU(X86_64)
- #include "MacroAssemblerX86Common.h"
- #define REPTACH_OFFSET_CALL_R11 3
- namespace JSC {
- class MacroAssemblerX86_64 : public MacroAssemblerX86Common {
- public:
- static const Scale ScalePtr = TimesEight;
- using MacroAssemblerX86Common::add32;
- using MacroAssemblerX86Common::and32;
- using MacroAssemblerX86Common::branchAdd32;
- using MacroAssemblerX86Common::or32;
- using MacroAssemblerX86Common::sub32;
- using MacroAssemblerX86Common::load32;
- using MacroAssemblerX86Common::store32;
- using MacroAssemblerX86Common::store8;
- using MacroAssemblerX86Common::call;
- using MacroAssemblerX86Common::jump;
- using MacroAssemblerX86Common::addDouble;
- using MacroAssemblerX86Common::loadDouble;
- using MacroAssemblerX86Common::convertInt32ToDouble;
- void add32(TrustedImm32 imm, AbsoluteAddress address)
- {
- move(TrustedImmPtr(address.m_ptr), scratchRegister);
- add32(imm, Address(scratchRegister));
- }
-
- void and32(TrustedImm32 imm, AbsoluteAddress address)
- {
- move(TrustedImmPtr(address.m_ptr), scratchRegister);
- and32(imm, Address(scratchRegister));
- }
-
- void add32(AbsoluteAddress address, RegisterID dest)
- {
- move(TrustedImmPtr(address.m_ptr), scratchRegister);
- add32(Address(scratchRegister), dest);
- }
-
- void or32(TrustedImm32 imm, AbsoluteAddress address)
- {
- move(TrustedImmPtr(address.m_ptr), scratchRegister);
- or32(imm, Address(scratchRegister));
- }
- void or32(RegisterID reg, AbsoluteAddress address)
- {
- move(TrustedImmPtr(address.m_ptr), scratchRegister);
- or32(reg, Address(scratchRegister));
- }
- void sub32(TrustedImm32 imm, AbsoluteAddress address)
- {
- move(TrustedImmPtr(address.m_ptr), scratchRegister);
- sub32(imm, Address(scratchRegister));
- }
- void load32(const void* address, RegisterID dest)
- {
- if (dest == X86Registers::eax)
- m_assembler.movl_mEAX(address);
- else {
- move(TrustedImmPtr(address), dest);
- load32(dest, dest);
- }
- }
- void addDouble(AbsoluteAddress address, FPRegisterID dest)
- {
- move(TrustedImmPtr(address.m_ptr), scratchRegister);
- m_assembler.addsd_mr(0, scratchRegister, dest);
- }
- void convertInt32ToDouble(TrustedImm32 imm, FPRegisterID dest)
- {
- move(imm, scratchRegister);
- m_assembler.cvtsi2sd_rr(scratchRegister, dest);
- }
- void store32(TrustedImm32 imm, void* address)
- {
- move(TrustedImmPtr(address), scratchRegister);
- store32(imm, scratchRegister);
- }
-
- void store8(TrustedImm32 imm, void* address)
- {
- move(TrustedImmPtr(address), scratchRegister);
- store8(imm, Address(scratchRegister));
- }
- Call call()
- {
- DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister);
- Call result = Call(m_assembler.call(scratchRegister), Call::Linkable);
- ASSERT_UNUSED(label, differenceBetween(label, result) == REPTACH_OFFSET_CALL_R11);
- return result;
- }
- // Address is a memory location containing the address to jump to
- void jump(AbsoluteAddress address)
- {
- move(TrustedImmPtr(address.m_ptr), scratchRegister);
- jump(Address(scratchRegister));
- }
- Call tailRecursiveCall()
- {
- DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister);
- Jump newJump = Jump(m_assembler.jmp_r(scratchRegister));
- ASSERT_UNUSED(label, differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11);
- return Call::fromTailJump(newJump);
- }
- Call makeTailRecursiveCall(Jump oldJump)
- {
- oldJump.link(this);
- DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister);
- Jump newJump = Jump(m_assembler.jmp_r(scratchRegister));
- ASSERT_UNUSED(label, differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11);
- return Call::fromTailJump(newJump);
- }
- Jump branchAdd32(ResultCondition cond, TrustedImm32 src, AbsoluteAddress dest)
- {
- move(TrustedImmPtr(dest.m_ptr), scratchRegister);
- add32(src, Address(scratchRegister));
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- void add64(RegisterID src, RegisterID dest)
- {
- m_assembler.addq_rr(src, dest);
- }
-
- void add64(Address src, RegisterID dest)
- {
- m_assembler.addq_mr(src.offset, src.base, dest);
- }
- void add64(AbsoluteAddress src, RegisterID dest)
- {
- move(TrustedImmPtr(src.m_ptr), scratchRegister);
- add64(Address(scratchRegister), dest);
- }
- void add64(TrustedImm32 imm, RegisterID srcDest)
- {
- m_assembler.addq_ir(imm.m_value, srcDest);
- }
- void add64(TrustedImm64 imm, RegisterID dest)
- {
- move(imm, scratchRegister);
- add64(scratchRegister, dest);
- }
- void add64(TrustedImm32 imm, RegisterID src, RegisterID dest)
- {
- m_assembler.leaq_mr(imm.m_value, src, dest);
- }
- void add64(TrustedImm32 imm, Address address)
- {
- m_assembler.addq_im(imm.m_value, address.offset, address.base);
- }
- void add64(TrustedImm32 imm, AbsoluteAddress address)
- {
- move(TrustedImmPtr(address.m_ptr), scratchRegister);
- add64(imm, Address(scratchRegister));
- }
- void and64(RegisterID src, RegisterID dest)
- {
- m_assembler.andq_rr(src, dest);
- }
- void and64(TrustedImm32 imm, RegisterID srcDest)
- {
- m_assembler.andq_ir(imm.m_value, srcDest);
- }
-
- void neg64(RegisterID dest)
- {
- m_assembler.negq_r(dest);
- }
- void or64(RegisterID src, RegisterID dest)
- {
- m_assembler.orq_rr(src, dest);
- }
- void or64(TrustedImm64 imm, RegisterID dest)
- {
- move(imm, scratchRegister);
- or64(scratchRegister, dest);
- }
- void or64(TrustedImm32 imm, RegisterID dest)
- {
- m_assembler.orq_ir(imm.m_value, dest);
- }
- void or64(RegisterID op1, RegisterID op2, RegisterID dest)
- {
- if (op1 == op2)
- move(op1, dest);
- else if (op1 == dest)
- or64(op2, dest);
- else {
- move(op2, dest);
- or64(op1, dest);
- }
- }
- void or64(TrustedImm32 imm, RegisterID src, RegisterID dest)
- {
- move(src, dest);
- or64(imm, dest);
- }
-
- void rotateRight64(TrustedImm32 imm, RegisterID srcDst)
- {
- m_assembler.rorq_i8r(imm.m_value, srcDst);
- }
- void sub64(RegisterID src, RegisterID dest)
- {
- m_assembler.subq_rr(src, dest);
- }
-
- void sub64(TrustedImm32 imm, RegisterID dest)
- {
- m_assembler.subq_ir(imm.m_value, dest);
- }
-
- void sub64(TrustedImm64 imm, RegisterID dest)
- {
- move(imm, scratchRegister);
- sub64(scratchRegister, dest);
- }
- void xor64(RegisterID src, RegisterID dest)
- {
- m_assembler.xorq_rr(src, dest);
- }
-
- void xor64(RegisterID src, Address dest)
- {
- m_assembler.xorq_rm(src, dest.offset, dest.base);
- }
- void xor64(TrustedImm32 imm, RegisterID srcDest)
- {
- m_assembler.xorq_ir(imm.m_value, srcDest);
- }
- void load64(ImplicitAddress address, RegisterID dest)
- {
- m_assembler.movq_mr(address.offset, address.base, dest);
- }
- void load64(BaseIndex address, RegisterID dest)
- {
- m_assembler.movq_mr(address.offset, address.base, address.index, address.scale, dest);
- }
- void load64(const void* address, RegisterID dest)
- {
- if (dest == X86Registers::eax)
- m_assembler.movq_mEAX(address);
- else {
- move(TrustedImmPtr(address), dest);
- load64(dest, dest);
- }
- }
- DataLabel32 load64WithAddressOffsetPatch(Address address, RegisterID dest)
- {
- padBeforePatch();
- m_assembler.movq_mr_disp32(address.offset, address.base, dest);
- return DataLabel32(this);
- }
-
- DataLabelCompact load64WithCompactAddressOffsetPatch(Address address, RegisterID dest)
- {
- padBeforePatch();
- m_assembler.movq_mr_disp8(address.offset, address.base, dest);
- return DataLabelCompact(this);
- }
- void store64(RegisterID src, ImplicitAddress address)
- {
- m_assembler.movq_rm(src, address.offset, address.base);
- }
- void store64(RegisterID src, BaseIndex address)
- {
- m_assembler.movq_rm(src, address.offset, address.base, address.index, address.scale);
- }
-
- void store64(RegisterID src, void* address)
- {
- if (src == X86Registers::eax)
- m_assembler.movq_EAXm(address);
- else {
- move(TrustedImmPtr(address), scratchRegister);
- store64(src, scratchRegister);
- }
- }
- void store64(TrustedImm64 imm, ImplicitAddress address)
- {
- move(imm, scratchRegister);
- store64(scratchRegister, address);
- }
- void store64(TrustedImm64 imm, BaseIndex address)
- {
- move(imm, scratchRegister);
- m_assembler.movq_rm(scratchRegister, address.offset, address.base, address.index, address.scale);
- }
-
- DataLabel32 store64WithAddressOffsetPatch(RegisterID src, Address address)
- {
- padBeforePatch();
- m_assembler.movq_rm_disp32(src, address.offset, address.base);
- return DataLabel32(this);
- }
- void move64ToDouble(RegisterID src, FPRegisterID dest)
- {
- m_assembler.movq_rr(src, dest);
- }
- void moveDoubleTo64(FPRegisterID src, RegisterID dest)
- {
- m_assembler.movq_rr(src, dest);
- }
- void compare64(RelationalCondition cond, RegisterID left, TrustedImm32 right, RegisterID dest)
- {
- if (((cond == Equal) || (cond == NotEqual)) && !right.m_value)
- m_assembler.testq_rr(left, left);
- else
- m_assembler.cmpq_ir(right.m_value, left);
- m_assembler.setCC_r(x86Condition(cond), dest);
- m_assembler.movzbl_rr(dest, dest);
- }
-
- void compare64(RelationalCondition cond, RegisterID left, RegisterID right, RegisterID dest)
- {
- m_assembler.cmpq_rr(right, left);
- m_assembler.setCC_r(x86Condition(cond), dest);
- m_assembler.movzbl_rr(dest, dest);
- }
-
- Jump branch64(RelationalCondition cond, RegisterID left, RegisterID right)
- {
- m_assembler.cmpq_rr(right, left);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branch64(RelationalCondition cond, RegisterID left, TrustedImm64 right)
- {
- if (((cond == Equal) || (cond == NotEqual)) && !right.m_value) {
- m_assembler.testq_rr(left, left);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- move(right, scratchRegister);
- return branch64(cond, left, scratchRegister);
- }
- Jump branch64(RelationalCondition cond, RegisterID left, Address right)
- {
- m_assembler.cmpq_mr(right.offset, right.base, left);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branch64(RelationalCondition cond, AbsoluteAddress left, RegisterID right)
- {
- move(TrustedImmPtr(left.m_ptr), scratchRegister);
- return branch64(cond, Address(scratchRegister), right);
- }
- Jump branch64(RelationalCondition cond, Address left, RegisterID right)
- {
- m_assembler.cmpq_rm(right, left.offset, left.base);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branch64(RelationalCondition cond, Address left, TrustedImm64 right)
- {
- move(right, scratchRegister);
- return branch64(cond, left, scratchRegister);
- }
- Jump branchTest64(ResultCondition cond, RegisterID reg, RegisterID mask)
- {
- m_assembler.testq_rr(reg, mask);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
-
- Jump branchTest64(ResultCondition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1))
- {
- // if we are only interested in the low seven bits, this can be tested with a testb
- if (mask.m_value == -1)
- m_assembler.testq_rr(reg, reg);
- else if ((mask.m_value & ~0x7f) == 0)
- m_assembler.testb_i8r(mask.m_value, reg);
- else
- m_assembler.testq_i32r(mask.m_value, reg);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- void test64(ResultCondition cond, RegisterID reg, TrustedImm32 mask, RegisterID dest)
- {
- if (mask.m_value == -1)
- m_assembler.testq_rr(reg, reg);
- else if ((mask.m_value & ~0x7f) == 0)
- m_assembler.testb_i8r(mask.m_value, reg);
- else
- m_assembler.testq_i32r(mask.m_value, reg);
- set32(x86Condition(cond), dest);
- }
- void test64(ResultCondition cond, RegisterID reg, RegisterID mask, RegisterID dest)
- {
- m_assembler.testq_rr(reg, mask);
- set32(x86Condition(cond), dest);
- }
- Jump branchTest64(ResultCondition cond, AbsoluteAddress address, TrustedImm32 mask = TrustedImm32(-1))
- {
- load64(address.m_ptr, scratchRegister);
- return branchTest64(cond, scratchRegister, mask);
- }
- Jump branchTest64(ResultCondition cond, Address address, TrustedImm32 mask = TrustedImm32(-1))
- {
- if (mask.m_value == -1)
- m_assembler.cmpq_im(0, address.offset, address.base);
- else
- m_assembler.testq_i32m(mask.m_value, address.offset, address.base);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branchTest64(ResultCondition cond, Address address, RegisterID reg)
- {
- m_assembler.testq_rm(reg, address.offset, address.base);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branchTest64(ResultCondition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1))
- {
- if (mask.m_value == -1)
- m_assembler.cmpq_im(0, address.offset, address.base, address.index, address.scale);
- else
- m_assembler.testq_i32m(mask.m_value, address.offset, address.base, address.index, address.scale);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branchAdd64(ResultCondition cond, TrustedImm32 imm, RegisterID dest)
- {
- add64(imm, dest);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branchAdd64(ResultCondition cond, RegisterID src, RegisterID dest)
- {
- add64(src, dest);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branchSub64(ResultCondition cond, TrustedImm32 imm, RegisterID dest)
- {
- sub64(imm, dest);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branchSub64(ResultCondition cond, RegisterID src, RegisterID dest)
- {
- sub64(src, dest);
- return Jump(m_assembler.jCC(x86Condition(cond)));
- }
- Jump branchSub64(ResultCondition cond, RegisterID src1, TrustedImm32 src2, RegisterID dest)
- {
- move(src1, dest);
- return branchSub64(cond, src2, dest);
- }
- ConvertibleLoadLabel convertibleLoadPtr(Address address, RegisterID dest)
- {
- ConvertibleLoadLabel result = ConvertibleLoadLabel(this);
- m_assembler.movq_mr(address.offset, address.base, dest);
- return result;
- }
- DataLabelPtr moveWithPatch(TrustedImmPtr initialValue, RegisterID dest)
- {
- padBeforePatch();
- m_assembler.movq_i64r(initialValue.asIntptr(), dest);
- return DataLabelPtr(this);
- }
- Jump branchPtrWithPatch(RelationalCondition cond, RegisterID left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0))
- {
- dataLabel = moveWithPatch(initialRightValue, scratchRegister);
- return branch64(cond, left, scratchRegister);
- }
- Jump branchPtrWithPatch(RelationalCondition cond, Address left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0))
- {
- dataLabel = moveWithPatch(initialRightValue, scratchRegister);
- return branch64(cond, left, scratchRegister);
- }
- DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address)
- {
- DataLabelPtr label = moveWithPatch(initialValue, scratchRegister);
- store64(scratchRegister, address);
- return label;
- }
-
- using MacroAssemblerX86Common::branchTest8;
- Jump branchTest8(ResultCondition cond, ExtendedAddress address, TrustedImm32 mask = TrustedImm32(-1))
- {
- TrustedImmPtr addr(reinterpret_cast<void*>(address.offset));
- MacroAssemblerX86Common::move(addr, scratchRegister);
- return MacroAssemblerX86Common::branchTest8(cond, BaseIndex(scratchRegister, address.base, TimesOne), mask);
- }
-
- Jump branchTest8(ResultCondition cond, AbsoluteAddress address, TrustedImm32 mask = TrustedImm32(-1))
- {
- MacroAssemblerX86Common::move(TrustedImmPtr(address.m_ptr), scratchRegister);
- return MacroAssemblerX86Common::branchTest8(cond, Address(scratchRegister), mask);
- }
- static bool supportsFloatingPoint() { return true; }
- // See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate()
- static bool supportsFloatingPointTruncate() { return true; }
- static bool supportsFloatingPointSqrt() { return true; }
- static bool supportsFloatingPointAbs() { return true; }
-
- static FunctionPtr readCallTarget(CodeLocationCall call)
- {
- return FunctionPtr(X86Assembler::readPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation()));
- }
- static RegisterID scratchRegisterForBlinding() { return scratchRegister; }
- static bool canJumpReplacePatchableBranchPtrWithPatch() { return true; }
-
- static CodeLocationLabel startOfBranchPtrWithPatchOnRegister(CodeLocationDataLabelPtr label)
- {
- const int rexBytes = 1;
- const int opcodeBytes = 1;
- const int immediateBytes = 8;
- const int totalBytes = rexBytes + opcodeBytes + immediateBytes;
- ASSERT(totalBytes >= maxJumpReplacementSize());
- return label.labelAtOffset(-totalBytes);
- }
-
- static CodeLocationLabel startOfPatchableBranchPtrWithPatchOnAddress(CodeLocationDataLabelPtr label)
- {
- return startOfBranchPtrWithPatchOnRegister(label);
- }
-
- #if ENABLE(DETACHED_JIT) && !BUILDING_DETACHED_JIT
- static void revertJumpReplacementToPatchableBranchPtrWithPatch(CodeLocationLabel instructionStart, Address, void* initialValue);
- static void revertJumpReplacementToBranchPtrWithPatch(CodeLocationLabel instructionStart, RegisterID, void* initialValue);
- #else
- static void revertJumpReplacementToPatchableBranchPtrWithPatch(CodeLocationLabel instructionStart, Address, void* initialValue)
- {
- X86Assembler::revertJumpTo_movq_i64r(instructionStart.executableAddress(), reinterpret_cast<intptr_t>(initialValue), scratchRegister);
- }
- static void revertJumpReplacementToBranchPtrWithPatch(CodeLocationLabel instructionStart, RegisterID, void* initialValue)
- {
- X86Assembler::revertJumpTo_movq_i64r(instructionStart.executableAddress(), reinterpret_cast<intptr_t>(initialValue), scratchRegister);
- }
- #endif
- private:
- friend class LinkBuffer;
- friend class RepatchBuffer;
- #if ENABLE(DETACHED_JIT) && BUILDING_DETACHED_JIT
- friend void JSCBridge::performCompilerTask();
- #endif
- static void linkCall(void* code, Call call, FunctionPtr function)
- {
- if (!call.isFlagSet(Call::Near))
- X86Assembler::linkPointer(code, call.m_label.labelAtOffset(-REPTACH_OFFSET_CALL_R11), function.value());
- else
- X86Assembler::linkCall(code, call.m_label, function.value());
- }
- #if ENABLE(DETACHED_JIT) && !BUILDING_DETACHED_JIT
- static void repatchCall(CodeLocationCall call, CodeLocationLabel destination);
- static void repatchCall(CodeLocationCall call, FunctionPtr destination);
- #else
- static void repatchCall(CodeLocationCall call, CodeLocationLabel destination)
- {
- X86Assembler::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress());
- }
- static void repatchCall(CodeLocationCall call, FunctionPtr destination)
- {
- X86Assembler::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress());
- }
- #endif
- };
- } // namespace JSC
- #endif // ENABLE(ASSEMBLER)
- #endif // MacroAssemblerX86_64_h
|