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

Side by Side Diff: src/x64/debug-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, 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 | « src/x64/code-stubs-x64.cc ('k') | src/x64/full-codegen-x64.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 __ push(reg); 73 __ push(reg);
74 __ sar(kScratchRegister, Immediate(32)); 74 __ sar(kScratchRegister, Immediate(32));
75 __ Integer32ToSmi(kScratchRegister, kScratchRegister); 75 __ Integer32ToSmi(kScratchRegister, kScratchRegister);
76 __ push(kScratchRegister); 76 __ push(kScratchRegister);
77 } 77 }
78 } 78 }
79 79
80 #ifdef DEBUG 80 #ifdef DEBUG
81 __ RecordComment("// Calling from debug break to runtime - come in - over"); 81 __ RecordComment("// Calling from debug break to runtime - come in - over");
82 #endif 82 #endif
83 __ xor_(rax, rax); // No arguments (argc == 0). 83 __ Set(rax, 0); // No arguments (argc == 0).
84 __ movq(rbx, ExternalReference::debug_break()); 84 __ movq(rbx, ExternalReference::debug_break());
85 85
86 CEntryStub ceb(1); 86 CEntryStub ceb(1);
87 __ CallStub(&ceb); 87 __ CallStub(&ceb);
88 88
89 // Restore the register values from the expression stack. 89 // Restore the register values from the expression stack.
90 for (int i = kNumJSCallerSaved - 1; i >= 0; i--) { 90 for (int i = kNumJSCallerSaved - 1; i >= 0; i--) {
91 int r = JSCallerSavedCode(i); 91 int r = JSCallerSavedCode(i);
92 Register reg = { r }; 92 Register reg = { r };
93 if (FLAG_debug_code) { 93 if (FLAG_debug_code) {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 ASSERT(IsDebugBreakSlot()); 303 ASSERT(IsDebugBreakSlot());
304 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); 304 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength);
305 } 305 }
306 306
307 307
308 #endif // ENABLE_DEBUGGER_SUPPORT 308 #endif // ENABLE_DEBUGGER_SUPPORT
309 309
310 } } // namespace v8::internal 310 } } // namespace v8::internal
311 311
312 #endif // V8_TARGET_ARCH_X64 312 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698