Chromium Code Reviews| 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 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1402 t.dst4 = 0; | 1402 t.dst4 = 0; |
| 1403 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 1403 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
| 1404 USE(dummy); | 1404 USE(dummy); |
| 1405 CHECK_EQ(0x12130304, t.dst0); | 1405 CHECK_EQ(0x12130304, t.dst0); |
| 1406 CHECK_EQ(0x01021213, t.dst1); | 1406 CHECK_EQ(0x01021213, t.dst1); |
| 1407 CHECK_EQ(0x00010003, t.dst2); | 1407 CHECK_EQ(0x00010003, t.dst2); |
| 1408 CHECK_EQ(0x00000003, t.dst3); | 1408 CHECK_EQ(0x00000003, t.dst3); |
| 1409 CHECK_EQ(0x11121313, t.dst4); | 1409 CHECK_EQ(0x11121313, t.dst4); |
| 1410 } | 1410 } |
| 1411 | 1411 |
| 1412 | |
| 1413 TEST(17) { | |
| 1414 // Test generating labels at high addresses. | |
| 1415 // Should not assert. | |
| 1416 CcTest::InitializeVM(); | |
| 1417 Isolate* isolate = Isolate::Current(); | |
| 1418 HandleScope scope(isolate); | |
| 1419 | |
| 1420 // Generate a code segment that will be longer than 2^24 bytes. | |
| 1421 Assembler assm(isolate, NULL, 0); | |
| 1422 for (size_t i = 0; i < 8388608; ++i) { // 2^23 | |
|
Benedikt Meurer
2013/07/31 11:35:55
nit: use 1 << 23 instead of 8388608.
Kimmo Kinnunen
2013/08/01 06:06:53
Done.
| |
| 1423 __ nop(); | |
| 1424 } | |
| 1425 | |
| 1426 Label target; | |
| 1427 __ b(eq, &target); | |
| 1428 __ bind(&target); | |
| 1429 __ nop(); | |
| 1430 } | |
| 1431 | |
| 1432 | |
| 1412 #undef __ | 1433 #undef __ |
| OLD | NEW |