3 ms·
Fortunately, in the amd64 Windows world, there's only one calling convention. (Edit: as cremno points out, there's now a new vectorcall convention. Dammit.) The
by quotemstr 10y ago
Fortunately, in the amd64 Windows world, there's only one calling convention. (Edit: as cremno points out, there's now a new vectorcall convention. Dammit.) The 64-bit Windows ABI is a big improvement over the old 32-bit one. Other improvements are use of unwind tables for SEH and the requirement that all code be unwindable.
- pavlov 10y agoI'm happy to hear that! With a fixed ABI, C++ 1x language features and UWP, it sounds like doing C/C++ on Windows could actually be fun these days.
- jheriko 10y agodon't get ahead of yourself... that ABI isn't there yet. :P
- cremno 10y ago>Fortunately, in the amd64 Windows world, there's only one calling convention. Not anymore: https://blogs.msdn.microsoft.com/vcblog/2013/07/11/introducing-vector-calling-convention/ https://blogs.msdn.microsoft.com/vcblog/2013/07/11/introduci...
- jheriko 10y ago> the requirement that all code be unwindable. i would not call that an improvement in all cases... the extra code produced by enabling exceptions, even for the latest compilers, produces enough bloat and slow down for basically everyone seriously concerned with real-time performance to turn them off. small simple functions are forced to have prologue/epilogue, use a frame pointer and to preserve the return address on the stack. doesn't sound like much, but if your function does anything simple (float f() { return 1; } bool g(float a, float b) { return a < b; } etc...) you spend all the time paying for exceptions instead of the intended functionality.
- quotemstr 10y agoYou're confusing unwinding mechanisms. The whole point of using unwind tables is to avoid the need to preserve frame pointers. There zero cost in pure C code and minimal cost in C++ code just for preserving the ability to unwind. You absolutely do not need to have extra prologue and epilogue code or to burn a register for a frame pointer.
- jheriko 10y agofrom what i understood it only gets rid of those requirements in some cases.... there is a table i remember in some doc about this, the only reason i listed from memory was the lack of being able to find it quickly on google .. its a shame i can't find it. perhaps my memory is imply faulty.