| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // to get the index into the root-array. | 142 // to get the index into the root-array. |
| 143 void LoadRootIndexed(Register destination, | 143 void LoadRootIndexed(Register destination, |
| 144 Register variable_offset, | 144 Register variable_offset, |
| 145 int fixed_offset); | 145 int fixed_offset); |
| 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::kFar) { |
| 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, | 156 void JumpIfRoot(const Operand& with, Heap::RootListIndex index, |
| 157 Label* if_equal, | 157 Label* if_equal, |
| 158 Label::Distance if_equal_distance = Label::kNear) { | 158 Label::Distance if_equal_distance = Label::kFar) { |
| 159 CompareRoot(with, index); | 159 CompareRoot(with, index); |
| 160 j(equal, if_equal, if_equal_distance); | 160 j(equal, if_equal, if_equal_distance); |
| 161 } | 161 } |
| 162 | 162 |
| 163 // 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. |
| 164 void JumpIfNotRoot(Register with, Heap::RootListIndex index, | 164 void JumpIfNotRoot(Register with, Heap::RootListIndex index, |
| 165 Label* if_not_equal, | 165 Label* if_not_equal, |
| 166 Label::Distance if_not_equal_distance = Label::kNear) { | 166 Label::Distance if_not_equal_distance = Label::kFar) { |
| 167 CompareRoot(with, index); | 167 CompareRoot(with, index); |
| 168 j(not_equal, if_not_equal, if_not_equal_distance); | 168 j(not_equal, if_not_equal, if_not_equal_distance); |
| 169 } | 169 } |
| 170 void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, | 170 void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, |
| 171 Label* if_not_equal, | 171 Label* if_not_equal, |
| 172 Label::Distance if_not_equal_distance = Label::kNear) { | 172 Label::Distance if_not_equal_distance = Label::kFar) { |
| 173 CompareRoot(with, index); | 173 CompareRoot(with, index); |
| 174 j(not_equal, if_not_equal, if_not_equal_distance); | 174 j(not_equal, if_not_equal, if_not_equal_distance); |
| 175 } | 175 } |
| 176 | 176 |
| 177 // 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 |
| 178 // 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 |
| 179 // 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. |
| 180 void PushCallerSaved(SaveFPRegsMode fp_mode, | 180 void PushCallerSaved(SaveFPRegsMode fp_mode, |
| 181 Register exclusion1 = no_reg, | 181 Register exclusion1 = no_reg, |
| 182 Register exclusion2 = no_reg, | 182 Register exclusion2 = no_reg, |
| (...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1748 } \ | 1748 } \ |
| 1749 masm-> | 1749 masm-> |
| 1750 #else | 1750 #else |
| 1751 #define ACCESS_MASM(masm) masm-> | 1751 #define ACCESS_MASM(masm) masm-> |
| 1752 #endif | 1752 #endif |
| 1753 | 1753 |
| 1754 } // namespace internal | 1754 } // namespace internal |
| 1755 } // namespace v8 | 1755 } // namespace v8 |
| 1756 | 1756 |
| 1757 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1757 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |