| 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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 | 1018 |
| 1019 | 1019 |
| 1020 // The code patcher is used to patch (typically) small parts of code e.g. for | 1020 // The code patcher is used to patch (typically) small parts of code e.g. for |
| 1021 // debugging and other types of instrumentation. When using the code patcher | 1021 // debugging and other types of instrumentation. When using the code patcher |
| 1022 // the exact number of bytes specified must be emitted. Is not legal to emit | 1022 // the exact number of bytes specified must be emitted. Is not legal to emit |
| 1023 // relocation information. If any of these constraints are violated it causes | 1023 // relocation information. If any of these constraints are violated it causes |
| 1024 // an assertion. | 1024 // an assertion. |
| 1025 class CodePatcher { | 1025 class CodePatcher { |
| 1026 public: | 1026 public: |
| 1027 CodePatcher(byte* address, int size); | 1027 CodePatcher(byte* address, int size); |
| 1028 virtual ~CodePatcher(); | 1028 ~CodePatcher(); |
| 1029 | 1029 |
| 1030 // Macro assembler to emit code. | 1030 // Macro assembler to emit code. |
| 1031 MacroAssembler* masm() { return &masm_; } | 1031 MacroAssembler* masm() { return &masm_; } |
| 1032 | 1032 |
| 1033 private: | 1033 private: |
| 1034 byte* address_; // The address of the code being patched. | 1034 byte* address_; // The address of the code being patched. |
| 1035 int size_; // Number of bytes of the expected patch size. | 1035 int size_; // Number of bytes of the expected patch size. |
| 1036 MacroAssembler masm_; // Macro assembler used to generate the code. | 1036 MacroAssembler masm_; // Macro assembler used to generate the code. |
| 1037 }; | 1037 }; |
| 1038 | 1038 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 } \ | 1091 } \ |
| 1092 masm-> | 1092 masm-> |
| 1093 #else | 1093 #else |
| 1094 #define ACCESS_MASM(masm) masm-> | 1094 #define ACCESS_MASM(masm) masm-> |
| 1095 #endif | 1095 #endif |
| 1096 | 1096 |
| 1097 | 1097 |
| 1098 } } // namespace v8::internal | 1098 } } // namespace v8::internal |
| 1099 | 1099 |
| 1100 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1100 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |