On Tue, 5 Oct 2010, Paul Walmsley wrote:

>                 __raw_writew(v, oh->_mpu_rt_va + reg_offs);
>       28:       16ff3070        uxthne  r3, r0
>       2c:       118130b2        strhne  r3, [r1, r2]
> 
> gcc for some reason decides to zero-extend it first, but that is not your
> bug to fix.

Unlikely anyone cares too much about this, but just to follow up, this 
appears to be caused by using -march=armv6 or -march=armv7-a on the gcc 
command line.  Dropping the -march or using -march=armv5 avoids the uxt.
That's with arm-linux-gcc (Sourcery G++ Lite 2008q3-72) 4.3.2.  Minimal 
case follows.  This appears to be gcc bug 40893:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40893


- Paul

void foo(unsigned int v)
{
  *(volatile unsigned short *)0xabcdefab = (v);
}

arm-linux-gcc  -O2 -march=armv7-a -c test.c; arm-linux-objdump -DS test.o 
| less


00000000 <foo>:
   0:   e30e3fff        movw    r3, #61439      ; 0xefff
   4:   e34a3bcd        movt    r3, #43981      ; 0xabcd
   8:   e6ff0070        uxth    r0, r0
   c:   e14305b4        strh    r0, [r3, #-84]
  10:   e12fff1e        bx      lr


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to