RFR: 8259822: [PPC64] Support the prefixed instruction format added in POWER10 [v5]
Kazunori Ogata
ogatak at openjdk.java.net
Wed Mar 24 15:23:42 UTC 2021
On Tue, 23 Mar 2021 16:02:33 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> 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.
@TheRealMDoerr Thank you for your review. I updated the patch based on your comments. As a result of this, all changes in assembler_ppc.cpp were reverted.
/hotspot/cpu/ppc/ppc.ad
@@ -5912,7 +6020,7 @@ instruct loadConL(iRegLdst dst, immL src, iRegLdst toc) %{
ins_field_cbuf_insts_offset(int);
format %{ "LD $dst, offset, $toc \t// load long $src from TOC" %}
- size(4);
+ size(12);
I picked up a diff for other changes by my mistake. Thank you for pointing this out.
/hotspot/cpu/ppc/assembler_ppc.hpp
static int is_paddi(const int* p, bool is_pli = false) {
int32_t* p_inst = (int32_t*)p;
if (is_aligned(reinterpret_cast<uintptr_t>(p_inst+1), 64) && is_nop(*p_inst)) {
> TheRealMDoerr
> Do we still need to skip over the nop? I think this should no longer happen.
I think it is still useful when JIT scans a sequence of generated code like `MacroAssembler::get_const()`. Assuming a generated sequence:
:
paddi rA, const32a(r0)
nop
paddi rB, const32b(r0)
it would be convenient if `get_const()` can check the next instruction after the first `paddi` without taking care of the nop, and it can start scanning from the nest instruction address (= label+8).
-------------
PR: https://git.openjdk.java.net/jdk/pull/2095
More information about the hotspot-compiler-dev
mailing list