changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: 7c: fix registerization of vlong constants

changeset 7141: 4e09a9199097
parent 7140: 1c857cff1d86
child 7142: 1f9656482835
author: cinap_lenrek@felloff.net
date: Mon, 08 Apr 2019 13:47:45 +0200
files: sys/src/cmd/7c/gc.h sys/src/cmd/7c/reg.c sys/src/cmd/7c/txt.c
description: 7c: fix registerization of vlong constants
     1.1--- a/sys/src/cmd/7c/gc.h
     1.2+++ b/sys/src/cmd/7c/gc.h
     1.3@@ -264,7 +264,7 @@ int	samaddr(Node*, Node*);
     1.4 void	gbranch(int);
     1.5 void	patch(Prog*, long);
     1.6 int	sconst(Node*);
     1.7-int	sval(long);
     1.8+int	sval(vlong);
     1.9 void	gpseudo(int, Sym*, Node*);
    1.10 int	usableoffset(Node*, vlong, Node*);
    1.11 
     2.1--- a/sys/src/cmd/7c/reg.c
     2.2+++ b/sys/src/cmd/7c/reg.c
     2.3@@ -551,7 +551,7 @@ mkvar(Adr *a, int docon)
     2.4 {
     2.5 	Var *v;
     2.6 	int i, t, n, et, z;
     2.7-	long o;
     2.8+	vlong o;
     2.9 	Bits bit;
    2.10 	Sym *s;
    2.11 
    2.12@@ -566,7 +566,7 @@ mkvar(Adr *a, int docon)
    2.13 	if(s == S) {
    2.14 		if(t != D_CONST || !docon || a->reg != NREG)
    2.15 			goto none;
    2.16-		et = TLONG;
    2.17+		// et = TLONG;
    2.18 	}
    2.19 	if(t == D_CONST) {
    2.20 		if(s == S && sval(o))
     3.1--- a/sys/src/cmd/7c/txt.c
     3.2+++ b/sys/src/cmd/7c/txt.c
     3.3@@ -1315,7 +1315,7 @@ isaddcon(vlong v)
     3.4 }
     3.5 
     3.6 int
     3.7-sval(long v)
     3.8+sval(vlong v)
     3.9 {
    3.10 	return isaddcon(v) || isaddcon(-v);
    3.11 }