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_X64_MACRO_ASSEMBLER_X64_H_ | 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ |
6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 6 #define V8_X64_MACRO_ASSEMBLER_X64_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/base/flags.h" | 10 #include "src/base/flags.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void CompareRoot(Register with, Heap::RootListIndex index); | 146 void CompareRoot(Register with, Heap::RootListIndex index); |
147 void CompareRoot(const Operand& with, Heap::RootListIndex index); | 147 void CompareRoot(const Operand& with, Heap::RootListIndex index); |
148 void PushRoot(Heap::RootListIndex index); | 148 void PushRoot(Heap::RootListIndex index); |
149 | 149 |
150 // Compare the object in a register to a value and jump if they are equal. | 150 // Compare the object in a register to a value and jump if they are equal. |
151 void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal, | 151 void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal, |
152 Label::Distance if_equal_distance = Label::kNear) { | 152 Label::Distance if_equal_distance = Label::kNear) { |
153 CompareRoot(with, index); | 153 CompareRoot(with, index); |
154 j(equal, if_equal, if_equal_distance); | 154 j(equal, if_equal, if_equal_distance); |
155 } | 155 } |
| 156 void JumpIfRoot(const Operand& with, Heap::RootListIndex index, |
| 157 Label* if_equal, |
| 158 Label::Distance if_equal_distance = Label::kNear) { |
| 159 CompareRoot(with, index); |
| 160 j(equal, if_equal, if_equal_distance); |
| 161 } |
156 | 162 |
157 // Compare the object in a register to a value and jump if they are not equal. | 163 // Compare the object in a register to a value and jump if they are not equal. |
158 void JumpIfNotRoot(Register with, Heap::RootListIndex index, | 164 void JumpIfNotRoot(Register with, Heap::RootListIndex index, |
159 Label* if_not_equal, | 165 Label* if_not_equal, |
160 Label::Distance if_not_equal_distance = Label::kNear) { | 166 Label::Distance if_not_equal_distance = Label::kNear) { |
161 CompareRoot(with, index); | 167 CompareRoot(with, index); |
162 j(not_equal, if_not_equal, if_not_equal_distance); | 168 j(not_equal, if_not_equal, if_not_equal_distance); |
163 } | 169 } |
| 170 void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, |
| 171 Label* if_not_equal, |
| 172 Label::Distance if_not_equal_distance = Label::kNear) { |
| 173 CompareRoot(with, index); |
| 174 j(not_equal, if_not_equal, if_not_equal_distance); |
| 175 } |
164 | 176 |
165 // These functions do not arrange the registers in any particular order so | 177 // These functions do not arrange the registers in any particular order so |
166 // they are not useful for calls that can cause a GC. The caller can | 178 // they are not useful for calls that can cause a GC. The caller can |
167 // exclude up to 3 registers that do not need to be saved and restored. | 179 // exclude up to 3 registers that do not need to be saved and restored. |
168 void PushCallerSaved(SaveFPRegsMode fp_mode, | 180 void PushCallerSaved(SaveFPRegsMode fp_mode, |
169 Register exclusion1 = no_reg, | 181 Register exclusion1 = no_reg, |
170 Register exclusion2 = no_reg, | 182 Register exclusion2 = no_reg, |
171 Register exclusion3 = no_reg); | 183 Register exclusion3 = no_reg); |
172 void PopCallerSaved(SaveFPRegsMode fp_mode, | 184 void PopCallerSaved(SaveFPRegsMode fp_mode, |
173 Register exclusion1 = no_reg, | 185 Register exclusion1 = no_reg, |
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 } \ | 1748 } \ |
1737 masm-> | 1749 masm-> |
1738 #else | 1750 #else |
1739 #define ACCESS_MASM(masm) masm-> | 1751 #define ACCESS_MASM(masm) masm-> |
1740 #endif | 1752 #endif |
1741 | 1753 |
1742 } // namespace internal | 1754 } // namespace internal |
1743 } // namespace v8 | 1755 } // namespace v8 |
1744 | 1756 |
1745 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1757 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |