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 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1346 // Tear down the internal frame and remove function, receiver and args. | 1346 // Tear down the internal frame and remove function, receiver and args. |
1347 } | 1347 } |
1348 __ add(sp, sp, Operand(3 * kPointerSize)); | 1348 __ add(sp, sp, Operand(3 * kPointerSize)); |
1349 __ Jump(lr); | 1349 __ Jump(lr); |
1350 } | 1350 } |
1351 | 1351 |
1352 | 1352 |
1353 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { | 1353 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
1354 __ SmiTag(r0); | 1354 __ SmiTag(r0); |
1355 __ mov(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 1355 __ mov(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
1356 __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | fp.bit() | lr.bit()); | 1356 __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | |
1357 (FLAG_enable_ool_constant_pool ? pp.bit() : 0) | | |
1358 fp.bit() | lr.bit()); | |
1357 __ add(fp, sp, | 1359 __ add(fp, sp, |
1358 Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); | 1360 Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); |
1359 } | 1361 } |
1360 | 1362 |
1361 | 1363 |
1362 static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) { | 1364 static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) { |
1363 // ----------- S t a t e ------------- | 1365 // ----------- S t a t e ------------- |
1364 // -- r0 : result being passed through | 1366 // -- r0 : result being passed through |
1365 // ----------------------------------- | 1367 // ----------------------------------- |
1366 // Get the number of arguments passed (as a smi), tear down the frame and | 1368 // Get the number of arguments passed (as a smi), tear down the frame and |
1367 // then tear down the parameters. | 1369 // then tear down the parameters. |
1368 __ ldr(r1, MemOperand(fp, -(StandardFrameConstants::kFixedFrameSizeFromFp + | 1370 __ ldr(r1, MemOperand(fp, -(StandardFrameConstants::kFixedFrameSizeFromFp + |
1369 kPointerSize))); | 1371 kPointerSize))); |
1370 __ mov(sp, fp); | 1372 __ mov(sp, fp); |
1371 __ ldm(ia_w, sp, fp.bit() | lr.bit()); | 1373 __ ldm(ia_w, sp, fp.bit() | lr.bit()); |
1372 __ add(sp, sp, Operand::PointerOffsetFromSmiKey(r1)); | 1374 __ add(sp, sp, Operand::PointerOffsetFromSmiKey(r1)); |
1373 __ add(sp, sp, Operand(kPointerSize)); // adjust for receiver | 1375 __ add(sp, sp, Operand(kPointerSize)); // adjust for receiver |
JF
2013/12/13 17:33:39
Does this adjust for ool constant properly?
rmcilroy
2013/12/16 14:56:21
The line above: __ mov(sp, fp) drops the ool point
| |
1374 } | 1376 } |
1375 | 1377 |
1376 | 1378 |
1377 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 1379 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
1378 // ----------- S t a t e ------------- | 1380 // ----------- S t a t e ------------- |
1379 // -- r0 : actual number of arguments | 1381 // -- r0 : actual number of arguments |
1380 // -- r1 : function (passed through to callee) | 1382 // -- r1 : function (passed through to callee) |
1381 // -- r2 : expected number of arguments | 1383 // -- r2 : expected number of arguments |
1382 // -- r3 : code entry to call | 1384 // -- r3 : code entry to call |
1383 // -- r5 : call kind information | 1385 // -- r5 : call kind information |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1482 __ bind(&dont_adapt_arguments); | 1484 __ bind(&dont_adapt_arguments); |
1483 __ Jump(r3); | 1485 __ Jump(r3); |
1484 } | 1486 } |
1485 | 1487 |
1486 | 1488 |
1487 #undef __ | 1489 #undef __ |
1488 | 1490 |
1489 } } // namespace v8::internal | 1491 } } // namespace v8::internal |
1490 | 1492 |
1491 #endif // V8_TARGET_ARCH_ARM | 1493 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |