[llvm-dev] [ppc64le] mfspr gpr, ABCD

Amol via llvm-dev llvm-dev at lists.llvm.org
Sun Nov 1 06:20:13 PST 2020


Hello,

// 1.s
.abiversion 2
mfspr 8, ABCD
// clang -c -mcpu=power9 -target ppc64le 1.s

The command successfully assembles the source into an object file.

The disassembly shows the instruction emitted:
a6 1a 10 7d: mfspr 8, 112

112 is 0x70.

GNU as throws unsupported relocation error, and doesn't assemble.

This causes problems when a .S is passed to clang for preprocessing
and if the usage of a #define has a typo - clang doesn't catch it.


Thanks,
amol


More information about the llvm-dev mailing list