From: Jon Sharp <jrsharp@sdf.org>
To: 9front@9front.org
Subject: [9front] Drawterm patch -- build on latest OpenBSD/PPC
Date: Fri, 9 Aug 2024 03:50:59 +0000 (UTC) [thread overview]
Message-ID: <eb09c175-d999-8434-9c78-10d50d00b127@sdf.org> (raw)
[-- 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"
next reply other threads:[~2024-08-09 3:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 3:50 Jon Sharp [this message]
2024-08-22 18:39 ` Stanley Lieber
2024-08-22 20:51 ` Sigrid Solveig Haflínudóttir
2024-08-23 20:27 ` Jon Sharp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb09c175-d999-8434-9c78-10d50d00b127@sdf.org \
--to=jrsharp@sdf.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).