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

Unified Diff: test/cctest/test-assembler-mips64.cc

Issue 1334793004: MIPS64: Add big-endian support for mips64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase ToT. Created 5 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 | « test/cctest/cctest.status ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-mips64.cc
diff --git a/test/cctest/test-assembler-mips64.cc b/test/cctest/test-assembler-mips64.cc
index 90e31d45b25e3f1a55ba81a67c271fed14441f67..ee6755f2591fed59193b433ad14acb24d0c99568 100644
--- a/test/cctest/test-assembler-mips64.cc
+++ b/test/cctest/test-assembler-mips64.cc
@@ -590,11 +590,19 @@ TEST(MIPS6) {
USE(dummy);
CHECK_EQ(static_cast<int32_t>(0x11223344), t.r1);
- CHECK_EQ(static_cast<int32_t>(0x3344), t.r2);
- CHECK_EQ(static_cast<int32_t>(0xffffbbcc), t.r3);
- CHECK_EQ(static_cast<int32_t>(0x0000bbcc), t.r4);
- CHECK_EQ(static_cast<int32_t>(0xffffffcc), t.r5);
- CHECK_EQ(static_cast<int32_t>(0x3333bbcc), t.r6);
+ if (kArchEndian == kLittle) {
+ CHECK_EQ(static_cast<int32_t>(0x3344), t.r2);
+ CHECK_EQ(static_cast<int32_t>(0xffffbbcc), t.r3);
+ CHECK_EQ(static_cast<int32_t>(0x0000bbcc), t.r4);
+ CHECK_EQ(static_cast<int32_t>(0xffffffcc), t.r5);
+ CHECK_EQ(static_cast<int32_t>(0x3333bbcc), t.r6);
+ } else {
+ CHECK_EQ(static_cast<int32_t>(0x1122), t.r2);
+ CHECK_EQ(static_cast<int32_t>(0xffff99aa), t.r3);
+ CHECK_EQ(static_cast<int32_t>(0x000099aa), t.r4);
+ CHECK_EQ(static_cast<int32_t>(0xffffff99), t.r5);
+ CHECK_EQ(static_cast<int32_t>(0x99aa3333), t.r6);
+ }
}
@@ -1026,25 +1034,47 @@ TEST(MIPS11) {
Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
USE(dummy);
- CHECK_EQ(static_cast<int32_t>(0x44bbccdd), t.lwl_0);
- CHECK_EQ(static_cast<int32_t>(0x3344ccdd), t.lwl_1);
- CHECK_EQ(static_cast<int32_t>(0x223344dd), t.lwl_2);
- CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwl_3);
-
- CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwr_0);
- CHECK_EQ(static_cast<int32_t>(0xaa112233), t.lwr_1);
- CHECK_EQ(static_cast<int32_t>(0xaabb1122), t.lwr_2);
- CHECK_EQ(static_cast<int32_t>(0xaabbcc11), t.lwr_3);
-
- CHECK_EQ(static_cast<int32_t>(0x112233aa), t.swl_0);
- CHECK_EQ(static_cast<int32_t>(0x1122aabb), t.swl_1);
- CHECK_EQ(static_cast<int32_t>(0x11aabbcc), t.swl_2);
- CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swl_3);
-
- CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swr_0);
- CHECK_EQ(static_cast<int32_t>(0xbbccdd44), t.swr_1);
- CHECK_EQ(static_cast<int32_t>(0xccdd3344), t.swr_2);
- CHECK_EQ(static_cast<int32_t>(0xdd223344), t.swr_3);
+ if (kArchEndian == kLittle) {
+ CHECK_EQ(static_cast<int32_t>(0x44bbccdd), t.lwl_0);
+ CHECK_EQ(static_cast<int32_t>(0x3344ccdd), t.lwl_1);
+ CHECK_EQ(static_cast<int32_t>(0x223344dd), t.lwl_2);
+ CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwl_3);
+
+ CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwr_0);
+ CHECK_EQ(static_cast<int32_t>(0xaa112233), t.lwr_1);
+ CHECK_EQ(static_cast<int32_t>(0xaabb1122), t.lwr_2);
+ CHECK_EQ(static_cast<int32_t>(0xaabbcc11), t.lwr_3);
+
+ CHECK_EQ(static_cast<int32_t>(0x112233aa), t.swl_0);
+ CHECK_EQ(static_cast<int32_t>(0x1122aabb), t.swl_1);
+ CHECK_EQ(static_cast<int32_t>(0x11aabbcc), t.swl_2);
+ CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swl_3);
+
+ CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swr_0);
+ CHECK_EQ(static_cast<int32_t>(0xbbccdd44), t.swr_1);
+ CHECK_EQ(static_cast<int32_t>(0xccdd3344), t.swr_2);
+ CHECK_EQ(static_cast<int32_t>(0xdd223344), t.swr_3);
+ } else {
+ CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwl_0);
+ CHECK_EQ(static_cast<int32_t>(0x223344dd), t.lwl_1);
+ CHECK_EQ(static_cast<int32_t>(0x3344ccdd), t.lwl_2);
+ CHECK_EQ(static_cast<int32_t>(0x44bbccdd), t.lwl_3);
+
+ CHECK_EQ(static_cast<int32_t>(0xaabbcc11), t.lwr_0);
+ CHECK_EQ(static_cast<int32_t>(0xaabb1122), t.lwr_1);
+ CHECK_EQ(static_cast<int32_t>(0xaa112233), t.lwr_2);
+ CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwr_3);
+
+ CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swl_0);
+ CHECK_EQ(static_cast<int32_t>(0x11aabbcc), t.swl_1);
+ CHECK_EQ(static_cast<int32_t>(0x1122aabb), t.swl_2);
+ CHECK_EQ(static_cast<int32_t>(0x112233aa), t.swl_3);
+
+ CHECK_EQ(static_cast<int32_t>(0xdd223344), t.swr_0);
+ CHECK_EQ(static_cast<int32_t>(0xccdd3344), t.swr_1);
+ CHECK_EQ(static_cast<int32_t>(0xbbccdd44), t.swr_2);
+ CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swr_3);
+ }
}
}
« no previous file with comments | « test/cctest/cctest.status ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698