To: linux-m68k@lists.linux-m68k.org
Subject: L68K: Small patch for 2.1.85
X-Yow: ..  Like I always say -- nothing can beat the BRATWURST
 here in DUSSELDORF!!
From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Date: 06 Mar 1998 10:24:28 +0100
Sender: owner-linux-m68k@phil.uni-sb.de

This patch fixes sigismember to not return a negative value.  As a nice
side effect it is now slightly more efficient.

Andreas.

--- linux-2.1.85/include/asm-m68k/signal.h.~2~	Wed Feb 11 20:11:50 1998
+++ linux-2.1.85/include/asm-m68k/signal.h	Sun Feb 22 12:43:12 1998
@@ -187,9 +187,9 @@
 
 extern __inline__ int __gen_sigismember(sigset_t *set, int _sig)
 {
-	char ret;
-	__asm__("bftst %1{%2,#1}\n\t sne %0"
-		: "=rm"(ret) : "m"(*set), "id"((_sig-1) ^ 31) : "cc");
+	int ret;
+	__asm__("bfextu %1{%2,#1},%0"
+		: "=d"(ret) : "m"(*set), "id"((_sig-1) ^ 31));
 	return ret;
 }
 

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org
