xen/arm: Workaround clang/armclang support for register allocation
authorJulien Grall <julien@xen.org>
Mon, 17 Feb 2020 22:20:34 +0000 (22:20 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 4 Mar 2020 02:04:34 +0000 (18:04 -0800)
commit0c35d446047aa632ec3a03221814ad5a6a37af97
treed1c9481d9bc56358963df767f2b8a8269d44c1b9
parentd6e732c32a82eb8f03c1bf86c6bc530f24dc05b3
xen/arm: Workaround clang/armclang support for register allocation

Clang 8.0 (see [1]) and by extent some of the version of armclang does
not support register allocation using the syntax rN.

Thankfully, both GCC [2] and clang are able to support the xN syntax for
Arm64. Introduce a new macro ASM_REG() and use in common code for
register allocation.

[1] https://reviews.llvm.org/rL328829
[2] https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html

Cc: Andrii Anisov <andrii_anisov@epam.com>
Signed-off-by: Julien Grall <julien@xen.org>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/include/asm-arm/asm_defns.h
xen/include/asm-arm/smccc.h