[all-commits] [llvm/llvm-project] 47c902: [X86] Have indirect calls take 64-bit operands in ...
Harald van Dijk via All-commits
all-commits at lists.llvm.org
Sat Nov 28 08:49:30 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 47c902ba8479fc1faed73b86f59d58830df06644
https://github.com/llvm/llvm-project/commit/47c902ba8479fc1faed73b86f59d58830df06644
Author: Harald van Dijk <harald at gigawatt.nl>
Date: 2020-11-28 (Sat, 28 Nov 2020)
Changed paths:
M llvm/lib/Target/X86/X86FastISel.cpp
Log Message:
-----------
[X86] Have indirect calls take 64-bit operands in 64-bit modes
The build bots caught two additional pre-existing problems exposed by the test change part of my change https://reviews.llvm.org/D91339, when expensive checks are enabled. This fixes one of them.
X86 has CALL64r and CALL32r opcodes, where CALL64r takes a 64-bit register, and CALL32r takes a 32-bit register. CALL64r can only be used in 64-bit mode, CALL32r can only be used in 32-bit mode. LLVM would assume that after picking the appropriate CALLr opcode, a pointer-sized register would be a valid operand, but in x32 mode, a 64-bit mode, pointers are 32 bits. In this mode, it is invalid to directly pass a pointer to CALL64r, it needs to be extended to 64 bits first.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D91924
More information about the All-commits
mailing list