By the way, these instructions are not generated by the compiler. They are part of the assembly in the stdlib (runtime or internal/bytealg, probably).
On Tuesday, May 14, 2019 at 7:37:44 AM UTC-7, Amnon Baron Cohen wrote: > > OK. > Thanks for the explanation and pointers. > > On Tuesday, 14 May 2019 15:15:46 UTC+1, Ian Lance Taylor wrote: >> >> On Tue, May 14, 2019 at 7:03 AM Amnon Baron Cohen <amn...@gmail.com> >> wrote: >> >> > > go version >> > go version go1.12.5 linux/amd64 >> > > GODEBUG=cpu.avx=off go build hello.go >> > > objdump -d hello | grep '%ymm' >> > 4021bd: c5 fe 6f 16 vmovdqu (%rsi),%ymm2 >> > 4021c1: c5 fe 6f 1f vmovdqu (%rdi),%ymm3 >> > 4021c5: c5 fe 6f 66 20 vmovdqu 0x20(%rsi),%ymm4 >> > >> > > GODEBUG=cpu.avx=off,cpu.avx2=off go build hello.go >> > > objdump -d hello | grep '%ymm' |head >> > 4021bd: c5 fe 6f 16 vmovdqu (%rsi),%ymm2 >> > 4021c1: c5 fe 6f 1f vmovdqu (%rdi),%ymm3 >> > 4021c5: c5 fe 6f 66 20 vmovdqu 0x20(%rsi),%ymm4 >> > 4021ca: c5 fe 6f 6f 20 vmovdqu 0x20(%rdi),%ymm5 >> >> Yes: GODEBUG=cpu.avx=off affects runtime execution. It does not >> affect the compiler. You should set it when running the program. It >> will override the CPU detection to say that AVX instructions are not >> available on this processor. >> >> There is no way to change what the compiler generates. >> >> Ian >> > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/eecc1209-91db-46b5-8094-4ba276952b6c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.