shithub: scc

Download patch

ref: 40d91321c64a0ae0c5b7679b687b6c555fd4ecf0
parent: 878d46d965b83832a939cc46707aa6f3b7e5d30e
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Jun 30 03:12:14 EDT 2022

cc2/qbe: Update qbe to follow upstream

Lot of changes happened since the scc patches for qbe
were written. The patches were rebased and sent to
upstream repository, but it will take some time until
these patches are integrated there. Meanwhile we update
our fork and wait to the update of upstream.

git/query: bad hash b0e3ca697787cd405535278dc32148767002619e
--- a/src/cmd/cc/cc2/target/qbe/code.c
+++ b/src/cmd/cc/cc2/target/qbe/code.c
@@ -295,10 +295,11 @@
 		return;
 	if (sym->kind == SGLOB)
 		fputs("export ", stdout);
+	if ((tp->flags & INITF) == 0)
+		fputs("common ", stdout);
 
-	printf("data %s = %s align %d {\n",
+	printf("data %s = align %d {\n",
 	       symname(sym),
-	       (tp->flags & INITF) ? "" : "common",
 	       tp->align);
 	if ((tp->flags & INITF) == 0)
 		printf("\tz\t%lu\n}\n", tp->size);