20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef CPU_X86_C2_MACROASSEMBLER_X86_HPP
26 #define CPU_X86_C2_MACROASSEMBLER_X86_HPP
27
28 // C2_MacroAssembler contains high-level macros for C2
29
30 public:
31 Assembler::AvxVectorLen vector_length_encoding(int vlen_in_bytes);
32
33 // special instructions for EVEX
34 void setvectmask(Register dst, Register src, KRegister mask);
35 void restorevectmask(KRegister mask);
36
37 // Code used by cmpFastLock and cmpFastUnlock mach instructions in .ad file.
38 // See full desription in macroAssembler_x86.cpp.
39 void fast_lock(Register obj, Register box, Register tmp,
40 Register scr, Register cx1, Register cx2,
41 BiasedLockingCounters* counters,
42 RTMLockingCounters* rtm_counters,
43 RTMLockingCounters* stack_rtm_counters,
44 Metadata* method_data,
45 bool use_rtm, bool profile_rtm);
46 void fast_unlock(Register obj, Register box, Register tmp, bool use_rtm);
47
48 #if INCLUDE_RTM_OPT
49 void rtm_counters_update(Register abort_status, Register rtm_counters);
50 void branch_on_random_using_rdtsc(Register tmp, Register scr, int count, Label& brLabel);
51 void rtm_abort_ratio_calculation(Register tmp, Register rtm_counters_reg,
52 RTMLockingCounters* rtm_counters,
53 Metadata* method_data);
54 void rtm_profiling(Register abort_status_Reg, Register rtm_counters_Reg,
55 RTMLockingCounters* rtm_counters, Metadata* method_data, bool profile_rtm);
56 void rtm_retry_lock_on_abort(Register retry_count, Register abort_status, Label& retryLabel);
57 void rtm_retry_lock_on_busy(Register retry_count, Register box, Register tmp, Register scr, Label& retryLabel);
58 void rtm_stack_locking(Register obj, Register tmp, Register scr,
59 Register retry_on_abort_count,
60 RTMLockingCounters* stack_rtm_counters,
|
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef CPU_X86_C2_MACROASSEMBLER_X86_HPP
26 #define CPU_X86_C2_MACROASSEMBLER_X86_HPP
27
28 // C2_MacroAssembler contains high-level macros for C2
29
30 public:
31 Assembler::AvxVectorLen vector_length_encoding(int vlen_in_bytes);
32
33 // special instructions for EVEX
34 void setvectmask(Register dst, Register src, KRegister mask);
35 void restorevectmask(KRegister mask);
36
37 // Code used by cmpFastLock and cmpFastUnlock mach instructions in .ad file.
38 // See full desription in macroAssembler_x86.cpp.
39 void fast_lock(Register obj, Register box, Register tmp,
40 Register scr, Register cx1, Register cx2, Register thread,
41 BiasedLockingCounters* counters,
42 RTMLockingCounters* rtm_counters,
43 RTMLockingCounters* stack_rtm_counters,
44 Metadata* method_data,
45 bool use_rtm, bool profile_rtm);
46 void fast_unlock(Register obj, Register box, Register tmp, bool use_rtm);
47
48 #if INCLUDE_RTM_OPT
49 void rtm_counters_update(Register abort_status, Register rtm_counters);
50 void branch_on_random_using_rdtsc(Register tmp, Register scr, int count, Label& brLabel);
51 void rtm_abort_ratio_calculation(Register tmp, Register rtm_counters_reg,
52 RTMLockingCounters* rtm_counters,
53 Metadata* method_data);
54 void rtm_profiling(Register abort_status_Reg, Register rtm_counters_Reg,
55 RTMLockingCounters* rtm_counters, Metadata* method_data, bool profile_rtm);
56 void rtm_retry_lock_on_abort(Register retry_count, Register abort_status, Label& retryLabel);
57 void rtm_retry_lock_on_busy(Register retry_count, Register box, Register tmp, Register scr, Label& retryLabel);
58 void rtm_stack_locking(Register obj, Register tmp, Register scr,
59 Register retry_on_abort_count,
60 RTMLockingCounters* stack_rtm_counters,
|