< prev index next >

src/hotspot/cpu/ppc/macroAssembler_ppc.hpp

Print this page

  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #ifndef CPU_PPC_MACROASSEMBLER_PPC_HPP
  27 #define CPU_PPC_MACROASSEMBLER_PPC_HPP
  28 
  29 #include "asm/assembler.hpp"
  30 #include "oops/accessDecorators.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 // MacroAssembler extends Assembler by a few frequently used macros.
  34 
  35 class ciTypeArray;
  36 class OopMap;



  37 
  38 class MacroAssembler: public Assembler {
  39  public:
  40   MacroAssembler(CodeBuffer* code) : Assembler(code) {}
  41 
  42   // Indicates whether and, if so, which registers must be preserved when calling runtime code.
  43   enum PreservationLevel {
  44     PRESERVATION_NONE,
  45     PRESERVATION_FRAME_LR,
  46     PRESERVATION_FRAME_LR_GP_REGS,
  47     PRESERVATION_FRAME_LR_GP_FP_REGS
  48   };
  49 
  50   //
  51   // Optimized instruction emitters
  52   //
  53 
  54   inline static int largeoffset_si16_si16_hi(int si31) { return (si31 + (1<<15)) >> 16; }
  55   inline static int largeoffset_si16_si16_lo(int si31) { return si31 - (((si31 + (1<<15)) >> 16) << 16); }
  56 

 980 
 981  private:
 982   void stop(int type, const char* msg);
 983 
 984  public:
 985   enum {
 986     stop_stop               = 0,
 987     stop_untested           = 1,
 988     stop_unimplemented      = 2,
 989     stop_shouldnotreachhere = 3,
 990     stop_msg_present        = -0x8000
 991   };
 992 
 993   // Prints msg, dumps registers and stops execution.
 994   void stop                 (const char* msg = nullptr) { stop(stop_stop,               msg); }
 995   void untested             (const char* msg = nullptr) { stop(stop_untested,           msg); }
 996   void unimplemented        (const char* msg = nullptr) { stop(stop_unimplemented,      msg); }
 997   void should_not_reach_here(const char* msg = nullptr) { stop(stop_shouldnotreachhere, msg); }
 998 
 999   void zap_from_to(Register low, int before, Register high, int after, Register val, Register addr) PRODUCT_RETURN;



1000 };
1001 
1002 #endif // CPU_PPC_MACROASSEMBLER_PPC_HPP

  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #ifndef CPU_PPC_MACROASSEMBLER_PPC_HPP
  27 #define CPU_PPC_MACROASSEMBLER_PPC_HPP
  28 
  29 #include "asm/assembler.hpp"
  30 #include "oops/accessDecorators.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 // MacroAssembler extends Assembler by a few frequently used macros.
  34 
  35 class ciTypeArray;
  36 class OopMap;
  37 class ciInlineKlass;
  38 class SigEntry;
  39 class VMRegPair;
  40 
  41 class MacroAssembler: public Assembler {
  42  public:
  43   MacroAssembler(CodeBuffer* code) : Assembler(code) {}
  44 
  45   // Indicates whether and, if so, which registers must be preserved when calling runtime code.
  46   enum PreservationLevel {
  47     PRESERVATION_NONE,
  48     PRESERVATION_FRAME_LR,
  49     PRESERVATION_FRAME_LR_GP_REGS,
  50     PRESERVATION_FRAME_LR_GP_FP_REGS
  51   };
  52 
  53   //
  54   // Optimized instruction emitters
  55   //
  56 
  57   inline static int largeoffset_si16_si16_hi(int si31) { return (si31 + (1<<15)) >> 16; }
  58   inline static int largeoffset_si16_si16_lo(int si31) { return si31 - (((si31 + (1<<15)) >> 16) << 16); }
  59 

 983 
 984  private:
 985   void stop(int type, const char* msg);
 986 
 987  public:
 988   enum {
 989     stop_stop               = 0,
 990     stop_untested           = 1,
 991     stop_unimplemented      = 2,
 992     stop_shouldnotreachhere = 3,
 993     stop_msg_present        = -0x8000
 994   };
 995 
 996   // Prints msg, dumps registers and stops execution.
 997   void stop                 (const char* msg = nullptr) { stop(stop_stop,               msg); }
 998   void untested             (const char* msg = nullptr) { stop(stop_untested,           msg); }
 999   void unimplemented        (const char* msg = nullptr) { stop(stop_unimplemented,      msg); }
1000   void should_not_reach_here(const char* msg = nullptr) { stop(stop_shouldnotreachhere, msg); }
1001 
1002   void zap_from_to(Register low, int before, Register high, int after, Register val, Register addr) PRODUCT_RETURN;
1003 
1004   // Inline type specific methods
1005   #include "asm/macroAssembler_common.hpp"
1006 };
1007 
1008 #endif // CPU_PPC_MACROASSEMBLER_PPC_HPP
< prev index next >