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

Side by Side Diff: test/cctest/test-assembler-arm.cc

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CHECK_NULL/NOT_NULL is back. Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 Handle<Code> code = isolate->factory()->NewCode( 980 Handle<Code> code = isolate->factory()->NewCode(
981 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 981 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
982 #ifdef DEBUG 982 #ifdef DEBUG
983 OFStream os(stdout); 983 OFStream os(stdout);
984 code->Print(os); 984 code->Print(os);
985 #endif 985 #endif
986 F3 f = FUNCTION_CAST<F3>(code->entry()); 986 F3 f = FUNCTION_CAST<F3>(code->entry());
987 Object* dummy = CALL_GENERATED_CODE(f, &i, 0, 0, 0, 0); 987 Object* dummy = CALL_GENERATED_CODE(f, &i, 0, 0, 0, 0);
988 USE(dummy); 988 USE(dummy);
989 989
990 CHECK_EQ(0xabcd0001, i.a); 990 CHECK_EQ(static_cast<int32_t>(0xabcd0001), i.a);
991 CHECK_EQ(static_cast<int32_t>(0xabcd0000) >> 1, i.b); 991 CHECK_EQ(static_cast<int32_t>(0xabcd0000) >> 1, i.b);
992 CHECK_EQ(0x00000000, i.c); 992 CHECK_EQ(0x00000000, i.c);
993 CHECK_EQ(0xffffffff, i.d); 993 CHECK_EQ(static_cast<int32_t>(0xffffffff), i.d);
994 } 994 }
995 995
996 996
997 TEST(12) { 997 TEST(12) {
998 // Test chaining of label usages within instructions (issue 1644). 998 // Test chaining of label usages within instructions (issue 1644).
999 CcTest::InitializeVM(); 999 CcTest::InitializeVM();
1000 Isolate* isolate = CcTest::i_isolate(); 1000 Isolate* isolate = CcTest::i_isolate();
1001 HandleScope scope(isolate); 1001 HandleScope scope(isolate);
1002 1002
1003 Assembler assm(isolate, NULL, 0); 1003 Assembler assm(isolate, NULL, 0);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 USE(dummy); 1122 USE(dummy);
1123 CHECK_EQ(14.7610017472335499, t.a); 1123 CHECK_EQ(14.7610017472335499, t.a);
1124 CHECK_EQ(3.84200491244266251, t.b); 1124 CHECK_EQ(3.84200491244266251, t.b);
1125 CHECK_EQ(73.8818412254460241, t.c); 1125 CHECK_EQ(73.8818412254460241, t.c);
1126 CHECK_EQ(2.75, t.x); 1126 CHECK_EQ(2.75, t.x);
1127 CHECK_EQ(1.5, t.y); 1127 CHECK_EQ(1.5, t.y);
1128 CHECK_EQ(17.0, t.z); 1128 CHECK_EQ(17.0, t.z);
1129 CHECK_EQ(14.7610017472335499, t.i); 1129 CHECK_EQ(14.7610017472335499, t.i);
1130 CHECK_EQ(16.0, t.j); 1130 CHECK_EQ(16.0, t.j);
1131 CHECK_EQ(73.8818412254460241, t.k); 1131 CHECK_EQ(73.8818412254460241, t.k);
1132 CHECK_EQ(372106121, t.low); 1132 CHECK_EQ(372106121u, t.low);
1133 CHECK_EQ(1079146608, t.high); 1133 CHECK_EQ(1079146608u, t.high);
1134 } 1134 }
1135 } 1135 }
1136 1136
1137 1137
1138 TEST(14) { 1138 TEST(14) {
1139 // Test the VFP Canonicalized Nan mode. 1139 // Test the VFP Canonicalized Nan mode.
1140 CcTest::InitializeVM(); 1140 CcTest::InitializeVM();
1141 Isolate* isolate = CcTest::i_isolate(); 1141 Isolate* isolate = CcTest::i_isolate();
1142 HandleScope scope(isolate); 1142 HandleScope scope(isolate);
1143 1143
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 t.dstA0 = 0; 1314 t.dstA0 = 0;
1315 t.dstA1 = 0; 1315 t.dstA1 = 0;
1316 t.dstA2 = 0; 1316 t.dstA2 = 0;
1317 t.dstA3 = 0; 1317 t.dstA3 = 0;
1318 t.dstA4 = 0; 1318 t.dstA4 = 0;
1319 t.dstA5 = 0; 1319 t.dstA5 = 0;
1320 t.dstA6 = 0; 1320 t.dstA6 = 0;
1321 t.dstA7 = 0; 1321 t.dstA7 = 0;
1322 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 1322 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
1323 USE(dummy); 1323 USE(dummy);
1324 CHECK_EQ(0x01020304, t.dst0); 1324 CHECK_EQ(0x01020304u, t.dst0);
1325 CHECK_EQ(0x11121314, t.dst1); 1325 CHECK_EQ(0x11121314u, t.dst1);
1326 CHECK_EQ(0x21222324, t.dst2); 1326 CHECK_EQ(0x21222324u, t.dst2);
1327 CHECK_EQ(0x31323334, t.dst3); 1327 CHECK_EQ(0x31323334u, t.dst3);
1328 CHECK_EQ(0x41424344, t.dst4); 1328 CHECK_EQ(0x41424344u, t.dst4);
1329 CHECK_EQ(0x51525354, t.dst5); 1329 CHECK_EQ(0x51525354u, t.dst5);
1330 CHECK_EQ(0x61626364, t.dst6); 1330 CHECK_EQ(0x61626364u, t.dst6);
1331 CHECK_EQ(0x71727374, t.dst7); 1331 CHECK_EQ(0x71727374u, t.dst7);
1332 CHECK_EQ(0x00430044, t.dstA0); 1332 CHECK_EQ(0x00430044u, t.dstA0);
1333 CHECK_EQ(0x00410042, t.dstA1); 1333 CHECK_EQ(0x00410042u, t.dstA1);
1334 CHECK_EQ(0x00830084, t.dstA2); 1334 CHECK_EQ(0x00830084u, t.dstA2);
1335 CHECK_EQ(0x00810082, t.dstA3); 1335 CHECK_EQ(0x00810082u, t.dstA3);
1336 CHECK_EQ(0x00430044, t.dstA4); 1336 CHECK_EQ(0x00430044u, t.dstA4);
1337 CHECK_EQ(0x00410042, t.dstA5); 1337 CHECK_EQ(0x00410042u, t.dstA5);
1338 CHECK_EQ(0x00830084, t.dstA6); 1338 CHECK_EQ(0x00830084u, t.dstA6);
1339 CHECK_EQ(0x00810082, t.dstA7); 1339 CHECK_EQ(0x00810082u, t.dstA7);
1340 } 1340 }
1341 } 1341 }
1342 1342
1343 1343
1344 TEST(16) { 1344 TEST(16) {
1345 // Test the pkh, uxtb, uxtab and uxtb16 instructions. 1345 // Test the pkh, uxtb, uxtab and uxtb16 instructions.
1346 CcTest::InitializeVM(); 1346 CcTest::InitializeVM();
1347 Isolate* isolate = CcTest::i_isolate(); 1347 Isolate* isolate = CcTest::i_isolate();
1348 HandleScope scope(isolate); 1348 HandleScope scope(isolate);
1349 1349
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 t.src0 = 0x01020304; 1399 t.src0 = 0x01020304;
1400 t.src1 = 0x11121314; 1400 t.src1 = 0x11121314;
1401 t.src2 = 0x11121300; 1401 t.src2 = 0x11121300;
1402 t.dst0 = 0; 1402 t.dst0 = 0;
1403 t.dst1 = 0; 1403 t.dst1 = 0;
1404 t.dst2 = 0; 1404 t.dst2 = 0;
1405 t.dst3 = 0; 1405 t.dst3 = 0;
1406 t.dst4 = 0; 1406 t.dst4 = 0;
1407 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 1407 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
1408 USE(dummy); 1408 USE(dummy);
1409 CHECK_EQ(0x12130304, t.dst0); 1409 CHECK_EQ(0x12130304u, t.dst0);
1410 CHECK_EQ(0x01021213, t.dst1); 1410 CHECK_EQ(0x01021213u, t.dst1);
1411 CHECK_EQ(0x00010003, t.dst2); 1411 CHECK_EQ(0x00010003u, t.dst2);
1412 CHECK_EQ(0x00000003, t.dst3); 1412 CHECK_EQ(0x00000003u, t.dst3);
1413 CHECK_EQ(0x11121313, t.dst4); 1413 CHECK_EQ(0x11121313u, t.dst4);
1414 } 1414 }
1415 1415
1416 1416
1417 TEST(17) { 1417 TEST(17) {
1418 // Test generating labels at high addresses. 1418 // Test generating labels at high addresses.
1419 // Should not assert. 1419 // Should not assert.
1420 CcTest::InitializeVM(); 1420 CcTest::InitializeVM();
1421 Isolate* isolate = CcTest::i_isolate(); 1421 Isolate* isolate = CcTest::i_isolate();
1422 HandleScope scope(isolate); 1422 HandleScope scope(isolate);
1423 1423
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 CodeDesc desc; 1535 CodeDesc desc;
1536 assm.GetCode(&desc); 1536 assm.GetCode(&desc);
1537 Handle<Code> code = isolate->factory()->NewCode( 1537 Handle<Code> code = isolate->factory()->NewCode(
1538 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1538 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1539 #ifdef DEBUG 1539 #ifdef DEBUG
1540 OFStream os(stdout); 1540 OFStream os(stdout);
1541 code->Print(os); 1541 code->Print(os);
1542 #endif 1542 #endif
1543 F3 f = FUNCTION_CAST<F3>(code->entry()); 1543 F3 f = FUNCTION_CAST<F3>(code->entry());
1544 Object* dummy; 1544 Object* dummy;
1545 TEST_UDIV(0, 0, 0); 1545 TEST_UDIV(0u, 0, 0);
1546 TEST_UDIV(0, 1024, 0); 1546 TEST_UDIV(0u, 1024, 0);
1547 TEST_UDIV(5, 10, 2); 1547 TEST_UDIV(5u, 10, 2);
1548 TEST_UDIV(3, 10, 3); 1548 TEST_UDIV(3u, 10, 3);
1549 USE(dummy); 1549 USE(dummy);
1550 } 1550 }
1551 } 1551 }
1552 1552
1553 1553
1554 #undef TEST_UDIV 1554 #undef TEST_UDIV
1555 1555
1556 1556
1557 TEST(smmla) { 1557 TEST(smmla) {
1558 CcTest::InitializeVM(); 1558 CcTest::InitializeVM();
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 CHECK_VRINT(inf, inf, inf, inf, inf, inf) 1974 CHECK_VRINT(inf, inf, inf, inf, inf, inf)
1975 CHECK_VRINT(-inf, -inf, -inf, -inf, -inf, -inf) 1975 CHECK_VRINT(-inf, -inf, -inf, -inf, -inf, -inf)
1976 CHECK_VRINT(-0.0, -0.0, -0.0, -0.0, -0.0, -0.0) 1976 CHECK_VRINT(-0.0, -0.0, -0.0, -0.0, -0.0, -0.0)
1977 double nan = std::numeric_limits<double>::quiet_NaN(); 1977 double nan = std::numeric_limits<double>::quiet_NaN();
1978 CHECK_VRINT(nan, nan, nan, nan, nan, nan) 1978 CHECK_VRINT(nan, nan, nan, nan, nan, nan)
1979 1979
1980 #undef CHECK_VRINT 1980 #undef CHECK_VRINT
1981 } 1981 }
1982 } 1982 }
1983 #undef __ 1983 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698