summaryrefslogtreecommitdiff
path: root/sys/src/cmd/6c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-10-04 20:02:58 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-10-04 20:02:58 +0200
commitbfd0cb0db474a2ace38443537aff86382ec10baf (patch)
treebd37e71c63992d5ee17a12c3d132393106612985 /sys/src/cmd/6c
parent9e3ef5c777971707ab4ba426bb55d3bb2553ddf9 (diff)
cc/6c: fix return type of mixed asop expressions, preserve type for moves so fixed<->float conversions work correctly
Diffstat (limited to 'sys/src/cmd/6c')
-rw-r--r--sys/src/cmd/6c/txt.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/sys/src/cmd/6c/txt.c b/sys/src/cmd/6c/txt.c
index 85c4f2a46..5239b5633 100644
--- a/sys/src/cmd/6c/txt.c
+++ b/sys/src/cmd/6c/txt.c
@@ -677,14 +677,10 @@ gmove(Node *f, Node *t)
return;
}
case TUVLONG:
- a = AMOVQ;
- goto ld;
case TIND:
a = AMOVQ;
-
ld:
regalloc(&nod, f, t);
- nod.type = t64? types[TVLONG]: types[TINT];
gins(a, f, &nod);
gmove(&nod, t);
regfree(&nod);
@@ -692,19 +688,10 @@ gmove(Node *f, Node *t)
case TFLOAT:
a = AMOVSS;
- goto fld;
+ goto ld;
case TDOUBLE:
a = AMOVSD;
- fld:
- regalloc(&nod, f, t);
- if(tt != TDOUBLE && tt != TFLOAT){ /* TO DO: why is this here */
- prtree(f, "odd tree");
- nod.type = t64? types[TVLONG]: types[TINT];
- }
- gins(a, f, &nod);
- gmove(&nod, t);
- regfree(&nod);
- return;
+ goto ld;
}
/*
@@ -1077,7 +1064,7 @@ gmove(Node *f, Node *t)
case CASE( TUSHORT,TFLOAT):
case CASE( TINT, TFLOAT):
case CASE( TLONG, TFLOAT):
- case CASE( TVLONG, TFLOAT):
+ case CASE( TVLONG, TFLOAT):
case CASE( TIND, TFLOAT):
case CASE( TCHAR, TDOUBLE):