Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-25 Thread Kim Barrett
On Thu, 25 May 2023 07:16:29 GMT, JoKern65 wrote: >> That's not what I see in this PR, and not what I see in the repository after >> the integration. Where are you seeing >> that? (If in your local repository, maybe you forgot a push to the PR?) > > I checked it directly in repository > [https

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-25 Thread JoKern65
On Wed, 24 May 2023 03:13:34 GMT, Kim Barrett wrote: >> Strange the last resulting change I see is >> `struct shmid_ds shm_buf{};` > > That's not what I see in this PR, and not what I see in the repository after > the integration. Where are you seeing > that? (If in your local repository, mayb

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-23 Thread Kim Barrett
On Mon, 22 May 2023 07:09:30 GMT, JoKern65 wrote: >> The final suggested change (to direct-value-initialize the object) seems to >> have *not* been made. >> >> However, I think it doesn't matter. The mentioned restriction against being >> non-empty until C23 is not relevant. >> This is C++, n

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-22 Thread JoKern65
On Thu, 18 May 2023 15:20:22 GMT, Kim Barrett wrote: >> Use >> >> struct shmid_ds shm_buf{}; >> >> to _value-initialize_. Calls the default constructor if there is one. >> Otherwise, performs _zero-initialization_, >> which is what we want here. > > The final suggested change (to direct-value

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-18 Thread Kim Barrett
On Wed, 17 May 2023 09:44:47 GMT, Kim Barrett wrote: >> os_aix.cpp:460:37: error: missing field 'gid' initializer >> [-Werror,-Wmissing-field-initializers] >> struct shmid_ds shm_buf = { 0 }; >> >> ={} seems to work, but I do not know if it works on every compiler because >> standard say

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-17 Thread Matthias Baesken
On Fri, 12 May 2023 16:16:01 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Many of those are in the aix or ppc specific codebase and could be addressed >> by small adjustments. >> A l

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-17 Thread JoKern65
On Fri, 12 May 2023 16:16:01 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Many of those are in the aix or ppc specific codebase and could be addressed >> by small adjustments. >> A l

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-17 Thread Kim Barrett
On Mon, 15 May 2023 09:52:59 GMT, JoKern65 wrote: >> Such a fix of adlc is probably out of scope for this change though. We >> should probably have a separate bug for that. > > And what should I use as a workaround meanwhile to get our new compiler > through? Now that I understand what the pr

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-17 Thread Kim Barrett
On Tue, 16 May 2023 07:22:44 GMT, Matthias Baesken wrote: >> I think disabling the warning is fine. Alternatively, we could `#define >> MIN_INT16 -32768` somewhere or introduce `const int16_t min_int16 = >> (int16_t)1 << (sizeof(int16_t)*BitsPerByte-1);`. What do you prefer, Kim? > > Hi Martin/

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-17 Thread Kim Barrett
On Mon, 15 May 2023 09:34:28 GMT, JoKern65 wrote: >> src/hotspot/os/aix/os_aix.cpp line 464: >> >>> 462: guarantee0(shmid != -1); // Should always work. >>> 463: // Try to set pagesize. >>> 464: struct shmid_ds shm_buf = { >>> {0,0,0,0,0,0,0,0},0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; >

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-16 Thread Matthias Baesken
On Mon, 15 May 2023 12:25:29 GMT, Martin Doerr wrote: >> What is the warning here? Note that we've already turned off >> `-Wshift-negative-value` for gcc and xlc >> (but not for clang, for some reason). See `# Disabled warnings` in >> CompileJvm.gmk. > > I think disabling the warning is fine.

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-15 Thread Martin Doerr
On Fri, 12 May 2023 21:51:59 GMT, Kim Barrett wrote: >> src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp line 426: >> >>> 424: // Missing test if instr is commutative and if we should swap. >>> 425: if (right.value()->type()->as_LongConstant() && >>> 426: (x->op() == Bytecodes::_lsub && >>

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-15 Thread Martin Doerr
On Fri, 12 May 2023 16:16:01 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Many of those are in the aix or ppc specific codebase and could be addressed >> by small adjustments. >> A l

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-15 Thread JoKern65
On Mon, 15 May 2023 09:32:26 GMT, Kim Barrett wrote: >> I see, so `size` is kind of macro-like, and is just textually splicing its >> argument expression into another expression. >> And without the added parens the resulting full expression for the assert >> isn't checking what's intended, due

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-15 Thread JoKern65
On Fri, 12 May 2023 22:01:46 GMT, Kim Barrett wrote: >> JoKern65 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> cosmetic changes > > src/java.desktop/aix/native/libawt/porting_aix.c line 49: > >> 47: for (;;) { >> 48: if (addr >=

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-15 Thread JoKern65
On Fri, 12 May 2023 21:59:11 GMT, Kim Barrett wrote: >> JoKern65 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> cosmetic changes > > src/hotspot/os/aix/os_aix.cpp line 464: > >> 462: guarantee0(shmid != -1); // Should always work

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-15 Thread Kim Barrett
On Mon, 15 May 2023 09:30:52 GMT, Kim Barrett wrote: >> /data/d042520/xlc17/jdk/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp:426:97: >> error: shifting a negative signed value is undefined >> [-Werror,-Wshift-negative-value] >> I reverted my change in c1_LIRGenerator_ppc.cpp and added >> shift-

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-15 Thread Kim Barrett
On Mon, 15 May 2023 08:29:31 GMT, JoKern65 wrote: >> src/hotspot/cpu/ppc/ppc.ad line 11444: >> >>> 11442: effect(KILL cr0); >>> 11443: ins_cost(DEFAULT_COST * 5); >>> 11444: size((VM_Version::has_brw() ? 16 : 20)); >> >> What is it complaining about here? > > /data/d042520/xlc17/jdk/src/h

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-15 Thread JoKern65
On Fri, 12 May 2023 21:56:50 GMT, Kim Barrett wrote: >> JoKern65 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> cosmetic changes > > src/hotspot/cpu/ppc/ppc.ad line 11444: > >> 11442: effect(KILL cr0); >> 11443: ins_cost(DEFAULT_CO

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-12 Thread Kim Barrett
On Fri, 12 May 2023 15:16:36 GMT, Tyler Steele wrote: >> JoKern65 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> cosmetic changes > > src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp line 426: > >> 424: // Missing test if instr is commuta

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-12 Thread Kim Barrett
On Fri, 12 May 2023 16:16:01 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Many of those are in the aix or ppc specific codebase and could be addressed >> by small adjustments. >> A l

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-12 Thread Tyler Steele
On Fri, 12 May 2023 16:16:01 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Many of those are in the aix or ppc specific codebase and could be addressed >> by small adjustments. >> A l

Re: RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

2023-05-12 Thread JoKern65
> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk > on AIX , we run into various "warnings as errors". > Many of those are in the aix or ppc specific codebase and could be addressed > by small adjustments. > A lot of those changes are in hotspot, some might be somewhe