two fixes for /lib/c2
Paul Vixie
vix at ubvax.UB.Com
Thu Apr 28 00:03:31 AEST 1988
In article <11228 at mimsy.UUCP> chris at 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],<dst> # as long as it matches
>
> which becomes
>
> moval _x[r0],<dst>
> [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:
"<stdin>", line 670: register expected
"<stdin>", line 678: register expected
"<stdin>", line 708: register expected
"<stdin>", line 716: register expected
"<stdin>", 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 at ub.com vix%ubvax at uunet.uu.net
Ungermann-Bass Home: 415-647-7023 {amdahl,ptsfa,pyramid,uunet}!ubvax!vix
Santa Clara, CA <<I do not speak for Ungermann-Bass>>
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list