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

Unified Diff: src/x64/builtins-x64.cc

Issue 6015011: Use the macro assembler Set instead of explicit xor for clearing registers. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/builtins-x64.cc
===================================================================
--- src/x64/builtins-x64.cc (revision 6129)
+++ src/x64/builtins-x64.cc (working copy)
@@ -422,7 +422,7 @@
// [rsp+0x20] : argv
// Clear the context before we push it when entering the JS frame.
- __ xor_(rsi, rsi);
+ __ Set(rsi, 0);
__ EnterInternalFrame();
// Load the function context into rsi.
@@ -451,7 +451,7 @@
// rdi : function
// Clear the context before we push it when entering the JS frame.
- __ xor_(rsi, rsi);
+ __ Set(rsi, 0);
// Enter an internal frame.
__ EnterInternalFrame();
@@ -479,7 +479,7 @@
// Register rbx points to array of pointers to handle locations.
// Push the values of these handles.
Label loop, entry;
- __ xor_(rcx, rcx); // Set loop variable to 0.
+ __ Set(rcx, 0); // Set loop variable to 0.
__ jmp(&entry);
__ bind(&loop);
__ movq(kScratchRegister, Operand(rbx, rcx, times_pointer_size, 0));
@@ -668,7 +668,7 @@
// become the receiver.
__ bind(&non_function);
__ movq(Operand(rsp, rax, times_pointer_size, 0), rdi);
- __ xor_(rdi, rdi);
+ __ Set(rdi, 0);
// 4. Shift arguments and return address one slot down on the stack
// (overwriting the original receiver). Adjust argument count to make
@@ -689,7 +689,7 @@
{ Label function;
__ testq(rdi, rdi);
__ j(not_zero, &function);
- __ xor_(rbx, rbx);
+ __ Set(rbx, 0);
__ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION);
__ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)),
RelocInfo::CODE_TARGET);
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698