Revision: 19462
Author:   [email protected]
Date:     Tue Feb 18 17:42:49 2014 UTC
Log:      A64: Fix WrapReceiver corrupting receiver register

BUG=
[email protected]

Review URL: https://codereview.chromium.org/170433006
http://code.google.com/p/v8/source/detail?r=19462

Modified:
 /branches/bleeding_edge/src/a64/lithium-codegen-a64.cc

=======================================
--- /branches/bleeding_edge/src/a64/lithium-codegen-a64.cc Tue Feb 18 11:56:55 2014 UTC +++ /branches/bleeding_edge/src/a64/lithium-codegen-a64.cc Tue Feb 18 17:42:49 2014 UTC
@@ -5647,6 +5647,7 @@
   // Deoptimize if the receiver is not a JS object.
   __ JumpIfSmi(receiver, &deopt);
   __ CompareObjectType(receiver, result, result, FIRST_SPEC_OBJECT_TYPE);
+  __ Mov(result, receiver);
   __ B(ge, &done);
   // Otherwise, fall through to deopt.

@@ -5654,16 +5655,11 @@
   Deoptimize(instr->environment());

   __ Bind(&global_object);
- // We could load directly into the result register here, but the additional - // branches required are likely to be more time consuming than one additional
-  // move.
-  __ Ldr(receiver, FieldMemOperand(function, JSFunction::kContextOffset));
- __ Ldr(receiver, ContextMemOperand(receiver, Context::GLOBAL_OBJECT_INDEX));
-  __ Ldr(receiver,
-         FieldMemOperand(receiver, GlobalObject::kGlobalReceiverOffset));
+  __ Ldr(result, FieldMemOperand(function, JSFunction::kContextOffset));
+  __ Ldr(result, ContextMemOperand(result, Context::GLOBAL_OBJECT_INDEX));
+ __ Ldr(result, FieldMemOperand(result, GlobalObject::kGlobalReceiverOffset));

   __ Bind(&done);
-  __ Mov(result, receiver);
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to