[PATCH] D138639: [X86] Add In64BitMode for MOVSX64/MOVZX64 instructions

Haohai, Wen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 17:30:29 PST 2022


HaohaiWen added a comment.

> How does adding In64BitMode avoid this error? This error occurs when AH/BH/CH/DH are passed to an instruction that uses a REX prefix. Are you using In64BitMode to avoid passing AH/BH/CH/DH registers?

In fact, the issue is, I relied on predicates to auto gen asm. Let's take CVTSD2SI64rm  as an example.
Since it have no predicates, I made assumption its encodable in all modes and then try to gen 16,32,64 bit asm string (by adding {.code16 .code32 . code64) enumeration and encode it with llvm-mc. Then fed the encoding into llvm-mc to decode in order to find all matchable llvm opcodes.
That's how I found this predicates error.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138639/new/

https://reviews.llvm.org/D138639



More information about the llvm-commits mailing list