From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Bahns To: crossgcc@sourceware.cygnus.com Subject: Where are _modsi3.c and/or _modsi3.o? Date: Sat, 24 Jun 2000 16:21:00 -0000 Message-id: <3955415C.2FA61072@bahns.com> X-SW-Source: 2000-q2/msg00262.html 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