[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


================
@@ -683,10 +747,11 @@ void X86MCCodeEmitter::emitMemModRMByte(
       return;
     }
 
-    // If the base is not EBP/ESP/R12/R13 and there is no displacement, use
-    // simple indirect register encoding, this handles addresses like [EAX].
-    // The encoding for [EBP] or[R13] with no displacement means [disp32] so we
-    // handle it by emitting a displacement of 0 later.
+    // If the base is not EBP/ESP/R12/R13/R20/R21/R28/R29 and there is no
+    // displacement, use simple indirect register encoding, this handles
+    // addresses like [EAX]. The encoding for [EBP], [R13], [R20], [R21], [R28]
+    // or [R29] with no displacement means [disp32] so we handle it by emitting
+    // a displacement of 0 later.
----------------
phoebewang wrote:

Does the code work without adjust?

https://github.com/llvm/llvm-project/pull/71909


More information about the llvm-commits mailing list