Skip to content

Commit

Permalink
refact some codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Wanghuang-Huawei committed Mar 22, 2021
1 parent 8b70753 commit 630a267
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/hotspot/cpu/aarch64/aarch64_sve.ad
Expand Up @@ -3026,15 +3026,15 @@ instruct extractS(iRegINoSp dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
%}


instruct extractI(iRegINoSp dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
instruct extractI(iRegINoSp dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
%{
predicate(UseSVE > 0);
match(Set dst (ExtractI src idx));
effect(TEMP pTmp, KILL cr);
ins_cost(2 * SVE_COST);
format %{ "movzw rscratch1, $idx\n\t"
"sve_whilele $pTmp, S, zr, rscratch1\n\t"
"sve_lastb $dst, S, $pTmp, $src\n\t" %}
"sve_lastb $dst, S, $pTmp, $src\t# extract from vector(I)" %}
ins_encode %{
__ movzw(rscratch1, (int)($idx$$constant));
__ sve_whilele(as_PRegister($pTmp$$reg), __ S, zr, rscratch1);
Expand All @@ -3043,15 +3043,15 @@ instruct extractI(iRegINoSp dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr
ins_pipe(pipe_slow);
%}

instruct extractL(iRegLNoSp dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
instruct extractL(iRegLNoSp dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
%{
predicate(UseSVE > 0);
match(Set dst (ExtractL src idx));
effect(TEMP pTmp, KILL cr);
ins_cost(2 * SVE_COST);
format %{ "movzw rscratch1, $idx\n\t"
"sve_whilele $pTmp, D, zr, rscratch1\n\t"
"sve_lastb $dst, D, $pTmp, $src\n\t" %}
"sve_lastb $dst, D, $pTmp, $src\t# extract from vector(L)" %}
ins_encode %{
__ movzw(rscratch1, (int)($idx$$constant));
__ sve_whilele(as_PRegister($pTmp$$reg), __ D, zr, rscratch1);
Expand All @@ -3060,15 +3060,15 @@ instruct extractL(iRegLNoSp dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr
ins_pipe(pipe_slow);
%}

instruct extractF(vRegF dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
instruct extractF(vRegF dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
%{
predicate(UseSVE > 0);
match(Set dst (ExtractF src idx));
effect(TEMP pTmp, KILL cr);
ins_cost(2 * SVE_COST);
format %{ "movzw rscratch1, $idx\n\t"
"sve_whilele $pTmp, S, zr, rscratch1\n\t"
"sve_lastb $dst, S, $pTmp, $src\n\t" %}
"sve_lastb $dst, S, $pTmp, $src\t# extract from vector(F)" %}
ins_encode %{
__ movzw(rscratch1, (int)($idx$$constant));
__ sve_whilele(as_PRegister($pTmp$$reg), __ S, zr, rscratch1);
Expand All @@ -3077,15 +3077,15 @@ instruct extractF(vRegF dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
ins_pipe(pipe_slow);
%}

instruct extractD(vRegD dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
instruct extractD(vRegD dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
%{
predicate(UseSVE > 0);
match(Set dst (ExtractD src idx));
effect(TEMP pTmp, KILL cr);
ins_cost(2 * SVE_COST);
format %{ "movzw rscratch1, $idx\n\t"
"sve_whilele $pTmp, D, zr, rscratch1\n\t"
"sve_lastb $dst, D, $pTmp, $src\n\t" %}
"sve_lastb $dst, D, $pTmp, $src\t# extract from vector(D)" %}
ins_encode %{
__ movzw(rscratch1, (int)($idx$$constant));
__ sve_whilele(as_PRegister($pTmp$$reg), __ D, zr, rscratch1);
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/aarch64_sve_ad.m4
Expand Up @@ -1808,15 +1808,15 @@ VECTOR_EXTRACT_SXT(S, iRegINoSp, H, Register, 15U)

dnl
define(`VECTOR_EXTRACT', `
instruct extract$1`'($2 dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
instruct extract$1`'($2 dst, vReg src, immI idx, pRegGov pTmp, rFlagsReg cr)
%{
predicate(UseSVE > 0);
match(Set dst (Extract$1 src idx));
effect(TEMP pTmp, KILL cr);
ins_cost(2 * SVE_COST);
format %{ "movzw rscratch1, $idx\n\t"
"sve_whilele $pTmp, $3, zr, rscratch1\n\t"
"sve_lastb $dst, $3, $pTmp, $src\n\t" %}
"sve_lastb $dst, $3, $pTmp, $src\t# extract from vector($1)" %}
ins_encode %{
__ movzw(rscratch1, (int)($idx$$constant));
__ sve_whilele(as_PRegister($pTmp$$reg), __ $3, zr, rscratch1);
Expand Down

0 comments on commit 630a267

Please sign in to comment.