< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.hpp

Print this page
*** 77,10 ***
--- 77,33 ---
    // helpers for FPU flag access
    // tmp is a temporary register, if none is available use noreg
    void save_rax   (Register tmp);
    void restore_rax(Register tmp);
  
+  public:
+ 
+   enum KlassDecodeMode {
+     KlassDecodeNone,
+     KlassDecodeZero,
+     KlassDecodeXor,
+     KlassDecodeAdd
+   };
+ 
+   // Return the current narrow Klass pointer decode mode. Initialized on first call.
+   static KlassDecodeMode klass_decode_mode();
+ 
+   // Given an arbitrary base address, return the KlassDecodeMode that would be used. Return KlassDecodeNone
+   // if base address is not valid for encoding.
+   static KlassDecodeMode klass_decode_mode_for_base(address base);
+ 
+   // Returns a static string
+   static const char* describe_klass_decode_mode(KlassDecodeMode mode);
+ 
+  private:
+ 
+   static KlassDecodeMode _klass_decode_mode;
+ 
   public:
    MacroAssembler(CodeBuffer* code) : Assembler(code) {}
  
   // These routines should emit JVMTI PopFrame and ForceEarlyReturn handling code.
   // The implementation is only non-empty for the InterpreterMacroAssembler,

*** 338,12 ***
    void load_method_holder_cld(Register rresult, Register rmethod);
  
    void load_method_holder(Register holder, Register method);
  
    // oop manipulations
!   void load_klass(Register dst, Register src, Register tmp);
!   void store_klass(Register dst, Register src, Register tmp);
  
    void access_load_at(BasicType type, DecoratorSet decorators, Register dst, Address src,
                        Register tmp1, Register thread_tmp);
    void access_store_at(BasicType type, DecoratorSet decorators, Address dst, Register src,
                         Register tmp1, Register tmp2, Register tmp3);
--- 361,16 ---
    void load_method_holder_cld(Register rresult, Register rmethod);
  
    void load_method_holder(Register holder, Register method);
  
    // oop manipulations
!   void load_klass(Register dst, Register src, Register tmp, bool null_check_src = false);
! #ifdef _LP64
+   void load_nklass(Register dst, Register src);
+ #else
+   void store_klass(Register dst, Register src);
+ #endif
  
    void access_load_at(BasicType type, DecoratorSet decorators, Register dst, Address src,
                        Register tmp1, Register thread_tmp);
    void access_store_at(BasicType type, DecoratorSet decorators, Address dst, Register src,
                         Register tmp1, Register tmp2, Register tmp3);

*** 358,12 ***
    // Used for storing NULL. All other oop constants should be
    // stored using routines that take a jobject.
    void store_heap_oop_null(Address dst);
  
  #ifdef _LP64
-   void store_klass_gap(Register dst, Register src);
- 
    // This dummy is to prevent a call to store_heap_oop from
    // converting a zero (like NULL) into a Register by giving
    // the compiler two choices it can't resolve
  
    void store_heap_oop(Address dst, void* dummy);
--- 385,10 ---
< prev index next >