[llvm] [Xtensa] Add esp32/esp8266 cpus implementation. (PR #152409)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 11 09:37:48 PDT 2025
================
@@ -0,0 +1,78 @@
+//==-- XtensaTargetParser - Parser for Xtensa features --*- 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 implements a target parser to recognise Xtensa hardware features
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TARGETPARSER_XTENSATARGETPARSER_H
+#define LLVM_TARGETPARSER_XTENSATARGETPARSER_H
+
+#include "llvm/TargetParser/Triple.h"
+#include <vector>
+
+namespace llvm {
+class StringRef;
+
+namespace Xtensa {
+
+enum CPUKind : unsigned {
+#define XTENSA_CPU(ENUM, NAME, FEATURES) CK_##ENUM,
+#include "XtensaTargetParser.def"
+};
+
+enum FeatureKind : uint64_t {
+ FK_INVALID = 0,
+ FK_NONE = 1,
----------------
MaskRay wrote:
I would avoid FK_NONE which is also a member of `enum MCFixupKind`.
https://github.com/llvm/llvm-project/pull/152409
More information about the llvm-commits
mailing list