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 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ | 5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ |
6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ | 6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/frames.h" | 9 #include "src/frames.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 // Convenience for platform-independent signatures. We do not normally | 15 // Convenience for platform-independent signatures. We do not normally |
16 // distinguish memory operands from other operands on ia32. | 16 // distinguish memory operands from other operands on ia32. |
17 typedef Operand MemOperand; | 17 typedef Operand MemOperand; |
18 | 18 |
19 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; | 19 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; |
20 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; | 20 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; |
| 21 enum PointersToHereCheck { |
| 22 kPointersToHereMaybeInteresting, |
| 23 kPointersToHereAreAlwaysInteresting |
| 24 }; |
21 | 25 |
22 | 26 |
23 enum RegisterValueType { | 27 enum RegisterValueType { |
24 REGISTER_VALUE_IS_SMI, | 28 REGISTER_VALUE_IS_SMI, |
25 REGISTER_VALUE_IS_INT32 | 29 REGISTER_VALUE_IS_INT32 |
26 }; | 30 }; |
27 | 31 |
28 | 32 |
29 bool AreAliased(Register r1, Register r2, Register r3, Register r4); | 33 bool AreAliased(Register r1, Register r2, Register r3, Register r4); |
30 | 34 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // |object| is the object being stored into, |value| is the object being | 135 // |object| is the object being stored into, |value| is the object being |
132 // stored. value and scratch registers are clobbered by the operation. | 136 // stored. value and scratch registers are clobbered by the operation. |
133 // The offset is the offset from the start of the object, not the offset from | 137 // The offset is the offset from the start of the object, not the offset from |
134 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). | 138 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). |
135 void RecordWriteField( | 139 void RecordWriteField( |
136 Register object, | 140 Register object, |
137 int offset, | 141 int offset, |
138 Register value, | 142 Register value, |
139 Register scratch, | 143 Register scratch, |
140 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 144 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
141 SmiCheck smi_check = INLINE_SMI_CHECK); | 145 SmiCheck smi_check = INLINE_SMI_CHECK, |
| 146 PointersToHereCheck pointers_to_here_check_for_value = |
| 147 kPointersToHereMaybeInteresting); |
142 | 148 |
143 // As above, but the offset has the tag presubtracted. For use with | 149 // As above, but the offset has the tag presubtracted. For use with |
144 // Operand(reg, off). | 150 // Operand(reg, off). |
145 void RecordWriteContextSlot( | 151 void RecordWriteContextSlot( |
146 Register context, | 152 Register context, |
147 int offset, | 153 int offset, |
148 Register value, | 154 Register value, |
149 Register scratch, | 155 Register scratch, |
150 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 156 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
151 SmiCheck smi_check = INLINE_SMI_CHECK) { | 157 SmiCheck smi_check = INLINE_SMI_CHECK, |
| 158 PointersToHereCheck pointers_to_here_check_for_value = |
| 159 kPointersToHereMaybeInteresting) { |
152 RecordWriteField(context, | 160 RecordWriteField(context, |
153 offset + kHeapObjectTag, | 161 offset + kHeapObjectTag, |
154 value, | 162 value, |
155 scratch, | 163 scratch, |
156 remembered_set_action, | 164 remembered_set_action, |
157 smi_check); | 165 smi_check, |
| 166 pointers_to_here_check_for_value); |
158 } | 167 } |
159 | 168 |
160 // Notify the garbage collector that we wrote a pointer into a fixed array. | 169 // Notify the garbage collector that we wrote a pointer into a fixed array. |
161 // |array| is the array being stored into, |value| is the | 170 // |array| is the array being stored into, |value| is the |
162 // object being stored. |index| is the array index represented as a | 171 // object being stored. |index| is the array index represented as a |
163 // Smi. All registers are clobbered by the operation RecordWriteArray | 172 // Smi. All registers are clobbered by the operation RecordWriteArray |
164 // filters out smis so it does not update the write barrier if the | 173 // filters out smis so it does not update the write barrier if the |
165 // value is a smi. | 174 // value is a smi. |
166 void RecordWriteArray( | 175 void RecordWriteArray( |
167 Register array, | 176 Register array, |
168 Register value, | 177 Register value, |
169 Register index, | 178 Register index, |
170 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 179 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
171 SmiCheck smi_check = INLINE_SMI_CHECK); | 180 SmiCheck smi_check = INLINE_SMI_CHECK, |
| 181 PointersToHereCheck pointers_to_here_check_for_value = |
| 182 kPointersToHereMaybeInteresting); |
172 | 183 |
173 // For page containing |object| mark region covering |address| | 184 // For page containing |object| mark region covering |address| |
174 // dirty. |object| is the object being stored into, |value| is the | 185 // dirty. |object| is the object being stored into, |value| is the |
175 // object being stored. The address and value registers are clobbered by the | 186 // object being stored. The address and value registers are clobbered by the |
176 // operation. RecordWrite filters out smis so it does not update the | 187 // operation. RecordWrite filters out smis so it does not update the |
177 // write barrier if the value is a smi. | 188 // write barrier if the value is a smi. |
178 void RecordWrite( | 189 void RecordWrite( |
179 Register object, | 190 Register object, |
180 Register address, | 191 Register address, |
181 Register value, | 192 Register value, |
182 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 193 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
183 SmiCheck smi_check = INLINE_SMI_CHECK); | 194 SmiCheck smi_check = INLINE_SMI_CHECK, |
| 195 PointersToHereCheck pointers_to_here_check_for_value = |
| 196 kPointersToHereMaybeInteresting); |
184 | 197 |
185 // For page containing |object| mark the region covering the object's map | 198 // For page containing |object| mark the region covering the object's map |
186 // dirty. |object| is the object being stored into, |map| is the Map object | 199 // dirty. |object| is the object being stored into, |map| is the Map object |
187 // that was stored. | 200 // that was stored. |
188 void RecordWriteForMap( | 201 void RecordWriteForMap( |
189 Register object, | 202 Register object, |
190 Handle<Map> map, | 203 Handle<Map> map, |
191 Register scratch1, | 204 Register scratch1, |
192 Register scratch2); | 205 Register scratch2); |
193 | 206 |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 } \ | 1081 } \ |
1069 masm-> | 1082 masm-> |
1070 #else | 1083 #else |
1071 #define ACCESS_MASM(masm) masm-> | 1084 #define ACCESS_MASM(masm) masm-> |
1072 #endif | 1085 #endif |
1073 | 1086 |
1074 | 1087 |
1075 } } // namespace v8::internal | 1088 } } // namespace v8::internal |
1076 | 1089 |
1077 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ | 1090 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ |
OLD | NEW |