hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp
changeset 23221 b70675ece1ce
parent 23211 954e3a81da29
child 23492 af5352f40e65
equal deleted inserted replaced
23220:fc827339dc37 23221:b70675ece1ce
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright 2012, 2013 SAP AG. All rights reserved.
     3  * Copyright 2012, 2014 SAP AG. All rights reserved.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     7  * under the terms of the GNU General Public License version 2 only, as
     8  * published by the Free Software Foundation.
     8  * published by the Free Software Foundation.
   564   // Check accessed object for null. Use SIGTRAP-based null checks on AIX.
   564   // Check accessed object for null. Use SIGTRAP-based null checks on AIX.
   565   inline void load_with_trap_null_check(Register d, int si16, Register s1);
   565   inline void load_with_trap_null_check(Register d, int si16, Register s1);
   566 
   566 
   567   // Load heap oop and decompress. Loaded oop may not be null.
   567   // Load heap oop and decompress. Loaded oop may not be null.
   568   inline void load_heap_oop_not_null(Register d, RegisterOrConstant offs, Register s1 = noreg);
   568   inline void load_heap_oop_not_null(Register d, RegisterOrConstant offs, Register s1 = noreg);
       
   569   inline void store_heap_oop_not_null(Register d, RegisterOrConstant offs, Register s1,
       
   570                                       /*specify if d must stay uncompressed*/ Register tmp = noreg);
   569 
   571 
   570   // Null allowed.
   572   // Null allowed.
   571   inline void load_heap_oop(Register d, RegisterOrConstant offs, Register s1 = noreg);
   573   inline void load_heap_oop(Register d, RegisterOrConstant offs, Register s1 = noreg);
   572 
   574 
   573   // Encode/decode heap oop. Oop may not be null, else en/decoding goes wrong.
   575   // Encode/decode heap oop. Oop may not be null, else en/decoding goes wrong.
   574   inline void encode_heap_oop_not_null(Register d);
   576   inline Register encode_heap_oop_not_null(Register d, Register src = noreg);
   575   inline void decode_heap_oop_not_null(Register d);
   577   inline void decode_heap_oop_not_null(Register d);
   576 
   578 
   577   // Null allowed.
   579   // Null allowed.
   578   inline void decode_heap_oop(Register d);
   580   inline void decode_heap_oop(Register d);
   579 
   581 
   580   // Load/Store klass oop from klass field. Compress.
   582   // Load/Store klass oop from klass field. Compress.
   581   void load_klass(Register dst, Register src);
   583   void load_klass(Register dst, Register src);
   582   void load_klass_with_trap_null_check(Register dst, Register src);
   584   void load_klass_with_trap_null_check(Register dst, Register src);
   583   void store_klass(Register dst_oop, Register klass, Register tmp = R0);
   585   void store_klass(Register dst_oop, Register klass, Register tmp = R0);
       
   586   void store_klass_gap(Register dst_oop, Register val = noreg); // Will store 0 if val not specified.
   584   static int instr_size_for_decode_klass_not_null();
   587   static int instr_size_for_decode_klass_not_null();
   585   void decode_klass_not_null(Register dst, Register src = noreg);
   588   void decode_klass_not_null(Register dst, Register src = noreg);
   586   void encode_klass_not_null(Register dst, Register src = noreg);
   589   void encode_klass_not_null(Register dst, Register src = noreg);
   587 
   590 
   588   // Load common heap base into register.
   591   // Load common heap base into register.
   691   void should_not_reach_here()                         { stop(stop_shouldnotreachhere,  "", -1); }
   694   void should_not_reach_here()                         { stop(stop_shouldnotreachhere,  "", -1); }
   692 
   695 
   693   void zap_from_to(Register low, int before, Register high, int after, Register val, Register addr) PRODUCT_RETURN;
   696   void zap_from_to(Register low, int before, Register high, int after, Register val, Register addr) PRODUCT_RETURN;
   694 };
   697 };
   695 
   698 
       
   699 // class SkipIfEqualZero:
       
   700 //
       
   701 // Instantiating this class will result in assembly code being output that will
       
   702 // jump around any code emitted between the creation of the instance and it's
       
   703 // automatic destruction at the end of a scope block, depending on the value of
       
   704 // the flag passed to the constructor, which will be checked at run-time.
       
   705 class SkipIfEqualZero : public StackObj {
       
   706  private:
       
   707   MacroAssembler* _masm;
       
   708   Label _label;
       
   709 
       
   710  public:
       
   711    // 'Temp' is a temp register that this object can use (and trash).
       
   712    explicit SkipIfEqualZero(MacroAssembler*, Register temp, const bool* flag_addr);
       
   713    ~SkipIfEqualZero();
       
   714 };
       
   715 
   696 #endif // CPU_PPC_VM_MACROASSEMBLER_PPC_HPP
   716 #endif // CPU_PPC_VM_MACROASSEMBLER_PPC_HPP