Revision: 20401
Author: [email protected]
Date: Tue Apr 1 12:51:15 2014 UTC
Log: MSan workaround in Simulator::VisitBitfield.
This change shuffles the code in Simulator::VisitBitfield a bit
to work around a MemorySanitizer bug. New code should not be any
slower or less readable than before.
More info:
https://code.google.com/p/memory-sanitizer/issues/detail?id=50
[email protected]
Review URL: https://codereview.chromium.org/212863002
Patch from Evgeniy Stepanov <[email protected]>.
http://code.google.com/p/v8/source/detail?r=20401
Modified:
/branches/bleeding_edge/src/arm64/simulator-arm64.cc
=======================================
--- /branches/bleeding_edge/src/arm64/simulator-arm64.cc Mon Mar 24
17:43:56 2014 UTC
+++ /branches/bleeding_edge/src/arm64/simulator-arm64.cc Tue Apr 1
12:51:15 2014 UTC
@@ -2108,8 +2108,9 @@
// Rotate source bitfield into place.
int64_t result = (static_cast<uint64_t>(src) >> R) | (src << (reg_size -
R));
// Determine the sign extension.
- int64_t topbits = ((1L << (reg_size - diff - 1)) - 1) << (diff + 1);
- int64_t signbits = extend && ((src >> S) & 1) ? topbits : 0;
+ int64_t topbits_preshift = (1L << (reg_size - diff - 1)) - 1;
+ int64_t signbits = (extend && ((src >> S) & 1) ? topbits_preshift : 0)
+ << (diff + 1);
// Merge sign extension, dest/zero and bitfield.
result = signbits | (result & mask) | (dst & ~mask);
--
--
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.