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 6580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6591 __ TailCallRuntime(ExternalReference(f), 1, f->result_size); | 6591 __ TailCallRuntime(ExternalReference(f), 1, f->result_size); |
6592 } | 6592 } |
6593 | 6593 |
6594 | 6594 |
6595 void ArgumentsAccessStub::GenerateReadLength(MacroAssembler* masm) { | 6595 void ArgumentsAccessStub::GenerateReadLength(MacroAssembler* masm) { |
6596 // Check if the calling frame is an arguments adaptor frame. | 6596 // Check if the calling frame is an arguments adaptor frame. |
6597 Label adaptor; | 6597 Label adaptor; |
6598 __ movq(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); | 6598 __ movq(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
6599 __ SmiCompare(Operand(rdx, StandardFrameConstants::kContextOffset), | 6599 __ SmiCompare(Operand(rdx, StandardFrameConstants::kContextOffset), |
6600 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 6600 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
6601 __ j(equal, &adaptor); | |
6602 | |
6603 // Nothing to do: The formal number of parameters has already been | |
6604 // passed in register rax by calling function. Just return it. | |
6605 __ ret(0); | |
6606 | 6601 |
6607 // Arguments adaptor case: Read the arguments length from the | 6602 // Arguments adaptor case: Read the arguments length from the |
6608 // adaptor frame and return it. | 6603 // adaptor frame and return it. |
6609 __ bind(&adaptor); | 6604 // Otherwise nothing to do: The number of formal parameters has already been |
6610 __ movq(rax, Operand(rdx, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 6605 // passed in register eax by calling function. Just return it. |
| 6606 __ cmovq(equal, rax, |
| 6607 Operand(rdx, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
6611 __ ret(0); | 6608 __ ret(0); |
6612 } | 6609 } |
6613 | 6610 |
6614 | 6611 |
6615 int CEntryStub::MinorKey() { | 6612 int CEntryStub::MinorKey() { |
6616 ASSERT(result_size_ <= 2); | 6613 ASSERT(result_size_ <= 2); |
6617 #ifdef _WIN64 | 6614 #ifdef _WIN64 |
6618 // Simple results returned in rax (using default code). | 6615 // Simple results returned in rax (using default code). |
6619 // Complex results must be written to address passed as first argument. | 6616 // Complex results must be written to address passed as first argument. |
6620 // Use even numbers for minor keys, reserving the odd numbers for | 6617 // Use even numbers for minor keys, reserving the odd numbers for |
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8044 masm.GetCode(&desc); | 8041 masm.GetCode(&desc); |
8045 // Call the function from C++. | 8042 // Call the function from C++. |
8046 return FUNCTION_CAST<ModuloFunction>(buffer); | 8043 return FUNCTION_CAST<ModuloFunction>(buffer); |
8047 } | 8044 } |
8048 | 8045 |
8049 #endif | 8046 #endif |
8050 | 8047 |
8051 #undef __ | 8048 #undef __ |
8052 | 8049 |
8053 } } // namespace v8::internal | 8050 } } // namespace v8::internal |
OLD | NEW |