OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC_MACRO_ASSEMBLER_PPC_H_ | 5 #ifndef V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
6 #define V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 6 #define V8_PPC_MACRO_ASSEMBLER_PPC_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 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 | 1534 |
1535 // The code patcher is used to patch (typically) small parts of code e.g. for | 1535 // The code patcher is used to patch (typically) small parts of code e.g. for |
1536 // debugging and other types of instrumentation. When using the code patcher | 1536 // debugging and other types of instrumentation. When using the code patcher |
1537 // the exact number of bytes specified must be emitted. It is not legal to emit | 1537 // the exact number of bytes specified must be emitted. It is not legal to emit |
1538 // relocation information. If any of these constraints are violated it causes | 1538 // relocation information. If any of these constraints are violated it causes |
1539 // an assertion to fail. | 1539 // an assertion to fail. |
1540 class CodePatcher { | 1540 class CodePatcher { |
1541 public: | 1541 public: |
1542 enum FlushICache { FLUSH, DONT_FLUSH }; | 1542 enum FlushICache { FLUSH, DONT_FLUSH }; |
1543 | 1543 |
1544 CodePatcher(byte* address, int instructions, FlushICache flush_cache = FLUSH); | 1544 CodePatcher(Isolate* isolate, byte* address, int instructions, |
| 1545 FlushICache flush_cache = FLUSH); |
1545 ~CodePatcher(); | 1546 ~CodePatcher(); |
1546 | 1547 |
1547 // Macro assembler to emit code. | 1548 // Macro assembler to emit code. |
1548 MacroAssembler* masm() { return &masm_; } | 1549 MacroAssembler* masm() { return &masm_; } |
1549 | 1550 |
1550 // Emit an instruction directly. | 1551 // Emit an instruction directly. |
1551 void Emit(Instr instr); | 1552 void Emit(Instr instr); |
1552 | 1553 |
1553 // Emit the condition part of an instruction leaving the rest of the current | 1554 // Emit the condition part of an instruction leaving the rest of the current |
1554 // instruction unchanged. | 1555 // instruction unchanged. |
(...skipping 27 matching lines...) Expand all Loading... |
1582 #define ACCESS_MASM(masm) \ | 1583 #define ACCESS_MASM(masm) \ |
1583 masm->stop(__FILE_LINE__); \ | 1584 masm->stop(__FILE_LINE__); \ |
1584 masm-> | 1585 masm-> |
1585 #else | 1586 #else |
1586 #define ACCESS_MASM(masm) masm-> | 1587 #define ACCESS_MASM(masm) masm-> |
1587 #endif | 1588 #endif |
1588 } // namespace internal | 1589 } // namespace internal |
1589 } // namespace v8 | 1590 } // namespace v8 |
1590 | 1591 |
1591 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 1592 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
OLD | NEW |