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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 Register reg5 = no_reg, | 56 Register reg5 = no_reg, |
57 Register reg6 = no_reg, | 57 Register reg6 = no_reg, |
58 Register reg7 = no_reg, | 58 Register reg7 = no_reg, |
59 Register reg8 = no_reg); | 59 Register reg8 = no_reg); |
60 #endif | 60 #endif |
61 | 61 |
62 | 62 |
63 // MacroAssembler implements a collection of frequently used macros. | 63 // MacroAssembler implements a collection of frequently used macros. |
64 class MacroAssembler: public Assembler { | 64 class MacroAssembler: public Assembler { |
65 public: | 65 public: |
66 // The isolate parameter can be NULL if the macro assembler should | 66 MacroAssembler(Isolate* isolate, void* buffer, int size, |
67 // not use isolate-dependent functionality. In this case, it's the | 67 CodeObjectRequired create_code_object); |
68 // responsibility of the caller to never invoke such function on the | |
69 // macro assembler. | |
70 MacroAssembler(Isolate* isolate, void* buffer, int size); | |
71 | 68 |
72 void Load(Register dst, const Operand& src, Representation r); | 69 void Load(Register dst, const Operand& src, Representation r); |
73 void Store(Register src, const Operand& dst, Representation r); | 70 void Store(Register src, const Operand& dst, Representation r); |
74 | 71 |
75 // Load a register with a long value as efficiently as possible. | 72 // Load a register with a long value as efficiently as possible. |
76 void Set(Register dst, int32_t x) { | 73 void Set(Register dst, int32_t x) { |
77 if (x == 0) { | 74 if (x == 0) { |
78 xor_(dst, dst); | 75 xor_(dst, dst); |
79 } else { | 76 } else { |
80 mov(dst, Immediate(x)); | 77 mov(dst, Immediate(x)); |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 masm-> | 1130 masm-> |
1134 #else | 1131 #else |
1135 #define ACCESS_MASM(masm) masm-> | 1132 #define ACCESS_MASM(masm) masm-> |
1136 #endif | 1133 #endif |
1137 | 1134 |
1138 | 1135 |
1139 } // namespace internal | 1136 } // namespace internal |
1140 } // namespace v8 | 1137 } // namespace v8 |
1141 | 1138 |
1142 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1139 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |