mirror of
https://github.com/golang/go.git
synced 2025-05-16 21:04:38 +00:00
fix possible infinite recursion in eqtype.
don't use intermediate register to move 32-or-fewer-bit immediate constants into memory. R=ken OCL=23726 CL=23726
This commit is contained in:
parent
3ec4675220
commit
282bf8cc8c
@ -554,7 +554,9 @@ gmove(Node *f, Node *t)
|
|||||||
goto st;
|
goto st;
|
||||||
|
|
||||||
st:
|
st:
|
||||||
if(f->op == OCONST) {
|
// 64-bit immediates only allowed for move into registers.
|
||||||
|
// this is not a move into a register.
|
||||||
|
if(f->op == OCONST || (f->op == OLITERAL && !t64)) {
|
||||||
gins(a, f, t);
|
gins(a, f, t);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1620,7 +1620,7 @@ signame(Type *t)
|
|||||||
// so that it can be referred to by the runtime.
|
// so that it can be referred to by the runtime.
|
||||||
if(strcmp(buf, "interface { }") == 0)
|
if(strcmp(buf, "interface { }") == 0)
|
||||||
strcpy(buf, "empty");
|
strcpy(buf, "empty");
|
||||||
|
|
||||||
// special case: sigi.... is just too hard to read in assembly.
|
// special case: sigi.... is just too hard to read in assembly.
|
||||||
if(strcmp(buf, "...") == 0)
|
if(strcmp(buf, "...") == 0)
|
||||||
strcpy(buf, "dotdotdot");
|
strcpy(buf, "dotdotdot");
|
||||||
@ -1707,7 +1707,7 @@ eqtype(Type *t1, Type *t2, int d)
|
|||||||
return 0;
|
return 0;
|
||||||
if(ta->etype != TFIELD || tb->etype != TFIELD)
|
if(ta->etype != TFIELD || tb->etype != TFIELD)
|
||||||
return 0;
|
return 0;
|
||||||
if(!eqtype(ta->type, tb->type, 0))
|
if(!eqtype(ta->type, tb->type, d+1))
|
||||||
return 0;
|
return 0;
|
||||||
ta = ta->down;
|
ta = ta->down;
|
||||||
tb = tb->down;
|
tb = tb->down;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user