public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Kaz Kojima <kkojima@rr.iij4u.or.jp>
To: libc-hacker@sources.redhat.com
Subject: [PATCH] SH: A few nptl fixups
Date: Tue, 20 Apr 2004 04:05:00 -0000	[thread overview]
Message-ID: <20040420.130335.38694095.kkojima@rr.iij4u.or.jp> (raw)

Hi,

The attached patch removes DT_TEXTREL from libpthread.so and
fixes frame info of a few .S files.

Regards,
	kaz
--
2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
	Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
	* sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
	info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.

diff -u3prN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
--- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S	Sat Jul 12 10:28:54 2003
+++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S	Mon Apr 19 12:48:43 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
@@ -33,6 +33,7 @@
 	.globl	sem_timedwait
 	.type	sem_timedwait,@function
 	.align	5
+	cfi_startproc
 sem_timedwait:
 	/* First check for cancellation.  */
 	stc	gbr, r0
@@ -59,11 +60,22 @@ sem_timedwait:
 1:
 	/* Check whether the timeout value is valid.  */
 	mov.l	r8, @-r15
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r8, 0)
 	mov.l	r9, @-r15
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r9, 0)
 	mov.l	r10, @-r15
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r10, 0)
 	mov.l	r12, @-r15
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r12, 0)
 	sts.l	pr, @-r15
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (pr, 0)
 	add	#-8, r15
+	cfi_adjust_cfa_offset(8)
 	mov	r4, r8
 	mov	r5, r9
 
@@ -193,8 +205,10 @@ sem_timedwait:
 	stc	gbr, r0
 	mov.w	.Lclbuf, r1
 	mov.l	.Lunwind, r2
-	jmp	@r2
+	braf	r2
 	 mov.l	@(r0,r1), r4
+.Lunwindb:
+	cfi_endproc
 
 .L1k:
 	.word	1000
@@ -221,5 +235,5 @@ sem_timedwait:
 .Ldisable0:
 	.long	__pthread_disable_asynccancel-.Ldisable0b
 .Lunwind:
-	.long	__pthread_unwind
+	.long	HIDDEN_JUMPTARGET (__pthread_unwind)-.Lunwindb
 	.size	sem_timedwait,.-sem_timedwait
diff -u3prN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S
--- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S	Sat Mar 20 15:24:30 2004
+++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S	Mon Apr 19 12:49:01 2004
@@ -121,18 +121,10 @@ __new_sem_wait:
 	mov	#-1, r0
 9:
 	lds.l	@r15+, pr
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (pr)
 	mov.l	@r15+, r12
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (r12)
 	mov.l	@r15+, r10
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (r10)
 	rts
 	 mov.l	@r15+, r8
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (r8)
 5:
 	/* Canceled.  */
 	stc	gbr, r0
@@ -144,8 +136,9 @@ __new_sem_wait:
 	stc	gbr, r0
 	mov.w	.Lclbuf, r1
 	mov.l	.Lunwind, r2
-	jmp	@r2
+	braf	r2
 	 mov.l	@(r0,r1), r4
+.Lunwindb:
 	cfi_endproc
 
 .Lchand:
@@ -169,6 +162,6 @@ __new_sem_wait:
 .Ldisable0:
 	.long	__pthread_disable_asynccancel-.Ldisable0b
 .Lunwind:
-	.long	__pthread_unwind
+	.long	HIDDEN_JUMPTARGET (__pthread_unwind)-.Lunwindb
 	.size	__new_sem_wait,.-__new_sem_wait
 	versioned_symbol(libpthread, __new_sem_wait, sem_wait, GLIBC_2_1)

             reply	other threads:[~2004-04-20  4:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-20  4:05 Kaz Kojima [this message]
2004-04-20  4:18 ` 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.130335.38694095.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).