1
0
mirror of https://github.com/golang/go synced 2024-11-22 02:04:40 -07:00

bug fix in 6c/8c/5c mis-aligned

function arguments.

R=rsc
CC=golang-dev
https://golang.org/cl/206054
This commit is contained in:
Ken Thompson 2010-02-09 17:26:04 -08:00
parent 2b4a9fa176
commit d4ad8e8ce3

View File

@ -801,7 +801,19 @@ tcoma(Node *l, Node *n, Type *t, int f)
n->type, t, l);
return 1;
}
switch(t->etype) {
// switch(t->etype) {
// case TCHAR:
// case TSHORT:
// t = types[TINT];
// break;
//
// case TUCHAR:
// case TUSHORT:
// t = types[TUINT];
// break;
// }
} else {
switch(n->type->etype) {
case TCHAR:
case TSHORT:
t = types[TINT];
@ -811,23 +823,12 @@ tcoma(Node *l, Node *n, Type *t, int f)
case TUSHORT:
t = types[TUINT];
break;
case TFLOAT:
t = types[TDOUBLE];
}
} else
switch(n->type->etype)
{
case TCHAR:
case TSHORT:
t = types[TINT];
break;
case TUCHAR:
case TUSHORT:
t = types[TUINT];
break;
case TFLOAT:
t = types[TDOUBLE];
}
if(t != T && !sametype(t, n->type)) {
n1 = new1(OXXX, Z, Z);
*n1 = *n;