arm64: Work around broken .inst when defective gas is detected
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 6 Dec 2016 15:27:45 +0000 (15:27 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 6 Dec 2016 15:54:28 +0000 (15:54 +0000)
commitcd9e1927a525f6ce7c0d99c6e038f0a0b9e85176
tree27f2d7b9b4bba34962abb9098a3b265b94ac140b
parentbbb56c27228d4ad64aca858c5af49d0f2f11c645
arm64: Work around broken .inst when defective gas is detected

.inst being largely broken with older binutils, it'd be better not
to emit it altogether when detecting such configuration (as it
leads to all kind of horrors when using alternatives).

Generalize the __emit_inst macro and use it extensively in
asm/sysreg.h, and make it generate a .long when a broken gas is
detected. The disassembly will be crap, but at least we can write
semi-sane code.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/sysreg.h