[PATCH] arm64: LLVMLinux: Fix inline arm64 assembly for use with clang
will.deacon at arm.com
Mon Sep 8 03:53:07 PDT 2014
On Sat, Sep 06, 2014 at 12:24:20AM +0100, behanw at converseincode.com wrote:
> From: Mark Charlebois <charlebm at gmail.com>
> Fix variable types for 64-bit inline assembly.
> This patch now works with both gcc and clang.
Really? This looks like something the clang needs to do better on, as I
really don't see people adding these casts to future code. They're ugly and
redundant (or GCC).
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index c555672..6894ef3 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -94,7 +94,7 @@ static int __init early_cachepolicy(char *p)
> asm volatile(
> " mrs %0, mair_el1\n"
> - " bfi %0, %1, #%2, #8\n"
> + " bfi %0, %1, %2, #8\n"
> " msr mair_el1, %0\n"
> " isb\n"
> : "=&r" (tmp)
also looks fishy. Does gas accept that without the '#' prefix?
More information about the linux-arm-kernel