char* thestring = "amd64";
LinkArch* thelinkarch = &linkamd64;
+void
+linkarchinit(void)
+{
+ if(strcmp(getgoarch(), "amd64p32") == 0)
+ thelinkarch = &linkamd64p32;
+}
+
vlong MAXWIDTH = 1LL<<50;
int addptr = AADDQ;
void gused(Node*);
void movelarge(NodeList*);
int isfat(Type*);
+void linkarchinit(void);
void liveness(Node*, Prog*, Sym*, Sym*, Sym*);
void markautoused(Prog*);
Plist* newplist(void);
#ifdef PLAN9
notify(catcher);
#endif
+ // Allow GOARCH=thestring or GOARCH=thestringsuffix,
+ // but not other values.
+ p = getgoarch();
+ if(strncmp(p, thestring, strlen(thestring)) != 0)
+ fatal("cannot use %cg with GOARCH=%s", thechar, p);
+ goarch = p;
+ linkarchinit();
ctxt = linknew(thelinkarch);
ctxt->diag = yyerror;
ctxt->bso = &bstdout;
goroot = getgoroot();
goos = getgoos();
- // Allow GOARCH=thestring or GOARCH=thestringsuffix,
- // but not other values.
- p = getgoarch();
- if(strncmp(p, thestring, strlen(thestring)) != 0)
- fatal("cannot use %cg with GOARCH=%s", thechar, p);
- goarch = p;
-
nacl = strcmp(goos, "nacl") == 0;
if(nacl)
flag_largemodel = 1;