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 tiny nptl fix
Date: Thu, 03 Jun 2004 15:01:00 -0000	[thread overview]
Message-ID: <20040603.235910.102556587.kkojima@rr.iij4u.or.jp> (raw)

Hi,

The end address of a critical section in a software atomic sequence
of SH must have 4-byte alignment, because MOVA instruction needs it.
The attached patch fixes a few mistakes about that.

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

	* sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
	Add nop to align the end of critical section.
	(lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.

diff -u3prN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
--- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h	Tue Mar 30 10:41:09 2004
+++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h	Thu Jun  3 22:57:03 2004
@@ -89,6 +89,7 @@ extern int __lll_mutex_unlock_wake (int 
 	    __asm __volatile ("\
 		.align 2\n\
 		mova 1f,r0\n\
+		nop\n\
 		mov r15,r1\n\
 		mov #-8,r15\n\
 	     0: mov.l @%2,%0\n\
@@ -108,6 +109,7 @@ extern int __lll_mutex_unlock_wake (int 
 	    __asm __volatile ("\
 		.align 2\n\
 		mova 1f,r0\n\
+		nop\n\
 		mov r15,r1\n\
 		mov #-8,r15\n\
 	     0: mov.l @%2,%0\n\
@@ -125,6 +127,7 @@ extern int __lll_mutex_unlock_wake (int 
      __asm __volatile ("\
 	.align 2\n\
 	mova 1f,r0\n\
+	nop\n\
 	mov r15,r1\n\
 	mov #-8,r15\n\
      0: mov.l @%2,%0\n\

             reply	other threads:[~2004-06-03 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-03 15:01 Kaz Kojima [this message]
2004-06-03 15:29 ` Ulrich Drepper
2004-11-18  9:07 [PATCH] SH: A tiny NPTL fix Kaz Kojima
2004-11-19  0:00 ` 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=20040603.235910.102556587.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).