[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:32 PST 2023
================
@@ -139,7 +147,20 @@ class X86OpcodePrefixHelper {
}
void setR(unsigned Encoding) { R = Encoding >> 3 & 1; }
- void setR2(unsigned Encoding) { EVEX_R2 = Encoding >> 4 & 1; }
+ void setR2(unsigned Encoding) {
+ R2 = Encoding >> 4 & 1;
+ assert((!R2 || (Kind <= REX2 || Kind == EVEX)) && "invalid setting");
----------------
phoebewang wrote:
`Kind <= REX2` includes `Kind == None` which doesn't seem correct.
The same for below.
https://github.com/llvm/llvm-project/pull/71909
More information about the llvm-commits
mailing list