[PATCH] D121572: [X86][NFC] Generate mnemonic tables

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 13 23:11:51 PDT 2022


Amir created this revision.
Amir added reviewers: MaskRay, skan, craig.topper.
Herald added subscribers: pengfei, hiraditya, mgorny.
Herald added a project: All.
Amir published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Produce mnemonic tables, adding the functions to llvm::X86 namespace.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121572

Files:
  llvm/lib/Target/X86/CMakeLists.txt
  llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
  llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
  llvm/lib/Target/X86/MCTargetDesc/X86MnemonicTables.cpp


Index: llvm/lib/Target/X86/MCTargetDesc/X86MnemonicTables.cpp
===================================================================
--- /dev/null
+++ llvm/lib/Target/X86/MCTargetDesc/X86MnemonicTables.cpp
@@ -0,0 +1,16 @@
+//===-- X86MnemonicTables.cpp - X86 Mnemonic Tables -------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file provides X86 mnemonic tables.
+//
+//===----------------------------------------------------------------------===//
+
+#include "X86InstrInfo.h"
+
+#define GET_X86_MNEMONIC_TABLES_CPP
+#include "X86GenMnemonicTables.inc"
Index: llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
===================================================================
--- llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
+++ llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
@@ -141,4 +141,7 @@
 #define GET_SUBTARGETINFO_ENUM
 #include "X86GenSubtargetInfo.inc"
 
+#define GET_X86_MNEMONIC_TABLES_H
+#include "X86GenMnemonicTables.inc"
+
 #endif
Index: llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
===================================================================
--- llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
+++ llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
@@ -10,6 +10,7 @@
   X86MCAsmInfo.cpp
   X86MCCodeEmitter.cpp
   X86MachObjectWriter.cpp
+  X86MnemonicTables.cpp
   X86ELFObjectWriter.cpp
   X86WinCOFFObjectWriter.cpp
   X86WinCOFFStreamer.cpp
Index: llvm/lib/Target/X86/CMakeLists.txt
===================================================================
--- llvm/lib/Target/X86/CMakeLists.txt
+++ llvm/lib/Target/X86/CMakeLists.txt
@@ -9,6 +9,7 @@
 tablegen(LLVM X86GenDAGISel.inc -gen-dag-isel)
 tablegen(LLVM X86GenDisassemblerTables.inc -gen-disassembler)
 tablegen(LLVM X86GenEVEX2VEXTables.inc -gen-x86-EVEX2VEX-tables)
+tablegen(LLVM X86GenMnemonicTables.inc -gen-x86-mnemonic-tables -asmwriternum=1)
 tablegen(LLVM X86GenExegesis.inc -gen-exegesis)
 tablegen(LLVM X86GenFastISel.inc -gen-fast-isel)
 tablegen(LLVM X86GenGlobalISel.inc -gen-global-isel)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121572.415009.patch
Type: text/x-patch
Size: 2282 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220314/fd1ad91f/attachment.bin>


More information about the llvm-commits mailing list