3 ms·
If you want all the nasty details, this post covers it all: "This also has a side-effect on function pointers. Since function pointers are generally used at so
by apaprocki 11y ago
If you want all the nasty details, this post covers it all:
"This also has a side-effect on function pointers. Since function pointers are generally used at some distance from allocation, they might be used in a module with a different gp value. The compiler gets around this by not compiling a function pointer to a single pointer-sized value; it compiles to a pair of pointer-sized values, one representing the address of the first instruction (bundle on IA64) in the function, the other being the correct gp value to use."
http://mikedimmick.blogspot.com/2004/01/ia64s-global-pointer.html?m=1 http://mikedimmick.blogspot.com/2004/01/ia64s-global-pointer...
- nickpsecurity 11y agoWow. That's a huge mess of stuff to mentally track just for some optimization. To be honest, I'd probably just end up writing a macro-assembler and coding it directly against a C reference implementation just to avoid all the nonsense lol.