Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arm64: Delete the space separator in __emit_inst
Many instances of __emit_inst(x) expand to a directive. In a few places it is used as a macro argument, e.g. arch/arm64/include/asm/sysreg.h #define __emit_inst(x) .inst (x) arch/arm64/include/asm/sysreg.h #define SET_PSTATE_PAN(x) __emit_inst(0xd500401f | PSTATE_PAN | ((!!x) << PSTATE_Imm_shift)) arch/arm64/kvm/hyp/entry.S ALTERNATIVE(nop, SET_PSTATE_PAN(1), ARM64_HAS_PAN, CONFIG_ARM64_PAN) Clang integrated assembler parses `.inst (x)` as two arguments passing to a macro. We delete the space separator so that `.inst(x)` will be parsed as one argument. Note, GNU as parsing `.inst (x)` as one argument is unintentional (for example the x86 backend will parse the construct as two arguments). See https://sourceware.org/bugzilla/show_bug.cgi?id=25750#c10 Link: ClangBuiltLinux#939 Cc: clang-built-linux@googlegroups.com Signed-off-by: Fangrui Song <maskray@google.com>
- Loading branch information