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_X87_MACRO_ASSEMBLER_X87_H_ | 5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ |
6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ | 6 #define V8_X87_MACRO_ASSEMBLER_X87_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 bool 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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 masm-> | 1077 masm-> |
1081 #else | 1078 #else |
1082 #define ACCESS_MASM(masm) masm-> | 1079 #define ACCESS_MASM(masm) masm-> |
1083 #endif | 1080 #endif |
1084 | 1081 |
1085 | 1082 |
1086 } // namespace internal | 1083 } // namespace internal |
1087 } // namespace v8 | 1084 } // namespace v8 |
1088 | 1085 |
1089 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ | 1086 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ |
OLD | NEW |