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

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

Issue 17116006: Fix a crash when generating forward jumps to labels at very high assembly offsets (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | no next file » | 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 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 t.dst4 = 0; 1411 t.dst4 = 0;
1412 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 1412 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
1413 USE(dummy); 1413 USE(dummy);
1414 CHECK_EQ(0x12130304, t.dst0); 1414 CHECK_EQ(0x12130304, t.dst0);
1415 CHECK_EQ(0x01021213, t.dst1); 1415 CHECK_EQ(0x01021213, t.dst1);
1416 CHECK_EQ(0x00010003, t.dst2); 1416 CHECK_EQ(0x00010003, t.dst2);
1417 CHECK_EQ(0x00000003, t.dst3); 1417 CHECK_EQ(0x00000003, t.dst3);
1418 CHECK_EQ(0x11121313, t.dst4); 1418 CHECK_EQ(0x11121313, t.dst4);
1419 } 1419 }
1420 1420
1421
1422 TEST(17) {
1423 // Test generating labels at high addresses.
1424 // Should not assert.
1425 CcTest::InitializeVM();
1426 Isolate* isolate = Isolate::Current();
1427 HandleScope scope(isolate);
1428
1429 // Generate a code segment that will be longer than 2^24 bytes.
1430 Assembler assm(isolate, NULL, 0);
1431 for (size_t i = 0; i < 1 << 23 ; ++i) { // 2^23
1432 __ nop();
1433 }
1434
1435 Label target;
1436 __ b(eq, &target);
1437 __ bind(&target);
1438 __ nop();
1439 }
1440
1441
1421 #undef __ 1442 #undef __
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698