Index: test/cctest/test-assembler-mips.cc |
diff --git a/test/cctest/test-assembler-mips.cc b/test/cctest/test-assembler-mips.cc |
index 74dcc3a0a2aeeaa243c768943c811d447802efd4..4809387c0511b2c026b8742346791713c5f4ea2f 100644 |
--- a/test/cctest/test-assembler-mips.cc |
+++ b/test/cctest/test-assembler-mips.cc |
@@ -66,7 +66,7 @@ TEST(MIPS0) { |
F2 f = FUNCTION_CAST<F2>(code->entry()); |
int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); |
::printf("f() = %d\n", res); |
- CHECK_EQ(0xabc, res); |
+ CHECK_EQ(static_cast<int32_t>(0xabc), res); |
} |
@@ -240,7 +240,7 @@ TEST(MIPS2) { |
F2 f = FUNCTION_CAST<F2>(code->entry()); |
int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); |
::printf("f() = %d\n", res); |
- CHECK_EQ(0x31415926, res); |
+ CHECK_EQ(static_cast<int32_t>(0x31415926), res); |
} |
@@ -523,19 +523,19 @@ TEST(MIPS6) { |
Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
USE(dummy); |
- CHECK_EQ(0x11223344, t.r1); |
+ CHECK_EQ(static_cast<int32_t>(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); |
+ 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); |
#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); |
+ 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); |
#else |
#error Unknown endianness |
#endif |
@@ -710,21 +710,21 @@ TEST(MIPS8) { |
t.input = 0x12345678; |
Object* dummy = CALL_GENERATED_CODE(f, &t, 0x0, 0, 0, 0); |
USE(dummy); |
- CHECK_EQ(0x81234567, t.result_rotr_4); |
- CHECK_EQ(0x78123456, t.result_rotr_8); |
- CHECK_EQ(0x67812345, t.result_rotr_12); |
- CHECK_EQ(0x56781234, t.result_rotr_16); |
- CHECK_EQ(0x45678123, t.result_rotr_20); |
- CHECK_EQ(0x34567812, t.result_rotr_24); |
- CHECK_EQ(0x23456781, t.result_rotr_28); |
- |
- CHECK_EQ(0x81234567, t.result_rotrv_4); |
- CHECK_EQ(0x78123456, t.result_rotrv_8); |
- CHECK_EQ(0x67812345, t.result_rotrv_12); |
- CHECK_EQ(0x56781234, t.result_rotrv_16); |
- CHECK_EQ(0x45678123, t.result_rotrv_20); |
- CHECK_EQ(0x34567812, t.result_rotrv_24); |
- CHECK_EQ(0x23456781, t.result_rotrv_28); |
+ CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotr_4); |
+ CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotr_8); |
+ CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotr_12); |
+ CHECK_EQ(static_cast<int32_t>(0x56781234), t.result_rotr_16); |
+ CHECK_EQ(static_cast<int32_t>(0x45678123), t.result_rotr_20); |
+ CHECK_EQ(static_cast<int32_t>(0x34567812), t.result_rotr_24); |
+ CHECK_EQ(static_cast<int32_t>(0x23456781), t.result_rotr_28); |
+ |
+ CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotrv_4); |
+ CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotrv_8); |
+ CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotrv_12); |
+ CHECK_EQ(static_cast<int32_t>(0x56781234), t.result_rotrv_16); |
+ CHECK_EQ(static_cast<int32_t>(0x45678123), t.result_rotrv_20); |
+ CHECK_EQ(static_cast<int32_t>(0x34567812), t.result_rotrv_24); |
+ CHECK_EQ(static_cast<int32_t>(0x23456781), t.result_rotrv_28); |
} |
@@ -809,9 +809,9 @@ TEST(MIPS10) { |
Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
USE(dummy); |
- CHECK_EQ(0x41DFFFFF, t.dbl_exp); |
- CHECK_EQ(0xFF800000, t.dbl_mant); |
- CHECK_EQ(0X7FFFFFFE, t.word); |
+ CHECK_EQ(static_cast<int32_t>(0x41DFFFFF), t.dbl_exp); |
+ CHECK_EQ(static_cast<int32_t>(0xFF800000), t.dbl_mant); |
+ CHECK_EQ(static_cast<int32_t>(0x7FFFFFFE), t.word); |
// 0x0FF00FF0 -> 2.6739096+e08 |
CHECK_EQ(2.6739096e08, t.b); |
} |
@@ -940,45 +940,45 @@ TEST(MIPS11) { |
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); |
- CHECK_EQ(0x11223344, t.lwl_3); |
- |
- CHECK_EQ(0x11223344, t.lwr_0); |
- CHECK_EQ(0xaa112233, t.lwr_1); |
- CHECK_EQ(0xaabb1122, t.lwr_2); |
- CHECK_EQ(0xaabbcc11, t.lwr_3); |
- |
- CHECK_EQ(0x112233aa, t.swl_0); |
- CHECK_EQ(0x1122aabb, t.swl_1); |
- CHECK_EQ(0x11aabbcc, t.swl_2); |
- CHECK_EQ(0xaabbccdd, t.swl_3); |
- |
- CHECK_EQ(0xaabbccdd, t.swr_0); |
- CHECK_EQ(0xbbccdd44, t.swr_1); |
- CHECK_EQ(0xccdd3344, t.swr_2); |
- CHECK_EQ(0xdd223344, t.swr_3); |
+ 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); |
#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); |
+ 11223344, 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); |
#else |
#error Unknown endianness |
#endif |
@@ -1245,12 +1245,12 @@ TEST(MIPS14) { |
USE(dummy); |
#define GET_FPU_ERR(x) (static_cast<int>(x & kFCSRFlagMask)) |
-#define CHECK_ROUND_RESULT(type) \ |
- CHECK(GET_FPU_ERR(t.type##_err1_out) & kFCSRInexactFlagMask); \ |
- CHECK_EQ(0, GET_FPU_ERR(t.type##_err2_out)); \ |
+#define CHECK_ROUND_RESULT(type) \ |
+ CHECK(GET_FPU_ERR(t.type##_err1_out) & kFCSRInexactFlagMask); \ |
+ CHECK_EQ(0, GET_FPU_ERR(t.type##_err2_out)); \ |
CHECK(GET_FPU_ERR(t.type##_err3_out) & kFCSRInvalidOpFlagMask); \ |
CHECK(GET_FPU_ERR(t.type##_err4_out) & kFCSRInvalidOpFlagMask); \ |
- CHECK_EQ(kFPUInvalidResult, t.type##_invalid_result); |
+ CHECK_EQ(kFPUInvalidResult, static_cast<uint>(t.type##_invalid_result)); |
CHECK_ROUND_RESULT(round); |
CHECK_ROUND_RESULT(floor); |