This is the mail archive of the
mailing list for the GCC project.
Re: Another look at the ARM division routine
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: "Zack Weinberg" <zack at codesourcery dot com>
- Cc: Richard dot Earnshaw at arm dot com, mark at codesourcery dot com, Nicolas Pitre <nico at cam dot org>, Ian Lance Taylor <ian at wasabisystems dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 29 Nov 2003 14:39:19 +0000
- Subject: Re: Another look at the ARM division routine
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Richard Earnshaw <firstname.lastname@example.org> writes:
> > There is a trick you can play, but I'm not sure if GCC's build system will
> > support it. It relies on constructing your archive files quite carefully.
> > Basically, you build both versions of __divsi3, one small and one fast.
> > In the small one you make the definition of __divsi3 weak. In the fast
> > one you make it strong, and also add a symbol definition, say
> > __fast_divsi3.
> Another approach would be to have __divsi3_big and __divsi3_small, in
> different modules of libgcc.a, then have TARGET_INIT_LIBFUNCS rename
> the __divsi3 libfunc based on optimize_size.
No, this wouldn't work. If one file was compiled -Os and the other was
compiled -O2, you'd end up with two division routines in your application.
That would be worse than either alternative.