hotspot/src/cpu/sparc/vm/assembler_sparc.hpp
changeset 360 21d113ecbf6a
parent 1 489c9b5090e2
child 371 1aacedc9db7c
equal deleted inserted replaced
357:f4edb0d9f109 360:21d113ecbf6a
    57 // %%%% The interpreter should be revisited to reduce global scratch regs.
    57 // %%%% The interpreter should be revisited to reduce global scratch regs.
    58 
    58 
    59 // This global always holds the current JavaThread pointer:
    59 // This global always holds the current JavaThread pointer:
    60 
    60 
    61 REGISTER_DECLARATION(Register, G2_thread , G2);
    61 REGISTER_DECLARATION(Register, G2_thread , G2);
       
    62 REGISTER_DECLARATION(Register, G6_heapbase , G6);
    62 
    63 
    63 // The following globals are part of the Java calling convention:
    64 // The following globals are part of the Java calling convention:
    64 
    65 
    65 REGISTER_DECLARATION(Register, G5_method             , G5);
    66 REGISTER_DECLARATION(Register, G5_method             , G5);
    66 REGISTER_DECLARATION(Register, G5_megamorphic_method , G5_method);
    67 REGISTER_DECLARATION(Register, G5_megamorphic_method , G5_method);
  1973   inline void stbool( Register d, const Address& a, int offset = 0 ) { stb(d, a, offset); }
  1974   inline void stbool( Register d, const Address& a, int offset = 0 ) { stb(d, a, offset); }
  1974   inline void ldbool( const Address& a, Register d, int offset = 0 ) { ldsb( a, d, offset ); }
  1975   inline void ldbool( const Address& a, Register d, int offset = 0 ) { ldsb( a, d, offset ); }
  1975   inline void tstbool( Register s ) { tst(s); }
  1976   inline void tstbool( Register s ) { tst(s); }
  1976   inline void movbool( bool boolconst, Register d) { mov( (int) boolconst, d); }
  1977   inline void movbool( bool boolconst, Register d) { mov( (int) boolconst, d); }
  1977 
  1978 
       
  1979   // klass oop manipulations if compressed
       
  1980   void load_klass(Register  src_oop, Register dst);
       
  1981   void store_klass(Register dst_oop, Register s1);
       
  1982 
       
  1983    // oop manipulations
       
  1984   void load_heap_oop(const Address& s, Register d, int offset = 0);
       
  1985   void load_heap_oop(Register s1, Register s2, Register d);
       
  1986   void load_heap_oop(Register s1, int simm13a, Register d);
       
  1987   void store_heap_oop(Register d, Register s1, Register s2);
       
  1988   void store_heap_oop(Register d, Register s1, int simm13a);
       
  1989   void store_heap_oop(Register d, const Address& a, int offset = 0);
       
  1990 
       
  1991   void encode_heap_oop(Register src, Register dst);
       
  1992   void encode_heap_oop(Register r) {
       
  1993     encode_heap_oop(r, r);
       
  1994   }
       
  1995   void decode_heap_oop(Register src, Register dst);
       
  1996   void decode_heap_oop(Register r) {
       
  1997     decode_heap_oop(r, r);
       
  1998   }
       
  1999   void encode_heap_oop_not_null(Register r);
       
  2000   void decode_heap_oop_not_null(Register r);
       
  2001 
  1978   // Support for managing the JavaThread pointer (i.e.; the reference to
  2002   // Support for managing the JavaThread pointer (i.e.; the reference to
  1979   // thread-local information).
  2003   // thread-local information).
  1980   void get_thread();                                // load G2_thread
  2004   void get_thread();                                // load G2_thread
  1981   void verify_thread();                             // verify G2_thread contents
  2005   void verify_thread();                             // verify G2_thread contents
  1982   void save_thread   (const Register threache); // save to cache
  2006   void save_thread   (const Register threache); // save to cache
  2047   void push_FPU_state();
  2071   void push_FPU_state();
  2048   void pop_FPU_state();
  2072   void pop_FPU_state();
  2049 
  2073 
  2050   void push_CPU_state();
  2074   void push_CPU_state();
  2051   void pop_CPU_state();
  2075   void pop_CPU_state();
       
  2076 
       
  2077   // if heap base register is used - reinit it with the correct value
       
  2078   void reinit_heapbase();
  2052 
  2079 
  2053   // Debugging
  2080   // Debugging
  2054   void _verify_oop(Register reg, const char * msg, const char * file, int line);
  2081   void _verify_oop(Register reg, const char * msg, const char * file, int line);
  2055   void _verify_oop_addr(Address addr, const char * msg, const char * file, int line);
  2082   void _verify_oop_addr(Address addr, const char * msg, const char * file, int line);
  2056 
  2083