[U-Boot-Users] ARM missing __udivdi3 in lib_arm or fix 64bit division in nand_util.c?

Wolfgang Denk wd at denx.de
Wed Aug 1 22:14:24 CEST 2007


In message <46B0C928.3020001 at googlemail.com> you wrote:
>
> > CodingStyle: Generally, inline functions are preferable to macros
> > resembling functions.
> 
> I know that this is no excuse for bad coding style, but please note 
> that this stuff is already part of U-Boot, see lib_avr32/div64.c and 
> include/asm-avr32/div64.h. My patch only moves the *unmodfied* files 
> to lib_generic for general use, as proposed by Håvard. Same as U-Boot 
> NG did ;)

Yes, I understood thos. Just thought I might talk you into even more
improvements :-)

> >> COBJS	= bzlib.o bzlib_crctable.o bzlib_decompress.o \
> >> 	  bzlib_randtable.o bzlib_huffman.o \
> >>-	  crc32.o ctype.o display_options.o ldiv.o sha1.o \
> >>+	  crc32.o ctype.o display_options.o div64.o ldiv.o sha1.o \
> >> 	  string.o vsprintf.o zlib.o
> > 
> > 
> > Why should I link this code and increase the memory footprint for all
> > boards, when 99% of them don't need this?
> 
> Sorry if I misunderstood anything here. But with putting 
> do_div/__div64_32 to a *library* boards use it only if they need it? 

Right. Objects from a librariry get only pulled into the linked image
when they are referenced somewhere. Objects explicitely listed on the
command line get always included.

I failed to see that this was an object list for another library.
Sorry for the false alarm.

> Anything wrong with this?

No. I was wrong.

> > Rejected.
> 
> What's your proposal then with the 64bit division issue in nand_util.c?

I withdraw the reject.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Sometimes a feeling is all we humans have to go on.
	-- Kirk, "A Taste of Armageddon", stardate 3193.9




More information about the U-Boot mailing list