Skip to content

Commit

Permalink
Review comments resolution.
Browse files Browse the repository at this point in the history
  • Loading branch information
jatin-bhateja committed Sep 13, 2024
1 parent 998501e commit c1c42d3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/gc/x/x_x86_64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ instruct xCompareAndSwapP(rRegI res, indirect mem, rRegP newval, rRegP tmp, rFla

format %{ "lock\n\t"
"cmpxchgq $newval, $mem\n\t"
"sete_with_zextl $res\n\t" %}
"setcc $res \t# emits sete + movzbl or setzue for APX" %}

ins_encode %{
precond($oldval$$Register == rax);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/gc/z/z_x86_64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ instruct zCompareAndSwapP(rRegI res, indirect mem, rRegP newval, rRegP tmp, rax_

format %{ "lock\n\t"
"cmpxchgq $newval, $mem\n\t"
"sete_with_zextl $res\n\t" %}
"setcc $res \t# emits sete + movzbl or setzue for APX" %}

ins_encode %{
assert_different_registers($oldval$$Register, $mem$$Register);
Expand Down
20 changes: 10 additions & 10 deletions src/hotspot/cpu/x86/x86_64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -7069,7 +7069,7 @@ instruct compareAndSwapP(rRegI res,

format %{ "cmpxchgq $mem_ptr,$newval\t# "
"If rax == $mem_ptr then store $newval into $mem_ptr\n\t"
"sete_with_zextl $res\n\t" %}
"setcc $res \t# emits sete + movzbl or setzue for APX" %}
ins_encode %{
__ lock();
__ cmpxchgq($newval$$Register, $mem_ptr$$Address);
Expand All @@ -7089,7 +7089,7 @@ instruct compareAndSwapL(rRegI res,

format %{ "cmpxchgq $mem_ptr,$newval\t# "
"If rax == $mem_ptr then store $newval into $mem_ptr\n\t"
"sete_with_zextl $res\n\t" %}
"setcc $res \t# emits sete + movzbl or setzue for APX" %}
ins_encode %{
__ lock();
__ cmpxchgq($newval$$Register, $mem_ptr$$Address);
Expand All @@ -7109,7 +7109,7 @@ instruct compareAndSwapI(rRegI res,

format %{ "cmpxchgl $mem_ptr,$newval\t# "
"If rax == $mem_ptr then store $newval into $mem_ptr\n\t"
"sete_with_zextl $res\n\t" %}
"setcc $res \t# emits sete + movzbl or setzue for APX" %}
ins_encode %{
__ lock();
__ cmpxchgl($newval$$Register, $mem_ptr$$Address);
Expand All @@ -7129,7 +7129,7 @@ instruct compareAndSwapB(rRegI res,

format %{ "cmpxchgb $mem_ptr,$newval\t# "
"If rax == $mem_ptr then store $newval into $mem_ptr\n\t"
"sete_with_zextl $res\n\t" %}
"setcc $res \t# emits sete + movzbl or setzue for APX" %}
ins_encode %{
__ lock();
__ cmpxchgb($newval$$Register, $mem_ptr$$Address);
Expand All @@ -7149,7 +7149,7 @@ instruct compareAndSwapS(rRegI res,

format %{ "cmpxchgw $mem_ptr,$newval\t# "
"If rax == $mem_ptr then store $newval into $mem_ptr\n\t"
"sete_with_zextl $res\n\t" %}
"setcc $res \t# emits sete + movzbl or setzue for APX" %}
ins_encode %{
__ lock();
__ cmpxchgw($newval$$Register, $mem_ptr$$Address);
Expand All @@ -7168,7 +7168,7 @@ instruct compareAndSwapN(rRegI res,

format %{ "cmpxchgl $mem_ptr,$newval\t# "
"If rax == $mem_ptr then store $newval into $mem_ptr\n\t"
"sete_with_zextl $res\n\t" %}
"setcc $res \t# emits sete + movzbl or setzue for APX" %}
ins_encode %{
__ lock();
__ cmpxchgl($newval$$Register, $mem_ptr$$Address);
Expand Down Expand Up @@ -9716,7 +9716,7 @@ instruct cmpLTMask(rRegI dst, rRegI p, rRegI q, rFlagsReg cr)

ins_cost(400);
format %{ "cmpl $p, $q\t# cmpLTMask\n\t"
"setlt_with_zextl $dst\n\t"
"setcc $dst \t# emits setlt + movzbl or setzul for APX"
"negl $dst" %}
ins_encode %{
__ cmpl($p$$Register, $q$$Register);
Expand Down Expand Up @@ -11845,7 +11845,7 @@ instruct cmpU3_reg_reg(rRegI dst, rRegI src1, rRegI src2, rFlagsReg flags)
format %{ "cmpl $src1, $src2\t# CmpL3\n\t"
"movl $dst, -1\n\t"
"jb,u done\n\t"
"setne_with_zextl $dst\n\t"
"setcc $dst \t# emits setne + movzbl or setzune for APX"
"done:" %}
ins_encode %{
Label done;
Expand All @@ -11869,7 +11869,7 @@ instruct cmpL3_reg_reg(rRegI dst, rRegL src1, rRegL src2, rFlagsReg flags)
format %{ "cmpq $src1, $src2\t# CmpL3\n\t"
"movl $dst, -1\n\t"
"jl,s done\n\t"
"setne_with_zextl $dst\n\t"
"setcc $dst \t# emits setne + movzbl or setzune for APX"
"done:" %}
ins_encode %{
Label done;
Expand All @@ -11893,7 +11893,7 @@ instruct cmpUL3_reg_reg(rRegI dst, rRegL src1, rRegL src2, rFlagsReg flags)
format %{ "cmpq $src1, $src2\t# CmpL3\n\t"
"movl $dst, -1\n\t"
"jb,u done\n\t"
"setne_with_zextl $dst\n\t"
"setcc $dst \t# emits setne + movzbl or setzune for APX"
"done:" %}
ins_encode %{
Label done;
Expand Down

0 comments on commit c1c42d3

Please sign in to comment.