diff --git a/src/cpu/sparc/vm/macroAssembler_sparc.cpp b/src/cpu/sparc/vm/macroAssembler_sparc.cpp index 2801a35a10d1e7c7f912ce313c4916bb9a0bf2b7..ac56573e76658b94b2df171cbb2868fa0a63a29f 100644 --- a/src/cpu/sparc/vm/macroAssembler_sparc.cpp +++ b/src/cpu/sparc/vm/macroAssembler_sparc.cpp @@ -100,34 +100,6 @@ const char* Argument::name() const { bool AbstractAssembler::pd_check_instruction_mark() { return false; } #endif - -void MacroAssembler::print_instruction(int inst) { - const char* s; - switch (inv_op(inst)) { - default: s = "????"; break; - case call_op: s = "call"; break; - case branch_op: - switch (inv_op2(inst)) { - case fb_op2: s = "fb"; break; - case fbp_op2: s = "fbp"; break; - case br_op2: s = "br"; break; - case bp_op2: s = "bp"; break; - case cb_op2: s = "cb"; break; - case bpr_op2: { - if (is_cbcond(inst)) { - s = is_cxb(inst) ? "cxb" : "cwb"; - } else { - s = "bpr"; - } - break; - } - default: s = "????"; break; - } - } - ::tty->print("%s", s); -} - - // Patch instruction inst at offset inst_pos to refer to dest_pos // and return the resulting instruction. // We should have pcs, not offsets, but since all is relative, it will work out diff --git a/src/cpu/sparc/vm/macroAssembler_sparc.hpp b/src/cpu/sparc/vm/macroAssembler_sparc.hpp index 1e1e6de9e47d8d302efe8a9d6e2932c15207db70..dffef7e794b291aef2d0edbb2692941263b056e5 100644 --- a/src/cpu/sparc/vm/macroAssembler_sparc.hpp +++ b/src/cpu/sparc/vm/macroAssembler_sparc.hpp @@ -603,7 +603,6 @@ class MacroAssembler : public Assembler { friend class Label; protected: - static void print_instruction(int inst); static int patched_branch(int dest_pos, int inst, int inst_pos); static int branch_destination(int inst, int pos); @@ -759,9 +758,6 @@ class MacroAssembler : public Assembler { // Required platform-specific helpers for Label::patch_instructions. // They _shadow_ the declarations in AbstractAssembler, which are undefined. void pd_patch_instruction(address branch, address target); -#ifndef PRODUCT - static void pd_print_patched_instruction(address branch); -#endif // sethi Macro handles optimizations and relocations private: diff --git a/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp b/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp index e9bdaea79ad4b6d161ea5ba44c7b73b31b8b21a2..871853c684d0420edb946ee428108be35629d0ec 100644 --- a/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp +++ b/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp @@ -43,14 +43,6 @@ inline void MacroAssembler::pd_patch_instruction(address branch, address target) stub_inst = patched_branch(target - branch, stub_inst, 0); } -#ifndef PRODUCT -inline void MacroAssembler::pd_print_patched_instruction(address branch) { - jint stub_inst = *(jint*) branch; - print_instruction(stub_inst); - ::tty->print("%s", " (unresolved)"); -} -#endif // PRODUCT - // Use the right loads/stores for the platform inline void MacroAssembler::ld_ptr( Register s1, Register s2, Register d ) { #ifdef _LP64 diff --git a/src/cpu/x86/vm/macroAssembler_x86.hpp b/src/cpu/x86/vm/macroAssembler_x86.hpp index 36d4d2311550b430a945cbb6a7ef19fbc776cc3a..10eab0c8a4fe648bd06e01acee507adc517f3326 100644 --- a/src/cpu/x86/vm/macroAssembler_x86.hpp +++ b/src/cpu/x86/vm/macroAssembler_x86.hpp @@ -126,25 +126,6 @@ class MacroAssembler: public Assembler { } } -#ifndef PRODUCT - static void pd_print_patched_instruction(address branch) { - const char* s; - unsigned char op = branch[0]; - if (op == 0xE8) { - s = "call"; - } else if (op == 0xE9 || op == 0xEB) { - s = "jmp"; - } else if ((op & 0xF0) == 0x70) { - s = "jcc"; - } else if (op == 0x0F) { - s = "jcc"; - } else { - s = "????"; - } - tty->print("%s (unresolved)", s); - } -#endif - // The following 4 methods return the offset of the appropriate move instruction // Support for fast byte/short loading with zero extension (depending on particular CPU) diff --git a/src/cpu/zero/vm/assembler_zero.cpp b/src/cpu/zero/vm/assembler_zero.cpp index 985f5d225be4ee00a5660b3ce5ec7c31ca49922e..2851558bf0023fedbda31128dd4b91dfb86f3490 100644 --- a/src/cpu/zero/vm/assembler_zero.cpp +++ b/src/cpu/zero/vm/assembler_zero.cpp @@ -56,12 +56,6 @@ void Assembler::pd_patch_instruction(address branch, address target) { ShouldNotCallThis(); } -#ifndef PRODUCT -void Assembler::pd_print_patched_instruction(address branch) { - ShouldNotCallThis(); -} -#endif // PRODUCT - void MacroAssembler::align(int modulus) { while (offset() % modulus != 0) emit_byte(AbstractAssembler::code_fill_byte()); diff --git a/src/cpu/zero/vm/assembler_zero.hpp b/src/cpu/zero/vm/assembler_zero.hpp index 724153982ac2e7601f3d840bcceb2eba66823480..f9564a54c0ac5acbd9908947d4de7e3084262177 100644 --- a/src/cpu/zero/vm/assembler_zero.hpp +++ b/src/cpu/zero/vm/assembler_zero.hpp @@ -37,9 +37,6 @@ class Assembler : public AbstractAssembler { public: void pd_patch_instruction(address branch, address target); -#ifndef PRODUCT - static void pd_print_patched_instruction(address branch); -#endif // PRODUCT }; class MacroAssembler : public Assembler { diff --git a/src/share/vm/asm/assembler.cpp b/src/share/vm/asm/assembler.cpp index 6a34989ec7b66b12a01693ac06de1f8679533afe..90a72ac6f48cad47ac99258da2baad6a50167d9d 100644 --- a/src/share/vm/asm/assembler.cpp +++ b/src/share/vm/asm/assembler.cpp @@ -119,26 +119,6 @@ void AbstractAssembler::a_long(jint x) { emit_long(x); } -// Labels refer to positions in the (to be) generated code. There are bound -// and unbound -// -// Bound labels refer to known positions in the already generated code. -// offset() is the position the label refers to. -// -// Unbound labels refer to unknown positions in the code to be generated; it -// may contain a list of unresolved displacements that refer to it -#ifndef PRODUCT -void AbstractAssembler::print(Label& L) { - if (L.is_bound()) { - tty->print_cr("bound label to %d|%d", L.loc_pos(), L.loc_sect()); - } else if (L.is_unbound()) { - L.print_instructions((MacroAssembler*)this); - } else { - tty->print_cr("label in inconsistent state (loc = %d)", L.loc()); - } -} -#endif // PRODUCT - void AbstractAssembler::bind(Label& L) { if (L.is_bound()) { @@ -342,28 +322,3 @@ bool MacroAssembler::needs_explicit_null_check(intptr_t offset) { #endif return offset < 0 || os::vm_page_size() <= offset; } - -#ifndef PRODUCT -void Label::print_instructions(MacroAssembler* masm) const { - CodeBuffer* cb = masm->code(); - for (int i = 0; i < _patch_index; ++i) { - int branch_loc; - if (i >= PatchCacheSize) { - branch_loc = _patch_overflow->at(i - PatchCacheSize); - } else { - branch_loc = _patches[i]; - } - int branch_pos = CodeBuffer::locator_pos(branch_loc); - int branch_sect = CodeBuffer::locator_sect(branch_loc); - address branch = cb->locator_address(branch_loc); - tty->print_cr("unbound label"); - tty->print("@ %d|%d ", branch_pos, branch_sect); - if (branch_sect == CodeBuffer::SECT_CONSTS) { - tty->print_cr(PTR_FORMAT, *(address*)branch); - continue; - } - masm->pd_print_patched_instruction(branch); - tty->cr(); - } -} -#endif // ndef PRODUCT diff --git a/src/share/vm/asm/assembler.hpp b/src/share/vm/asm/assembler.hpp index 5de33dd503edd959f7ffe343bc46488843606065..893ed13e9d586e1b93b1602520f30fae2a4b9ad6 100644 --- a/src/share/vm/asm/assembler.hpp +++ b/src/share/vm/asm/assembler.hpp @@ -277,9 +277,6 @@ class AbstractAssembler : public ResourceObj { }; #endif - // Label functions - void print(Label& L); - public: // Creation @@ -441,15 +438,6 @@ class AbstractAssembler : public ResourceObj { */ void pd_patch_instruction(address branch, address target); -#ifndef PRODUCT - /** - * Platform-dependent method of printing an instruction that needs to be - * patched. - * - * @param branch the instruction to be patched in the buffer. - */ - static void pd_print_patched_instruction(address branch); -#endif // PRODUCT }; #ifdef TARGET_ARCH_x86