changeset 14827:8aa0a51a7137

8004548: remove unused AbstractAssembler::print(Label&) Reviewed-by: kvn, twisti Contributed-by: Bharadwaj Yadavalli <bharadwaj.yadavalli@oracle.com>
author twisti
date Mon, 17 Dec 2012 11:00:22 -0800
parents c2e4165eeb14
children bb9dffedf46c 03af9abeb93b
files hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp hotspot/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp hotspot/src/cpu/zero/vm/assembler_zero.cpp hotspot/src/cpu/zero/vm/assembler_zero.hpp hotspot/src/share/vm/asm/assembler.cpp hotspot/src/share/vm/asm/assembler.hpp
diffstat 8 files changed, 0 insertions(+), 125 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Fri Dec 14 12:11:17 2012 -0800
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Mon Dec 17 11:00:22 2012 -0800
@@ -100,34 +100,6 @@
 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
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp	Fri Dec 14 12:11:17 2012 -0800
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp	Mon Dec 17 11:00:22 2012 -0800
@@ -603,7 +603,6 @@
   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 @@
   // 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:
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp	Fri Dec 14 12:11:17 2012 -0800
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp	Mon Dec 17 11:00:22 2012 -0800
@@ -43,14 +43,6 @@
   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
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp	Fri Dec 14 12:11:17 2012 -0800
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp	Mon Dec 17 11:00:22 2012 -0800
@@ -126,25 +126,6 @@
     }
   }
 
-#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)
--- a/hotspot/src/cpu/zero/vm/assembler_zero.cpp	Fri Dec 14 12:11:17 2012 -0800
+++ b/hotspot/src/cpu/zero/vm/assembler_zero.cpp	Mon Dec 17 11:00:22 2012 -0800
@@ -56,12 +56,6 @@
   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());
--- a/hotspot/src/cpu/zero/vm/assembler_zero.hpp	Fri Dec 14 12:11:17 2012 -0800
+++ b/hotspot/src/cpu/zero/vm/assembler_zero.hpp	Mon Dec 17 11:00:22 2012 -0800
@@ -37,9 +37,6 @@
 
  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 {
--- a/hotspot/src/share/vm/asm/assembler.cpp	Fri Dec 14 12:11:17 2012 -0800
+++ b/hotspot/src/share/vm/asm/assembler.cpp	Mon Dec 17 11:00:22 2012 -0800
@@ -119,26 +119,6 @@
   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 @@
 #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
--- a/hotspot/src/share/vm/asm/assembler.hpp	Fri Dec 14 12:11:17 2012 -0800
+++ b/hotspot/src/share/vm/asm/assembler.hpp	Mon Dec 17 11:00:22 2012 -0800
@@ -277,9 +277,6 @@
   };
 #endif
 
-  // Label functions
-  void print(Label& L);
-
  public:
 
   // Creation
@@ -441,15 +438,6 @@
    */
   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