[llvm] [X86][MC] Support encoding of EGPR for APX (PR #71909)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 10 06:52:36 PST 2023
================
@@ -168,11 +194,34 @@ class X86OpcodePrefixHelper {
setR(Encoding);
setR2(Encoding);
}
+ void setM(bool V) { M = V; }
+ void setXX2(const MCInst &MI, unsigned OpNum) {
+ unsigned Reg = MI.getOperand(OpNum).getReg();
+ unsigned Encoding = MRI.getEncodingValue(Reg);
+ setX(Encoding);
+ // Index can be a vector register while X2 is used to extend GPR only
+ if (Kind <= REX2 || X86II::isApxExtendedReg(Reg))
----------------
phoebewang wrote:
Should it be `Kind == REX2`?
The same for below.
https://github.com/llvm/llvm-project/pull/71909
More information about the llvm-commits
mailing list