------- Comment #3 from patrick dot georgi at coresystems dot de 2009-08-13 15:10 ------- (In reply to comment #1) > -mregparm changes the ABI, you have to rebuild libgcc with -mregparm to be > able to use it. >
I agree with that notion for general purpose libraries as used by the user. But libgcc is an implementation artefact of GCC. I'd prefer not to use it, but GCC forces me to. If I use __divdi3 myself, GCC can expect that I fix up the call myself (using some __attribute__((regparm))), but if GCC uses it, I think it's not to much to ask for it to fix it up itself (as I don't have the means to do so, short of rewriting assembler code) I see three good solutions: 1. GCC calls its own libgcc calls in a proper way (and it should be able to do so, if I as a user can change calling conventions per function call) 2. It refuses to use libgcc with mregparm, as it will break. 3. GCC supports multiple libgccs, choosing the right one automatically. My guess is that solution 1 is the easiest. Hacks like http://trac.nchc.org.tw/grid/browser/gpfs_3.1_ker2.6.20/lpp/mmfs/src/gpl-linux/mmwrap.c shouldn't be necessary. -- patrick dot georgi at coresystems dot de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41055