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

Martin Doerr mdoerr at openjdk.java.net
Tue Mar 23 16:05:47 UTC 2021


On Tue, 23 Mar 2021 10:49:03 GMT, Kazunori Ogata <ogatak 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
>
> Kazunori Ogata has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use ins_alignment to put a nop for 64-byte alignment

Thanks for contributing this and for using ins_alignment. Update needs further changes.

src/hotspot/cpu/ppc/assembler_ppc.cpp line 75:

> 73: #endif
> 74: }
> 75: 

I don't think this is still needed. Please revert changes to this file.

src/hotspot/cpu/ppc/assembler_ppc.hpp line 1343:

> 1341: 
> 1342:   static bool in_scratch_emit_size();
> 1343: 

Should not be needed any more.

src/hotspot/cpu/ppc/ppc.ad line 1163:

> 1161:   assert(PowerArchitecturePPC64 >= 10 && (CodeEntryAlignment & 63) == 0,
> 1162:          "Code buffer must be aligned to a multiple of 64 byte");
> 1163:   if (is_aligned(current_offset + BytesPerInstWord, 64) || Assembler::in_scratch_emit_size()) {

compute_padding is not called during scratch emit. So please remove Assembler::in_scratch_emit_size().

src/hotspot/cpu/ppc/ppc.ad line 5906:

> 5904:   %}
> 5905:   ins_pipe(pipe_class_default);
> 5906:   ins_alignment(4);

ins_alignment is specified in number of nops, not number of Bytes. So it should be 2 which means that up to 1 nop can get inserted.

src/hotspot/cpu/ppc/ppc.ad line 6023:

> 6021: 
> 6022:   format %{ "LD      $dst, offset, $toc \t// load long $src from TOC" %}
> 6023:   size(12);

Why are you changing this? Looks wrong. I can only see 1 4 Byte instruction.

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

Changes requested by mdoerr (Reviewer).

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


More information about the hotspot-compiler-dev mailing list