[Bug middle-end/38674] When storing in a register the address of a value contained in the same register, gcc 4.3.2 on ARM clobbers the register before saving its content on the stack.
gilles dot chanteperdrix at xenomai dot org
gcc-bugzilla@gcc.gnu.org
Mon Jan 5 15:21:00 GMT 2009
------- Comment #1 from gilles dot chanteperdrix at xenomai dot org 2009-01-05 15:21 -------
The following, even simpler test case:
unsigned long long f(unsigned long long ull)
{
register unsigned long long *__r0 __asm__ ("r0") = &ull;
__asm__ __volatile__ ("" : "+r" (__r0));
return * __r0;
}
gives the same warning, and the following assembly code:
00000000 <f>:
0: e24dd008 sub sp, sp, #8 ; 0x8
4: e28d0008 add r0, sp, #8 ; 0x8
8: e16000f8 strd r0, [r0, #-8]!
c: e8900003 ldm r0, {r0, r1}
10: e28dd008 add sp, sp, #8 ; 0x8
14: e12fff1e bx lr
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38674
More information about the Gcc-bugs
mailing list