Revision: 22522
Author:   [email protected]
Date:     Tue Jul 22 11:35:49 2014 UTC
Log:      SlotRef::GetValue INT32 case needs to be 64bit big endian aware

On 64bit big endian systems fetch the correct 32bits from the slot

BUG=v8:3449
LOG=N
[email protected]

Review URL: https://codereview.chromium.org/403003002

Patch from Andrew Low <[email protected]>.
http://code.google.com/p/v8/source/detail?r=22522

Modified:
 /branches/bleeding_edge/src/deoptimizer.cc

=======================================
--- /branches/bleeding_edge/src/deoptimizer.cc  Mon Jul 21 13:10:14 2014 UTC
+++ /branches/bleeding_edge/src/deoptimizer.cc  Tue Jul 22 11:35:49 2014 UTC
@@ -3268,7 +3268,11 @@
       return Handle<Object>(Memory::Object_at(addr_), isolate);

     case INT32: {
+#if V8_TARGET_BIG_ENDIAN && V8_HOST_ARCH_64_BIT
+      int value = Memory::int32_at(addr_ + kIntSize);
+#else
       int value = Memory::int32_at(addr_);
+#endif
       if (Smi::IsValid(value)) {
         return Handle<Object>(Smi::FromInt(value), isolate);
       } else {
@@ -3277,7 +3281,11 @@
     }

     case UINT32: {
+#if V8_TARGET_BIG_ENDIAN && V8_HOST_ARCH_64_BIT
+      uint32_t value = Memory::uint32_at(addr_ + kIntSize);
+#else
       uint32_t value = Memory::uint32_at(addr_);
+#endif
       if (value <= static_cast<uint32_t>(Smi::kMaxValue)) {
return Handle<Object>(Smi::FromInt(static_cast<int>(value)), isolate);
       } else {

--
--
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