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_IA32_MACRO_ASSEMBLER_IA32_H_ | 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/frames.h" | 10 #include "src/frames.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 CompareRoot(with, index); | 100 CompareRoot(with, index); |
101 j(not_equal, if_not_equal, if_not_equal_distance); | 101 j(not_equal, if_not_equal, if_not_equal_distance); |
102 } | 102 } |
103 void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, | 103 void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, |
104 Label* if_not_equal, | 104 Label* if_not_equal, |
105 Label::Distance if_not_equal_distance = Label::kFar) { | 105 Label::Distance if_not_equal_distance = Label::kFar) { |
106 CompareRoot(with, index); | 106 CompareRoot(with, index); |
107 j(not_equal, if_not_equal, if_not_equal_distance); | 107 j(not_equal, if_not_equal, if_not_equal_distance); |
108 } | 108 } |
109 | 109 |
| 110 // These functions do not arrange the registers in any particular order so |
| 111 // they are not useful for calls that can cause a GC. The caller can |
| 112 // exclude up to 3 registers that do not need to be saved and restored. |
| 113 void PushCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1 = no_reg, |
| 114 Register exclusion2 = no_reg, |
| 115 Register exclusion3 = no_reg); |
| 116 void PopCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1 = no_reg, |
| 117 Register exclusion2 = no_reg, |
| 118 Register exclusion3 = no_reg); |
| 119 |
110 // --------------------------------------------------------------------------- | 120 // --------------------------------------------------------------------------- |
111 // GC Support | 121 // GC Support |
112 enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd }; | 122 enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd }; |
113 | 123 |
114 // Record in the remembered set the fact that we have a pointer to new space | 124 // Record in the remembered set the fact that we have a pointer to new space |
115 // at the address pointed to by the addr register. Only works if addr is not | 125 // at the address pointed to by the addr register. Only works if addr is not |
116 // in new space. | 126 // in new space. |
117 void RememberedSetHelper(Register object, // Used for debug code. | 127 void RememberedSetHelper(Register object, // Used for debug code. |
118 Register addr, Register scratch, | 128 Register addr, Register scratch, |
119 SaveFPRegsMode save_fp, | 129 SaveFPRegsMode save_fp, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // object being stored. The address and value registers are clobbered by the | 210 // object being stored. The address and value registers are clobbered by the |
201 // operation. RecordWrite filters out smis so it does not update the | 211 // operation. RecordWrite filters out smis so it does not update the |
202 // write barrier if the value is a smi. | 212 // write barrier if the value is a smi. |
203 void RecordWrite( | 213 void RecordWrite( |
204 Register object, Register address, Register value, SaveFPRegsMode save_fp, | 214 Register object, Register address, Register value, SaveFPRegsMode save_fp, |
205 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 215 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
206 SmiCheck smi_check = INLINE_SMI_CHECK, | 216 SmiCheck smi_check = INLINE_SMI_CHECK, |
207 PointersToHereCheck pointers_to_here_check_for_value = | 217 PointersToHereCheck pointers_to_here_check_for_value = |
208 kPointersToHereMaybeInteresting); | 218 kPointersToHereMaybeInteresting); |
209 | 219 |
| 220 // Notify the garbage collector that we wrote a code entry into a |
| 221 // JSFunction. Only scratch is clobbered by the operation. |
| 222 void RecordWriteCodeEntryField(Register js_function, Register code_entry, |
| 223 Register scratch); |
| 224 |
210 // For page containing |object| mark the region covering the object's map | 225 // For page containing |object| mark the region covering the object's map |
211 // dirty. |object| is the object being stored into, |map| is the Map object | 226 // dirty. |object| is the object being stored into, |map| is the Map object |
212 // that was stored. | 227 // that was stored. |
213 void RecordWriteForMap(Register object, Handle<Map> map, Register scratch1, | 228 void RecordWriteForMap(Register object, Handle<Map> map, Register scratch1, |
214 Register scratch2, SaveFPRegsMode save_fp); | 229 Register scratch2, SaveFPRegsMode save_fp); |
215 | 230 |
216 // --------------------------------------------------------------------------- | 231 // --------------------------------------------------------------------------- |
217 // Debugger Support | 232 // Debugger Support |
218 | 233 |
219 void DebugBreak(); | 234 void DebugBreak(); |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 } \ | 1022 } \ |
1008 masm-> | 1023 masm-> |
1009 #else | 1024 #else |
1010 #define ACCESS_MASM(masm) masm-> | 1025 #define ACCESS_MASM(masm) masm-> |
1011 #endif | 1026 #endif |
1012 | 1027 |
1013 } // namespace internal | 1028 } // namespace internal |
1014 } // namespace v8 | 1029 } // namespace v8 |
1015 | 1030 |
1016 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1031 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |