[PATCH v2] ARM: teach __asmeq that r11 == fp and r12 == ip

Ard Biesheuvel ard.biesheuvel at linaro.org
Thu Jan 29 23:21:18 PST 2015


On 29 January 2015 at 11:48, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Thu, Jan 29, 2015 at 09:44:46AM +0000, Ard Biesheuvel wrote:
>> The __asmeq macro is used inside inline asm statements to ensure that
>> register asm variables that explicitly specify a register are mapped
>> correctly onto those registers when used in inline asm input and output
>> constraints. However, the string based matching fails to take into account
>> that 'fp' is often referred to as 'r11' and 'ip' is often referred to as
>> 'r12', (e.g., by clang), causing false negatives.
>>
>> Fix this by making __asmeq consider the ("fp","r11"), ("r11","fp"),
>> ("ip","r12") and ("r12","ip") cases specifically.
>>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
>
> The method adopted is rather horrid in itself, but I guess there's no
> other way to deal with this... so I'm okay with the patch.  (I won't
> say I'm happy with it!)
>

How about we retain the old version unless __clang__ is defined?



More information about the linux-arm-kernel mailing list