summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--alias.c2
-rw-r--r--all.h4
-rw-r--r--amd64/emit.c4
-rw-r--r--arm64/emit.c2
-rw-r--r--fold.c10
-rw-r--r--load.c2
-rw-r--r--parse.c2
-rw-r--r--rv64/emit.c6
-rw-r--r--util.c2
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);