< prev index next >

src/hotspot/cpu/s390/macroAssembler_s390.hpp

Print this page

  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  *
  25  */
  26 
  27 #ifndef CPU_S390_MACROASSEMBLER_S390_HPP
  28 #define CPU_S390_MACROASSEMBLER_S390_HPP
  29 
  30 #include "asm/assembler.hpp"
  31 #include "oops/accessDecorators.hpp"
  32 




  33 #define MODERN_IFUN(name)  ((void (MacroAssembler::*)(Register, int64_t, Register, Register))&MacroAssembler::name)
  34 #define CLASSIC_IFUN(name) ((void (MacroAssembler::*)(Register, int64_t, Register, Register))&MacroAssembler::name)
  35 #define MODERN_FFUN(name)  ((void (MacroAssembler::*)(FloatRegister, int64_t, Register, Register))&MacroAssembler::name)
  36 #define CLASSIC_FFUN(name) ((void (MacroAssembler::*)(FloatRegister, int64_t, Register, Register))&MacroAssembler::name)
  37 
  38 class MacroAssembler: public Assembler {
  39  public:
  40   MacroAssembler(CodeBuffer* code) : Assembler(code) {}
  41 
  42   //
  43   // Optimized instruction emitters
  44   //
  45 
  46   // Move register if destination register and target register are different.
  47   void lr_if_needed(Register rd, Register rs);
  48   void lgr_if_needed(Register rd, Register rs);
  49   void llgfr_if_needed(Register rd, Register rs);
  50   void ldr_if_needed(FloatRegister rd, FloatRegister rs);
  51 
  52   void move_reg_if_needed(Register dest, BasicType dest_type, Register src, BasicType src_type);

1106 
1107   // These generate optimized code for all supported s390 implementations, and are preferred for most uses.
1108   void pop_count_int(Register dst, Register src, Register tmp);
1109   void pop_count_long(Register dst, Register src, Register tmp);
1110 
1111   // For legacy (pre-z15) use, but will work on all supported s390 implementations.
1112   void pop_count_int_without_ext3(Register dst, Register src, Register tmp);
1113   void pop_count_long_without_ext3(Register dst, Register src, Register tmp);
1114 
1115   // Only for use on z15 or later s390 implementations.
1116   void pop_count_int_with_ext3(Register dst, Register src);
1117   void pop_count_long_with_ext3(Register dst, Register src);
1118 
1119   void push_cont_fastpath();
1120   void pop_cont_fastpath();
1121 
1122   void load_on_condition_imm_32(Register dst, int64_t i2, branch_condition cc);
1123   void load_on_condition_imm_64(Register dst, int64_t i2, branch_condition cc);
1124 
1125   void profile_receiver_type(Register recv, Register mdp, int mdp_offset, Register tmp1);



1126 };
1127 
1128 #ifdef ASSERT
1129 // Return false (e.g. important for our impl. of virtual calls).
1130 inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
1131 #endif
1132 
1133 #endif // CPU_S390_MACROASSEMBLER_S390_HPP

  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  *
  25  */
  26 
  27 #ifndef CPU_S390_MACROASSEMBLER_S390_HPP
  28 #define CPU_S390_MACROASSEMBLER_S390_HPP
  29 
  30 #include "asm/assembler.hpp"
  31 #include "oops/accessDecorators.hpp"
  32 
  33 class ciInlineKlass;
  34 class SigEntry;
  35 class VMRegPair;
  36 
  37 #define MODERN_IFUN(name)  ((void (MacroAssembler::*)(Register, int64_t, Register, Register))&MacroAssembler::name)
  38 #define CLASSIC_IFUN(name) ((void (MacroAssembler::*)(Register, int64_t, Register, Register))&MacroAssembler::name)
  39 #define MODERN_FFUN(name)  ((void (MacroAssembler::*)(FloatRegister, int64_t, Register, Register))&MacroAssembler::name)
  40 #define CLASSIC_FFUN(name) ((void (MacroAssembler::*)(FloatRegister, int64_t, Register, Register))&MacroAssembler::name)
  41 
  42 class MacroAssembler: public Assembler {
  43  public:
  44   MacroAssembler(CodeBuffer* code) : Assembler(code) {}
  45 
  46   //
  47   // Optimized instruction emitters
  48   //
  49 
  50   // Move register if destination register and target register are different.
  51   void lr_if_needed(Register rd, Register rs);
  52   void lgr_if_needed(Register rd, Register rs);
  53   void llgfr_if_needed(Register rd, Register rs);
  54   void ldr_if_needed(FloatRegister rd, FloatRegister rs);
  55 
  56   void move_reg_if_needed(Register dest, BasicType dest_type, Register src, BasicType src_type);

1110 
1111   // These generate optimized code for all supported s390 implementations, and are preferred for most uses.
1112   void pop_count_int(Register dst, Register src, Register tmp);
1113   void pop_count_long(Register dst, Register src, Register tmp);
1114 
1115   // For legacy (pre-z15) use, but will work on all supported s390 implementations.
1116   void pop_count_int_without_ext3(Register dst, Register src, Register tmp);
1117   void pop_count_long_without_ext3(Register dst, Register src, Register tmp);
1118 
1119   // Only for use on z15 or later s390 implementations.
1120   void pop_count_int_with_ext3(Register dst, Register src);
1121   void pop_count_long_with_ext3(Register dst, Register src);
1122 
1123   void push_cont_fastpath();
1124   void pop_cont_fastpath();
1125 
1126   void load_on_condition_imm_32(Register dst, int64_t i2, branch_condition cc);
1127   void load_on_condition_imm_64(Register dst, int64_t i2, branch_condition cc);
1128 
1129   void profile_receiver_type(Register recv, Register mdp, int mdp_offset, Register tmp1);
1130 
1131   // Inline type specific methods
1132   #include "asm/macroAssembler_common.hpp"
1133 };
1134 
1135 #ifdef ASSERT
1136 // Return false (e.g. important for our impl. of virtual calls).
1137 inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
1138 #endif
1139 
1140 #endif // CPU_S390_MACROASSEMBLER_S390_HPP
< prev index next >