Re: [go-nuts] Re: Register spilling size

2020-11-04 Thread eric...@arm.com
Yes, as Keith said, the 16-byte alignment requirement of sp is for the size of the entire stack, and there is no such requirement for a single variable on the stack. We can access a single variable through sp+/-offset. The code has already dealt with the overall alignment of sp. I tried to remov

Re: [go-nuts] Re: Register spilling size

2020-11-04 Thread 'Keith Randall' via golang-nuts
Ah, arm64. That code jesper points to looks like the culprit. The whole stack frame alignment should be handled separately from the alignment of individual variables, so the total alignment needed shouldn't matter. Not sure why we do that. A small archaeology dive indicates this code dates from

Re: [go-nuts] Re: json.number in struct

2020-11-04 Thread Urjit Singh Bhatia
Yeah, iirc JSON doesn't really have a clear distinction between float and int because it has to sort of stay parallel to javascript. Found this link that explains a bit more... Excerpt: ```The precise treatment of the “integer” type may depend on the implementation of your JSON Schema validator

Re: [go-nuts] Re: Register spilling size

2020-11-04 Thread Jesper Louis Andersen
On Wed, Nov 4, 2020 at 9:36 AM eric...@arm.com wrote: > I got it, the code is here > https://github.com/golang/go/blob/633f9e206045176a12c301eb2c249c1c1d9a5d2e/src/cmd/compile/internal/gc/pgen.go#L186 > , > I don't know why the slot is required to be aligned at least 8 bytes on > these architectu

[go-nuts] Re: Register spilling size

2020-11-04 Thread eric...@arm.com
I got it, the code is here https://github.com/golang/go/blob/633f9e206045176a12c301eb2c249c1c1d9a5d2e/src/cmd/compile/internal/gc/pgen.go#L186, I don't know why the slot is required to be aligned at least 8 bytes on these architectures. I will try to see if this requirement can be removed on