This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't optimize function addresses


John David Anglin wrote:
My only concern would be whether or not we should make your change somehow conditional on whether or not the target abi uses function descriptors. It'd be a shame to pessimize all those embedded targets which don't have to deal with such hair.

Jakub also expressed this viewpoint. However, it's just not clear to me how much this actually pessimizes embedded targets. I think the only code that actually needs to test the least significant bits of function pointers is ABI/runtime specific.

I think we should have something for the middle-end to test to determine whether or not it can assume that function pointers do in fact point to real functions, and thus that alignment can be assumed. It doesn't seem that hard to add a target hook for that.


Thanks,

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]