Commit 734fd707 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Use memcpy to read double value in the deoptimizer.

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7cb82a76
...@@ -17,17 +17,9 @@ namespace internal { ...@@ -17,17 +17,9 @@ namespace internal {
static inline double read_double_value(Address p) { static inline double read_double_value(Address p) {
// 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; double d;
uint32_t u[2]; memcpy(&d, p, sizeof(d));
} c; return d;
c.u[0] = Memory::uint32_at(p);
c.u[1] = Memory::uint32_at(p + 4);
return c.d;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment