Re:The Itanium processor, part 1: Warming up
by nickpsecurity on Monday July 27, 2015 @09:45PM
(#9959074)
Wow, that does sound like a painful learning curve. Curious, were the function pointer problems inherent to the architecture or the tool/lib you used? Might be worth documenting in case a reader stumbles upon this before going through what you did.
[ Parent
| on HN ]
Re:The Itanium processor, part 1: Warming up
by apaprocki on Monday July 27, 2015 @10:06PM
(#9959142)
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...
Re:The Itanium processor, part 1: Warming up
by nickpsecurity on Tuesday July 28, 2015 @12:44PM
(#9962831)
Wow. 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.