Hi, Xuerui,
On Thu, Jul 21, 2022 at 11:17 AM WANG Xuerui <kernel@xxxxxxxxxx> wrote:
Hi YI Jun and Huacai,Have you considered the new relocation types will be added in the near
On 2022/7/21 10:52, Huacai Chen wrote:
Hi, Jun,I surveyed all the existing arch compiler.h in the tree:
On Thu, Jul 21, 2022 at 10:11 AM Jun Yi <yijun@xxxxxxxxxxx> wrote:
Loongarch not used arch-specific compiler.hI'm not sure whether compiler.h will be used in future. If it will be
used, I want to keep it as is. Xuerui, what do you think about it?
$ find ./arch -name compiler.h
./arch/alpha/include/asm/compiler.h
./arch/alpha/include/uapi/asm/compiler.h
./arch/arm/include/asm/compiler.h
./arch/arm64/include/asm/compiler.h
./arch/mips/include/asm/compiler.h
./arch/loongarch/include/asm/compiler.h
Of all these occurrences:
- alpha needs to ensure a certain insn is being emitted from time to
time, with plain C constructs (or built-ins) on compiler versions with
said support, falling back to inline asm otherwise;
- arm and arm64 both need some inline assembly help (of different sort),
with arm64 stuffing some pointer authentication helpers into this file too;
- mips, which is obviously what the loongarch version is based on, needs
(1) a kludge for older compilers to fix delay slot filling around
__builtin_unreachable, (2) definitions for explicit arch level
selection. There is also the historical GCC_OFF_SMALL_ASM() constraint
definition that was rendered redundant by commit 4abaacc704729 ("MIPS:
remove GCC < 4.9 support").
For loongarch, the "ZC" constraint (I don't think it was a coincidence
BTW) should be usable for all present and future hardware, so I do think
the GCC_OFF_SMALL_ASM() here is redundant. We may want to remove the
mips one too. And the arch level thing is not currently needed either,
future revisions to the LoongArch ISA should be largely backwards
compatible, so it could be a long time before such explicit selection of
arch level is necessary, for exact control over emitted insn.
So overall, I'm in favor of removing this header for now.
future? I think we need compiler.h at that time.