OLD | NEW |
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 Loading... |
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 Loading... |
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 | |
OLD | NEW |