Compare commits

..

No commits in common. "ac79f8fd02cb365ce0edaf8d5c17d400afd1287a" and "f36c06c3ee8d8bb4c381904996f230e741be43c9" have entirely different histories.

View File

@ -199,7 +199,7 @@ emitcon(Con *con, E *e)
assert(!T.apple);
fprintf(e->f, "%%fs:%s%s@tpoff", p, l);
} else {
assert((con->sym.type & ~SExt) == SGlo);
assert(con->sym.type == SGlo);
fprintf(e->f, "%s%s", p, l);
}
if (con->bits.i)
@ -544,8 +544,7 @@ emitins(Ins i, E *e)
regtoa(i.to.val, SLong));
break;
}
switch (con->sym.type) {
case SThr:
if (!T.apple && con->sym.type == SThr) {
/* derive the symbol address from the TCB
* address at offset 0 of %fs */
emitf("movq %%fs:0, %L=", &i, e);
@ -558,7 +557,8 @@ emitins(Ins i, E *e)
regtoa(i.to.val, SLong),
regtoa(i.to.val, SLong));
break;
case SExtThr:
}
if (!T.apple && con->sym.type == SExtThr) {
/* initial-exec TLS: load offset from
* GOT, add to thread-base register */
assert(!con->bits.i);
@ -568,7 +568,8 @@ emitins(Ins i, E *e)
sym[0] == '"' ? "" : T.assym, sym,
regtoa(i.to.val, SLong));
break;
case SExt:
}
if (con->sym.type == SExt) {
/* load address from the GOT */
assert(!con->bits.i);
fprintf(e->f,
@ -576,10 +577,8 @@ emitins(Ins i, E *e)
sym[0] == '"' ? "" : T.assym, sym,
regtoa(i.to.val, SLong));
break;
default:
goto Table;
}
break;
goto Table;
case Ocall:
/* calls simply have a weird syntax in AT&T
* assembly... */