Index: test/cctest/test-assembler-mips.cc |
diff --git a/test/cctest/test-assembler-mips.cc b/test/cctest/test-assembler-mips.cc |
index 534c4cf0ae0bf5bf989dbe00bc2d93b046720504..3c5fc6924c83e2c4adfca334c7c080cb071b877b 100644 |
--- a/test/cctest/test-assembler-mips.cc |
+++ b/test/cctest/test-assembler-mips.cc |
@@ -533,11 +533,21 @@ TEST(MIPS6) { |
USE(dummy); |
CHECK_EQ(0x11223344, t.r1); |
+#if __BYTE_ORDER == __LITTLE_ENDIAN |
CHECK_EQ(0x3344, t.r2); |
CHECK_EQ(0xffffbbcc, t.r3); |
CHECK_EQ(0x0000bbcc, t.r4); |
CHECK_EQ(0xffffffcc, t.r5); |
CHECK_EQ(0x3333bbcc, t.r6); |
+#elif __BYTE_ORDER == __BIG_ENDIAN |
+ CHECK_EQ(0x1122, t.r2); |
+ CHECK_EQ(0xffff99aa, t.r3); |
+ CHECK_EQ(0x000099aa, t.r4); |
+ CHECK_EQ(0xffffff99, t.r5); |
+ CHECK_EQ(0x99aa3333, t.r6); |
+#else |
+#error Unknown endianness |
+#endif |
} |
@@ -942,6 +952,7 @@ TEST(MIPS11) { |
Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
USE(dummy); |
+#if __BYTE_ORDER == __LITTLE_ENDIAN |
CHECK_EQ(0x44bbccdd, t.lwl_0); |
CHECK_EQ(0x3344ccdd, t.lwl_1); |
CHECK_EQ(0x223344dd, t.lwl_2); |
@@ -961,6 +972,29 @@ TEST(MIPS11) { |
CHECK_EQ(0xbbccdd44, t.swr_1); |
CHECK_EQ(0xccdd3344, t.swr_2); |
CHECK_EQ(0xdd223344, t.swr_3); |
+#elif __BYTE_ORDER == __BIG_ENDIAN |
+ CHECK_EQ(0x11223344, t.lwl_0); |
+ CHECK_EQ(0x223344dd, t.lwl_1); |
+ CHECK_EQ(0x3344ccdd, t.lwl_2); |
+ CHECK_EQ(0x44bbccdd, t.lwl_3); |
+ |
+ CHECK_EQ(0xaabbcc11, t.lwr_0); |
+ CHECK_EQ(0xaabb1122, t.lwr_1); |
+ CHECK_EQ(0xaa112233, t.lwr_2); |
+ CHECK_EQ(0x11223344, t.lwr_3); |
+ |
+ CHECK_EQ(0xaabbccdd, t.swl_0); |
+ CHECK_EQ(0x11aabbcc, t.swl_1); |
+ CHECK_EQ(0x1122aabb, t.swl_2); |
+ CHECK_EQ(0x112233aa, t.swl_3); |
+ |
+ CHECK_EQ(0xdd223344, t.swr_0); |
+ CHECK_EQ(0xccdd3344, t.swr_1); |
+ CHECK_EQ(0xbbccdd44, t.swr_2); |
+ CHECK_EQ(0xaabbccdd, t.swr_3); |
+#else |
+#error Unknown endianness |
+#endif |
} |