9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Drawterm patch -- build on latest OpenBSD/PPC
@ 2024-08-09  3:50 Jon Sharp
  2024-08-22 18:39 ` Stanley Lieber
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Sharp @ 2024-08-09  3:50 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 150 bytes --]

Hey all,

Thought I'd share this trivial patch to work around the deprecation of 
the 'regnames' option on OpenBSD 7.5 for 32-bit PPC, FWIW...

--
Jon

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=ppc-regnames.patch, Size: 1351 bytes --]

diff --git a/posix-power/Makefile b/posix-power/Makefile
index d106fa7..75c8ca8 100644
--- a/posix-power/Makefile
+++ b/posix-power/Makefile
@@ -2,7 +2,7 @@ ROOT=..
 include ../Make.config
 LIB=../libmachdep.a
 
-CFLAGS+= -Wa,-mregnames
+#CFLAGS+= -Wa,-mregnames
 
 OFILES=\
 	getcallerpc.$O\
diff --git a/posix-power/tas.c b/posix-power/tas.c
index 7f9e5c0..4e52aef 100644
--- a/posix-power/tas.c
+++ b/posix-power/tas.c
@@ -15,16 +15,16 @@ tas(int *x)
 	 * r4 (x) and r5 (temp).
 	 */
 	__asm__("\n	sync\n"
-	"	li	r0,0\n"
-	"	mr	r4,%1		/* &l->val */\n"
-	"	lis	r5,0xdead	/* assemble constant 0xdeaddead */\n"
-	"	ori	r5,r5,0xdead	/* \" */\n"
+	"	li	%%r0,0\n"
+	"	mr	%%r4,%1		/* &l->val */\n"
+	"	lis	%%r5,0xdead	/* assemble constant 0xdeaddead */\n"
+	"	ori	%%r5,%%r5,0xdead	/* \" */\n"
 	"tas1:\n"
-	"	dcbf	r4,r0	/* cache flush; \"fix for 603x bug\" */\n"
-	"	lwarx	%0,r4,r0	/* v = l->val with reservation */\n"
-	"	cmp	cr0,0,%0,r0	/* v == 0 */\n"
+	"	dcbf	%%r4,%%r0	/* cache flush; \"fix for 603x bug\" */\n"
+	"	lwarx	%0,%%r4,%%r0	/* v = l->val with reservation */\n"
+	"	cmp	cr0,0,%0,%%r0	/* v == 0 */\n"
 	"	bne	tas0\n"
-	"	stwcx.	r5,r4,r0   /* if (l->val same) l->val = 0xdeaddead */\n"
+	"	stwcx.	%%r5,%%r4,%%r0   /* if (l->val same) l->val = 0xdeaddead */\n"
 	"	bne	tas1\n"
 	"tas0:\n"
 	"	sync\n"

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-23 20:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-09  3:50 [9front] Drawterm patch -- build on latest OpenBSD/PPC Jon Sharp
2024-08-22 18:39 ` Stanley Lieber
2024-08-22 20:51   ` Sigrid Solveig Haflínudóttir
2024-08-23 20:27     ` Jon Sharp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).