RFR: 8259822: [PPC64] Support the prefixed instruction format added in POWER10 [v3]
Corey Ashford
github.com+51754783+coreyashford at openjdk.java.net
Mon Feb 1 18:51:47 UTC 2021
On Mon, 1 Feb 2021 08:28:06 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:
>
> Update (2nd round) based on review comments
Just a few more minor things... several defined-but-not-used functions, and some little formatting issues.
src/hotspot/cpu/ppc/assembler_ppc.inline.hpp line 43:
> 41: // Add nop if a prefixed (two-word) instruction is going to cross a 64-byte boundary.
> 42: // (See Section 1.6 of Power ISA Version 3.1)
> 43: if(is_aligned(reinterpret_cast<uintptr_t>(pc()) + sizeof(int32_t), 64) ||
add space after 'if'
src/hotspot/cpu/ppc/assembler_ppc.inline.hpp line 149:
> 147: inline void Assembler::paddi( Register d, Register a, long si34, bool r = false) {
> 148: assert(a != R0 || r, "r0 not allowed, unless R is set (CIA relative)");
> 149: paddi_r0ok( d, a, si34, r);
The space after the ( isn't needed here, since it's not aligning with a similar call above or below.
src/hotspot/cpu/ppc/assembler_ppc.hpp line 1322:
> 1320:
> 1321: static inline int hi18_signed( int x) { return hi16_signed(x); }
> 1322: static inline int hi18_signed( long x) { return (int)((x << 30) >> 46); }
The extra spaces for alignment look a bit strange here. I think it should be:
static inline int hi18_signed( int x) ...
static inline int hi18_signed(long x) ...
Basically, remove the leading space from the ( long x) one and delete one from ( int x) to match.
src/hotspot/cpu/ppc/assembler_ppc.hpp line 1389:
> 1387: inline void pla( Register d, long si34);
> 1388: inline void pla( Register d, Register a, long si34);
> 1389: inline void psubi(Register d, Register a, long si34);
pla and psubi are defined but not used.
-------------
Changes requested by CoreyAshford at github.com (no known OpenJDK username).
PR: https://git.openjdk.java.net/jdk/pull/2095
More information about the hotspot-compiler-dev
mailing list