4 ms·
One might need to know considerably more, especially for low-level coding and/or efficiently SSE use. Recently we've had occasion to figure out quite a bit abou
by onan_barbarian 16y ago
One might need to know considerably more, especially for low-level coding and/or efficiently SSE use. Recently we've had occasion to figure out quite a bit about stack usage and this yielded some surprises; I suspect that gcc could still use some work in conserving stack space.
As a grad student, in the dark days of the mid-90s we found a obscure and nasty hole in the MIPS calling conventions as they existed then, where IIRC you could actually lose a floating point parameter when making a variadic call.
It required a particular combination of not having ANSI headers and using a float vs. double in just the wrong place, and was more of a theoretical curiosity (again, if I remember correctly, you needed to be the float or double as the first arg to a variadic function, which is unlikely, as typically variadic functions take structs or pointers telling them what they'll be doing as their first arg).
Shortly after Bailey and Davidson published a paper that found the one we found, and a bunch of others, although these also included a lot of implementation flaws that weren't inherently holes in the convention per se:
http://www.cs.virginia.edu/~mwb5y/pubs/pldi96.pdf http://www.cs.virginia.edu/~mwb5y/pubs/pldi96.pdf