The official documentation on using the Go assembly [0] says this: > When using the compiler and assembler's -dynlink or -shared modes, any > load or store of a fixed memory location such as a global variable must > be assumed to overwrite CX. Therefore, to be safe for use with these > modes, assembly sources should typically avoid CX except between memory > references.
A couple unclear things are: what is a "fixed memory location"; and does this apply to amd64 or just to 386? The text implies that a writer of 386 Go assembly code should assume CX clobbered after dereferencing SB. But what about dereferencing FP, SP, or a real register like AX or R10, does that also clobber CX? [0] https://golang.org/doc/asm -- 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.