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

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

Issue 118380: Add statistics operations and long calls and jumps to x64 macro assembler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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/assembler-x64.cc ('k') | src/x64/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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 // Copy arguments to the stack in a loop. 135 // Copy arguments to the stack in a loop.
136 // Register rbx points to array of pointers to handle locations. 136 // Register rbx points to array of pointers to handle locations.
137 // Push the values of these handles. 137 // Push the values of these handles.
138 Label loop, entry; 138 Label loop, entry;
139 __ xor_(rcx, rcx); // Set loop variable to 0. 139 __ xor_(rcx, rcx); // Set loop variable to 0.
140 __ jmp(&entry); 140 __ jmp(&entry);
141 __ bind(&loop); 141 __ bind(&loop);
142 __ movq(kScratchRegister, Operand(rbx, rcx, kTimesPointerSize, 0)); 142 __ movq(kScratchRegister, Operand(rbx, rcx, kTimesPointerSize, 0));
143 __ push(Operand(kScratchRegister, 0)); // dereference handle 143 __ push(Operand(kScratchRegister, 0)); // dereference handle
144 __ add(rcx, Immediate(1)); 144 __ addq(rcx, Immediate(1));
145 __ bind(&entry); 145 __ bind(&entry);
146 __ cmp(rcx, rax); 146 __ cmpq(rcx, rax);
147 __ j(not_equal, &loop); 147 __ j(not_equal, &loop);
148 148
149 // Invoke the code. 149 // Invoke the code.
150 if (is_construct) { 150 if (is_construct) {
151 // Expects rdi to hold function pointer. 151 // Expects rdi to hold function pointer.
152 __ movq(kScratchRegister, 152 __ movq(kScratchRegister,
153 Handle<Code>(Builtins::builtin(Builtins::JSConstructCall)), 153 Handle<Code>(Builtins::builtin(Builtins::JSConstructCall)),
154 RelocInfo::CODE_TARGET); 154 RelocInfo::CODE_TARGET);
155 __ call(kScratchRegister); 155 __ call(kScratchRegister);
156 } else { 156 } else {
(...skipping 13 matching lines...) Expand all
170 void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) { 170 void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) {
171 Generate_JSEntryTrampolineHelper(masm, false); 171 Generate_JSEntryTrampolineHelper(masm, false);
172 } 172 }
173 173
174 174
175 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { 175 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) {
176 Generate_JSEntryTrampolineHelper(masm, true); 176 Generate_JSEntryTrampolineHelper(masm, true);
177 } 177 }
178 178
179 } } // namespace v8::internal 179 } } // namespace v8::internal
180
181
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698