Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!vsi1!daver!bungi.com!news From: culberts@hplwbc.hpl.hp.com (Bruce Culbertson) Newsgroups: comp.sys.nsc.32k Subject: Re: Bug in minix library setjmp.s; lots of GNU tools diffs available Message-ID: <9102081832.AA02175@hplwbc.hpl.hp.com> Date: 8 Feb 91 18:32:17 GMT Sender: news@daver.bungi.com Lines: 47 Approved: news@daver.bungi.com > Jyrki Kuoppala (jkp) writes: > When porting emacs to pc532-Minix, I noticed there's a bug in the > setjmp library routine - it doesn't save registers r3-r7 (and f4-f7) > which I think it should do. This seems like a serious bug and I'm > surprised it has caused so little trouble when compiling all the other > software I have on the pc532. I have read the various man pages for BSD, SysV, etc. and I think my setjmp/longjmp actually conforms to the functionality it is required to support. However, I agree with Jyrki completely -- many programs we all know and love incorrectly expect more from setjmp/longjmp and it is a real pain if setjmp/longjmp does not preserve as much of the environment as possible. I have already made similar changes to the setjmp/longjmp in the soon-to-be released 1.3/1.5 hybrid pc532-Minix. > I now have a complete environment (including libc) working with the > GNU tools: gcc 1.39 with patches, gas 1.38.1 with patches, GNU > binutils with patches, GNU make 3.59, emacs 18.57 (subprocesses don't > work yet), bash 1.05.1, GNU fileutils etc. ... Great! This is a really nice contribution. > Bootstrapping with the broken Minix programs was also painful. May I request that people not make vague negative comments like this. What features of what programs are broken? An OS and C implementation are not broken just because they cannot compile and support all the GNU programs. I will attempt to fix bugs if I know what they are. > addr 0(f4),sj_f4(r0) #save f4 > addr 0(f5),sj_f5(r0) #save f5 > addr 0(f6),sj_f6(r0) #save f6 > addr 0(f7),sj_f7(r0) #save f7 I these are illegal instructions. If you look at the instruction encoding, you will see that there is no way to specify an addressing mode like "0(f4)". If gas does not catch this, it probably encodes it as "0(r4)", which is not what you want. The following should work: movf f4,sj_f4(r0) #save f4 movf f5,sj_f5(r0) #save f5 movf f6,sj_f6(r0) #save f6 movf f7,sj_f7(r0) #save f7 Cheers, Bruce Culbertson