[ptr-cage] Rename kPointerCageBaseRegister to kPtrComprCageBaseRegister
For consistency with the PtrComprCageBase struct and the upcoming PtrComprCage. Bug: v8:11460 Change-Id: I2e393331c36481ee911edeaf9fb3ff971cfdba83 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2787701 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#73874}
This commit is contained in:
parent
5c27726778
commit
14e52207d8
@ -639,7 +639,7 @@ void Generate_JSEntryVariant(MacroAssembler* masm, StackFrame::Type type,
|
||||
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
// Initialize the pointer cage base register.
|
||||
__ Mov(kPointerCageBaseRegister, x0);
|
||||
__ Mov(kPtrComprCageBaseRegister, x0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -925,7 +925,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
// Don't initialize the reserved registers.
|
||||
// x26 : root register (kRootRegister).
|
||||
// x27 : context pointer (cp).
|
||||
// x28 : pointer cage base register (kPointerCageBaseRegister).
|
||||
// x28 : pointer cage base register (kPtrComprCageBaseRegister).
|
||||
// x29 : frame pointer (fp).
|
||||
|
||||
Handle<Code> builtin = is_construct
|
||||
|
@ -384,7 +384,7 @@ void Generate_JSEntryVariant(MacroAssembler* masm, StackFrame::Type type,
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
// Initialize the pointer cage base register.
|
||||
// TODO(syg): Actually make a cage.
|
||||
__ movq(kPointerCageBaseRegister, arg_reg_1);
|
||||
__ movq(kPtrComprCageBaseRegister, arg_reg_1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1037,7 +1037,7 @@ void TurboAssembler::InitializeRootRegister() {
|
||||
ExternalReference isolate_root = ExternalReference::isolate_root(isolate());
|
||||
Mov(kRootRegister, Operand(isolate_root));
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
Mov(kPointerCageBaseRegister, Operand(isolate_root));
|
||||
Mov(kPtrComprCageBaseRegister, Operand(isolate_root));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2860,14 +2860,14 @@ void TurboAssembler::DecompressTaggedPointer(const Register& destination,
|
||||
const MemOperand& field_operand) {
|
||||
RecordComment("[ DecompressTaggedPointer");
|
||||
Ldr(destination.W(), field_operand);
|
||||
Add(destination, kPointerCageBaseRegister, destination);
|
||||
Add(destination, kPtrComprCageBaseRegister, destination);
|
||||
RecordComment("]");
|
||||
}
|
||||
|
||||
void TurboAssembler::DecompressTaggedPointer(const Register& destination,
|
||||
const Register& source) {
|
||||
RecordComment("[ DecompressTaggedPointer");
|
||||
Add(destination, kPointerCageBaseRegister, Operand(source, UXTW));
|
||||
Add(destination, kPtrComprCageBaseRegister, Operand(source, UXTW));
|
||||
RecordComment("]");
|
||||
}
|
||||
|
||||
@ -2875,7 +2875,7 @@ void TurboAssembler::DecompressAnyTagged(const Register& destination,
|
||||
const MemOperand& field_operand) {
|
||||
RecordComment("[ DecompressAnyTagged");
|
||||
Ldr(destination.W(), field_operand);
|
||||
Add(destination, kPointerCageBaseRegister, destination);
|
||||
Add(destination, kPtrComprCageBaseRegister, destination);
|
||||
RecordComment("]");
|
||||
}
|
||||
|
||||
|
@ -477,9 +477,9 @@ ALIAS_REGISTER(Register, kRootRegister, x26);
|
||||
ALIAS_REGISTER(Register, rr, x26);
|
||||
// Pointer cage base register.
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
ALIAS_REGISTER(Register, kPointerCageBaseRegister, x28);
|
||||
ALIAS_REGISTER(Register, kPtrComprCageBaseRegister, x28);
|
||||
#else
|
||||
ALIAS_REGISTER(Register, kPointerCageBaseRegister, kRootRegister);
|
||||
ALIAS_REGISTER(Register, kPtrComprCageBaseRegister, kRootRegister);
|
||||
#endif
|
||||
// Context pointer register.
|
||||
ALIAS_REGISTER(Register, cp, x27);
|
||||
|
@ -26,7 +26,7 @@ void CallInterfaceDescriptorData::InitializePlatformSpecific(
|
||||
#ifdef DEBUG
|
||||
CHECK_NE(registers[i], kRootRegister);
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
CHECK_NE(registers[i], kPointerCageBaseRegister);
|
||||
CHECK_NE(registers[i], kPtrComprCageBaseRegister);
|
||||
#endif
|
||||
// Check for duplicated registers.
|
||||
for (int j = i + 1; j < register_parameter_count; j++) {
|
||||
|
@ -288,7 +288,7 @@ void TurboAssembler::DecompressTaggedPointer(Register destination,
|
||||
Operand field_operand) {
|
||||
RecordComment("[ DecompressTaggedPointer");
|
||||
movl(destination, field_operand);
|
||||
addq(destination, kPointerCageBaseRegister);
|
||||
addq(destination, kPtrComprCageBaseRegister);
|
||||
RecordComment("]");
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ void TurboAssembler::DecompressTaggedPointer(Register destination,
|
||||
Register source) {
|
||||
RecordComment("[ DecompressTaggedPointer");
|
||||
movl(destination, source);
|
||||
addq(destination, kPointerCageBaseRegister);
|
||||
addq(destination, kPtrComprCageBaseRegister);
|
||||
RecordComment("]");
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ void TurboAssembler::DecompressAnyTagged(Register destination,
|
||||
Operand field_operand) {
|
||||
RecordComment("[ DecompressAnyTagged");
|
||||
movl(destination, field_operand);
|
||||
addq(destination, kPointerCageBaseRegister);
|
||||
addq(destination, kPtrComprCageBaseRegister);
|
||||
RecordComment("]");
|
||||
}
|
||||
|
||||
|
@ -575,7 +575,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public SharedTurboAssembler {
|
||||
ExternalReference isolate_root = ExternalReference::isolate_root(isolate());
|
||||
Move(kRootRegister, isolate_root);
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
Move(kPointerCageBaseRegister, isolate_root);
|
||||
Move(kPtrComprCageBaseRegister, isolate_root);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -236,9 +236,9 @@ constexpr Register kScratchRegister = r10;
|
||||
constexpr XMMRegister kScratchDoubleReg = xmm15;
|
||||
constexpr Register kRootRegister = r13; // callee save
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
constexpr Register kPointerCageBaseRegister = r14; // callee save
|
||||
constexpr Register kPtrComprCageBaseRegister = r14; // callee save
|
||||
#else
|
||||
constexpr Register kPointerCageBaseRegister = kRootRegister;
|
||||
constexpr Register kPtrComprCageBaseRegister = kRootRegister;
|
||||
#endif
|
||||
|
||||
constexpr Register kOffHeapTrampolineRegister = kScratchRegister;
|
||||
|
@ -969,7 +969,7 @@ void Deoptimizer::DoComputeOutputFrames() {
|
||||
topmost->GetRegisterValues()->SetRegister(kRootRegister.code(),
|
||||
isolate()->isolate_root());
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
topmost->GetRegisterValues()->SetRegister(kPointerCageBaseRegister.code(),
|
||||
topmost->GetRegisterValues()->SetRegister(kPtrComprCageBaseRegister.code(),
|
||||
isolate()->isolate_root());
|
||||
#endif
|
||||
|
||||
|
@ -61,14 +61,14 @@ static void EntryCode(MacroAssembler* masm) {
|
||||
// Smi constant register is callee save.
|
||||
__ pushq(kRootRegister);
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
__ pushq(kPointerCageBaseRegister);
|
||||
__ pushq(kPtrComprCageBaseRegister);
|
||||
#endif
|
||||
__ InitializeRootRegister();
|
||||
}
|
||||
|
||||
static void ExitCode(MacroAssembler* masm) {
|
||||
#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
|
||||
__ popq(kPointerCageBaseRegister);
|
||||
__ popq(kPtrComprCageBaseRegister);
|
||||
#endif
|
||||
__ popq(kRootRegister);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user