ARM gcc generates incorrect code?

2008-02-27 Thread Krzysztof Halasa
Hi, not sure where the bug is - gcc 4.2.4pre (CVS), binutils 2.17, cross compiler X86_64 -> ARM BE. -O2 -fno-strict-aliasing -fno-common -fno-stack-protector -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=apcs-gnu -mno-thumb-interwork -march=armv5te -mtune=xscale -mcpu=xscale -msoft

RE: ARM gcc generates incorrect code?

2008-02-27 Thread Dave Korn
On 27 February 2008 11:48, Krzysztof Halasa wrote: > Hi, > > not sure where the bug is - gcc 4.2.4pre (CVS), binutils 2.17, > cross compiler X86_64 -> ARM BE. That asm looks a bit odd to me (but I haven't had much coffee today so I could be reading it wrong):- > #define get_user(x,p)

Re: ARM gcc generates incorrect code?

2008-02-27 Thread Krzysztof Halasa
"Dave Korn" <[EMAIL PROTECTED]> writes: >> #define get_user(x,p) >> \ >> ({ \ >> register const u8 __user *__p asm("r0") = (p); \ >> register

RE: ARM gcc generates incorrect code?

2008-02-27 Thread Dave Korn
On 27 February 2008 13:07, Krzysztof Halasa wrote: > "Dave Korn" writes: > >>> #define get_user(x,p) \ >>> ({ \ >>> register const u8 __user *__p asm("r0") = (p); \ >>> register unsigned long __r2 as

Re: ARM gcc generates incorrect code?

2008-02-27 Thread Daniel Jacobowitz
On Wed, Feb 27, 2008 at 12:40:37PM -, Dave Korn wrote: > ^ '&' means output operand (zero) > is early-clobber, so cannot share > a register with any input operand. > > : "0" (__p)