Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v6]

2021-06-04 Thread Jorn Vernee
On Fri, 4 Jun 2021 15:10:18 GMT, Nick Gasson wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v3]

2021-06-04 Thread Nick Gasson
On Fri, 4 Jun 2021 11:07:27 GMT, Jorn Vernee wrote: >> test/jdk/java/foreign/valist/VaListTest.java line 706: >> >>> 704: vaList.skip(BigPoint_LAYOUT); >>> 705: assertEquals((long) vaList.vargAsLong(C_LONG), 42); >>> 706: })}, >> >> Looks

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-06-04 Thread Nick Gasson
On Fri, 4 Jun 2021 12:57:17 GMT, Maurizio Cimadamore wrote: > > That fix has a switch on the ABI type in the SystemLookup class (a new class > introduced by that fix). I believe that switch will no longer compile with > the changes in this PR as the ABI enum constants have changed -

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v6]

2021-06-04 Thread Nick Gasson
> macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on the stack following the normal calling > convention. To

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-06-04 Thread Maurizio Cimadamore
On Fri, 4 Jun 2021 10:06:26 GMT, Nick Gasson wrote: >> The JEP has been integrated, so we can pick this back up (and handle it as a >> bug for 17 even after the fork). >> >> Thank you for your patience. > > Thanks @JornVernee! I noticed VaListTest has started failing on Windows with > this

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v5]

2021-06-04 Thread Nick Gasson
> macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on the stack following the normal calling > convention. To

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v4]

2021-06-04 Thread Nick Gasson
> macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on the stack following the normal calling > convention. To

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v3]

2021-06-04 Thread Maurizio Cimadamore
On Thu, 3 Jun 2021 03:28:56 GMT, Nick Gasson wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v3]

2021-06-04 Thread Jorn Vernee
On Fri, 4 Jun 2021 11:04:33 GMT, Jorn Vernee wrote: >> Nick Gasson has updated the pull request incrementally with one additional >> commit since the last revision: >> >> No variadic upcalls >> >> Change-Id: Ibf91c570c88be2587e9e23240477c4a5cc56b4c5 >> CustomizedGitHooks: yes > >

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v3]

2021-06-04 Thread Jorn Vernee
On Thu, 3 Jun 2021 03:28:56 GMT, Nick Gasson wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-06-04 Thread Jorn Vernee
On Fri, 4 Jun 2021 10:06:26 GMT, Nick Gasson wrote: >> The JEP has been integrated, so we can pick this back up (and handle it as a >> bug for 17 even after the fork). >> >> Thank you for your patience. > > Thanks @JornVernee! I noticed VaListTest has started failing on Windows with > this

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-06-04 Thread Nick Gasson
On Wed, 2 Jun 2021 13:42:22 GMT, Jorn Vernee wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v3]

2021-06-03 Thread Jorn Vernee
On Thu, 3 Jun 2021 03:28:56 GMT, Nick Gasson wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v2]

2021-06-02 Thread Nick Gasson
On Thu, 3 Jun 2021 03:09:58 GMT, Nick Gasson wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v3]

2021-06-02 Thread Nick Gasson
> macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on the stack following the normal calling > convention. To

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native [v2]

2021-06-02 Thread Nick Gasson
> macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on the stack following the normal calling > convention. To

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-06-02 Thread Jorn Vernee
On Thu, 22 Apr 2021 08:19:53 GMT, Nick Gasson wrote: > macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-05-06 Thread Nick Gasson
On Mon, 3 May 2021 15:37:44 GMT, Jorn Vernee wrote: >> src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/abi/aarch64/macos/StackVaList.java >> line 131: >> >>> 129: MemorySegment struct = allocator.allocate(layout); >>> 130:

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-05-06 Thread Nick Gasson
On Mon, 26 Apr 2021 12:52:54 GMT, Jorn Vernee wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either registers or

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-05-03 Thread Jorn Vernee
On Mon, 26 Apr 2021 14:30:17 GMT, Maurizio Cimadamore wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-05-03 Thread Jorn Vernee
On Mon, 3 May 2021 15:31:53 GMT, Jorn Vernee wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-05-03 Thread Jorn Vernee
On Thu, 22 Apr 2021 08:19:53 GMT, Nick Gasson wrote: > macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-05-03 Thread Jorn Vernee
On Tue, 27 Apr 2021 02:14:07 GMT, Nick Gasson wrote: >> How about StandardAArch64Linker? Otherwise MacOsAArch64Linker sounds like it >> should be a specialisation of AArch64Linker. > > Or LinuxAArch64Linker if we're going to rename the CABI enum AArch64 -> > LinuxAArch64? But this would also

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-04-26 Thread Nick Gasson
On Mon, 26 Apr 2021 14:27:49 GMT, Maurizio Cimadamore wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-04-26 Thread Nick Gasson
On Tue, 27 Apr 2021 02:07:50 GMT, Nick Gasson wrote: >> src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/abi/aarch64/aapcs/AapcsLinker.java >> line 50: >> >>> 48: * the ARM 64-bit Architecture". >>> 49: */ >>> 50: public class AapcsLinker implements CLinker { >> >> I see why

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-04-26 Thread Nick Gasson
On Mon, 26 Apr 2021 14:29:43 GMT, Maurizio Cimadamore wrote: >> macOS on Apple silicon uses slightly different ABI conventions to the >> standard AArch64 ABI. The differences are outlined in [1]. In >> particular in the standard (AAPCS) ABI, variadic arguments may be passed >> in either

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-04-26 Thread Maurizio Cimadamore
On Thu, 22 Apr 2021 08:19:53 GMT, Nick Gasson wrote: > macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-04-26 Thread Jorn Vernee
On Thu, 22 Apr 2021 08:19:53 GMT, Nick Gasson wrote: > macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on

Re: RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-04-22 Thread Nick Gasson
On Thu, 22 Apr 2021 08:19:53 GMT, Nick Gasson wrote: > macOS on Apple silicon uses slightly different ABI conventions to the > standard AArch64 ABI. The differences are outlined in [1]. In > particular in the standard (AAPCS) ABI, variadic arguments may be passed > in either registers or on

RFR: 8263512: [macos_aarch64] issues with calling va_args functions from invoke_native

2021-04-22 Thread Nick Gasson
macOS on Apple silicon uses slightly different ABI conventions to the standard AArch64 ABI. The differences are outlined in [1]. In particular in the standard (AAPCS) ABI, variadic arguments may be passed in either registers or on the stack following the normal calling convention. To handle