NetBSD Problem Report #708

From gnats  Fri Jan  6 19:26:22 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id TAA04476 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 6 Jan 1995 19:26:22 -0800
Message-Id: <199501070328.WAA07029@lola-granola.MIT.EDU>
Date: Fri, 6 Jan 1995 22:28:43 -0500
From: jtkohl@MIT.EDU
Reply-To: jtkohl@MIT.EDU
To: gnats-bugs@netbsd.org, port-m68k@netbsd.org
Subject: swab(3) is broken on m68k
X-Send-Pr-Version: 3.2

>Number:         708
>Category:       port-m68k
>Synopsis:       swab(3) is broken on m68k
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 06 19:35:01 +0000 1995
>Closed-Date:    Sat Jan 07 03:47:59 +0000 1995
>Last-Modified:  
>Originator:     John Kohl
>Release:        <NetBSD-current source date>
>Organization:
"Kernel Hackers `R` Us"
>Environment:

System: NetBSD duality.gnu.ai.mit.edu 1.0A NetBSD 1.0A (DUALITY) #10: Thu Jan 5 23:26:52 EST 1995 mycroft@duality.gnu.ai.mit.edu:/build/src/sys/arch/hp300/compile/DUALITY hp300

>Description:
swab(3) swaps twice the requested number of bytes on m68k.
>How-To-Repeat:
use swab(3). watch it trash bytes after the ones you wanted swapped.
>Fix:
I think this will do it:

--- swab.S~	Fri Jan  6 22:15:36 1995
+++ usr/src/lib/libc/arch/m68k/string/swab.S	Fri Jan  6 22:19:46 1995
@@ -4,6 +4,7 @@
 	movl	sp@(4),a0	/* source */
 	movl	sp@(8),a1	/* destination */
 	movl	sp@(12),d0	/* count */
+	asrl	#1,d0		/* count is bytes, we do words */
 	jeq	swdone

 swloop:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Fri Jan 6 19:47:59 PST 1995 
State-Changed-Why:  
Fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.