[tremor] Tremor's use of 64-bit math

Nicolas Pitre nico at cam.org
Fri Sep 13 08:26:59 PDT 2002



On Fri, 13 Sep 2002, Owen G. Emry wrote:

> I'm referring to everything that requires me to link against libgcc.a.  I'm 
> targeting ARM, and defining _ARM_ASSEM_ which I _think_ is what does the 
> 32x32 -> 32,32 multiplications, right?  However, gcc's still generating 
> references to these:
> 
> __divdi3 (in ov_bitrate, ov_bitrate_instant, ov_time_total, etc.)
> __divsi3 (in _book_maptype1_quantvals, _book_unquantize, 
> vorbis_book_decodevs_add, floor0_look, etc.)
> __modsi3 (in _book_unquantize)
> 
> I've poked around for documentation and I honestly can't even figure out what 
> these are, but it's obvious from examining the ARM disassembly that they 
> result from operations on long longs.  

You mostly don't have the choice to link against libgcc.a.  Those symbols 
are functions implementing basic C primitives that the processor can,t 
perform by itself, and not only for 64 bit operations but 32 bit operations 
as well.  __divsi3 is a standard 32 bit division like in:

        int x, y z;
        z = x / y;

The __divdi3 call is for 64 bit divisions.

__modsi3 is the modulo operation on 32 bit types. like in:	

        int x, y, z;
        z = x % y;

Etc.

You really can't go away without libgcc.a in most cases.  If you can't link 
libgcc.a then your compiler installation is broken in some way.

<p>Nicolas

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'tremor-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Tremor mailing list