From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpAPx-0004mf-8B for qemu-devel@nongnu.org; Sun, 12 Oct 2008 19:32:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpAPw-0004mE-3L for qemu-devel@nongnu.org; Sun, 12 Oct 2008 19:32:08 -0400 Received: from [199.232.76.173] (port=40991 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpAPv-0004m7-Qw for qemu-devel@nongnu.org; Sun, 12 Oct 2008 19:32:07 -0400 Received: from hall.aurel32.net ([88.191.82.174]:49899) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KpAPv-0004aW-Qh for qemu-devel@nongnu.org; Sun, 12 Oct 2008 19:32:08 -0400 Received: from volta-wlan.aurel32.net ([2002:52e8:2fb:ffff:21d:e0ff:fe49:1047] helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KpAPu-0001F2-3d for qemu-devel@nongnu.org; Mon, 13 Oct 2008 01:32:06 +0200 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1KpAPn-0004Ed-I3 for qemu-devel@nongnu.org; Mon, 13 Oct 2008 01:31:59 +0200 Date: Mon, 13 Oct 2008 01:31:59 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [SH4] Fix swap.b Message-ID: <20081012233159.GC1463@volta.aurel32.net> References: <200810121921.05267.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200810121921.05267.vladimir@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sun, Oct 12, 2008 at 07:21:05PM +0400, Vladimir Prus wrote: > > The SH4 manual documents the swap.b instruction as follows: > > SWAP.B Rm,Rn > Rm → swap lower 2 bytes → Rn > > Current QEMU code, in addition to the above, also clears the high > 16 bits. The immediate breakage I saw is that htonl function applied > to netmask of 255.255.255.0 gives 0, which breaks all networking. > Attached patch fixes the problem. > Thanks, applied. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net