shithub: riscv

Download patch

ref: 14c7edf96e287b10285069bc0ab7b9569ca7b4c3
parent: b29d5ac7b1f713e41285ad4b2ce1b23313d8088e
author: cinap_lenrek <[email protected]>
date: Mon Apr 8 09:47:45 EDT 2019

7c: fix registerization of vlong constants

--- a/sys/src/cmd/7c/gc.h
+++ b/sys/src/cmd/7c/gc.h
@@ -264,7 +264,7 @@
 void	gbranch(int);
 void	patch(Prog*, long);
 int	sconst(Node*);
-int	sval(long);
+int	sval(vlong);
 void	gpseudo(int, Sym*, Node*);
 int	usableoffset(Node*, vlong, Node*);
 
--- a/sys/src/cmd/7c/reg.c
+++ b/sys/src/cmd/7c/reg.c
@@ -551,7 +551,7 @@
 {
 	Var *v;
 	int i, t, n, et, z;
-	long o;
+	vlong o;
 	Bits bit;
 	Sym *s;
 
@@ -566,7 +566,7 @@
 	if(s == S) {
 		if(t != D_CONST || !docon || a->reg != NREG)
 			goto none;
-		et = TLONG;
+		// et = TLONG;
 	}
 	if(t == D_CONST) {
 		if(s == S && sval(o))
--- a/sys/src/cmd/7c/txt.c
+++ b/sys/src/cmd/7c/txt.c
@@ -1315,7 +1315,7 @@
 }
 
 int
-sval(long v)
+sval(vlong v)
 {
 	return isaddcon(v) || isaddcon(-v);
 }