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: Another look at the ARM division routine


> Richard Earnshaw <rearnsha@arm.com> 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.

R.


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