[PATCH] D135933: [X86] Add CMPCCXADD instructions.

Kan Shengchen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 24 01:40:07 PDT 2022


skan added inline comments.


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp:32
   int64_t Imm = MI->getOperand(Op).getImm();
+  bool flavor = MI->getOpcode() == X86::CMPCCXADDmr32 || X86::CMPCCXADDmr64;
   switch (Imm) {
----------------
Capitalize 1st char


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1453-1455
+    emitMemModRMByte(MI, CurOp + 1, getX86RegNum(MI.getOperand(0)), TSFlags,
+                     HasREX, StartByte, OS, Fixups, STI, false);
+    CurOp = SrcRegNum + 3; // skip VEX_V4 and CC
----------------
Minor suggestion

```
    emitMemModRMByte(MI, ++CurOp, getX86RegNum(MI.getOperand(0)), TSFlags,
                     HasREX, StartByte, OS, Fixups, STI, false);
    CurOp = SrcRegNum + 2; // skip VEX_V4 and CC
```
would be more clear b/c you use "skip VEX_V4 and CC" in the comments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135933



More information about the cfe-commits mailing list