[llvm] [X86][MC] Support Enc/Dec for EGPR for promoted MOVDIR instruction (PR #74713)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 8 17:24:02 PST 2023
KanRobert wrote:
> :warning: C/C++ code formatter, clang-format found issues in your code. :warning:
>
> You can test this locally with the following command:
> View the diff from clang-format here.
> ```diff
> diff --git a/llvm/utils/TableGen/X86DisassemblerTables.cpp b/llvm/utils/TableGen/X86DisassemblerTables.cpp
> index 9e2b61f5a7..67eda84070 100644
> --- a/llvm/utils/TableGen/X86DisassemblerTables.cpp
> +++ b/llvm/utils/TableGen/X86DisassemblerTables.cpp
> @@ -914,63 +914,50 @@ void DisassemblerTables::emitContextTable(raw_ostream &o, unsigned &i) const {
> o << "_B";
> }
> }
> - } else if ((index & ATTR_64BIT) && (index & ATTR_REX2))
> - o << "IC_64BIT_REX2";
> - else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_XS))
> - o << "IC_64BIT_REXW_XS";
> - else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_XD))
> - o << "IC_64BIT_REXW_XD";
> - else if ((index & ATTR_64BIT) && (index & ATTR_REXW) &&
> - (index & ATTR_OPSIZE))
> - o << "IC_64BIT_REXW_OPSIZE";
> - else if ((index & ATTR_64BIT) && (index & ATTR_REXW) &&
> - (index & ATTR_ADSIZE))
> - o << "IC_64BIT_REXW_ADSIZE";
> - else if ((index & ATTR_64BIT) && (index & ATTR_XD) && (index & ATTR_OPSIZE))
> - o << "IC_64BIT_XD_OPSIZE";
> - else if ((index & ATTR_64BIT) && (index & ATTR_XD) && (index & ATTR_ADSIZE))
> - o << "IC_64BIT_XD_ADSIZE";
> - else if ((index & ATTR_64BIT) && (index & ATTR_XS) && (index & ATTR_OPSIZE))
> - o << "IC_64BIT_XS_OPSIZE";
> - else if ((index & ATTR_64BIT) && (index & ATTR_XS) && (index & ATTR_ADSIZE))
> - o << "IC_64BIT_XS_ADSIZE";
> - else if ((index & ATTR_64BIT) && (index & ATTR_XS))
> - o << "IC_64BIT_XS";
> - else if ((index & ATTR_64BIT) && (index & ATTR_XD))
> - o << "IC_64BIT_XD";
> - else if ((index & ATTR_64BIT) && (index & ATTR_OPSIZE) &&
> - (index & ATTR_ADSIZE))
> - o << "IC_64BIT_OPSIZE_ADSIZE";
> - else if ((index & ATTR_64BIT) && (index & ATTR_OPSIZE))
> - o << "IC_64BIT_OPSIZE";
> - else if ((index & ATTR_64BIT) && (index & ATTR_ADSIZE))
> - o << "IC_64BIT_ADSIZE";
> - else if ((index & ATTR_64BIT) && (index & ATTR_REXW))
> - o << "IC_64BIT_REXW";
> - else if ((index & ATTR_64BIT))
> - o << "IC_64BIT";
> - else if ((index & ATTR_XS) && (index & ATTR_OPSIZE))
> - o << "IC_XS_OPSIZE";
> - else if ((index & ATTR_XD) && (index & ATTR_OPSIZE))
> - o << "IC_XD_OPSIZE";
> - else if ((index & ATTR_XS) && (index & ATTR_ADSIZE))
> - o << "IC_XS_ADSIZE";
> - else if ((index & ATTR_XD) && (index & ATTR_ADSIZE))
> - o << "IC_XD_ADSIZE";
> - else if (index & ATTR_XS)
> - o << "IC_XS";
> - else if (index & ATTR_XD)
> - o << "IC_XD";
> - else if ((index & ATTR_OPSIZE) && (index & ATTR_ADSIZE))
> - o << "IC_OPSIZE_ADSIZE";
> - else if (index & ATTR_OPSIZE)
> - o << "IC_OPSIZE";
> - else if (index & ATTR_ADSIZE)
> - o << "IC_ADSIZE";
> - else
> - o << "IC";
> -
> - o << ", // " << index << "\n";
> + }
> + else if ((index & ATTR_64BIT) && (index & ATTR_REX2)) o << "IC_64BIT_REX2";
> + else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_XS)) o
> + << "IC_64BIT_REXW_XS";
> + else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_XD)) o
> + << "IC_64BIT_REXW_XD";
> + else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_OPSIZE))
> + o
> + << "IC_64BIT_REXW_OPSIZE";
> + else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_ADSIZE))
> + o
> + << "IC_64BIT_REXW_ADSIZE";
> + else if ((index & ATTR_64BIT) && (index & ATTR_XD) && (index & ATTR_OPSIZE)) o
> + << "IC_64BIT_XD_OPSIZE";
> + else if ((index & ATTR_64BIT) && (index & ATTR_XD) && (index & ATTR_ADSIZE)) o
> + << "IC_64BIT_XD_ADSIZE";
> + else if ((index & ATTR_64BIT) && (index & ATTR_XS) && (index & ATTR_OPSIZE)) o
> + << "IC_64BIT_XS_OPSIZE";
> + else if ((index & ATTR_64BIT) && (index & ATTR_XS) && (index & ATTR_ADSIZE)) o
> + << "IC_64BIT_XS_ADSIZE";
> + else if ((index & ATTR_64BIT) && (index & ATTR_XS)) o << "IC_64BIT_XS";
> + else if ((index & ATTR_64BIT) && (index & ATTR_XD)) o << "IC_64BIT_XD";
> + else if ((index & ATTR_64BIT) && (index & ATTR_OPSIZE) &&
> + (index & ATTR_ADSIZE)) o
> + << "IC_64BIT_OPSIZE_ADSIZE";
> + else if ((index & ATTR_64BIT) && (index & ATTR_OPSIZE)) o
> + << "IC_64BIT_OPSIZE";
> + else if ((index & ATTR_64BIT) && (index & ATTR_ADSIZE)) o
> + << "IC_64BIT_ADSIZE";
> + else if ((index & ATTR_64BIT) && (index & ATTR_REXW)) o << "IC_64BIT_REXW";
> + else if ((index & ATTR_64BIT)) o << "IC_64BIT";
> + else if ((index & ATTR_XS) && (index & ATTR_OPSIZE)) o << "IC_XS_OPSIZE";
> + else if ((index & ATTR_XD) && (index & ATTR_OPSIZE)) o << "IC_XD_OPSIZE";
> + else if ((index & ATTR_XS) && (index & ATTR_ADSIZE)) o << "IC_XS_ADSIZE";
> + else if ((index & ATTR_XD) && (index & ATTR_ADSIZE)) o << "IC_XD_ADSIZE";
> + else if (index & ATTR_XS) o << "IC_XS";
> + else if (index & ATTR_XD) o << "IC_XD";
> + else if ((index & ATTR_OPSIZE) && (index & ATTR_ADSIZE)) o
> + << "IC_OPSIZE_ADSIZE";
> + else if (index & ATTR_OPSIZE) o << "IC_OPSIZE";
> + else if (index & ATTR_ADSIZE) o << "IC_ADSIZE";
> + else o << "IC";
> +
> + o << ", // " << index << "\n";
> }
>
> i--;
> ```
@XinWang10 Be careful. It seems the brace is not balanced.
https://github.com/llvm/llvm-project/pull/74713
More information about the llvm-commits
mailing list