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

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

Issue 9169088: Use cmp instead of tst to check for zero. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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 | « no previous file | 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 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 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 // the deoptimizer infrastructure. 1290 // the deoptimizer infrastructure.
1291 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1291 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1292 generator.Generate(); 1292 generator.Generate();
1293 } 1293 }
1294 1294
1295 1295
1296 void Builtins::Generate_FunctionCall(MacroAssembler* masm) { 1296 void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
1297 // 1. Make sure we have at least one argument. 1297 // 1. Make sure we have at least one argument.
1298 // r0: actual number of arguments 1298 // r0: actual number of arguments
1299 { Label done; 1299 { Label done;
1300 __ tst(r0, Operand(r0)); 1300 __ cmp(r0, Operand(0));
1301 __ b(ne, &done); 1301 __ b(ne, &done);
1302 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); 1302 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
1303 __ push(r2); 1303 __ push(r2);
1304 __ add(r0, r0, Operand(1)); 1304 __ add(r0, r0, Operand(1));
1305 __ bind(&done); 1305 __ bind(&done);
1306 } 1306 }
1307 1307
1308 // 2. Get the function to call (passed as receiver) from the stack, check 1308 // 2. Get the function to call (passed as receiver) from the stack, check
1309 // if it is a function. 1309 // if it is a function.
1310 // r0: actual number of arguments 1310 // r0: actual number of arguments
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 __ bind(&dont_adapt_arguments); 1772 __ bind(&dont_adapt_arguments);
1773 __ Jump(r3); 1773 __ Jump(r3);
1774 } 1774 }
1775 1775
1776 1776
1777 #undef __ 1777 #undef __
1778 1778
1779 } } // namespace v8::internal 1779 } } // namespace v8::internal
1780 1780
1781 #endif // V8_TARGET_ARCH_ARM 1781 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698