[go-nuts] Re: About 64bits alignment
Is the bug zone outdated now. How about the support on other 32-bit archs? Such as mips? On Wednesday, February 1, 2017 at 12:03:59 PM UTC-4, T L wrote: > > the sync/atomic docs, https://golang.org/pkg/sync/atomic/, says in the > end of the docs > > > On x86-32, the 64-bit functions use instructions unavailable before the >> Pentium MMX. >> > On non-Linux ARM, the 64-bit functions use instructions unavailable before >> the ARMv6k core. >> >> On both ARM and x86-32, it is the caller's responsibility to arrange for >> 64-bit alignment of 64-bit words accessed atomically. >> > The first word in a global variable or in an allocated struct or slice can >> be relied upon to be 64-bit aligned. >> > > The last line says the first word in a global variable or in an allocated > struct or slice is 64-bit aligned for sure. > But what does an allocated struct or slice means? A struct or slice > allocated on heap, not stack? > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: About 64bits alignment
On Thursday, February 2, 2017 at 12:03:59 AM UTC+8, T L wrote: > > the sync/atomic docs, https://golang.org/pkg/sync/atomic/, says in the > end of the docs > > > On x86-32, the 64-bit functions use instructions unavailable before the >> Pentium MMX. >> > On non-Linux ARM, the 64-bit functions use instructions unavailable before >> the ARMv6k core. >> >> On both ARM and x86-32, it is the caller's responsibility to arrange for >> 64-bit alignment of 64-bit words accessed atomically. >> > Does the "ARM" here include ARMv8 (64-bit)? > The first word in a global variable or in an allocated struct or slice can >> be relied upon to be 64-bit aligned. >> > > The last line says the first word in a global variable or in an allocated > struct or slice is 64-bit aligned for sure. > But what does an allocated struct or slice means? A struct or slice > allocated on heap, not stack? > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: About 64bits alignment
Arm means arm as in linux/arm. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: About 64bits alignment
On Wednesday, March 29, 2017 at 5:04:26 AM UTC+8, Dave Cheney wrote: > > Arm means arm as in linux/arm. so WinRT is not supported? but will? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: About 64bits alignment
I don't know of anyone working on windows/arm. On Wednesday, 29 March 2017 13:19:28 UTC+11, T L wrote: > > > > On Wednesday, March 29, 2017 at 5:04:26 AM UTC+8, Dave Cheney wrote: >> >> Arm means arm as in linux/arm. > > > so WinRT is not supported? > but will? > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: About 64bits alignment
On Thu, Feb 7, 2019 at 3:49 PM T L wrote: > > Is the bug zone outdated now. How about the support on other 32-bit archs? > Such as mips? The bug description is not out of date. Yes, 32-bit MIPS also requires 8 byte alignment for the 64-bit operations. I sent https://golang.org/cl/161697 to update the docs. Ian > On Wednesday, February 1, 2017 at 12:03:59 PM UTC-4, T L wrote: >> >> the sync/atomic docs, https://golang.org/pkg/sync/atomic/, says in the end >> of the docs >> >> >>> On x86-32, the 64-bit functions use instructions unavailable before the >>> Pentium MMX. >>> >>> On non-Linux ARM, the 64-bit functions use instructions unavailable before >>> the ARMv6k core. >>> >>> On both ARM and x86-32, it is the caller's responsibility to arrange for >>> 64-bit alignment of 64-bit words accessed atomically. >>> >>> The first word in a global variable or in an allocated struct or slice can >>> be relied upon to be 64-bit aligned. >> >> >> The last line says the first word in a global variable or in an allocated >> struct or slice is 64-bit aligned for sure. >> But what does an allocated struct or slice means? A struct or slice >> allocated on heap, not stack? > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: About 64bits alignment
Thanks for the clarification. On Thursday, February 7, 2019 at 8:57:00 PM UTC-4, Ian Lance Taylor wrote: > > On Thu, Feb 7, 2019 at 3:49 PM T L > > wrote: > > > > Is the bug zone outdated now. How about the support on other 32-bit > archs? Such as mips? > > The bug description is not out of date. > > Yes, 32-bit MIPS also requires 8 byte alignment for the 64-bit > operations. I sent https://golang.org/cl/161697 to update the docs. > > Ian > > > > On Wednesday, February 1, 2017 at 12:03:59 PM UTC-4, T L wrote: > >> > >> the sync/atomic docs, https://golang.org/pkg/sync/atomic/, says in the > end of the docs > >> > >> > >>> On x86-32, the 64-bit functions use instructions unavailable before > the Pentium MMX. > >>> > >>> On non-Linux ARM, the 64-bit functions use instructions unavailable > before the ARMv6k core. > >>> > >>> On both ARM and x86-32, it is the caller's responsibility to arrange > for 64-bit alignment of 64-bit words accessed atomically. > >>> > >>> The first word in a global variable or in an allocated struct or slice > can be relied upon to be 64-bit aligned. > >> > >> > >> The last line says the first word in a global variable or in an > allocated struct or slice is 64-bit aligned for sure. > >> But what does an allocated struct or slice means? A struct or slice > allocated on heap, not stack? > > > > -- > > You received this message because you are subscribed to the Google > Groups "golang-nuts" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to golang-nuts...@googlegroups.com . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: About 64bits alignment
On 29 March 2017 at 04:44, T L wrote: > > > On Thursday, February 2, 2017 at 12:03:59 AM UTC+8, T L wrote: >> >> the sync/atomic docs, https://golang.org/pkg/sync/atomic/, says in the >> end of the docs >> >> >> On x86-32, the 64-bit functions use instructions unavailable before the >>> Pentium MMX. >>> >> On non-Linux ARM, the 64-bit functions use instructions unavailable >>> before the ARMv6k core. >>> >>> On both ARM and x86-32, it is the caller's responsibility to arrange for >>> 64-bit alignment of 64-bit words accessed atomically. >>> >> > Does the "ARM" here include ARMv8 (64-bit)? > On a 64 bit platform, 64-bit integers are naturally aligned on 64 bits so you shouldn't have to make any extra effort to arrange for it to happen. Cheers, mwh > The first word in a global variable or in an allocated struct or slice can >>> be relied upon to be 64-bit aligned. >>> >> >> The last line says the first word in a global variable or in an allocated >> struct or slice is 64-bit aligned for sure. >> But what does an allocated struct or slice means? A struct or slice >> allocated on heap, not stack? >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.