taylor@THINK.COM (David Taylor) (02/24/90)
I built gcc 1.37.1 as a cross compiler on a vax running Ultrix 3.1. The links are: aux-output.c --> ../config/out-ns32k.c config.h --> ../config/xm-vax.h md --> ../config/ns32k.md tm.h --> ../config/tm-pc532.h [I'm trying to get it to generate code for a 32532 based personal computer; since I don't have the machine built yet, much less have an operating system for it, I'm trying to run gcc as a cross compiler.] When I ask gcc to compile __cmpsf2 in gnulib.c, it dies with an illegal instruction. The file tm-pc532.h is the 2 lines -- #define TARGET_DEFAULT 1 #include "tm-ns32k.h" plus a redefinition of STANDARD_EXEC_PREFIX and STANDARD_STARTFILE_PREFIX to point to a subdirectory of my home directory and *NOTHING* else. The output of running ./gcc -O -B./ -I. -I.. -I../config -c -DL_cmpsf2 ../gnulib.c -S -v is: gcc version 1.37.1 ./cpp -v -DL_cmpsf2 -I. -I.. -I../config -undef -D__GNUC__ -Dns32000 -Dunix -D__ns32000__ -D__unix__ -D__OPTIMIZE__ ../gnulib.c /usr/tmp/cca08339.cpp GNU CPP version 1.37.1 ./cc1 /usr/tmp/cca08339.cpp -quiet -dumpbase ../gnulib.c -O -version -o gnulib.s GNU C version 1.37.1 (32000, National syntax) compiled by CC. default target switches: -m32081 ./gcc: Program cc1 got fatal signal 4. If I remove the `-O', it compiles okay. David p.s. yes, I realize that it seems a little silly to compile gnulib.c with gcc, but it really isn't -- I want to know which ones generate function calls and which ones get open coded. The ones that generate function calls, I'm going to need assembly language versions of. And I want to know which ones those are. -- David Taylor taylor@think.com, ...{ames,bloom-beacon,harvard}!think!taylor
loeliger@convex.com (Jon Loeliger) (02/27/90)
In article <9002240636.AA08346@pozzo> taylor@THINK.COM (David Taylor) writes: >I built gcc 1.37.1 as a cross compiler on a vax running Ultrix 3.1. The >links are: > > aux-output.c --> ../config/out-ns32k.c > config.h --> ../config/xm-vax.h > md --> ../config/ns32k.md > tm.h --> ../config/tm-pc532.h > >[I'm trying to get it to generate code for a 32532 based personal >computer; since I don't have the machine built yet, much less have an >operating system for it, I'm trying to run gcc as a cross compiler.] >-- >David Taylor >taylor@think.com, ...{ames,bloom-beacon,harvard}!think!taylor I'm in the midst of a similar task... And had a different question about the function prologue and epilogue. There are two instructions, enter [], and exit [], that are intended to save and restore callee used registers. I am not that familiar with the ns32k and the data sheets aren't that informative in a couple of areas, so I have a couple of questions: 1) Does the enter [] instruction save the registers in the frame in addresses {smaller|larger} than where the PC is stored? 2) If there are in fact stored registers on procedure entry, then the offset of the first argument from the FP is not a hard 8 as this declaration (from config/ns32k.h) would suggest: /* Offset of first parameter from the argument pointer register value. */ #define FIRST_PARM_OFFSET(FNDECL) 8 Is it instead something that looks like: 8 + (#of_regs_stored_in_[]_mask * size_of_a_register) Am I confused here? What has me mystified here is the dichotomy between a belief that it sort-of works as is (due to current use and all), and the apparent brain-damage of not knowing how big your call frame is... Now if the ns32k really has an AP and I don't know about it, then this is all academic... Thanks. ------------------------------------------------------------------------------ Jon Loeliger | loeliger@convex.com Convex Computer Corporation | I'm the thirteenth at your table, 3000 Waterview, Richardson TX 75080 | I'm the uninvited guest. - Marillion -- ------------------------------------------------------------------------------ Jon Loeliger | loeliger@convex.com Convex Computer Corporation | I'm the thirteenth at your table, 3000 Waterview, Richardson TX 75080 | I'm the uninvited guest. - Marillion