Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:33

0001 //===-- RISCVAttributes.h - RISCV Attributes --------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file contains enumerations for RISCV attributes as defined in RISC-V
0010 // ELF psABI specification.
0011 //
0012 // RISC-V ELF psABI specification
0013 //
0014 // https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md
0015 //
0016 //===----------------------------------------------------------------------===//
0017 #ifndef LLVM_SUPPORT_RISCVATTRIBUTES_H
0018 #define LLVM_SUPPORT_RISCVATTRIBUTES_H
0019 
0020 #include "llvm/Support/ELFAttributes.h"
0021 
0022 namespace llvm {
0023 namespace RISCVAttrs {
0024 
0025 const TagNameMap &getRISCVAttributeTags();
0026 
0027 enum AttrType : unsigned {
0028   // Attribute types in ELF/.riscv.attributes.
0029   STACK_ALIGN = 4,
0030   ARCH = 5,
0031   UNALIGNED_ACCESS = 6,
0032   PRIV_SPEC = 8,
0033   PRIV_SPEC_MINOR = 10,
0034   PRIV_SPEC_REVISION = 12,
0035   ATOMIC_ABI = 14,
0036 };
0037 
0038 enum class RISCVAtomicAbiTag : unsigned {
0039   // Values for Tag_RISCV_atomic_abi
0040   // Defined at
0041   // https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#tag_riscv_atomic_abi-14-uleb128version
0042   UNKNOWN = 0,
0043   A6C = 1,
0044   A6S = 2,
0045   A7 = 3,
0046 };
0047 
0048 enum { NOT_ALLOWED = 0, ALLOWED = 1 };
0049 
0050 } // namespace RISCVAttrs
0051 } // namespace llvm
0052 
0053 #endif