RE: [PATCH] ARMv7 Oprofile support | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
> > One thing I noticed was I think the patch should add the "memory"
> > qualifier to clobber list for asm's calls with output operands (=r).
> > There is a little bit of mixed C where the compiler should be told to
> > make sure to update local variables which may be in memory.
>
> Why? Merely reading a register doesn't affect memory.
The comment was if the local variable 'val' which could be allocated in memory needs updating.
u32 val;
asm volatile("mrc p15, 0, %0, c9, c12, 3" : "=r" (val));
val &= FLAG_MASK;
volatile("mrc p15, 0, %0, c9, c12, 3" : "=r" (val));
Can you always be assured that val will stick in a register and not be pushed on the stack (memory)?
I had rearranged some of the code and was seeing values not propagating as expected.
Regards,
Richard W.
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Site Home] [Linux Arm] [Fedora ARM] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [PDAs] [Linux] [Linux Book List] [Linux MIPS] [Yosemite Campsites] [Photos]
![]() |
|