Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Unified Diff: src/macro-assembler-arm.cc

Issue 8039: - ip register cannot be used when accessing large constants in the instructio... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/macro-assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/macro-assembler-arm.cc
===================================================================
--- src/macro-assembler-arm.cc (revision 544)
+++ src/macro-assembler-arm.cc (working copy)
@@ -648,8 +648,8 @@
void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
- Register scratch,
- Label* miss) {
+ Register scratch,
+ Label* miss) {
Label same_contexts;
ASSERT(!holder_reg.is(scratch));
@@ -671,10 +671,15 @@
// Check the context is a global context.
if (FLAG_debug_code) {
+ // TODO(119): avoid push(holder_reg)/pop(holder_reg)
+ // Cannot use ip as a temporary in this verification code. Due to the fact
+ // that ip is clobbered as part of cmp with an object Operand.
+ push(holder_reg); // Temporarily save holder on the stack.
// Read the first word and compare to the global_context_map.
- ldr(ip, FieldMemOperand(scratch, HeapObject::kMapOffset));
- cmp(ip, Operand(Factory::global_context_map()));
+ ldr(holder_reg, FieldMemOperand(scratch, HeapObject::kMapOffset));
+ cmp(holder_reg, Operand(Factory::global_context_map()));
Check(eq, "JSGlobalObject::global_context should be a global context.");
+ pop(holder_reg); // Restore holder.
}
// Check if both contexts are the same.
@@ -684,12 +689,19 @@
// Check the context is a global context.
if (FLAG_debug_code) {
- cmp(ip, Operand(Factory::null_value()));
+ // TODO(119): avoid push(holder_reg)/pop(holder_reg)
+ // Cannot use ip as a temporary in this verification code. Due to the fact
+ // that ip is clobbered as part of cmp with an object Operand.
+ push(holder_reg); // Temporarily save holder on the stack.
+ mov(holder_reg, ip); // Move ip to its holding place.
+ cmp(holder_reg, Operand(Factory::null_value()));
Check(ne, "JSGlobalProxy::context() should not be null.");
- ldr(ip, FieldMemOperand(ip, HeapObject::kMapOffset));
- cmp(ip, Operand(Factory::global_context_map()));
+ ldr(holder_reg, FieldMemOperand(holder_reg, HeapObject::kMapOffset));
+ cmp(holder_reg, Operand(Factory::global_context_map()));
Check(eq, "JSGlobalObject::global_context should be a global context.");
+ // Restore ip is not needed. ip is reloaded below.
+ pop(holder_reg); // Restore holder.
// Restore ip to holder's context.
ldr(ip, FieldMemOperand(holder_reg, JSGlobalProxy::kContextOffset));
}
« no previous file with comments | « src/bootstrapper.cc ('k') | src/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698