Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ubvax!vix From: vix@ubvax.UB.Com (Paul Vixie) Newsgroups: comp.bugs.4bsd Subject: Re: two fixes for /lib/c2 Message-ID: <7121@ubvax.UB.Com> Date: 27 Apr 88 14:03:31 GMT References: <11228@mimsy.UUCP> Reply-To: vix@ubvax.ub.com.UUCP (Paul Vixie) Organization: Ungermann-Bass Enterprises Lines: 90 Summary: help me, mr. wizard, i don't wanna me a c2 hacker anymore In article <11228@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >Index: lib/c2/c2.vax/c21.c 4.3BSD Fix > > [N.B.: the file is in lib/c2/c21.c in `plain' 4.3BSD] > >Description: > Here are two fixes for c2. The first is in the code that > takes care of address computation folding of the form > > ashl $2,r0,r0 # actually anything in r0..r5 > movab _x[r0], # as long as it matches > > which becomes > > moval _x[r0], > [etc] I installed this change, and sys/vm_mem.c now fails to compile. This: /* if ((*pmemall)(&Usrptmap[a], npg, &proc[0], CSYS) == 0) { */ /* ^^^^^^^^^^^^ */ ashl $2,r9,r0 addl2 $_Usrptmap,r0 pushl r0 Got changed into this: pushal _Usrptmap[9] Which although clever, is wrong, and elicits this from the assembler: Assembler: "", line 670: register expected "", line 678: register expected "", line 708: register expected "", line 716: register expected "", line 751: register expected The other occurences are similar, but in case they're helpful: (678) vmaccess(&Usrptmap[a], va, npg); ^^^^^^^^^^^^ ---------- ashl $2,r9,r0 addl2 $_Usrptmap,r0 pushl r0 ---------- pushal _Usrptmap[9] (708) if ((*pmemall)(&Usrptmap[a], npg, &proc[0], CSYS) == 0) { ^^^^^^^^^^^^ ---------- ashl $2,r9,r0 addl2 $_Usrptmap,r0 pushl r0 ---------- pushal _Usrptmap[9] (716) vmaccess(&Usrptmap[a], va, npg); ^^^^^^^^^^^^ ---------- ashl $2,r9,r0 addl2 $_Usrptmap,r0 pushl r0 ---------- pushal _Usrptmap[9] (751) (void) memfree(&Usrptmap[a], npg, 0); ^^^^^^^^^^^^ ---------- ashl $2,r11,r0 addl2 $_Usrptmap,r0 pushl r0 ---------- pushal _Usrptmap[11] Since my kernel used to work, I'm assuming that this latest bug fix is not something I've just gotta have. I'm also assuming that other bad code may have been generated, but I'll wait for a system panic or two before I make this poor old 750 recompile all that code again. (I understand that Amdahl claims the ability to recompile its kernel in 3 minutes... sigh...) (This just in: vm_mem.c compiles without complain using old c2.) -- Paul Vixie Consultant Work: 408-562-7798 vix@ub.com vix%ubvax@uunet.uu.net Ungermann-Bass Home: 415-647-7023 {amdahl,ptsfa,pyramid,uunet}!ubvax!vix Santa Clara, CA <>