diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2022-09-09 18:00:29 +0200 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-10-08 21:48:47 +0200 |
commit | 4e90b4210edc439bf749f495855e29f711d7e99e (patch) | |
tree | 9f3b3e137f98fa65bf1c61e235d32afce4f24f7f | |
parent | 2e38c86af6c91bfb23dfb06b517a00c11fd4c1b3 (diff) | |
download | roux-4e90b4210edc439bf749f495855e29f711d7e99e.tar.gz |
"rel" fields become "reloc"
-rw-r--r-- | alias.c | 2 | ||||
-rw-r--r-- | all.h | 4 | ||||
-rw-r--r-- | amd64/emit.c | 4 | ||||
-rw-r--r-- | arm64/emit.c | 2 | ||||
-rw-r--r-- | fold.c | 10 | ||||
-rw-r--r-- | load.c | 2 | ||||
-rw-r--r-- | parse.c | 2 | ||||
-rw-r--r-- | rv64/emit.c | 6 | ||||
-rw-r--r-- | util.c | 2 |
9 files changed, 17 insertions, 17 deletions
diff --git a/alias.c b/alias.c index f4d7f91..b4bb0fb 100644 --- a/alias.c +++ b/alias.c @@ -19,7 +19,7 @@ getalias(Alias *a, Ref r, Fn *fn) if (c->type == CAddr) { a->type = ASym; a->label = c->label; - a->rel = c->rel; + a->reloc = c->reloc; } else a->type = ACon; a->offset = c->bits.i; diff --git a/all.h b/all.h index 8303c62..7859b05 100644 --- a/all.h +++ b/all.h @@ -282,7 +282,7 @@ struct Alias { Ref base; uint32_t label; int64_t offset; - int rel; + int reloc; Alias *slot; }; @@ -328,7 +328,7 @@ struct Con { enum { RelDef, RelThr, - } rel; + } reloc; char flt; /* 1 to print as s, 2 to print as d */ }; diff --git a/amd64/emit.c b/amd64/emit.c index cf36ebe..064ee60 100644 --- a/amd64/emit.c +++ b/amd64/emit.c @@ -167,7 +167,7 @@ emitcon(Con *con, FILE *f) case CAddr: l = str(con->label); p = l[0] == '"' ? "" : T.assym; - if (con->rel == RelThr) + if (con->reloc == RelThr) fprintf(f, "%%fs:%s%s@tpoff", p, l); else fprintf(f, "%s%s", p, l); @@ -340,7 +340,7 @@ Next: case RCon: off = fn->con[ref.val]; emitcon(&off, f); - if (off.type == CAddr && off.rel != RelThr) + if (off.type == CAddr && off.reloc != RelThr) fprintf(f, "(%%rip)"); break; case RTmp: diff --git a/arm64/emit.c b/arm64/emit.c index fc3f9ac..e20114a 100644 --- a/arm64/emit.c +++ b/arm64/emit.c @@ -263,7 +263,7 @@ loadaddr(Con *c, char *rn, E *e) off[0] = 0; l = str(c->label); p = l[0] == '"' ? "" : T.assym; - if (c->rel == RelThr) { + if (c->reloc == RelThr) { fprintf(e->f, "\tmrs\t%s, tpidr_el0\n", rn); fprintf(e->f, "\tadd\t%s, %s, #:tprel_hi12:%s%s%s, lsl #12\n", rn, rn, p, l, off); diff --git a/fold.c b/fold.c index 0bbf8a7..2bb3a2f 100644 --- a/fold.c +++ b/fold.c @@ -346,12 +346,12 @@ foldint(Con *res, int op, int w, Con *cl, Con *cr) if (cr->type == CAddr) return 1; lab = cl->label; - rel = cl->rel; + rel = cl->reloc; typ = CAddr; } else if (cr->type == CAddr) { lab = cr->label; - rel = cr->rel; + rel = cr->reloc; typ = CAddr; } } @@ -359,7 +359,7 @@ foldint(Con *res, int op, int w, Con *cl, Con *cr) if (cl->type == CAddr) { if (cr->type != CAddr) { lab = cl->label; - rel = cl->rel; + rel = cl->reloc; typ = CAddr; } else if (cl->label != cr->label) return 1; @@ -408,7 +408,7 @@ foldint(Con *res, int op, int w, Con *cl, Con *cr) x = l.u; if (cl->type == CAddr) { lab = cl->label; - rel = cl->rel; + rel = cl->reloc; typ = CAddr; } break; @@ -462,7 +462,7 @@ foldint(Con *res, int op, int w, Con *cl, Con *cr) else die("unreachable"); } - *res = (Con){.type=typ, .label=lab, .rel=rel, .bits={.i=x}}; + *res = (Con){.type=typ, .label=lab, .reloc=rel, .bits={.i=x}}; return 0; } diff --git a/load.c b/load.c index 7146ce8..5a96d35 100644 --- a/load.c +++ b/load.c @@ -155,7 +155,7 @@ load(Slice sl, bits msk, Loc *l) c.type = CAddr; c.label = a->label; c.bits.i = a->offset; - c.rel = a->rel; + c.reloc = a->reloc; r = newcon(&c, curf); break; } diff --git a/parse.c b/parse.c index 874a71f..98ede39 100644 --- a/parse.c +++ b/parse.c @@ -420,7 +420,7 @@ parseref() c.flt = 2; break; case Tthread: - c.rel = RelThr; + c.reloc = RelThr; expect(Tglo); /* fall through */ case Tglo: diff --git a/rv64/emit.c b/rv64/emit.c index a176c11..bb53c83 100644 --- a/rv64/emit.c +++ b/rv64/emit.c @@ -129,7 +129,7 @@ slot(int s, Fn *fn) static void emitaddr(Con *c, FILE *f) { - assert(c->rel == RelDef); + assert(c->reloc == RelDef); fputs(str(c->label), f); if (c->bits.i) fprintf(f, "+%"PRIi64, c->bits.i); @@ -229,7 +229,7 @@ loadaddr(Con *c, char *rn, FILE *f) { char off[32]; - if (c->rel == RelThr) { + if (c->reloc == RelThr) { if (c->bits.i) sprintf(off, "+%"PRIi64, c->bits.i); else @@ -279,7 +279,7 @@ fixmem(Ref *pr, Fn *fn, FILE *f) r = *pr; if (rtype(r) == RCon) { c = &fn->con[r.val]; - if (c->type == CAddr && c->rel == RelThr) { + if (c->type == CAddr && c->reloc == RelThr) { loadcon(c, T6, Kl, f); *pr = TMP(T6); } diff --git a/util.c b/util.c index e187713..a4bdb29 100644 --- a/util.c +++ b/util.c @@ -360,7 +360,7 @@ newcon(Con *c0, Fn *fn) if (c0->type == c1->type && c0->label == c1->label && c0->bits.i == c1->bits.i - && c0->rel == c1->rel) + && c0->reloc == c1->reloc) return CON(i); } vgrow(&fn->con, ++fn->ncon); |