Commit ff196fbd authored by Kai Backman's avatar Kai Backman

patch in proper branch address in zaddr output

R=rsc
APPROVED=rsc
DELTA=12  (11 added, 1 deleted, 0 changed)
OCL=34658
CL=34664
parent 4c952153
...@@ -120,7 +120,6 @@ zaddr(Biobuf *b, Addr *a, int s) ...@@ -120,7 +120,6 @@ zaddr(Biobuf *b, Addr *a, int s)
Bputc(b, l>>24); // fall through Bputc(b, l>>24); // fall through
case D_OREG: case D_OREG:
case D_CONST: case D_CONST:
case D_BRANCH:
case D_SHIFT: case D_SHIFT:
case D_STATIC: case D_STATIC:
case D_AUTO: case D_AUTO:
...@@ -133,6 +132,17 @@ zaddr(Biobuf *b, Addr *a, int s) ...@@ -133,6 +132,17 @@ zaddr(Biobuf *b, Addr *a, int s)
Bputc(b, l>>24); Bputc(b, l>>24);
break; break;
case D_BRANCH:
if(a->branch == nil)
fatal("unpatched branch");
a->offset = a->branch->loc;
l = a->offset;
Bputc(b, l);
Bputc(b, l>>8);
Bputc(b, l>>16);
Bputc(b, l>>24);
break;
case D_SCONST: case D_SCONST:
n = a->sval; n = a->sval;
for(i=0; i<NSNAME; i++) { for(i=0; i<NSNAME; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment