8c: handle 64 bit mixedmode asop and type vlong <-> float/double type conversions
This commit is contained in:
parent
107ca1b42d
commit
e6d64bab9d
2 changed files with 6 additions and 6 deletions
|
@ -18,7 +18,7 @@ machcap(Node *n)
|
||||||
if(typev[n->type->etype]) {
|
if(typev[n->type->etype]) {
|
||||||
// if(typev[n->type->etype] && n->right->op == OCONST) {
|
// if(typev[n->type->etype] && n->right->op == OCONST) {
|
||||||
// if(hi64v(n->right) == 0)
|
// if(hi64v(n->right) == 0)
|
||||||
return 1;
|
return !mixedasop(n->left->type, n->right->type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -58,6 +58,8 @@ machcap(Node *n)
|
||||||
|
|
||||||
case OASADD:
|
case OASADD:
|
||||||
case OASSUB:
|
case OASSUB:
|
||||||
|
return !mixedasop(n->left->type, n->right->type);
|
||||||
|
|
||||||
case OASAND:
|
case OASAND:
|
||||||
case OASOR:
|
case OASOR:
|
||||||
case OASXOR:
|
case OASXOR:
|
||||||
|
|
|
@ -621,20 +621,18 @@ gmove(Node *f, Node *t)
|
||||||
a = AMOVWLZX;
|
a = AMOVWLZX;
|
||||||
goto ld;
|
goto ld;
|
||||||
case TINT:
|
case TINT:
|
||||||
case TUINT:
|
|
||||||
case TLONG:
|
case TLONG:
|
||||||
case TULONG:
|
|
||||||
case TIND:
|
|
||||||
if(typefd[tt]) {
|
if(typefd[tt]) {
|
||||||
gins(AFMOVL, f, &fregnode0);
|
gins(AFMOVL, f, &fregnode0);
|
||||||
gmove(&fregnode0, t);
|
gmove(&fregnode0, t);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case TUINT:
|
||||||
|
case TULONG:
|
||||||
|
case TIND:
|
||||||
a = AMOVL;
|
a = AMOVL;
|
||||||
|
|
||||||
ld:
|
ld:
|
||||||
regalloc(&nod, f, t);
|
regalloc(&nod, f, t);
|
||||||
nod.type = types[TLONG];
|
|
||||||
gins(a, f, &nod);
|
gins(a, f, &nod);
|
||||||
gmove(&nod, t);
|
gmove(&nod, t);
|
||||||
regfree(&nod);
|
regfree(&nod);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue