shithub: riscv

Download patch

ref: 0c6fd079ce51181e32e6625fdc85d07567991f37
parent: 539013042677ddd193cf6c37a53e4f64ed33649a
author: Jacob Moody <moody@posixcafe.org>
date: Sat Apr 6 20:01:30 EDT 2024

9l: do consize check for SB relative as well

--- a/sys/src/cmd/9l/span.c
+++ b/sys/src/cmd/9l/span.c
@@ -307,7 +307,7 @@
 			}
 			if(s->type == STEXT || s->type == SLEAF || s->type == SUNDEF) {
 				instoffset = s->value + a->offset;
-				return C_LCON;
+				goto consize;
 			}
 			if(s->type == SCONST) {
 				instoffset = s->value + a->offset;
@@ -323,17 +323,7 @@
 			instoffset = s->value + a->offset + INITDAT;
 			if(dlm)
 				return C_LCON;
-			/* not sure why this barfs */
-			return C_LCON;
-		/*
-			if(instoffset == 0)
-				return C_ZCON;
-			if(instoffset >= -0x8000 && instoffset <= 0xffff)
-				return C_SCON;
-			if((instoffset & 0xffff) == 0)
-				return C_UCON;
-			return C_LCON;
-		*/
+			goto consize;
 
 		case D_AUTO:
 			instoffset = autosize + a->offset;