| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void StoreRoot(Register source, Register scratch, Heap::RootListIndex index); | 74 void StoreRoot(Register source, Register scratch, Heap::RootListIndex index); |
| 75 void CompareRoot(Register with, Register scratch, Heap::RootListIndex index); | 75 void CompareRoot(Register with, Register scratch, Heap::RootListIndex index); |
| 76 // These methods can only be used with constant roots (i.e. non-writable | 76 // These methods can only be used with constant roots (i.e. non-writable |
| 77 // and not in new space). | 77 // and not in new space). |
| 78 void CompareRoot(Register with, Heap::RootListIndex index); | 78 void CompareRoot(Register with, Heap::RootListIndex index); |
| 79 void CompareRoot(const Operand& with, Heap::RootListIndex index); | 79 void CompareRoot(const Operand& with, Heap::RootListIndex index); |
| 80 void PushRoot(Heap::RootListIndex index); | 80 void PushRoot(Heap::RootListIndex index); |
| 81 | 81 |
| 82 // Compare the object in a register to a value and jump if they are equal. | 82 // Compare the object in a register to a value and jump if they are equal. |
| 83 void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal, | 83 void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal, |
| 84 Label::Distance if_equal_distance = Label::kNear) { | 84 Label::Distance if_equal_distance = Label::kFar) { |
| 85 CompareRoot(with, index); | 85 CompareRoot(with, index); |
| 86 j(equal, if_equal, if_equal_distance); | 86 j(equal, if_equal, if_equal_distance); |
| 87 } | 87 } |
| 88 void JumpIfRoot(const Operand& with, Heap::RootListIndex index, | 88 void JumpIfRoot(const Operand& with, Heap::RootListIndex index, |
| 89 Label* if_equal, | 89 Label* if_equal, |
| 90 Label::Distance if_equal_distance = Label::kNear) { | 90 Label::Distance if_equal_distance = Label::kFar) { |
| 91 CompareRoot(with, index); | 91 CompareRoot(with, index); |
| 92 j(equal, if_equal, if_equal_distance); | 92 j(equal, if_equal, if_equal_distance); |
| 93 } | 93 } |
| 94 | 94 |
| 95 // Compare the object in a register to a value and jump if they are not equal. | 95 // Compare the object in a register to a value and jump if they are not equal. |
| 96 void JumpIfNotRoot(Register with, Heap::RootListIndex index, | 96 void JumpIfNotRoot(Register with, Heap::RootListIndex index, |
| 97 Label* if_not_equal, | 97 Label* if_not_equal, |
| 98 Label::Distance if_not_equal_distance = Label::kNear) { | 98 Label::Distance if_not_equal_distance = Label::kFar) { |
| 99 CompareRoot(with, index); | 99 CompareRoot(with, index); |
| 100 j(not_equal, if_not_equal, if_not_equal_distance); | 100 j(not_equal, if_not_equal, if_not_equal_distance); |
| 101 } | 101 } |
| 102 void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, | 102 void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, |
| 103 Label* if_not_equal, | 103 Label* if_not_equal, |
| 104 Label::Distance if_not_equal_distance = Label::kNear) { | 104 Label::Distance if_not_equal_distance = Label::kFar) { |
| 105 CompareRoot(with, index); | 105 CompareRoot(with, index); |
| 106 j(not_equal, if_not_equal, if_not_equal_distance); | 106 j(not_equal, if_not_equal, if_not_equal_distance); |
| 107 } | 107 } |
| 108 | 108 |
| 109 // --------------------------------------------------------------------------- | 109 // --------------------------------------------------------------------------- |
| 110 // GC Support | 110 // GC Support |
| 111 enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd }; | 111 enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd }; |
| 112 | 112 |
| 113 // Record in the remembered set the fact that we have a pointer to new space | 113 // Record in the remembered set the fact that we have a pointer to new space |
| 114 // at the address pointed to by the addr register. Only works if addr is not | 114 // at the address pointed to by the addr register. Only works if addr is not |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 } \ | 1003 } \ |
| 1004 masm-> | 1004 masm-> |
| 1005 #else | 1005 #else |
| 1006 #define ACCESS_MASM(masm) masm-> | 1006 #define ACCESS_MASM(masm) masm-> |
| 1007 #endif | 1007 #endif |
| 1008 | 1008 |
| 1009 } // namespace internal | 1009 } // namespace internal |
| 1010 } // namespace v8 | 1010 } // namespace v8 |
| 1011 | 1011 |
| 1012 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1012 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |