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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 if (FLAG_test_secondary_stub_cache && table == StubCache::kPrimary) { | 54 if (FLAG_test_secondary_stub_cache && table == StubCache::kPrimary) { |
55 __ jmp(&miss); | 55 __ jmp(&miss); |
56 } else if (FLAG_test_primary_stub_cache && table == StubCache::kSecondary) { | 56 } else if (FLAG_test_primary_stub_cache && table == StubCache::kSecondary) { |
57 __ jmp(&miss); | 57 __ jmp(&miss); |
58 } | 58 } |
59 #endif | 59 #endif |
60 | 60 |
61 if (IC::ICUseVector(ic_kind)) { | 61 if (IC::ICUseVector(ic_kind)) { |
62 // The vector and slot were pushed onto the stack before starting the | 62 // The vector and slot were pushed onto the stack before starting the |
63 // probe, and need to be dropped before calling the handler. | 63 // probe, and need to be dropped before calling the handler. |
64 __ pop(VectorLoadICDescriptor::VectorRegister()); | 64 __ pop(LoadWithVectorDescriptor::VectorRegister()); |
65 __ pop(VectorLoadICDescriptor::SlotRegister()); | 65 __ pop(LoadDescriptor::SlotRegister()); |
66 } | 66 } |
67 | 67 |
68 if (leave_frame) __ leave(); | 68 if (leave_frame) __ leave(); |
69 | 69 |
70 // Jump to the first instruction in the code stub. | 70 // Jump to the first instruction in the code stub. |
71 __ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag)); | 71 __ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
72 __ jmp(extra); | 72 __ jmp(extra); |
73 | 73 |
74 __ bind(&miss); | 74 __ bind(&miss); |
75 } else { | 75 } else { |
(...skipping 29 matching lines...) Expand all Loading... |
105 } | 105 } |
106 #endif | 106 #endif |
107 | 107 |
108 // Restore offset and re-load code entry from cache. | 108 // Restore offset and re-load code entry from cache. |
109 __ pop(offset); | 109 __ pop(offset); |
110 __ mov(offset, Operand::StaticArray(offset, times_1, value_offset)); | 110 __ mov(offset, Operand::StaticArray(offset, times_1, value_offset)); |
111 | 111 |
112 if (IC::ICUseVector(ic_kind)) { | 112 if (IC::ICUseVector(ic_kind)) { |
113 // The vector and slot were pushed onto the stack before starting the | 113 // The vector and slot were pushed onto the stack before starting the |
114 // probe, and need to be dropped before calling the handler. | 114 // probe, and need to be dropped before calling the handler. |
115 Register vector = VectorLoadICDescriptor::VectorRegister(); | 115 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
116 Register slot = VectorLoadICDescriptor::SlotRegister(); | 116 Register slot = LoadDescriptor::SlotRegister(); |
117 DCHECK(!offset.is(vector) && !offset.is(slot)); | 117 DCHECK(!offset.is(vector) && !offset.is(slot)); |
118 | 118 |
119 __ pop(vector); | 119 __ pop(vector); |
120 __ pop(slot); | 120 __ pop(slot); |
121 } | 121 } |
122 | 122 |
123 | |
124 if (leave_frame) __ leave(); | 123 if (leave_frame) __ leave(); |
125 | 124 |
126 // Jump to the first instruction in the code stub. | 125 // Jump to the first instruction in the code stub. |
127 __ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag)); | 126 __ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
128 __ jmp(offset); | 127 __ jmp(offset); |
129 | 128 |
130 // Pop at miss. | 129 // Pop at miss. |
131 __ bind(&miss); | 130 __ bind(&miss); |
132 __ pop(offset); | 131 __ pop(offset); |
133 } | 132 } |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 __ bind(&miss); | 201 __ bind(&miss); |
203 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); | 202 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); |
204 } | 203 } |
205 | 204 |
206 | 205 |
207 #undef __ | 206 #undef __ |
208 } | 207 } |
209 } // namespace v8::internal | 208 } // namespace v8::internal |
210 | 209 |
211 #endif // V8_TARGET_ARCH_X87 | 210 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |