summaryrefslogtreecommitdiff
path: root/sys/src/cmd/8c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-10-04 20:06:59 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-10-04 20:06:59 +0200
commite6d64bab9dc7c71c80e82b7c41555a413f502399 (patch)
treea649cd9ab96cd7ded769f5346b570159f64bc7ba /sys/src/cmd/8c
parent107ca1b42d099d74cd033be7f363b92d4ff29e3c (diff)
8c: handle 64 bit mixedmode asop and type vlong <-> float/double type conversions
Diffstat (limited to 'sys/src/cmd/8c')
-rw-r--r--sys/src/cmd/8c/machcap.c4
-rw-r--r--sys/src/cmd/8c/txt.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/src/cmd/8c/machcap.c b/sys/src/cmd/8c/machcap.c
index 1734e9c32..db1cdcba6 100644
--- a/sys/src/cmd/8c/machcap.c
+++ b/sys/src/cmd/8c/machcap.c
@@ -18,7 +18,7 @@ machcap(Node *n)
if(typev[n->type->etype]) {
// if(typev[n->type->etype] && n->right->op == OCONST) {
// if(hi64v(n->right) == 0)
- return 1;
+ return !mixedasop(n->left->type, n->right->type);
}
break;
@@ -58,6 +58,8 @@ machcap(Node *n)
case OASADD:
case OASSUB:
+ return !mixedasop(n->left->type, n->right->type);
+
case OASAND:
case OASOR:
case OASXOR:
diff --git a/sys/src/cmd/8c/txt.c b/sys/src/cmd/8c/txt.c
index 13f62539f..258d90f8e 100644
--- a/sys/src/cmd/8c/txt.c
+++ b/sys/src/cmd/8c/txt.c
@@ -621,20 +621,18 @@ gmove(Node *f, Node *t)
a = AMOVWLZX;
goto ld;
case TINT:
- case TUINT:
case TLONG:
- case TULONG:
- case TIND:
if(typefd[tt]) {
gins(AFMOVL, f, &fregnode0);
gmove(&fregnode0, t);
return;
}
+ case TUINT:
+ case TULONG:
+ case TIND:
a = AMOVL;
-
ld:
regalloc(&nod, f, t);
- nod.type = types[TLONG];
gins(a, f, &nod);
gmove(&nod, t);
regfree(&nod);