OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
11 #include "src/x87/frames-x87.h" | 11 #include "src/x87/frames-x87.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 #define __ ACCESS_MASM(masm) | 16 #define __ ACCESS_MASM(masm) |
17 | 17 |
18 void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id, | 18 void Builtins::Generate_Adaptor(MacroAssembler* masm, Address address, |
19 ExitFrameType exit_frame_type) { | 19 ExitFrameType exit_frame_type) { |
20 // ----------- S t a t e ------------- | 20 // ----------- S t a t e ------------- |
21 // -- eax : number of arguments excluding receiver | 21 // -- eax : number of arguments excluding receiver |
22 // -- edi : target | 22 // -- edi : target |
23 // -- edx : new.target | 23 // -- edx : new.target |
24 // -- esp[0] : return address | 24 // -- esp[0] : return address |
25 // -- esp[4] : last argument | 25 // -- esp[4] : last argument |
26 // -- ... | 26 // -- ... |
27 // -- esp[4 * argc] : first argument | 27 // -- esp[4 * argc] : first argument |
28 // -- esp[4 * (argc +1)] : receiver | 28 // -- esp[4 * (argc +1)] : receiver |
(...skipping 13 matching lines...) Expand all Loading... |
42 | 42 |
43 // Insert extra arguments. | 43 // Insert extra arguments. |
44 __ PopReturnAddressTo(ecx); | 44 __ PopReturnAddressTo(ecx); |
45 __ SmiTag(eax); | 45 __ SmiTag(eax); |
46 __ Push(eax); | 46 __ Push(eax); |
47 __ SmiUntag(eax); | 47 __ SmiUntag(eax); |
48 __ Push(edi); | 48 __ Push(edi); |
49 __ Push(edx); | 49 __ Push(edx); |
50 __ PushReturnAddressFrom(ecx); | 50 __ PushReturnAddressFrom(ecx); |
51 | 51 |
52 __ JumpToExternalReference(ExternalReference(id, masm->isolate()), | 52 __ JumpToExternalReference(ExternalReference(address, masm->isolate()), |
53 exit_frame_type == BUILTIN_EXIT); | 53 exit_frame_type == BUILTIN_EXIT); |
54 } | 54 } |
55 | 55 |
56 static void GenerateTailCallToReturnedCode(MacroAssembler* masm, | 56 static void GenerateTailCallToReturnedCode(MacroAssembler* masm, |
57 Runtime::FunctionId function_id) { | 57 Runtime::FunctionId function_id) { |
58 // ----------- S t a t e ------------- | 58 // ----------- S t a t e ------------- |
59 // -- eax : argument count (preserved for callee) | 59 // -- eax : argument count (preserved for callee) |
60 // -- edx : new target (preserved for callee) | 60 // -- edx : new target (preserved for callee) |
61 // -- edi : target function (preserved for callee) | 61 // -- edi : target function (preserved for callee) |
62 // ----------------------------------- | 62 // ----------------------------------- |
(...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3015 | 3015 |
3016 // And "return" to the OSR entry point of the function. | 3016 // And "return" to the OSR entry point of the function. |
3017 __ ret(0); | 3017 __ ret(0); |
3018 } | 3018 } |
3019 | 3019 |
3020 #undef __ | 3020 #undef __ |
3021 } // namespace internal | 3021 } // namespace internal |
3022 } // namespace v8 | 3022 } // namespace v8 |
3023 | 3023 |
3024 #endif // V8_TARGET_ARCH_X87 | 3024 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |