5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef PRODUCT 26 class InstructionPrinter: public InstructionVisitor { 27 private: 28 outputStream* _output; 29 bool _print_phis; 30 31 enum LayoutConstants { 32 bci_pos = 2, 33 use_pos = 7, 34 temp_pos = 12, 35 instr_pos = 19, 36 end_pos = 60 37 }; 38 39 bool is_illegal_phi(Value v); 40 41 public: 42 InstructionPrinter(bool print_phis = true, outputStream* output = tty) 43 : _print_phis(print_phis) 44 , _output(output) 109 virtual void do_If (If* x); 110 virtual void do_IfInstanceOf (IfInstanceOf* x); 111 virtual void do_TableSwitch (TableSwitch* x); 112 virtual void do_LookupSwitch (LookupSwitch* x); 113 virtual void do_Return (Return* x); 114 virtual void do_Throw (Throw* x); 115 virtual void do_Base (Base* x); 116 virtual void do_OsrEntry (OsrEntry* x); 117 virtual void do_ExceptionObject(ExceptionObject* x); 118 virtual void do_RoundFP (RoundFP* x); 119 virtual void do_UnsafeGetRaw (UnsafeGetRaw* x); 120 virtual void do_UnsafePutRaw (UnsafePutRaw* x); 121 virtual void do_UnsafeGetObject(UnsafeGetObject* x); 122 virtual void do_UnsafePutObject(UnsafePutObject* x); 123 virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x); 124 virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x); 125 virtual void do_ProfileCall (ProfileCall* x); 126 virtual void do_ProfileInvoke (ProfileInvoke* x); 127 }; 128 #endif // PRODUCT | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_VM_C1_C1_INSTRUCTIONPRINTER_HPP 26 #define SHARE_VM_C1_C1_INSTRUCTIONPRINTER_HPP 27 28 #include "c1/c1_IR.hpp" 29 #include "c1/c1_Instruction.hpp" 30 #include "c1/c1_Runtime1.hpp" 31 32 #ifndef PRODUCT 33 class InstructionPrinter: public InstructionVisitor { 34 private: 35 outputStream* _output; 36 bool _print_phis; 37 38 enum LayoutConstants { 39 bci_pos = 2, 40 use_pos = 7, 41 temp_pos = 12, 42 instr_pos = 19, 43 end_pos = 60 44 }; 45 46 bool is_illegal_phi(Value v); 47 48 public: 49 InstructionPrinter(bool print_phis = true, outputStream* output = tty) 50 : _print_phis(print_phis) 51 , _output(output) 116 virtual void do_If (If* x); 117 virtual void do_IfInstanceOf (IfInstanceOf* x); 118 virtual void do_TableSwitch (TableSwitch* x); 119 virtual void do_LookupSwitch (LookupSwitch* x); 120 virtual void do_Return (Return* x); 121 virtual void do_Throw (Throw* x); 122 virtual void do_Base (Base* x); 123 virtual void do_OsrEntry (OsrEntry* x); 124 virtual void do_ExceptionObject(ExceptionObject* x); 125 virtual void do_RoundFP (RoundFP* x); 126 virtual void do_UnsafeGetRaw (UnsafeGetRaw* x); 127 virtual void do_UnsafePutRaw (UnsafePutRaw* x); 128 virtual void do_UnsafeGetObject(UnsafeGetObject* x); 129 virtual void do_UnsafePutObject(UnsafePutObject* x); 130 virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x); 131 virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x); 132 virtual void do_ProfileCall (ProfileCall* x); 133 virtual void do_ProfileInvoke (ProfileInvoke* x); 134 }; 135 #endif // PRODUCT 136 137 #endif // SHARE_VM_C1_C1_INSTRUCTIONPRINTER_HPP |