hp@vmars.tuwien.ac.at (Peter Holzer) (01/14/91)
Hi Folks! Here I am again with a BIG problem ... This weekend I tried to compile C.v.W's c386 compiler on my Minix/386 box, and as you may have guessed, it did not work. First problem was that in one module (I forgot which) save_mask is used if ICODE is #defined, but this variable is only declared (in the header file) if MC680X0 is defined. I got around this by either declaring save_mask unconditionally or by not defining ICODE (what does this anyway). Next problem was that bcc generates a `call fpushd' for each double parameter passed to a function but this fpushd is not in the library. I found empty functions fpushi and fpushl in dummy.s and added fpushd there. After this c386 compiled ok but did not work well. The code it produces has little to do with the C-code it is derived from and is not even semantically correct. What seems to happen is that instead of producing `memnonic operand' it produces `movl operand,' `memnonic' and then shuffles lines in some random order. c386 does compile well (if ICODE is not defined) and works correctly if compiled with Turbo-C, so I suspect that this is a bug in bcc. Has anybody had the same problems? -- | _ | Peter J. Holzer | Think of it | | |_|_) | Technical University Vienna | as evolution | | | | | Dept. for Real-Time Systems | in action! | | __/ | hp@vmars.tuwien.ac.at | Tony Rand |