[ia32,root] Remove root register verification

Verification has served its purpose now that kRootRegister is fully
supported on ia32.

Bug: v8:6666
Change-Id: I037617bf900f161c221228107c9f1352d4815d87
Reviewed-on: https://chromium-review.googlesource.com/c/1296130
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57666}
This commit is contained in:
Jakob Gruber 2018-11-21 10:09:53 +01:00 committed by Commit Bot
parent 8da2afaa77
commit b84766b388
7 changed files with 0 additions and 40 deletions

View File

@ -820,8 +820,6 @@ static void AdvanceBytecodeOffsetOrReturn(MacroAssembler* masm,
void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
ProfileEntryHookStub::MaybeCallEntryHook(masm);
__ VerifyRootRegister();
Register closure = edi;
Register feedback_vector = ecx;
@ -941,7 +939,6 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ mov(
kJavaScriptCallCodeStartRegister,
Operand(kInterpreterDispatchTableRegister, ecx, times_pointer_size, 0));
__ VerifyRootRegister();
__ call(kJavaScriptCallCodeStartRegister);
masm->isolate()->heap()->SetInterpreterEntryReturnPCOffset(masm->pc_offset());
@ -965,7 +962,6 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ bind(&do_return);
// The return value is in eax.
LeaveInterpreterFrame(masm, edx, ecx);
__ VerifyRootRegister();
__ ret(0);
}

View File

@ -3623,7 +3623,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
break;
}
case kIA32StackCheck: {
__ VerifyRootRegister();
__ CompareStackLimit(esp);
break;
}

View File

@ -1068,10 +1068,6 @@ DEFINE_VALUE_IMPLICATION(runtime_call_stats, runtime_stats, 1)
#endif
DEFINE_BOOL_READONLY(embedded_builtins, V8_EMBEDDED_BUILTINS_BOOL,
"Embed builtin code into the binary.")
// TODO(jgruber,v8:6666): Remove once ia32 has full embedded builtin support.
DEFINE_BOOL_READONLY(
ia32_verify_root_register, false,
"Check that the value of the root register was not clobbered.")
DEFINE_BOOL(profile_deserialization, false,
"Print the time it takes to deserialize the snapshot.")
DEFINE_BOOL(serialization_statistics, false,

View File

@ -98,8 +98,6 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
__ bind(&exit);
__ VerifyRootRegister();
// Check if the current stack frame is marked as the outermost JS frame.
__ pop(edi);
__ cmp(edi, Immediate(StackFrame::OUTERMOST_JSENTRY_FRAME));

View File

@ -54,19 +54,6 @@ void TurboAssembler::InitializeRootRegister() {
Move(kRootRegister, Immediate(isolate_root));
}
void TurboAssembler::VerifyRootRegister() {
if (!FLAG_ia32_verify_root_register) return;
DCHECK(FLAG_embedded_builtins);
Label root_register_ok;
cmp(Operand(kRootRegister, IsolateData::magic_number_offset()),
Immediate(IsolateData::kRootRegisterSentinel));
j(equal, &root_register_ok);
int3();
bind(&root_register_ok);
}
void TurboAssembler::LoadRoot(Register destination, RootIndex index) {
if (root_array_available()) {
mov(destination,

View File

@ -231,7 +231,6 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// Root register utility functions.
void InitializeRootRegister();
void VerifyRootRegister();
void LoadRoot(Register destination, RootIndex index) override;

View File

@ -66,11 +66,6 @@ class IsolateData final {
return builtins_table_offset() + id * kPointerSize;
}
// Root-register-relative offset of the magic number value.
static constexpr int magic_number_offset() {
return kMagicNumberOffset - kIsolateRootBias;
}
// Root-register-relative offset of the virtual call target register value.
static constexpr int virtual_call_target_register_offset() {
return kVirtualCallTargetRegisterOffset - kIsolateRootBias;
@ -94,10 +89,6 @@ class IsolateData final {
Address* builtins() { return builtins_; }
// For root register verification.
// TODO(v8:6666): Remove once the root register is fully supported on ia32.
static constexpr intptr_t kRootRegisterSentinel = 0xcafeca11;
private:
// Static layout definition.
#define FIELDS(V) \
@ -108,7 +99,6 @@ class IsolateData final {
V(kRootsTableOffset, RootsTable::kEntriesCount* kPointerSize) \
V(kExternalReferenceTableOffset, ExternalReferenceTable::SizeInBytes()) \
V(kBuiltinsTableOffset, Builtins::builtin_count* kPointerSize) \
V(kMagicNumberOffset, kIntptrSize) \
V(kVirtualCallTargetRegisterOffset, kPointerSize) \
/* This padding aligns IsolateData size by 8 bytes. */ \
V(kPaddingOffset, \
@ -143,10 +133,6 @@ class IsolateData final {
// The entries in this array are tagged pointers to Code objects.
Address builtins_[Builtins::builtin_count] = {};
// For root register verification.
// TODO(v8:6666): Remove once the root register is fully supported on ia32.
const intptr_t magic_number_ = kRootRegisterSentinel;
// For isolate-independent calls on ia32.
// TODO(v8:6666): Remove once wasm supports pc-relative jumps to builtins on
// ia32 (otherwise the arguments adaptor call runs out of registers).
@ -183,7 +169,6 @@ void IsolateData::AssertPredictableLayout() {
STATIC_ASSERT(offsetof(IsolateData, external_reference_table_) ==
kExternalReferenceTableOffset);
STATIC_ASSERT(offsetof(IsolateData, builtins_) == kBuiltinsTableOffset);
STATIC_ASSERT(offsetof(IsolateData, magic_number_) == kMagicNumberOffset);
STATIC_ASSERT(offsetof(IsolateData, virtual_call_target_register_) ==
kVirtualCallTargetRegisterOffset);
STATIC_ASSERT(offsetof(IsolateData, external_memory_) ==