5#ifndef V8_EXECUTION_ARM64_POINTER_AUTHENTICATION_ARM64_H_
6#define V8_EXECUTION_ARM64_POINTER_AUTHENTICATION_ARM64_H_
22 pc = Simulator::AddPAC(
pc, sp, Simulator::kPACKeyIB,
23 Simulator::kInstructionPointer);
39 pc = Simulator::AuthPAC(
pc, sp, Simulator::kPACKeyIB,
40 Simulator::kInstructionPointer);
44 " mov x16, %[stack_ptr]\n"
60 :
"x16",
"x17",
"x30",
"cc");
69 Address* pc_address,
unsigned offset_from_sp) {
70 uint64_t sp =
reinterpret_cast<uint64_t
>(pc_address) + offset_from_sp;
71 uint64_t
pc =
static_cast<uint64_t
>(*pc_address);
78 return Simulator::StripPAC(
pc, Simulator::kInstructionPointer);
100 int offset_from_sp) {
101 uint64_t sp =
reinterpret_cast<uint64_t
>(pc_address) + offset_from_sp;
102 uint64_t old_pc =
static_cast<uint64_t
>(*pc_address);
104 uint64_t auth_old_pc = Simulator::AuthPAC(old_pc, sp, Simulator::kPACKeyIB,
105 Simulator::kInstructionPointer);
106 uint64_t raw_old_pc =
107 Simulator::StripPAC(old_pc, Simulator::kInstructionPointer);
110 new_pc = Simulator::AddPAC(new_pc, sp, Simulator::kPACKeyIB,
111 Simulator::kInstructionPointer);
116 " mov x17, %[new_pc]\n"
119 " mov %[new_pc], x17\n"
120 " mov x17, %[old_pc]\n"
133 : [new_pc]
"+&r"(new_pc)
134 : [sp]
"r"(sp), [old_pc]
"r"(old_pc)
135 :
"x16",
"x17",
"x30",
"cc");
137 *pc_address = new_pc;
155#if V8_ENABLE_WEBASSEMBLY
static Address EnsureValidReturnAddress(Isolate *isolate, Address address)
static V8_INLINE void ReplacePC(Address *pc_address, Address new_pc, int offset_from_sp)
static V8_INLINE Address SignAndCheckPC(Isolate *isolate, Address pc, Address sp)
static V8_INLINE Address StripPAC(Address pc)
static V8_INLINE Address MoveSignedPC(Isolate *isolate, Address pc, Address new_sp, Address old_sp)
static V8_INLINE Address AuthenticatePC(Address *pc_address, unsigned offset_from_sp)
V8_INLINE Address SignPC(Address pc, Address sp)
V8_INLINE Address AuthPAC(Address pc, Address sp)
V8_EXPORT_PRIVATE FlagValues v8_flags
#define CHECK_EQ(lhs, rhs)