Skip to content

Commit 3c53057

Browse files
dbriemannTheRealMDoerr
authored andcommitted
8359232: [PPC64] C2: Clean up ppc.ad: add instr sizes, remove comments
Reviewed-by: mdoerr
1 parent 1fcede0 commit 3c53057

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

src/hotspot/cpu/ppc/ppc.ad

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6687,6 +6687,7 @@ instruct reinterpretL(iRegLdst dst) %{
66876687
match(Set dst (VectorReinterpret dst));
66886688
ins_cost(0);
66896689
format %{ "reinterpret $dst" %}
6690+
size(0);
66906691
ins_encode( /*empty*/ );
66916692
ins_pipe(pipe_class_empty);
66926693
%}
@@ -6695,6 +6696,7 @@ instruct reinterpretX(vecX dst) %{
66956696
match(Set dst (VectorReinterpret dst));
66966697
ins_cost(0);
66976698
format %{ "reinterpret $dst" %}
6699+
size(0);
66986700
ins_encode( /*empty*/ );
66996701
ins_pipe(pipe_class_empty);
67006702
%}
@@ -6814,7 +6816,6 @@ instruct cond_set_0_oop(iRegNdst dst, flagsRegSrc crx, iRegPsrc src1) %{
68146816
format %{ "CMOVE $dst, $crx eq, 0, $src1 \t// encode: preserve 0" %}
68156817
size(4);
68166818
ins_encode %{
6817-
// This is a Power7 instruction for which no machine description exists.
68186819
__ isel_0($dst$$Register, $crx$$CondRegister, Assembler::equal, $src1$$Register);
68196820
%}
68206821
ins_pipe(pipe_class_default);
@@ -6946,7 +6947,6 @@ instruct cond_set_0_ptr(iRegPdst dst, flagsRegSrc crx, iRegPsrc src1) %{
69466947
format %{ "CMOVE $dst, $crx eq, 0, $src1 \t// decode: preserve 0" %}
69476948
size(4);
69486949
ins_encode %{
6949-
// This is a Power7 instruction for which no machine description exists.
69506950
__ isel_0($dst$$Register, $crx$$CondRegister, Assembler::equal, $src1$$Register);
69516951
%}
69526952
ins_pipe(pipe_class_default);
@@ -7423,8 +7423,6 @@ instruct cmovI_reg_isel(cmpOp cmp, flagsRegSrc crx, iRegIdst dst, iRegIsrc src)
74237423
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
74247424
size(4);
74257425
ins_encode %{
7426-
// This is a Power7 instruction for which no machine description
7427-
// exists. Anyways, the scheduler should be off on Power7.
74287426
int cc = $cmp$$cmpcode;
74297427
__ isel($dst$$Register, $crx$$CondRegister,
74307428
(Assembler::Condition)(cc & 3), /*invert*/((~cc) & 8), $src$$Register);
@@ -7440,8 +7438,6 @@ instruct cmovL_reg_isel(cmpOp cmp, flagsRegSrc crx, iRegLdst dst, iRegLsrc src)
74407438
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
74417439
size(4);
74427440
ins_encode %{
7443-
// This is a Power7 instruction for which no machine description
7444-
// exists. Anyways, the scheduler should be off on Power7.
74457441
int cc = $cmp$$cmpcode;
74467442
__ isel($dst$$Register, $crx$$CondRegister,
74477443
(Assembler::Condition)(cc & 3), /*invert*/((~cc) & 8), $src$$Register);
@@ -7457,8 +7453,6 @@ instruct cmovN_reg_isel(cmpOp cmp, flagsRegSrc crx, iRegNdst dst, iRegNsrc src)
74577453
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
74587454
size(4);
74597455
ins_encode %{
7460-
// This is a Power7 instruction for which no machine description
7461-
// exists. Anyways, the scheduler should be off on Power7.
74627456
int cc = $cmp$$cmpcode;
74637457
__ isel($dst$$Register, $crx$$CondRegister,
74647458
(Assembler::Condition)(cc & 3), /*invert*/((~cc) & 8), $src$$Register);
@@ -7474,8 +7468,6 @@ instruct cmovP_reg_isel(cmpOp cmp, flagsRegSrc crx, iRegPdst dst, iRegPsrc src)
74747468
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
74757469
size(4);
74767470
ins_encode %{
7477-
// This is a Power7 instruction for which no machine description
7478-
// exists. Anyways, the scheduler should be off on Power7.
74797471
int cc = $cmp$$cmpcode;
74807472
__ isel($dst$$Register, $crx$$CondRegister,
74817473
(Assembler::Condition)(cc & 3), /*invert*/((~cc) & 8), $src$$Register);
@@ -9921,13 +9913,6 @@ instruct andcL_reg_reg(iRegLdst dst, iRegLsrc src1, iRegLsrc src2) %{
99219913
// of java.lang.Float etc., e.g.
99229914
// int floatToIntBits(float value)
99239915
// float intBitsToFloat(int bits)
9924-
//
9925-
// Notes on the implementation on ppc64:
9926-
// For Power7 and earlier, the rules are limited to those which move between a
9927-
// register and a stack-location, because we always have to go through memory
9928-
// when moving between a float register and an integer register.
9929-
// This restriction is removed in Power8 with the introduction of the mtfprd
9930-
// and mffprd instructions.
99319916

99329917
instruct moveL2D_reg(regD dst, iRegLsrc src) %{
99339918
match(Set dst (MoveL2D src));
@@ -12434,6 +12419,7 @@ instruct minI_reg_reg_isel(iRegIdst dst, iRegIsrc src1, iRegIsrc src2, flagsRegC
1243412419
effect(KILL cr0);
1243512420
ins_cost(DEFAULT_COST*2);
1243612421

12422+
size(8);
1243712423
ins_encode %{
1243812424
__ cmpw(CR0, $src1$$Register, $src2$$Register);
1243912425
__ isel($dst$$Register, CR0, Assembler::less, /*invert*/false, $src1$$Register, $src2$$Register);
@@ -12447,6 +12433,7 @@ instruct maxI_reg_reg_isel(iRegIdst dst, iRegIsrc src1, iRegIsrc src2, flagsRegC
1244712433
effect(KILL cr0);
1244812434
ins_cost(DEFAULT_COST*2);
1244912435

12436+
size(8);
1245012437
ins_encode %{
1245112438
__ cmpw(CR0, $src1$$Register, $src2$$Register);
1245212439
__ isel($dst$$Register, CR0, Assembler::greater, /*invert*/false, $src1$$Register, $src2$$Register);
@@ -12456,7 +12443,6 @@ instruct maxI_reg_reg_isel(iRegIdst dst, iRegIsrc src1, iRegIsrc src2, flagsRegC
1245612443

1245712444
//---------- Population Count Instructions ------------------------------------
1245812445

12459-
// Popcnt for Power7.
1246012446
instruct popCountI(iRegIdst dst, iRegIsrc src) %{
1246112447
match(Set dst (PopCountI src));
1246212448
predicate(UsePopCountInstruction);
@@ -12470,7 +12456,6 @@ instruct popCountI(iRegIdst dst, iRegIsrc src) %{
1247012456
ins_pipe(pipe_class_default);
1247112457
%}
1247212458

12473-
// Popcnt for Power7.
1247412459
instruct popCountL(iRegIdst dst, iRegLsrc src) %{
1247512460
predicate(UsePopCountInstruction);
1247612461
match(Set dst (PopCountL src));
@@ -13299,6 +13284,7 @@ instruct repl2F_immF0(iRegLdst dst, immF_0 zero) %{
1329913284
Matcher::vector_element_basic_type(n) == T_FLOAT);
1330013285

1330113286
format %{ "LI $dst, #0 \t// replicate2F" %}
13287+
size(4);
1330213288
ins_encode %{
1330313289
__ li($dst$$Register, 0x0);
1330413290
%}
@@ -13927,6 +13913,7 @@ instruct overflowAddL_reg_reg(flagsRegCR0 cr0, iRegLsrc op1, iRegLsrc op2) %{
1392713913
match(Set cr0 (OverflowAddL op1 op2));
1392813914

1392913915
format %{ "add_ $op1, $op2\t# overflow check long" %}
13916+
size(12);
1393013917
ins_encode %{
1393113918
__ li(R0, 0);
1393213919
__ mtxer(R0); // clear XER.SO
@@ -13939,6 +13926,7 @@ instruct overflowSubL_reg_reg(flagsRegCR0 cr0, iRegLsrc op1, iRegLsrc op2) %{
1393913926
match(Set cr0 (OverflowSubL op1 op2));
1394013927

1394113928
format %{ "subfo_ R0, $op2, $op1\t# overflow check long" %}
13929+
size(12);
1394213930
ins_encode %{
1394313931
__ li(R0, 0);
1394413932
__ mtxer(R0); // clear XER.SO
@@ -13951,6 +13939,7 @@ instruct overflowNegL_reg(flagsRegCR0 cr0, immL_0 zero, iRegLsrc op2) %{
1395113939
match(Set cr0 (OverflowSubL zero op2));
1395213940

1395313941
format %{ "nego_ R0, $op2\t# overflow check long" %}
13942+
size(12);
1395413943
ins_encode %{
1395513944
__ li(R0, 0);
1395613945
__ mtxer(R0); // clear XER.SO
@@ -13963,6 +13952,7 @@ instruct overflowMulL_reg_reg(flagsRegCR0 cr0, iRegLsrc op1, iRegLsrc op2) %{
1396313952
match(Set cr0 (OverflowMulL op1 op2));
1396413953

1396513954
format %{ "mulldo_ R0, $op1, $op2\t# overflow check long" %}
13955+
size(12);
1396613956
ins_encode %{
1396713957
__ li(R0, 0);
1396813958
__ mtxer(R0); // clear XER.SO
@@ -14001,6 +13991,7 @@ instruct repl4F_immF0(vecX dst, immF_0 zero) %{
1400113991
Matcher::vector_element_basic_type(n) == T_FLOAT);
1400213992

1400313993
format %{ "XXLXOR $dst, $zero \t// replicate4F" %}
13994+
size(4);
1400413995
ins_encode %{
1400513996
__ xxlxor($dst$$VectorSRegister, $dst$$VectorSRegister, $dst$$VectorSRegister);
1400613997
%}

0 commit comments

Comments
 (0)