NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PR/46898 CVS commit: src/sys/arch/arm/include



The following reply was made to PR port-arm/46898; it has been noted by GNATS.

From: Matt Thomas <matt%3am-software.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: port-arm-maintainer%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost,
 msaitoh%execsw.org@localhost
Subject: Re: PR/46898 CVS commit: src/sys/arch/arm/include
Date: Tue, 4 Sep 2012 23:58:58 -0700

 On Sep 4, 2012, at 11:40 PM, David Laight wrote:
 
 > The following reply was made to PR port-arm/46898; it has been noted =
 by GNATS.
 >=20
 > From: David Laight <david%l8s.co.uk@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc:=20
 > Subject: Re: PR/46898 CVS commit: src/sys/arch/arm/include
 > Date: Wed, 5 Sep 2012 07:29:40 +0100
 >=20
 > On Wed, Sep 05, 2012 at 01:05:03AM +0000, Matt Thomas wrote:
 >> Disable arm32 __asm for _byte_swap_u16_variable since gcc4.5 produces
 >> decent code for it.  Fixes PR/46898.
 >=20
 > Presumably there was also something badly wrong with it as well?
 > That is likely to be replicated and will crop up elsewhere.
 
 the uint16_t was causing the compiler to assume the upper 16-bits
 didn't matter which int fact they did.  So unexpected got mixed
 into the result resulting in a bad value.  Hence the adding of a
 uint32_t temporary to cause the compiler to do the right thing.  But
 after examining the code that generated again the naive C code, i
 found the the normal optimizer did a decent enough job that the asm
 wasn't needed.=
 


Home | Main Index | Thread Index | Old Index