RFR: 8259822: [PPC64] Support the prefixed instruction format added in POWER10

Kazunori Ogata ogatak at openjdk.java.net
Tue Jan 26 19:17:41 UTC 2021


On Thu, 21 Jan 2021 01:34:19 GMT, Corey Ashford <github.com+51754783+CoreyAshford at openjdk.org> wrote:

>> The POWER10 processor, which implements Power ISA 3.1 [1], supports new instruction formats where an instruction takes two 32bit words.  The first word is called prefix, and the instructions with prefix are called prefixed instructions.  With more bits in opcode and operand fields, POWER10 supports larger immediate value in an operand, as well as many new instructions.
>> 
>> This is the first changes to handle prefixed instructions, and this adds support of prefixed addi (= paddi) instruction as an example of prefix usage.  paddi accepts 34bit immediate value, while original addi accepts 16bit value.
>> 
>> [1] https://ibm.ent.box.com/s/hhjfw0x0lrbtyzmiaffnbxh2fuo0fog0
>
> src/hotspot/cpu/ppc/ppc.ad line 5925:
> 
>> 5923: instruct loadConL34(iRegLdst dst, immL34 src) %{
>> 5924:   match(Set dst src);
>> 5925:   ins_cost(DEFAULT_COST+1);
> 
> There's no predicate for >= POWER10.  I can see how this works because of the immL34 operand having its own predicate, but in later instructs, e.g. addL_reg_imm34 even though the operand is immI32, you still add the explicit predicate.
> 
> I'd rather there be an explicit POWER10 predicate in this instruct.

If predicate is added, adlc fails with an error message: "Syntax Error: :ADLC does not support instruction chain rules with predicates"  I think addL_reg_imm34 allows predicate because it is not called from other rules.  Is it better to leave some comments?  (BTW, immI32 is only for POWER10 or higher.  POWER9 version uses immI16 or immI16hi.)

-------------

PR: https://git.openjdk.java.net/jdk/pull/2095


More information about the hotspot-compiler-dev mailing list