RFR: 8259822: [PPC64] Support the prefixed instruction format added in POWER10 [v6]
Martin Doerr
mdoerr at openjdk.java.net
Wed Mar 24 16:10:47 UTC 2021
On Wed, 24 Mar 2021 15:20:04 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:
>
> Fix errosrs and remove in_scratch_emit_size()
Thanks for the update. Looks basically good to me, but the merge conflict needs to get resolved. Also, please check for unused code.
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); }
Sees like they are unused and should get removed.
src/hotspot/cpu/ppc/assembler_ppc.hpp line 1347:
> 1345:
> 1346: inline void emit_int32(int); // shadows AbstractAssembler::emit_int32
> 1347: inline void emit_prefix(int); // emit prefix word only (and a nop to skip 64-byte boundary)
Unused.
src/hotspot/cpu/ppc/assembler_ppc.hpp line 1531:
> 1529: return false;
> 1530: }
> 1531: }
I can't see any usage of it. As Corey stated, unused code should better get removed because it doesn't get tested and may break unless you're planning to use it in the near future or need it for debugging purposes.
src/hotspot/cpu/ppc/assembler_ppc.inline.hpp line 3:
> 1: /*
> 2: * Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
> 3: * Copyright (c) 2012, 2021 SAP SE. All rights reserved.
The Copyright year change in this file was already done by another change. You need to revert it in order to resolve the merge conflict.
-------------
Changes requested by mdoerr (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2095
More information about the hotspot-compiler-dev
mailing list