News for hackers. Stuff that matters.
Re:Cooperative Threading by avdicius on Saturday November 16, 2019 @07:26PM (#21555809)
Wow. I used my own stack switch routine for several years now and didn't realize it could be improved until I read this thread. Thank you very much.

This is my old naive version:

https://github.com/ademakov/MainMemory/blob/master/src/base/...

This is what I have now:

https://github.com/ademakov/MainMemory/blob/cstack-switch-re...

Re:Cooperative Threading by gpderetta on Sunday November 17, 2019 @06:09AM (#21557426)
You are missing x/y/zmm regs in the clobber list.
Re:Cooperative Threading by avdicius on Monday November 18, 2019 @02:23AM (#21562515)
Yes, that's true. However in my app this has never caused any problems. Apparently even if the compiler auto-vectorizes anything it does this only with scratch regs or in leaf procedures. I don't have any fp or simd code of myself.