This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

Where are _modsi3.c and/or _modsi3.o?


I built binutils/gcc/newlib on my machine (Windows 98/NT, for m68k-coff
target), and things are basically going ok, but I'm having trouble with
the mod ('%') operator. I looked at the assembly language output and see
that it has a 'jsr __modsi3'. I check the map file and find the
'__modsi3' routine as follows:

 .text          0x00008c9c       x2e
/gcc-m68k/lib/gcc-lib/m68k-coff/2.95.2/libgcc.a(_modsi3.o)
                0x00008c9c                __modsi3

I extracted the source but could not find a file that fit the '_mod*' or
'_mod*.*' patterns, using both the Cygwin/Unix 'find' command and
Microsoft Explorer's find program. I re-built the compiler and also
could find no such object file in the build directory. I'd like to look
at the source code to find out if the arguments are being passed
properly.

I can send more details about my original problem with the mod operator
if you like. I have a very simple program that just does not work right.
If I use a different mathematics operator ('/', '*', etc.) then it's
fine. Also, the same code works perfectly if built with the Microtek
Research (MRI) compiler. If I can solve that problem then perhaps I
don't need to find _modsi3.c/o.

Can anyone help on where to find the code for the __modsi3 function?

Bonus question:
Is there a GCC option to generate an assembly listing without affecting
the build process. I know about the '-S' option, which generates
assembly code INSTEAD of object code (unless I'm just not using it
right). What I want is to generate assembly code IN ADDITION to object
code, and have the compilation process otherwise complete normally. I'd
like to specify a separate directory for the assembly listings and have
them all go there. This way, if I later have trouble and want to know
how a library routine works, I can just look it up instead of rebuilding
the whole damn thing again.

Thanks a lot for any help!
Christopher Bahns
Christopher Bahns Software

begin:vcard 
n:Bahns;Christopher
tel;home:812-342-4714
tel;work:812-342-4714
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:chris@bahns.com
fn:Christopher Bahns
end:vcard

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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