[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 20:02:17 PDT 2024
================
@@ -0,0 +1,41 @@
+//==- BuiltinsRISCVXCV.td - RISC-V CORE-V Builtin database ----*- 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 defines the CORE-V-specific builtin function database. Users of
+// this file must define the BUILTIN macro to make use of this information.
+//
+//===----------------------------------------------------------------------===//
+
+class RISCXCVBuiltin<string prototype, string features = ""> : TargetBuiltin {
+ let Spellings = ["__builtin_riscv_cv_" # NAME];
+ let Prototype = prototype;
+ let Features = features;
+}
+
+let Attributes = [NoThrow, Const] in {
+//===----------------------------------------------------------------------===//
+// XCValu extension.
+//===----------------------------------------------------------------------===//
+def alu_slet : RISCXCVBuiltin<"int(int, int)", "xcvalu">;
----------------
topperc wrote:
Did the intrinsics keep the 't' in their name even though the instruction was renamed here https://github.com/openhwgroup/cv32e40p/issues/833?
https://github.com/llvm/llvm-project/pull/100684
More information about the cfe-commits
mailing list