[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");
+ }
+ void setX(unsigned Encoding) { X = Encoding >> 3 & 1; }
+ void setX2(unsigned Encoding) {
+ assert((Kind <= REX2 || Kind == EVEX) && "invalid setting");
+ X2 = Encoding >> 4 & 1;
----------------
phoebewang wrote:
Is it a mistake or happen to have the same offset?
The same for below.
https://github.com/llvm/llvm-project/pull/71909
More information about the llvm-commits
mailing list