Tag Archives: x86

How Variable Argument Lists Work in C

Variable argument lists are very arcane in the world of C. You’ll see them expressed in function signatures as … at the end of the parameter list, but you may not understand how they work or what they do.

Posted in C/C++ | Tagged , , , | 11 Comments

Describing the MSVC ABI for Structure Return Types

An ABI is an “application binary interface”, which is basically a contract between pieces of executable code on how to behave. The ABI dictates things like how parameters are passed, where return values go, how to create and destroy stack … Continue reading

Posted in C/C++, Win32 | Tagged , , , , | 6 Comments

Tail Calls

A tail call is a specific pattern of source code where the last instruction executed in a method is another function call. For instance: In this code, the call to last is considered a tail call because there are no … Continue reading

Posted in C/C++ | Tagged , , | Leave a comment

Frustrations in Assembly

At my day job, we do a lot of complex math calculations in our frameworks. To increase performance, we have enabled the optimizer to use certain assembly instruction sets such as MMX and SSE. However, we have found that not … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

The Importance of Calling Conventions

Calling conventions are something you generally don’t have to worry about as a programmer because the compiler usually takes care of everything for you. But when you start interacting with code outside of your control (such as shared libraries), calling … Continue reading

Posted in Framework Design | Tagged , | Leave a comment