summaryrefslogtreecommitdiff
path: root/deps/v8/src/ia32/code-stubs-ia32.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/ia32/code-stubs-ia32.cc')
-rw-r--r--deps/v8/src/ia32/code-stubs-ia32.cc37
1 files changed, 21 insertions, 16 deletions
diff --git a/deps/v8/src/ia32/code-stubs-ia32.cc b/deps/v8/src/ia32/code-stubs-ia32.cc
index b7a704f359..7bfc0875cb 100644
--- a/deps/v8/src/ia32/code-stubs-ia32.cc
+++ b/deps/v8/src/ia32/code-stubs-ia32.cc
@@ -4,7 +4,7 @@
#if V8_TARGET_ARCH_IA32
-#include "src/api-arguments.h"
+#include "src/api-arguments-inl.h"
#include "src/assembler-inl.h"
#include "src/base/bits.h"
#include "src/bootstrapper.h"
@@ -40,23 +40,25 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
__ push(Immediate(StackFrame::TypeToMarker(marker))); // marker
ExternalReference context_address =
ExternalReference::Create(IsolateAddressId::kContextAddress, isolate());
- __ push(Operand::StaticVariable(context_address)); // context
+ __ push(__ StaticVariable(context_address)); // context
// Save callee-saved registers (C calling conventions).
__ push(edi);
__ push(esi);
__ push(ebx);
+ __ InitializeRootRegister();
+
// Save copies of the top frame descriptor on the stack.
ExternalReference c_entry_fp =
ExternalReference::Create(IsolateAddressId::kCEntryFPAddress, isolate());
- __ push(Operand::StaticVariable(c_entry_fp));
+ __ push(__ StaticVariable(c_entry_fp));
// If this is the outermost JS call, set js_entry_sp value.
ExternalReference js_entry_sp =
ExternalReference::Create(IsolateAddressId::kJSEntrySPAddress, isolate());
- __ cmp(Operand::StaticVariable(js_entry_sp), Immediate(0));
+ __ cmp(__ StaticVariable(js_entry_sp), Immediate(0));
__ j(not_equal, &not_outermost_js, Label::kNear);
- __ mov(Operand::StaticVariable(js_entry_sp), ebp);
+ __ mov(__ StaticVariable(js_entry_sp), ebp);
__ push(Immediate(StackFrame::OUTERMOST_JSENTRY_FRAME));
__ jmp(&invoke, Label::kNear);
__ bind(&not_outermost_js);
@@ -71,7 +73,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
// field in the JSEnv and return a failure sentinel.
ExternalReference pending_exception = ExternalReference::Create(
IsolateAddressId::kPendingExceptionAddress, isolate());
- __ mov(Operand::StaticVariable(pending_exception), eax);
+ __ mov(__ StaticVariable(pending_exception), eax);
__ mov(eax, Immediate(isolate()->factory()->exception()));
__ jmp(&exit);
@@ -89,15 +91,18 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
__ PopStackHandler();
__ bind(&exit);
+
+ __ VerifyRootRegister();
+
// Check if the current stack frame is marked as the outermost JS frame.
__ pop(ebx);
__ cmp(ebx, Immediate(StackFrame::OUTERMOST_JSENTRY_FRAME));
__ j(not_equal, &not_outermost_js_2);
- __ mov(Operand::StaticVariable(js_entry_sp), Immediate(0));
+ __ mov(__ StaticVariable(js_entry_sp), Immediate(0));
__ bind(&not_outermost_js_2);
// Restore the top frame descriptor from the stack.
- __ pop(Operand::StaticVariable(ExternalReference::Create(
+ __ pop(__ StaticVariable(ExternalReference::Create(
IsolateAddressId::kCEntryFPAddress, isolate())));
// Restore callee-saved registers (C calling conventions).
@@ -197,9 +202,9 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
DCHECK(edx == function_address);
// Allocate HandleScope in callee-save registers.
- __ mov(ebx, Operand::StaticVariable(next_address));
- __ mov(edi, Operand::StaticVariable(limit_address));
- __ add(Operand::StaticVariable(level_address), Immediate(1));
+ __ mov(ebx, __ StaticVariable(next_address));
+ __ mov(edi, __ StaticVariable(limit_address));
+ __ add(__ StaticVariable(level_address), Immediate(1));
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
@@ -251,10 +256,10 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
__ bind(&prologue);
// No more valid handles (the result handle was the last one). Restore
// previous handle scope.
- __ mov(Operand::StaticVariable(next_address), ebx);
- __ sub(Operand::StaticVariable(level_address), Immediate(1));
+ __ mov(__ StaticVariable(next_address), ebx);
+ __ sub(__ StaticVariable(level_address), Immediate(1));
__ Assert(above_equal, AbortReason::kInvalidHandleScopeLevel);
- __ cmp(edi, Operand::StaticVariable(limit_address));
+ __ cmp(edi, __ StaticVariable(limit_address));
__ j(not_equal, &delete_allocated_handles);
// Leave the API exit frame.
@@ -267,7 +272,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Check if the function scheduled an exception.
ExternalReference scheduled_exception_address =
ExternalReference::scheduled_exception_address(isolate);
- __ cmp(Operand::StaticVariable(scheduled_exception_address),
+ __ cmp(__ StaticVariable(scheduled_exception_address),
Immediate(isolate->factory()->the_hole_value()));
__ j(not_equal, &promote_scheduled_exception);
@@ -323,7 +328,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
ExternalReference delete_extensions =
ExternalReference::delete_handle_scope_extensions();
__ bind(&delete_allocated_handles);
- __ mov(Operand::StaticVariable(limit_address), edi);
+ __ mov(__ StaticVariable(limit_address), edi);
__ mov(edi, eax);
__ mov(Operand(esp, 0),
Immediate(ExternalReference::isolate_address(isolate)));