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

Unified Diff: src/deoptimizer.h

Issue 568753002: Remove V8_HOST_CAN_READ_UNALIGNED and its uses. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 6 years, 3 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/base/build_config.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.h
diff --git a/src/deoptimizer.h b/src/deoptimizer.h
index 5d401deedd6c8d9f06c15b7f9b61a3f352680176..602a21a0e20b199e7ca9a229b79c0be5be9c4783 100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -17,19 +17,17 @@ namespace internal {
static inline double read_double_value(Address p) {
-#ifdef V8_HOST_CAN_READ_UNALIGNED
- return Memory::double_at(p);
-#else // V8_HOST_CAN_READ_UNALIGNED
// Prevent gcc from using load-double (mips ldc1) on (possibly)
// non-64-bit aligned address.
+ // We assume that the address is 32-bit aligned.
+ DCHECK(IsAligned(reinterpret_cast<intptr_t>(p), kInt32Size));
union conversion {
double d;
uint32_t u[2];
} c;
- c.u[0] = *reinterpret_cast<uint32_t*>(p);
- c.u[1] = *reinterpret_cast<uint32_t*>(p + 4);
+ c.u[0] = Memory::uint32_at(p);
+ c.u[1] = Memory::uint32_at(p + 4);
return c.d;
-#endif // V8_HOST_CAN_READ_UNALIGNED
}
« no previous file with comments | « src/base/build_config.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698