From: Kaz Kojima <kkojima@rr.iij4u.or.jp>
To: libc-hacker@sources.redhat.com
Subject: [PATCH] Fix SH linuxthreads
Date: Tue, 20 Apr 2004 04:00:00 -0000 [thread overview]
Message-ID: <20040420.125734.35680772.kkojima@rr.iij4u.or.jp> (raw)
Hi,
The appended patch is an SH-portion of the change of sysdep-cancel.h
for linuxthreads. I've noticed also that I forgot to fix a silly bug
in CENABLE and CDISABLE which was fixed already in nptl.
Regards,
kaz
--
2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
for librt. Save the return value to a safe register.
(CDISABLE): Define for librt. Set the function argument correctly.
diff -u3prN ORIG/libc/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h LOCAL/libc/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
--- ORIG/libc/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h Thu Jul 3 13:49:24 2003
+++ LOCAL/libc/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h Mon Apr 19 12:01:40 2004
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -101,25 +101,57 @@
# define __local_disable_asynccancel __librt_disable_asynccancel
# endif
-# define CENABLE \
+# if defined IS_IN_librt && defined PIC
+# define CENABLE \
+ mov.l r12,@-r15; \
+ mov.l 1f,r12; \
+ mova 1f,r0; \
+ add r0,r12; \
+ mov.l 2f,r0; \
+ bsrf r0; \
+ nop; \
+ 0: bra 3f; \
+ mov r0,r2; \
+ .align 2; \
+ 1: .long _GLOBAL_OFFSET_TABLE_; \
+ 2: .long __local_enable_asynccancel@PLT - (0b+2-.); \
+ 3: mov.l @r15+,r12
+
+# define CDISABLE \
+ mov.l r12,@-r15; \
+ mov.l 1f,r12; \
+ mova 1f,r0; \
+ add r0,r12; \
+ mov.l 2f,r0; \
+ bsrf r0; \
+ mov r2,r4; \
+ 0: bra 3f; \
+ nop; \
+ .align 2; \
+ 1: .long _GLOBAL_OFFSET_TABLE_; \
+ 2: .long __local_disable_asynccancel@PLT - (0b+2-.); \
+ 3: mov.l @r15+,r12
+# else
+# define CENABLE \
mov.l 1f,r0; \
bsrf r0; \
nop; \
0: bra 2f; \
- nop; \
+ mov r0,r2; \
.align 2; \
1: .long __local_enable_asynccancel - 0b; \
2:
-# define CDISABLE \
+# define CDISABLE \
mov.l 1f,r0; \
bsrf r0; \
- nop; \
+ mov r2,r4; \
0: bra 2f; \
nop; \
.align 2; \
1: .long __local_disable_asynccancel - 0b; \
2:
+# endif
# ifndef __ASSEMBLER__
# if defined FLOATING_STACKS && USE___THREAD && defined PIC
next reply other threads:[~2004-04-20 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-20 4:00 Kaz Kojima [this message]
2004-04-20 4:15 ` Ulrich Drepper
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=20040420.125734.35680772.kkojima@rr.iij4u.or.jp \
--to=kkojima@rr.iij4u.or.jp \
--cc=libc-hacker@sources.redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).