Revision: 20771
Author:   [email protected]
Date:     Tue Apr 15 14:03:25 2014 UTC
Log:      ARM64: Access has_pending_message_ correctly.

This fixes accesses in ARM and ARM64; the field is a bool, with size 1,
but we were accessing it with pointer-sized loads and stores.

BUG=
[email protected]

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

Modified:
 /branches/bleeding_edge/src/arm/full-codegen-arm.cc
 /branches/bleeding_edge/src/arm64/full-codegen-arm64.cc

=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Fri Apr 11 07:27:25 2014 UTC +++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Tue Apr 15 14:03:25 2014 UTC
@@ -4767,7 +4767,8 @@
   ExternalReference has_pending_message =
       ExternalReference::address_of_has_pending_message(isolate());
   __ mov(ip, Operand(has_pending_message));
-  __ ldr(r1, MemOperand(ip));
+  STATIC_ASSERT(sizeof(bool) == 1);   // NOLINT(runtime/sizeof)
+  __ ldrb(r1, MemOperand(ip));
   __ SmiTag(r1);
   __ push(r1);

@@ -4793,7 +4794,8 @@
   ExternalReference has_pending_message =
       ExternalReference::address_of_has_pending_message(isolate());
   __ mov(ip, Operand(has_pending_message));
-  __ str(r1, MemOperand(ip));
+  STATIC_ASSERT(sizeof(bool) == 1);   // NOLINT(runtime/sizeof)
+  __ strb(r1, MemOperand(ip));

   __ pop(r1);
   ExternalReference pending_message_obj =
=======================================
--- /branches/bleeding_edge/src/arm64/full-codegen-arm64.cc Fri Apr 11 07:27:25 2014 UTC +++ /branches/bleeding_edge/src/arm64/full-codegen-arm64.cc Tue Apr 15 14:03:25 2014 UTC
@@ -4821,8 +4821,9 @@

   ExternalReference has_pending_message =
       ExternalReference::address_of_has_pending_message(isolate());
+  STATIC_ASSERT(sizeof(bool) == 1);   // NOLINT(runtime/sizeof)
   __ Mov(x11, has_pending_message);
-  __ Ldr(x11, MemOperand(x11));
+  __ Ldrb(x11, MemOperand(x11));
   __ SmiTag(x11);

   __ Push(x10, x11);
@@ -4850,7 +4851,8 @@
   ExternalReference has_pending_message =
       ExternalReference::address_of_has_pending_message(isolate());
   __ Mov(x13, has_pending_message);
-  __ Str(x11, MemOperand(x13));
+  STATIC_ASSERT(sizeof(bool) == 1);   // NOLINT(runtime/sizeof)
+  __ Strb(x11, MemOperand(x13));

   ExternalReference pending_message_obj =
       ExternalReference::address_of_pending_message_obj(isolate());

--
--
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/d/optout.

Reply via email to