OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 __ jr(ra); | 59 __ jr(ra); |
60 __ nop(); | 60 __ nop(); |
61 | 61 |
62 CodeDesc desc; | 62 CodeDesc desc; |
63 assm.GetCode(&desc); | 63 assm.GetCode(&desc); |
64 Handle<Code> code = isolate->factory()->NewCode( | 64 Handle<Code> code = isolate->factory()->NewCode( |
65 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 65 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
66 F2 f = FUNCTION_CAST<F2>(code->entry()); | 66 F2 f = FUNCTION_CAST<F2>(code->entry()); |
67 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); | 67 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); |
68 ::printf("f() = %d\n", res); | 68 ::printf("f() = %d\n", res); |
69 CHECK_EQ(0xabc, res); | 69 CHECK_EQ(static_cast<int32_t>(0xabc), res); |
70 } | 70 } |
71 | 71 |
72 | 72 |
73 TEST(MIPS1) { | 73 TEST(MIPS1) { |
74 CcTest::InitializeVM(); | 74 CcTest::InitializeVM(); |
75 Isolate* isolate = CcTest::i_isolate(); | 75 Isolate* isolate = CcTest::i_isolate(); |
76 HandleScope scope(isolate); | 76 HandleScope scope(isolate); |
77 | 77 |
78 MacroAssembler assm(isolate, NULL, 0); | 78 MacroAssembler assm(isolate, NULL, 0); |
79 Label L, C; | 79 Label L, C; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 __ jr(ra); | 233 __ jr(ra); |
234 __ nop(); | 234 __ nop(); |
235 | 235 |
236 CodeDesc desc; | 236 CodeDesc desc; |
237 assm.GetCode(&desc); | 237 assm.GetCode(&desc); |
238 Handle<Code> code = isolate->factory()->NewCode( | 238 Handle<Code> code = isolate->factory()->NewCode( |
239 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 239 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
240 F2 f = FUNCTION_CAST<F2>(code->entry()); | 240 F2 f = FUNCTION_CAST<F2>(code->entry()); |
241 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); | 241 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); |
242 ::printf("f() = %d\n", res); | 242 ::printf("f() = %d\n", res); |
243 CHECK_EQ(0x31415926, res); | 243 CHECK_EQ(static_cast<int32_t>(0x31415926), res); |
244 } | 244 } |
245 | 245 |
246 | 246 |
247 TEST(MIPS3) { | 247 TEST(MIPS3) { |
248 // Test floating point instructions. | 248 // Test floating point instructions. |
249 CcTest::InitializeVM(); | 249 CcTest::InitializeVM(); |
250 Isolate* isolate = CcTest::i_isolate(); | 250 Isolate* isolate = CcTest::i_isolate(); |
251 HandleScope scope(isolate); | 251 HandleScope scope(isolate); |
252 | 252 |
253 typedef struct { | 253 typedef struct { |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 CodeDesc desc; | 516 CodeDesc desc; |
517 assm.GetCode(&desc); | 517 assm.GetCode(&desc); |
518 Handle<Code> code = isolate->factory()->NewCode( | 518 Handle<Code> code = isolate->factory()->NewCode( |
519 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 519 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
520 F3 f = FUNCTION_CAST<F3>(code->entry()); | 520 F3 f = FUNCTION_CAST<F3>(code->entry()); |
521 t.ui = 0x11223344; | 521 t.ui = 0x11223344; |
522 t.si = 0x99aabbcc; | 522 t.si = 0x99aabbcc; |
523 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 523 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
524 USE(dummy); | 524 USE(dummy); |
525 | 525 |
526 CHECK_EQ(0x11223344, t.r1); | 526 CHECK_EQ(static_cast<int32_t>(0x11223344), t.r1); |
527 #if __BYTE_ORDER == __LITTLE_ENDIAN | 527 #if __BYTE_ORDER == __LITTLE_ENDIAN |
528 CHECK_EQ(0x3344, t.r2); | 528 CHECK_EQ(static_cast<int32_t>(0x3344), t.r2); |
529 CHECK_EQ(0xffffbbcc, t.r3); | 529 CHECK_EQ(static_cast<int32_t>(0xffffbbcc), t.r3); |
530 CHECK_EQ(0x0000bbcc, t.r4); | 530 CHECK_EQ(static_cast<int32_t>(0x0000bbcc), t.r4); |
531 CHECK_EQ(0xffffffcc, t.r5); | 531 CHECK_EQ(static_cast<int32_t>(0xffffffcc), t.r5); |
532 CHECK_EQ(0x3333bbcc, t.r6); | 532 CHECK_EQ(static_cast<int32_t>(0x3333bbcc), t.r6); |
533 #elif __BYTE_ORDER == __BIG_ENDIAN | 533 #elif __BYTE_ORDER == __BIG_ENDIAN |
534 CHECK_EQ(0x1122, t.r2); | 534 CHECK_EQ(static_cast<int32_t>(0x1122), t.r2); |
535 CHECK_EQ(0xffff99aa, t.r3); | 535 CHECK_EQ(static_cast<int32_t>(0xffff99aa), t.r3); |
536 CHECK_EQ(0x000099aa, t.r4); | 536 CHECK_EQ(static_cast<int32_t>(0x000099aa), t.r4); |
537 CHECK_EQ(0xffffff99, t.r5); | 537 CHECK_EQ(static_cast<int32_t>(0xffffff99), t.r5); |
538 CHECK_EQ(0x99aa3333, t.r6); | 538 CHECK_EQ(static_cast<int32_t>(0x99aa3333), t.r6); |
539 #else | 539 #else |
540 #error Unknown endianness | 540 #error Unknown endianness |
541 #endif | 541 #endif |
542 } | 542 } |
543 | 543 |
544 | 544 |
545 TEST(MIPS7) { | 545 TEST(MIPS7) { |
546 // Test floating point compare and branch instructions. | 546 // Test floating point compare and branch instructions. |
547 CcTest::InitializeVM(); | 547 CcTest::InitializeVM(); |
548 Isolate* isolate = CcTest::i_isolate(); | 548 Isolate* isolate = CcTest::i_isolate(); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 __ nop(); | 703 __ nop(); |
704 | 704 |
705 CodeDesc desc; | 705 CodeDesc desc; |
706 assm.GetCode(&desc); | 706 assm.GetCode(&desc); |
707 Handle<Code> code = isolate->factory()->NewCode( | 707 Handle<Code> code = isolate->factory()->NewCode( |
708 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 708 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
709 F3 f = FUNCTION_CAST<F3>(code->entry()); | 709 F3 f = FUNCTION_CAST<F3>(code->entry()); |
710 t.input = 0x12345678; | 710 t.input = 0x12345678; |
711 Object* dummy = CALL_GENERATED_CODE(f, &t, 0x0, 0, 0, 0); | 711 Object* dummy = CALL_GENERATED_CODE(f, &t, 0x0, 0, 0, 0); |
712 USE(dummy); | 712 USE(dummy); |
713 CHECK_EQ(0x81234567, t.result_rotr_4); | 713 CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotr_4); |
714 CHECK_EQ(0x78123456, t.result_rotr_8); | 714 CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotr_8); |
715 CHECK_EQ(0x67812345, t.result_rotr_12); | 715 CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotr_12); |
716 CHECK_EQ(0x56781234, t.result_rotr_16); | 716 CHECK_EQ(static_cast<int32_t>(0x56781234), t.result_rotr_16); |
717 CHECK_EQ(0x45678123, t.result_rotr_20); | 717 CHECK_EQ(static_cast<int32_t>(0x45678123), t.result_rotr_20); |
718 CHECK_EQ(0x34567812, t.result_rotr_24); | 718 CHECK_EQ(static_cast<int32_t>(0x34567812), t.result_rotr_24); |
719 CHECK_EQ(0x23456781, t.result_rotr_28); | 719 CHECK_EQ(static_cast<int32_t>(0x23456781), t.result_rotr_28); |
720 | 720 |
721 CHECK_EQ(0x81234567, t.result_rotrv_4); | 721 CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotrv_4); |
722 CHECK_EQ(0x78123456, t.result_rotrv_8); | 722 CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotrv_8); |
723 CHECK_EQ(0x67812345, t.result_rotrv_12); | 723 CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotrv_12); |
724 CHECK_EQ(0x56781234, t.result_rotrv_16); | 724 CHECK_EQ(static_cast<int32_t>(0x56781234), t.result_rotrv_16); |
725 CHECK_EQ(0x45678123, t.result_rotrv_20); | 725 CHECK_EQ(static_cast<int32_t>(0x45678123), t.result_rotrv_20); |
726 CHECK_EQ(0x34567812, t.result_rotrv_24); | 726 CHECK_EQ(static_cast<int32_t>(0x34567812), t.result_rotrv_24); |
727 CHECK_EQ(0x23456781, t.result_rotrv_28); | 727 CHECK_EQ(static_cast<int32_t>(0x23456781), t.result_rotrv_28); |
728 } | 728 } |
729 | 729 |
730 | 730 |
731 TEST(MIPS9) { | 731 TEST(MIPS9) { |
732 // Test BRANCH improvements. | 732 // Test BRANCH improvements. |
733 CcTest::InitializeVM(); | 733 CcTest::InitializeVM(); |
734 Isolate* isolate = CcTest::i_isolate(); | 734 Isolate* isolate = CcTest::i_isolate(); |
735 HandleScope scope(isolate); | 735 HandleScope scope(isolate); |
736 | 736 |
737 MacroAssembler assm(isolate, NULL, 0); | 737 MacroAssembler assm(isolate, NULL, 0); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 CodeDesc desc; | 802 CodeDesc desc; |
803 assm.GetCode(&desc); | 803 assm.GetCode(&desc); |
804 Handle<Code> code = isolate->factory()->NewCode( | 804 Handle<Code> code = isolate->factory()->NewCode( |
805 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 805 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
806 F3 f = FUNCTION_CAST<F3>(code->entry()); | 806 F3 f = FUNCTION_CAST<F3>(code->entry()); |
807 t.a = 2.147483646e+09; // 0x7FFFFFFE -> 0xFF80000041DFFFFF as double. | 807 t.a = 2.147483646e+09; // 0x7FFFFFFE -> 0xFF80000041DFFFFF as double. |
808 t.b_word = 0x0ff00ff0; // 0x0FF00FF0 -> 0x as double. | 808 t.b_word = 0x0ff00ff0; // 0x0FF00FF0 -> 0x as double. |
809 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 809 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
810 USE(dummy); | 810 USE(dummy); |
811 | 811 |
812 CHECK_EQ(0x41DFFFFF, t.dbl_exp); | 812 CHECK_EQ(static_cast<int32_t>(0x41DFFFFF), t.dbl_exp); |
813 CHECK_EQ(0xFF800000, t.dbl_mant); | 813 CHECK_EQ(static_cast<int32_t>(0xFF800000), t.dbl_mant); |
814 CHECK_EQ(0X7FFFFFFE, t.word); | 814 CHECK_EQ(static_cast<int32_t>(0x7FFFFFFE), t.word); |
815 // 0x0FF00FF0 -> 2.6739096+e08 | 815 // 0x0FF00FF0 -> 2.6739096+e08 |
816 CHECK_EQ(2.6739096e08, t.b); | 816 CHECK_EQ(2.6739096e08, t.b); |
817 } | 817 } |
818 | 818 |
819 | 819 |
820 TEST(MIPS11) { | 820 TEST(MIPS11) { |
821 // Do not run test on MIPS32r6, as these instructions are removed. | 821 // Do not run test on MIPS32r6, as these instructions are removed. |
822 if (IsMipsArchVariant(kMips32r6)) return; | 822 if (IsMipsArchVariant(kMips32r6)) return; |
823 // Test LWL, LWR, SWL and SWR instructions. | 823 // Test LWL, LWR, SWL and SWR instructions. |
824 CcTest::InitializeVM(); | 824 CcTest::InitializeVM(); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 Handle<Code> code = isolate->factory()->NewCode( | 933 Handle<Code> code = isolate->factory()->NewCode( |
934 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 934 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
935 F3 f = FUNCTION_CAST<F3>(code->entry()); | 935 F3 f = FUNCTION_CAST<F3>(code->entry()); |
936 t.reg_init = 0xaabbccdd; | 936 t.reg_init = 0xaabbccdd; |
937 t.mem_init = 0x11223344; | 937 t.mem_init = 0x11223344; |
938 | 938 |
939 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 939 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
940 USE(dummy); | 940 USE(dummy); |
941 | 941 |
942 #if __BYTE_ORDER == __LITTLE_ENDIAN | 942 #if __BYTE_ORDER == __LITTLE_ENDIAN |
943 CHECK_EQ(0x44bbccdd, t.lwl_0); | 943 CHECK_EQ(static_cast<int32_t>(0x44bbccdd), t.lwl_0); |
944 CHECK_EQ(0x3344ccdd, t.lwl_1); | 944 CHECK_EQ(static_cast<int32_t>(0x3344ccdd), t.lwl_1); |
945 CHECK_EQ(0x223344dd, t.lwl_2); | 945 CHECK_EQ(static_cast<int32_t>(0x223344dd), t.lwl_2); |
946 CHECK_EQ(0x11223344, t.lwl_3); | 946 CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwl_3); |
947 | 947 |
948 CHECK_EQ(0x11223344, t.lwr_0); | 948 CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwr_0); |
949 CHECK_EQ(0xaa112233, t.lwr_1); | 949 CHECK_EQ(static_cast<int32_t>(0xaa112233), t.lwr_1); |
950 CHECK_EQ(0xaabb1122, t.lwr_2); | 950 CHECK_EQ(static_cast<int32_t>(0xaabb1122), t.lwr_2); |
951 CHECK_EQ(0xaabbcc11, t.lwr_3); | 951 CHECK_EQ(static_cast<int32_t>(0xaabbcc11), t.lwr_3); |
952 | 952 |
953 CHECK_EQ(0x112233aa, t.swl_0); | 953 CHECK_EQ(static_cast<int32_t>(0x112233aa), t.swl_0); |
954 CHECK_EQ(0x1122aabb, t.swl_1); | 954 CHECK_EQ(static_cast<int32_t>(0x1122aabb), t.swl_1); |
955 CHECK_EQ(0x11aabbcc, t.swl_2); | 955 CHECK_EQ(static_cast<int32_t>(0x11aabbcc), t.swl_2); |
956 CHECK_EQ(0xaabbccdd, t.swl_3); | 956 CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swl_3); |
957 | 957 |
958 CHECK_EQ(0xaabbccdd, t.swr_0); | 958 CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swr_0); |
959 CHECK_EQ(0xbbccdd44, t.swr_1); | 959 CHECK_EQ(static_cast<int32_t>(0xbbccdd44), t.swr_1); |
960 CHECK_EQ(0xccdd3344, t.swr_2); | 960 CHECK_EQ(static_cast<int32_t>(0xccdd3344), t.swr_2); |
961 CHECK_EQ(0xdd223344, t.swr_3); | 961 CHECK_EQ(static_cast<int32_t>(0xdd223344), t.swr_3); |
962 #elif __BYTE_ORDER == __BIG_ENDIAN | 962 #elif __BYTE_ORDER == __BIG_ENDIAN |
963 CHECK_EQ(0x11223344, t.lwl_0); | 963 11223344, t.lwl_0); |
964 CHECK_EQ(0x223344dd, t.lwl_1); | 964 CHECK_EQ(static_cast<int32_t>(0x223344dd), t.lwl_1); |
965 CHECK_EQ(0x3344ccdd, t.lwl_2); | 965 CHECK_EQ(static_cast<int32_t>(0x3344ccdd), t.lwl_2); |
966 CHECK_EQ(0x44bbccdd, t.lwl_3); | 966 CHECK_EQ(static_cast<int32_t>(0x44bbccdd), t.lwl_3); |
967 | 967 |
968 CHECK_EQ(0xaabbcc11, t.lwr_0); | 968 CHECK_EQ(static_cast<int32_t>(0xaabbcc11), t.lwr_0); |
969 CHECK_EQ(0xaabb1122, t.lwr_1); | 969 CHECK_EQ(static_cast<int32_t>(0xaabb1122), t.lwr_1); |
970 CHECK_EQ(0xaa112233, t.lwr_2); | 970 CHECK_EQ(static_cast<int32_t>(0xaa112233), t.lwr_2); |
971 CHECK_EQ(0x11223344, t.lwr_3); | 971 CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwr_3); |
972 | 972 |
973 CHECK_EQ(0xaabbccdd, t.swl_0); | 973 CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swl_0); |
974 CHECK_EQ(0x11aabbcc, t.swl_1); | 974 CHECK_EQ(static_cast<int32_t>(0x11aabbcc), t.swl_1); |
975 CHECK_EQ(0x1122aabb, t.swl_2); | 975 CHECK_EQ(static_cast<int32_t>(0x1122aabb), t.swl_2); |
976 CHECK_EQ(0x112233aa, t.swl_3); | 976 CHECK_EQ(static_cast<int32_t>(0x112233aa), t.swl_3); |
977 | 977 |
978 CHECK_EQ(0xdd223344, t.swr_0); | 978 CHECK_EQ(static_cast<int32_t>(0xdd223344), t.swr_0); |
979 CHECK_EQ(0xccdd3344, t.swr_1); | 979 CHECK_EQ(static_cast<int32_t>(0xccdd3344), t.swr_1); |
980 CHECK_EQ(0xbbccdd44, t.swr_2); | 980 CHECK_EQ(static_cast<int32_t>(0xbbccdd44), t.swr_2); |
981 CHECK_EQ(0xaabbccdd, t.swr_3); | 981 CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swr_3); |
982 #else | 982 #else |
983 #error Unknown endianness | 983 #error Unknown endianness |
984 #endif | 984 #endif |
985 } | 985 } |
986 | 986 |
987 | 987 |
988 TEST(MIPS12) { | 988 TEST(MIPS12) { |
989 CcTest::InitializeVM(); | 989 CcTest::InitializeVM(); |
990 Isolate* isolate = CcTest::i_isolate(); | 990 Isolate* isolate = CcTest::i_isolate(); |
991 HandleScope scope(isolate); | 991 HandleScope scope(isolate); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 t.neg_round_down_in = -123.49; | 1238 t.neg_round_down_in = -123.49; |
1239 t.err1_in = 123.51; | 1239 t.err1_in = 123.51; |
1240 t.err2_in = 1; | 1240 t.err2_in = 1; |
1241 t.err3_in = static_cast<double>(1) + 0xFFFFFFFF; | 1241 t.err3_in = static_cast<double>(1) + 0xFFFFFFFF; |
1242 t.err4_in = NAN; | 1242 t.err4_in = NAN; |
1243 | 1243 |
1244 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 1244 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
1245 USE(dummy); | 1245 USE(dummy); |
1246 | 1246 |
1247 #define GET_FPU_ERR(x) (static_cast<int>(x & kFCSRFlagMask)) | 1247 #define GET_FPU_ERR(x) (static_cast<int>(x & kFCSRFlagMask)) |
1248 #define CHECK_ROUND_RESULT(type) \ | 1248 #define CHECK_ROUND_RESULT(type) \ |
1249 CHECK(GET_FPU_ERR(t.type##_err1_out) & kFCSRInexactFlagMask); \ | 1249 CHECK(GET_FPU_ERR(t.type##_err1_out) & kFCSRInexactFlagMask); \ |
1250 CHECK_EQ(0, GET_FPU_ERR(t.type##_err2_out)); \ | 1250 CHECK_EQ(0, GET_FPU_ERR(t.type##_err2_out)); \ |
1251 CHECK(GET_FPU_ERR(t.type##_err3_out) & kFCSRInvalidOpFlagMask); \ | 1251 CHECK(GET_FPU_ERR(t.type##_err3_out) & kFCSRInvalidOpFlagMask); \ |
1252 CHECK(GET_FPU_ERR(t.type##_err4_out) & kFCSRInvalidOpFlagMask); \ | 1252 CHECK(GET_FPU_ERR(t.type##_err4_out) & kFCSRInvalidOpFlagMask); \ |
1253 CHECK_EQ(kFPUInvalidResult, t.type##_invalid_result); | 1253 CHECK_EQ(kFPUInvalidResult, static_cast<uint>(t.type##_invalid_result)); |
1254 | 1254 |
1255 CHECK_ROUND_RESULT(round); | 1255 CHECK_ROUND_RESULT(round); |
1256 CHECK_ROUND_RESULT(floor); | 1256 CHECK_ROUND_RESULT(floor); |
1257 CHECK_ROUND_RESULT(ceil); | 1257 CHECK_ROUND_RESULT(ceil); |
1258 CHECK_ROUND_RESULT(cvt); | 1258 CHECK_ROUND_RESULT(cvt); |
1259 } | 1259 } |
1260 | 1260 |
1261 | 1261 |
1262 TEST(MIPS15) { | 1262 TEST(MIPS15) { |
1263 // Test chaining of label usages within instructions (issue 1644). | 1263 // Test chaining of label usages within instructions (issue 1644). |
1264 CcTest::InitializeVM(); | 1264 CcTest::InitializeVM(); |
1265 Isolate* isolate = CcTest::i_isolate(); | 1265 Isolate* isolate = CcTest::i_isolate(); |
1266 HandleScope scope(isolate); | 1266 HandleScope scope(isolate); |
1267 Assembler assm(isolate, NULL, 0); | 1267 Assembler assm(isolate, NULL, 0); |
1268 | 1268 |
1269 Label target; | 1269 Label target; |
1270 __ beq(v0, v1, &target); | 1270 __ beq(v0, v1, &target); |
1271 __ nop(); | 1271 __ nop(); |
1272 __ bne(v0, v1, &target); | 1272 __ bne(v0, v1, &target); |
1273 __ nop(); | 1273 __ nop(); |
1274 __ bind(&target); | 1274 __ bind(&target); |
1275 __ nop(); | 1275 __ nop(); |
1276 } | 1276 } |
1277 | 1277 |
1278 #undef __ | 1278 #undef __ |
OLD | NEW |