Re: Static Chain Register on iOS AArch64

2015-06-08 Thread Richard Henderson
On 06/06/2015 06:24 AM, Richard Earnshaw wrote: That's going to make it impossible to implement Go closures on AArch32, then, since the only call-clobbered register not used for parameter passing is r12 (ip) and that can be clobbered by function calls. No, because r12 is only clobbered by plt

Re: Static Chain Register on iOS AArch64

2015-06-08 Thread Richard Earnshaw
On 08/06/15 17:58, Richard Henderson wrote: On 06/06/2015 06:24 AM, Richard Earnshaw wrote: That's going to make it impossible to implement Go closures on AArch32, then, since the only call-clobbered register not used for parameter passing is r12 (ip) and that can be clobbered by function

Re: Static Chain Register on iOS AArch64

2015-06-08 Thread Richard Henderson
On 06/08/2015 10:00 AM, Richard Earnshaw wrote: r12 can *also* be clobbered by interworking calls or calls that span more than the branch range of a call instruction. Rare, but possible. I can only presume from this that nested functions are not reliable now, for very large programs. Unless

Re: Static Chain Register on iOS AArch64

2015-06-06 Thread Richard Earnshaw
On 05/06/15 16:55, Richard Henderson wrote: On 06/04/2015 03:40 AM, Richard Earnshaw wrote: The static chain register is pretty much private to a translation unit... That was true when the static chain was restricted to trampolines. Since Go has started using it for cross-translation-unit

Re: Static Chain Register on iOS AArch64

2015-06-05 Thread Richard Henderson
On 06/04/2015 03:40 AM, Richard Earnshaw wrote: The static chain register is pretty much private to a translation unit... That was true when the static chain was restricted to trampolines. Since Go has started using it for cross-translation-unit closures, that makes it part of the ABI. I

Re: Static Chain Register on iOS AArch64

2015-06-04 Thread Richard Earnshaw
On 03/06/15 23:55, Stephen Cross wrote: Hello, I noticed the following comment in the GCC source ( https://github.com/gcc-mirror/gcc/blob/7c62dfbbcd3699efcbbadc9fb3aa14f23a123add/libffi/src/aarch64/ffitarget.h#L66 ): /* iOS reserves x18 for the system. Disable Go closures until a new

Static Chain Register on iOS AArch64

2015-06-03 Thread Stephen Cross
Hello, I noticed the following comment in the GCC source ( https://github.com/gcc-mirror/gcc/blob/7c62dfbbcd3699efcbbadc9fb3aa14f23a123add/libffi/src/aarch64/ffitarget.h#L66 ): /* iOS reserves x18 for the system. Disable Go closures until a new static chain is chosen. */ Based on this comment,