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

Unified Diff: test/cctest/compiler/test-simplified-lowering.cc

Issue 1182713004: MIPS: Fix unaligned double acces in cctest/test-simplified-lowering/RunAccessTests_float64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-simplified-lowering.cc
diff --git a/test/cctest/compiler/test-simplified-lowering.cc b/test/cctest/compiler/test-simplified-lowering.cc
index 1ef35598be60901ddd268f8625bb332344f6c3e4..09b4bc3114a0b0448139a35f7b010e5090407357 100644
--- a/test/cctest/compiler/test-simplified-lowering.cc
+++ b/test/cctest/compiler/test-simplified-lowering.cc
@@ -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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698