| 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 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1519 // The code patcher is used to patch (typically) small parts of code e.g. for | 1519 // The code patcher is used to patch (typically) small parts of code e.g. for |
| 1520 // debugging and other types of instrumentation. When using the code patcher | 1520 // debugging and other types of instrumentation. When using the code patcher |
| 1521 // the exact number of bytes specified must be emitted. It is not legal to emit | 1521 // the exact number of bytes specified must be emitted. It is not legal to emit |
| 1522 // relocation information. If any of these constraints are violated it causes | 1522 // relocation information. If any of these constraints are violated it causes |
| 1523 // an assertion to fail. | 1523 // an assertion to fail. |
| 1524 class CodePatcher { | 1524 class CodePatcher { |
| 1525 public: | 1525 public: |
| 1526 enum FlushICache { FLUSH, DONT_FLUSH }; | 1526 enum FlushICache { FLUSH, DONT_FLUSH }; |
| 1527 | 1527 |
| 1528 CodePatcher(byte* address, int instructions, FlushICache flush_cache = FLUSH); | 1528 CodePatcher(byte* address, int instructions, FlushICache flush_cache = FLUSH); |
| 1529 virtual ~CodePatcher(); | 1529 ~CodePatcher(); |
| 1530 | 1530 |
| 1531 // Macro assembler to emit code. | 1531 // Macro assembler to emit code. |
| 1532 MacroAssembler* masm() { return &masm_; } | 1532 MacroAssembler* masm() { return &masm_; } |
| 1533 | 1533 |
| 1534 // Emit an instruction directly. | 1534 // Emit an instruction directly. |
| 1535 void Emit(Instr instr); | 1535 void Emit(Instr instr); |
| 1536 | 1536 |
| 1537 // Emit the condition part of an instruction leaving the rest of the current | 1537 // Emit the condition part of an instruction leaving the rest of the current |
| 1538 // instruction unchanged. | 1538 // instruction unchanged. |
| 1539 void EmitCondition(Condition cond); | 1539 void EmitCondition(Condition cond); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1566 #define ACCESS_MASM(masm) \ | 1566 #define ACCESS_MASM(masm) \ |
| 1567 masm->stop(__FILE_LINE__); \ | 1567 masm->stop(__FILE_LINE__); \ |
| 1568 masm-> | 1568 masm-> |
| 1569 #else | 1569 #else |
| 1570 #define ACCESS_MASM(masm) masm-> | 1570 #define ACCESS_MASM(masm) masm-> |
| 1571 #endif | 1571 #endif |
| 1572 } | 1572 } |
| 1573 } // namespace v8::internal | 1573 } // namespace v8::internal |
| 1574 | 1574 |
| 1575 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 1575 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
| OLD | NEW |