hotspot/src/cpu/sparc/vm/disassembler_sparc.hpp

Print this page
rev 611 : Merge
   1 #ifdef USE_PRAGMA_IDENT_HDR
   2 #pragma ident "@(#)disassembler_sparc.hpp       1.25 07/05/05 17:04:28 JVM"
   3 #endif
   4 /*
   5  * Copyright 1997-1999 Sun Microsystems, Inc.  All Rights Reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  *  
  26  */
  27 
  28 // The disassembler prints out sparc code annotated
  29 // with Java specific information.

  30 
  31 class Disassembler {
  32 #ifndef PRODUCT
  33  private:
  34   // points to the library.
  35   static void*    _library;
  36   // points to the print_insn_sparc function.
  37   static dll_func _print_insn_sparc;
  38   // tries to load library and return whether it succedded.
  39   static bool load_library();
  40   // decodes one instruction and return the start of the next instruction.
  41   static address decode_instruction(address start, DisassemblerEnv* env);
  42 #endif
  43  public:
  44   static void decode(CodeBlob *cb,               outputStream* st = NULL) PRODUCT_RETURN;
  45   static void decode(nmethod* nm,                outputStream* st = NULL) PRODUCT_RETURN;
  46   static void decode(u_char* begin, u_char* end, outputStream* st = NULL) PRODUCT_RETURN;
  47 };
  48 
  49 //Reconciliation History
  50 // 1.9 98/04/29 10:45:51 disassembler_i486.hpp
  51 // 1.10 98/05/11 16:47:20 disassembler_i486.hpp
  52 // 1.12 99/06/22 16:37:37 disassembler_i486.hpp
  53 // 1.13 99/08/06 10:09:04 disassembler_i486.hpp
  54 //End
   1 #ifdef USE_PRAGMA_IDENT_HDR
   2 #pragma ident "@(#)disassembler_sparc.hpp       1.25 07/05/05 17:04:28 JVM"
   3 #endif
   4 /*
   5  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  *  
  26  */
  27 
  28   static int pd_instruction_alignment() {
  29     return sizeof(int);
  30   }
  31 
  32   static const char* pd_cpu_opts() {
  33     return (VM_Version::v9_instructions_work()?
  34             (VM_Version::v8_instructions_work()? "" : "v9only") : "v8only");
  35   }