git: 9front

Download patch

ref: d060f74a59e7d22089481fbe6ec2b5259954dc31
parent: dad6a1cf6349b8a7c04994003dfe5d8b173b0469
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed May 1 04:55:24 EDT 2019

[5678vq]c: fix .safe node type for *FUNC() = *FUNC() sugen

--- a/sys/src/cmd/5c/cgen.c
+++ b/sys/src/cmd/5c/cgen.c
@@ -1407,7 +1407,7 @@
 		nn->type = types[TLONG];
 		regialloc(&nod1, nn, Z);
 		lcgen(nn, &nod1);
-		regsalloc(&nod2, nn);
+		regsalloc(&nod2, &nod1);
 		nn->type = t;
 
 		gopcode(OAS, &nod1, Z, &nod2);
--- a/sys/src/cmd/6c/cgen.c
+++ b/sys/src/cmd/6c/cgen.c
@@ -1599,7 +1599,7 @@
 		nn->type = types[TLONG];
 		regialloc(&nod1, nn, Z);
 		lcgen(nn, &nod1);
-		regsalloc(&nod2, nn);
+		regsalloc(&nod2, &nod1);
 		nn->type = t;
 
 		gins(AMOVQ, &nod1, &nod2);
--- a/sys/src/cmd/7c/cgen.c
+++ b/sys/src/cmd/7c/cgen.c
@@ -1068,7 +1068,7 @@
 		nn->type = types[TLONG];
 		regialloc(&nod1, nn, Z);
 		lcgen(nn, &nod1);
-		regsalloc(&nod2, nn);
+		regsalloc(&nod2, &nod1);
 		nn->type = t;
 
 		gopcode(OAS, &nod1, Z, &nod2);
--- a/sys/src/cmd/8c/cgen.c
+++ b/sys/src/cmd/8c/cgen.c
@@ -1669,7 +1669,7 @@
 		nn->type = types[TLONG];
 		regialloc(&nod1, nn, Z);
 		lcgen(nn, &nod1);
-		regsalloc(&nod2, nn);
+		regsalloc(&nod2, &nod1);
 		nn->type = t;
 
 		gins(AMOVL, &nod1, &nod2);
--- a/sys/src/cmd/qc/cgen.c
+++ b/sys/src/cmd/qc/cgen.c
@@ -1016,7 +1016,7 @@
 		nn->type = types[TLONG];
 		regialloc(&nod1, nn, Z);
 		lcgen(nn, &nod1);
-		regsalloc(&nod2, nn);
+		regsalloc(&nod2, &nod1);
 		nn->type = t;
 
 		gmove(&nod1, &nod2);
--- a/sys/src/cmd/vc/cgen.c
+++ b/sys/src/cmd/vc/cgen.c
@@ -1077,7 +1077,7 @@
 		nn->type = types[TLONG];
 		regialloc(&nod1, nn, Z);
 		lcgen(nn, &nod1);
-		regsalloc(&nod2, nn);
+		regsalloc(&nod2, &nod1);
 		nn->type = t;
 
 		gopcode(OAS, &nod1, Z, &nod2);
--