On Wed, Oct 4, 2023 at 5:36 AM Timur Celik <m...@timurcelik.de> wrote: > > Why is it that changes in the runtime package's atomic.Cas don't land in > my build? I suspect it has something to do with inlining of the > function, but even with `-gcflags=-l` the atomic.Cas original > implementation seems to get inlined. Functions that aren't inlined, > like atomic.Or have my changes incorporated. I tried deleting all > caches and rebuilt the compiler without success.
It's because in general the compiler internally implements all the functions that appear in runtime/internal/atomic. The implementations in that package are not normally used at all, though they may be used when optimizations are disabled (-gcflags=-N). For the internal compiler implementations you can start by looking for OpAtomicCompareAndSwap32 in cmd/compile/internal/ssa. 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/CAOyqgcWUGf1%2BJzvf%2BJxrpbxSWJOhv4-rydAZcbadzK3pmwEmUQ%40mail.gmail.com.