shithub: riscv

Download patch

ref: a99b0166432f1773ae50811c34d43f0c19ab2fa5
parent: 72cb1da8c26aedf2bb2355b1726ddfd30ac6585a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Oct 16 13:57:09 EDT 2023

7l: avoid hitting old 7c bug with 64-bit constant propagation

This is just to prevent breaking builds in case
someone compiles 7l with a old 7c compiler that
has the constant propagation bug.

The solution is to move the 64-bit assignments
together at the front.

--- a/sys/src/cmd/7l/obj.c
+++ b/sys/src/cmd/7l/obj.c
@@ -59,10 +59,10 @@
 	outfile = 0;
 	nerrors = 0;
 	curtext = P;
-	HEADTYPE = -1;
 	INITTEXT = -1;
-	INITTEXTP = -1;
 	INITDAT = -1;
+	HEADTYPE = -1;
+	INITTEXTP = -1;
 	INITRND = -1;
 	INITENTRY = 0;