Changeset 216058 in webkit for trunk/Source/JavaScriptCore/b3/testb3.cpp
- Timestamp:
- May 1, 2017, 9:32:08 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/b3/testb3.cpp
r215908 r216058 10426 10426 10427 10427 CHECK(compileAndRun<float>(proc) == functionWithHellaFloatArguments(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26)); 10428 } 10429 10430 void testLinearScanWithCalleeOnStack() 10431 { 10432 // This tests proper CCall generation when compiling with a lower optimization 10433 // level and operating with a callee argument that's spilt on the stack. 10434 // On ARM64, this caused an assert in MacroAssemblerARM64 because of disallowed 10435 // use of the scratch register. 10436 // https://bugs.webkit.org/show_bug.cgi?id=170672 10437 10438 Procedure proc; 10439 BasicBlock* root = proc.addBlock(); 10440 10441 root->appendNewControlValue( 10442 proc, Return, Origin(), 10443 root->appendNew<CCallValue>( 10444 proc, Int32, Origin(), 10445 root->appendNew<ConstPtrValue>(proc, Origin(), bitwise_cast<void*>(simpleFunction)), 10446 root->appendNew<ArgumentRegValue>(proc, Origin(), GPRInfo::argumentGPR0), 10447 root->appendNew<ArgumentRegValue>(proc, Origin(), GPRInfo::argumentGPR1))); 10448 10449 // Force the linear scan algorithm to spill everything. 10450 auto original = Options::airLinearScanSpillsEverything(); 10451 Options::airLinearScanSpillsEverything() = true; 10452 10453 // Compiling with 1 as the optimization level enforces the use of linear scan 10454 // for register allocation. 10455 auto code = compileProc(proc, 1); 10456 CHECK_EQ(invoke<int>(*code, 41, 1), 42); 10457 10458 Options::airLinearScanSpillsEverything() = original; 10428 10459 } 10429 10460 … … 16319 16350 RUN_BINARY(testCallSimpleFloat, floatingPointOperands<float>(), floatingPointOperands<float>()); 16320 16351 RUN(testCallFunctionWithHellaFloatArguments()); 16352 16353 RUN(testLinearScanWithCalleeOnStack()); 16321 16354 16322 16355 RUN(testChillDiv(4, 2, 2));
Note:
See TracChangeset
for help on using the changeset viewer.