update 8a, 8c, 8l to use new object format.

add "extern register" support to 8c.
extern register means allocate in the FS-relative segment.

make 8l generate segmented stack checks.

R=ken
OCL=26600
CL=26606
This commit is contained in:
Russ Cox 2009-03-20 16:40:00 -07:00
parent c1e748bd2e
commit 2bd101c4b1
18 changed files with 544 additions and 145 deletions

View file

@ -328,7 +328,10 @@ outcode(void)
return;
}
Binit(&b, f, OWRITE);
Bseek(&b, 0L, 2);
Bprint(&b, "%s\n", thestring);
Bprint(&b, "!\n");
outhist(&b);
for(sym=0; sym<NSYM; sym++) {
h[sym].sym = S;
@ -530,6 +533,9 @@ zaddr(Biobuf *b, Adr *a, int s)
case D_SCONST:
t |= T_SCONST;
break;
case D_CONST2:
t |= T_OFFSET|T_OFFSET2;
break;
}
Bputc(b, t);
@ -544,6 +550,13 @@ zaddr(Biobuf *b, Adr *a, int s)
Bputc(b, l>>16);
Bputc(b, l>>24);
}
if(t & T_OFFSET2) { /* implies offset2 */
l = a->offset2;
Bputc(b, l);
Bputc(b, l>>8);
Bputc(b, l>>16);
Bputc(b, l>>24);
}
if(t & T_SYM) /* implies sym */
Bputc(b, s);
if(t & T_FCONST) {