3 ms·
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
by avdicius 7y ago
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/arch/x86-64/cstack-switch.S https://github.com/ademakov/MainMemory/blob/master/src/base/...
This is what I have now:
https://github.com/ademakov/MainMemory/blob/cstack-switch-revamp/src/base/arch/x86-64/cstack.h https://github.com/ademakov/MainMemory/blob/cstack-switch-re...
- gpderetta 7y agoYou are missing x/y/zmm regs in the clobber list.
- avdicius 7y agoYes, 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.