| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::kNear) { |
| 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, |
| 89 Label* if_equal, |
| 90 Label::Distance if_equal_distance = Label::kNear) { |
| 91 CompareRoot(with, index); |
| 92 j(equal, if_equal, if_equal_distance); |
| 93 } |
| 88 | 94 |
| 89 // 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. |
| 90 void JumpIfNotRoot(Register with, Heap::RootListIndex index, | 96 void JumpIfNotRoot(Register with, Heap::RootListIndex index, |
| 91 Label* if_not_equal, | 97 Label* if_not_equal, |
| 92 Label::Distance if_not_equal_distance = Label::kNear) { | 98 Label::Distance if_not_equal_distance = Label::kNear) { |
| 93 CompareRoot(with, index); | 99 CompareRoot(with, index); |
| 94 j(not_equal, if_not_equal, if_not_equal_distance); | 100 j(not_equal, if_not_equal, if_not_equal_distance); |
| 95 } | 101 } |
| 102 void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, |
| 103 Label* if_not_equal, |
| 104 Label::Distance if_not_equal_distance = Label::kNear) { |
| 105 CompareRoot(with, index); |
| 106 j(not_equal, if_not_equal, if_not_equal_distance); |
| 107 } |
| 96 | 108 |
| 97 // --------------------------------------------------------------------------- | 109 // --------------------------------------------------------------------------- |
| 98 // GC Support | 110 // GC Support |
| 99 enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd }; | 111 enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd }; |
| 100 | 112 |
| 101 // 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 |
| 102 // 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 |
| 103 // in new space. | 115 // in new space. |
| 104 void RememberedSetHelper(Register object, // Used for debug code. | 116 void RememberedSetHelper(Register object, // Used for debug code. |
| 105 Register addr, Register scratch, | 117 Register addr, Register scratch, |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 } \ | 1003 } \ |
| 992 masm-> | 1004 masm-> |
| 993 #else | 1005 #else |
| 994 #define ACCESS_MASM(masm) masm-> | 1006 #define ACCESS_MASM(masm) masm-> |
| 995 #endif | 1007 #endif |
| 996 | 1008 |
| 997 } // namespace internal | 1009 } // namespace internal |
| 998 } // namespace v8 | 1010 } // namespace v8 |
| 999 | 1011 |
| 1000 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1012 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |