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);
1094 void multiply_to_len(Register x, Register xlen,
1095 Register y, Register ylen,
1096 Register z,
1097 Register tmp1, Register tmp2,
1098 Register tmp3, Register tmp4, Register tmp5);
1099
1100 // These generate optimized code for all supported s390 implementations, and are preferred for most uses.
1101 void pop_count_int(Register dst, Register src, Register tmp);
1102 void pop_count_long(Register dst, Register src, Register tmp);
1103
1104 // For legacy (pre-z15) use, but will work on all supported s390 implementations.
1105 void pop_count_int_without_ext3(Register dst, Register src, Register tmp);
1106 void pop_count_long_without_ext3(Register dst, Register src, Register tmp);
1107
1108 // Only for use on z15 or later s390 implementations.
1109 void pop_count_int_with_ext3(Register dst, Register src);
1110 void pop_count_long_with_ext3(Register dst, Register src);
1111
1112 void load_on_condition_imm_32(Register dst, int64_t i2, branch_condition cc);
1113 void load_on_condition_imm_64(Register dst, int64_t i2, branch_condition cc);
1114 };
1115
1116 #ifdef ASSERT
1117 // Return false (e.g. important for our impl. of virtual calls).
1118 inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
1119 #endif
1120
1121 #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);
1098 void multiply_to_len(Register x, Register xlen,
1099 Register y, Register ylen,
1100 Register z,
1101 Register tmp1, Register tmp2,
1102 Register tmp3, Register tmp4, Register tmp5);
1103
1104 // These generate optimized code for all supported s390 implementations, and are preferred for most uses.
1105 void pop_count_int(Register dst, Register src, Register tmp);
1106 void pop_count_long(Register dst, Register src, Register tmp);
1107
1108 // For legacy (pre-z15) use, but will work on all supported s390 implementations.
1109 void pop_count_int_without_ext3(Register dst, Register src, Register tmp);
1110 void pop_count_long_without_ext3(Register dst, Register src, Register tmp);
1111
1112 // Only for use on z15 or later s390 implementations.
1113 void pop_count_int_with_ext3(Register dst, Register src);
1114 void pop_count_long_with_ext3(Register dst, Register src);
1115
1116 void load_on_condition_imm_32(Register dst, int64_t i2, branch_condition cc);
1117 void load_on_condition_imm_64(Register dst, int64_t i2, branch_condition cc);
1118
1119 // Inline type specific methods
1120 #include "asm/macroAssembler_common.hpp"
1121 };
1122
1123 #ifdef ASSERT
1124 // Return false (e.g. important for our impl. of virtual calls).
1125 inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
1126 #endif
1127
1128 #endif // CPU_S390_MACROASSEMBLER_S390_HPP
|