Commit ed01b6b0 authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS: Fix unaligned double access in cctest/test-simplified-lowering/RunAccessTests_float64.

TEST=cctest/test-simplified-lowering/RunAccessTests_float64
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29128}
parent e7d4bf87
......@@ -535,8 +535,7 @@ class AccessTester : public HandleAndZoneScope {
E GetElement(int index) {
BoundsCheck(index);
if (tagged) {
E* raw = reinterpret_cast<E*>(tagged_array->GetDataStartAddress());
return raw[index];
return GetTaggedElement(index);
} else {
return untagged_array[index];
}
......@@ -569,8 +568,19 @@ class AccessTester : public HandleAndZoneScope {
CHECK_LT(index, static_cast<int>(num_elements));
CHECK_EQ(static_cast<int>(ByteSize()), tagged_array->length());
}
E GetTaggedElement(int index) {
E* raw = reinterpret_cast<E*>(tagged_array->GetDataStartAddress());
return raw[index];
}
};
template <>
double AccessTester<double>::GetTaggedElement(int index) {
return ReadDoubleValue(tagged_array->GetDataStartAddress() +
index * sizeof(double));
}
template <typename E>
static void RunAccessTest(MachineType rep, E* original_elements, size_t num) {
......
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