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

Side by Side Diff: src/arm/builtins-arm.cc

Issue 24793002: Thumb2 Backend: Make arithmetic instructions set condition codes by default Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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-thumb32.cc ('k') | src/arm/code-stubs-arm.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 (c) 2013 Qualcomm Technologies, Inc. All Rights Reserved.
2 // Qualcomm Technologies Proprietary and Confidential.
3
1 // Copyright 2012 the V8 project authors. All rights reserved. 4 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
4 // met: 7 // met:
5 // 8 //
6 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 11 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 12 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 13 // disclaimer in the documentation and/or other materials provided
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 // r0: copy start address 1402 // r0: copy start address
1400 // r1: function 1403 // r1: function
1401 // r2: copy end address 1404 // r2: copy end address
1402 // r3: code entry to call 1405 // r3: code entry to call
1403 1406
1404 Label copy; 1407 Label copy;
1405 __ bind(&copy); 1408 __ bind(&copy);
1406 __ ldr(ip, MemOperand(r0, 0)); 1409 __ ldr(ip, MemOperand(r0, 0));
1407 __ push(ip); 1410 __ push(ip);
1408 __ cmp(r0, r2); // Compare before moving to next argument. 1411 __ cmp(r0, r2); // Compare before moving to next argument.
1409 __ sub(r0, r0, Operand(kPointerSize)); 1412 __ sub(r0, r0, Operand(kPointerSize), LeaveCC);
1410 __ b(ne, &copy); 1413 __ b(ne, &copy);
1411 1414
1412 __ b(&invoke); 1415 __ b(&invoke);
1413 } 1416 }
1414 1417
1415 { // Too few parameters: Actual < expected 1418 { // Too few parameters: Actual < expected
1416 __ bind(&too_few); 1419 __ bind(&too_few);
1417 EnterArgumentsAdaptorFrame(masm); 1420 EnterArgumentsAdaptorFrame(masm);
1418 1421
1419 // Calculate copy start address into r0 and copy end address is fp. 1422 // Calculate copy start address into r0 and copy end address is fp.
1420 // r0: actual number of arguments as a smi 1423 // r0: actual number of arguments as a smi
1421 // r1: function 1424 // r1: function
1422 // r2: expected number of arguments 1425 // r2: expected number of arguments
1423 // r3: code entry to call 1426 // r3: code entry to call
1424 __ add(r0, fp, Operand::PointerOffsetFromSmiKey(r0)); 1427 __ add(r0, fp, Operand::PointerOffsetFromSmiKey(r0));
1425 1428
1426 // Copy the arguments (including the receiver) to the new stack frame. 1429 // Copy the arguments (including the receiver) to the new stack frame.
1427 // r0: copy start address 1430 // r0: copy start address
1428 // r1: function 1431 // r1: function
1429 // r2: expected number of arguments 1432 // r2: expected number of arguments
1430 // r3: code entry to call 1433 // r3: code entry to call
1431 Label copy; 1434 Label copy;
1432 __ bind(&copy); 1435 __ bind(&copy);
1433 // Adjust load for return address and receiver. 1436 // Adjust load for return address and receiver.
1434 __ ldr(ip, MemOperand(r0, 2 * kPointerSize)); 1437 __ ldr(ip, MemOperand(r0, 2 * kPointerSize));
1435 __ push(ip); 1438 __ push(ip);
1436 __ cmp(r0, fp); // Compare before moving to next argument. 1439 __ cmp(r0, fp); // Compare before moving to next argument.
1437 __ sub(r0, r0, Operand(kPointerSize)); 1440 __ sub(r0, r0, Operand(kPointerSize), LeaveCC);
1438 __ b(ne, &copy); 1441 __ b(ne, &copy);
1439 1442
1440 // Fill the remaining expected arguments with undefined. 1443 // Fill the remaining expected arguments with undefined.
1441 // r1: function 1444 // r1: function
1442 // r2: expected number of arguments 1445 // r2: expected number of arguments
1443 // r3: code entry to call 1446 // r3: code entry to call
1444 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); 1447 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
1445 __ sub(r2, fp, Operand(r2, LSL, kPointerSizeLog2)); 1448 __ sub(r2, fp, Operand(r2, LSL, kPointerSizeLog2));
1446 __ sub(r2, r2, Operand(4 * kPointerSize)); // Adjust for frame. 1449 __ sub(r2, r2, Operand(4 * kPointerSize)); // Adjust for frame.
1447 1450
(...skipping 22 matching lines...) Expand all
1470 __ bind(&dont_adapt_arguments); 1473 __ bind(&dont_adapt_arguments);
1471 __ Jump(r3); 1474 __ Jump(r3);
1472 } 1475 }
1473 1476
1474 1477
1475 #undef __ 1478 #undef __
1476 1479
1477 } } // namespace v8::internal 1480 } } // namespace v8::internal
1478 1481
1479 #endif // V8_TARGET_ARCH_ARM 1482 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-thumb32.cc ('k') | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698