1
0
mirror of https://github.com/golang/go synced 2024-11-12 10:20:27 -07:00

5c, 5g: another attempt at silencing gcc

R=ken2
CC=golang-dev
https://golang.org/cl/4535074
This commit is contained in:
Russ Cox 2011-05-16 16:15:13 -04:00
parent 40745a579c
commit 2d310a0087
4 changed files with 8 additions and 8 deletions

View File

@ -69,7 +69,7 @@ struct Adr
Sym* sym;
char type;
char reg;
uchar reg;
char name;
char etype;
};
@ -83,7 +83,7 @@ struct Prog
Prog* link;
int32 lineno;
char as;
char reg;
uchar reg;
uchar scond;
};
#define P ((Prog*)0)

View File

@ -1100,7 +1100,7 @@ copyu(Prog *p, Adr *v, Adr *s)
if(v->type == D_REG) {
if(v->reg <= REGEXT && v->reg > exregoffset)
return 2;
if(v->reg == REGARG)
if(v->reg == (uchar)REGARG)
return 2;
}
if(v->type == D_FREG)
@ -1118,7 +1118,7 @@ copyu(Prog *p, Adr *v, Adr *s)
case ATEXT: /* funny */
if(v->type == D_REG)
if(v->reg == REGARG)
if(v->reg == (uchar)REGARG)
return 3;
return 0;
}

View File

@ -26,7 +26,7 @@ struct Addr
int width;
uchar type;
char name;
char reg;
uchar reg;
char pun;
uchar etype;
};
@ -41,7 +41,7 @@ struct Prog
Addr to; // dst address
Prog* link; // next instruction in this func
void* regp; // points to enclosing Reg struct
char reg; // doubles as width in DATA op
uchar reg; // doubles as width in DATA op
uchar scond;
};

View File

@ -1134,7 +1134,7 @@ copyu(Prog *p, Adr *v, Adr *s)
if(v->type == D_REG) {
if(v->reg <= REGEXT && v->reg > exregoffset)
return 2;
if(v->reg == REGARG)
if(v->reg == (uchar)REGARG)
return 2;
}
if(v->type == D_FREG)
@ -1152,7 +1152,7 @@ copyu(Prog *p, Adr *v, Adr *s)
case ATEXT: /* funny */
if(v->type == D_REG)
if(v->reg == REGARG)
if(v->reg == (uchar)REGARG)
return 3;
return 0;
}