shithub: riscv

Download patch

ref: a23d7cdb841643216bc620fe1bd09bfb4f77759c
parent: 1dd7f0893b28d10fb40f2ce7337c986b83c16f1d
author: cinap_lenrek <[email protected]>
date: Sun Oct 4 17:22:17 EDT 2015

vc: fix mistake.

--- a/sys/src/cmd/vc/cgen.c
+++ b/sys/src/cmd/vc/cgen.c
@@ -208,9 +208,9 @@
 				reglcgen(&nod2, l, Z);
 			else
 				nod2 = *l;
-			regalloc(&nod, r, nn);
+			regalloc(&nod, l, nn);
 			gopcode(OAS, &nod2, Z, &nod);
-			gopcode(o, l, Z, &nod);
+			gopcode(o, r, Z, &nod);
 			gopcode(OAS, &nod, Z, &nod2);
 	
 			regfree(&nod);