x86_64 allyesconfig AS=clang
arch/x86/kernel/cpu/vmware.c:95:2: error: invalid operand for instruction
VMWARE_CMD(GETVERSION, eax, ebx, ecx, edx);
^
arch/x86/kernel/cpu/vmware.c:84:3: note: expanded from macro 'VMWARE_CMD'
VMWARE_PORT(cmd, eax, ebx, ecx, edx); \
^
arch/x86/kernel/cpu/vmware.c:52:10: note: expanded from macro 'VMWARE_PORT'
__asm__("inl (%%dx)" : \
^
<inline asm>:1:7: note: instantiated into assembly here
inl (%dx)
^
What's curious is that GAS accepts this (why doesn't Clang), but then there's another difference in the disassembly (after assembling w/ GAS):
$ cat bad2.s
inl (%dx)
$ llvm-objdump -d a.out
a.out: file format ELF64-x86-64
Disassembly of section .text:
0000000000000000 .text:
0: ed inl %dx, %eax
$ objdump -d a.out
a.out: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <.text>:
0: ed in (%dx),%eax
It looks like %dx is being dereferenced in the GNU disassembler output.
we see this in
drivers/input/mouse/vmmouse.c:255:2: error: invalid operand for instruction
as well.
accepted: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/urgent&id=fbcfb8f0270bf24fe348393540b17a7f2ba577d7
Most helpful comment
Merged in https://github.com/torvalds/linux/commit/fbcfb8f0270bf24fe348393540b17a7f2ba577d7.