paint1(Reg *r, int bn)
{
Reg *r1;
- Prog *p;
int z;
uint32 bb;
}
for(;;) {
r->act.b[z] |= bb;
- p = r->prog;
if(r->use1.b[z] & bb) {
change += CREF * r->loop;
{
int32 magic;
int a, dynsym;
- vlong vl, va, startva, fo, w, symo, elfsymo, elfstro, elfsymsize, machlink;
+ vlong vl, startva, fo, symo, elfsymo, elfstro, elfsymsize, machlink;
ElfEhdr *eh;
ElfPhdr *ph, *pph;
ElfShdr *sh;
eh = getElfEhdr();
fo = HEADR;
startva = INITTEXT - HEADR;
- va = startva + fo;
- w = segtext.filelen;
/* This null SHdr must appear before all others */
sh = newElfShdr(elfstr[ElfStrEmpty]);
vlong ipc;
Prog *p;
int v, o, r, skip, mode;
- Sym *h[NSYM], *s, *di;
+ Sym *h[NSYM], *s;
uint32 sig;
char *name, *x;
int ntext;
lastp = nil;
ntext = 0;
eof = Boffset(f) + len;
- di = S;
src[0] = 0;
newloop:
Type *f, *t1, *t2, **t0;
Strlit *note;
int lno;
- NodeList *init;
Node *n, *left;
char *what;
t0 = t;
- init = nil;
lno = lineno;
what = "field";
if(et == TINTER)
static Sig*
methods(Type *t)
{
- int o;
Type *f, *mt, *it, *this;
Sig *a, *b;
Sym *method;
// make list of methods for t,
// generating code if necessary.
a = nil;
- o = 0;
oldlist = nil;
for(f=mt->xmethod; f; f=f->down) {
if(f->type->etype != TFUNC)
imethods(Type *t)
{
Sig *a, *all, *last;
- int o;
Type *f;
Sym *method, *isym;
Prog *oldlist;
all = nil;
last = nil;
- o = 0;
oldlist = nil;
for(f=t->type; f; f=f->down) {
if(f->etype != TFIELD)
Type*
aindex(Node *b, Type *t)
{
- NodeList *init;
Type *r;
int bound;
bound = -1; // open bound
- init = nil;
typecheck(&b, Erv);
if(b != nil) {
switch(consttype(b)) {
Type*
methtype(Type *t)
{
- int ptr;
-
if(t == T)
return T;
// strip away pointer if it's there
- ptr = 0;
if(isptr[t->etype]) {
if(t->sym != S)
return T;
- ptr = 1;
t = t->type;
if(t == T)
return T;
static void
casebody(Node *sw, Node *typeswvar)
{
- Node *os, *oc, *n, *c, *last;
+ Node *n, *c, *last;
Node *def;
NodeList *cas, *stat, *l, *lc;
Node *go, *br;
cas = nil; // cases
stat = nil; // statements
def = N; // defaults
- os = N; // last statement
- oc = N; // last case
br = nod(OBREAK, N, N);
for(l=sw->list; l; l=l->next) {
walkdef(Node *n)
{
int lno;
- NodeList *init;
Node *e;
Type *t;
NodeList *l;
if(n->type != T || n->sym == S) // builtin or no name
goto ret;
- init = nil;
switch(n->op) {
default:
fatal("walkdef %O", n->op);
{
NodeList *init;
NodeList *ll, *rl;
- int cl, lno;
+ int cl;
Node *n, *f;
n = *np;
if(n == N)
return;
- lno = lineno;
setlineno(n);
switch(n->op) {
void
address(void)
{
- Section *s, *text, *data, *rodata, *bss;
+ Section *s, *text, *data, *rodata;
Sym *sym, *sub;
uvlong va;
text = segtext.sect;
rodata = segtext.sect->next;
data = segdata.sect;
- bss = segdata.sect->next;
for(sym = datap; sym != nil; sym = sym->next) {
cursym = sym;
char *name;
int i, j, rela, is64, n;
uchar hdrbuf[64];
- uchar *p, *dp;
+ uchar *p;
ElfHdrBytes *hdr;
ElfObj *obj;
ElfSect *sect, *rsect;
n = rsect->size/(4+4*is64)/(2+rela);
r = mal(n*sizeof r[0]);
p = rsect->base;
- dp = sect->base;
for(j=0; j<n; j++) {
add = 0;
rp = &r[j];
Prog *p;
int i;
int32 dwn[LOG], cnt[LOG];
- Prog *lst[LOG], *last;
+ Prog *lst[LOG];
for(i=0; i<LOG; i++) {
if(i == 0)
lst[i] = P;
}
i = 0;
- last = nil;
for(cursym = textp; cursym != nil; cursym = cursym->next) {
for(p = cursym->text; p != P; p = p->link) {
if(p->link == P) {
{
uvlong (*swav)(uvlong);
uint32 (*swal)(uint32);
- ushort (*swab)(ushort);
Machhdr *mp;
MachCmd **cmd;
MachSymSeg *symtab;
return 0;
}
- swab = leswab;
swal = leswal;
swav = leswav;