This commit is contained in:
Russ Cox 2012-03-05 16:36:31 -05:00
commit 4a000a28d3
12 changed files with 134 additions and 18 deletions

View file

@ -204,7 +204,7 @@ void call(char*, Node*, Node*, Node*, Node*);
void catcher(void*, char*);
void checkqid(int, int);
void cmd(void);
Node* con(int);
Node* con(s64int);
List* construct(Node*);
void ctrace(int);
void decl(Node*);
@ -217,12 +217,12 @@ Lsym* enter(char*, int);
void error(char*, ...);
void execute(Node*);
void fatal(char*, ...);
ulong findframe(ulong);
u64int findframe(u64int);
void flatten(Node**, Node*);
void gc(void);
char* getstatus(int);
void* gmalloc(long);
void indir(Map*, ulong, char, Node*);
void indir(Map*, u64int, char, Node*);
void indirreg(Regs*, char*, char, Node*);
void initexpr(void);
void initprint(void);
@ -251,7 +251,7 @@ void pstr(String*);
void pushfd(int);
void pushfile(char*);
void pushstr(Node*);
ulong raddr(char*);
u64int raddr(char*);
void readtext(char*);
void readcore(void);
void restartio(void);

View file

@ -866,7 +866,7 @@ cvtatoi(Node *r, Node *args)
r->op = OCONST;
r->type = TINT;
r->store.u.ival = strtoul(res.store.u.string->string, 0, 0);
r->store.u.ival = strtoull(res.store.u.string->string, 0, 0);
r->store.fmt = 'D';
}
@ -875,7 +875,7 @@ cvtitoa(Node *r, Node *args)
{
Node res;
Node *av[Maxarg];
int ival;
s64int ival;
char buf[128], *fmt;
if(args == 0)
@ -1030,7 +1030,7 @@ flatten(Node **av, Node *n)
static struct
{
char *name;
ulong val;
u64int val;
} sregs[Maxarg/2];
static int nsregs;

View file

@ -11,7 +11,7 @@
{
Node *node;
Lsym *sym;
ulong ival;
u64int ival;
float fval;
String *string;
}

View file

@ -28,7 +28,7 @@ odot(Node *n, Node *r)
char *s;
Type *t;
Node res;
ulong addr;
u64int addr;
s = n->sym->name;
if(s == 0)

View file

@ -203,7 +203,7 @@ convflt(Node *r, char *flt)
}
void
indir(Map *m, ulong addr, char fmt, Node *r)
indir(Map *m, u64int addr, char fmt, Node *r)
{
int i;
u32int ival;

View file

@ -1114,9 +1114,8 @@ acidregsrw(Regs *r, char *name, u64int *u, int isr)
}
addr = v->store.u.ival;
/* XXX should use format to determine size */
if(get4(cormap, addr, &u32) < 0)
if(geta(cormap, addr, u) < 0)
return -1;
*u = u32;
return 0;
}
}

View file

@ -588,9 +588,9 @@ numsym(char first)
}
if(isbin)
yylval.ival = strtoul(symbol+2, 0, 2);
yylval.ival = strtoull(symbol+2, 0, 2);
else
yylval.ival = strtoul(symbol, 0, 0);
yylval.ival = strtoll(symbol, 0, 0);
return Tconst;
}

View file

@ -365,7 +365,7 @@ al(int t)
}
Node*
con(int v)
con(s64int v)
{
Node *n;

View file

@ -73,7 +73,7 @@ addvarsym(Fhdr *fp)
Symbol s;
Lsym *l;
String *file;
ulong v;
u64int v;
char buf[65536]; /* Some of those C++ names are really big */
List *list, **tail, *tl;