1 //===-- RISCVAttributes.h - RISCV Attributes --------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file contains enumerations for RISCV attributes as defined in RISC-V
10 // ELF psABI specification.
12 // RISC-V ELF psABI specification
14 // https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md
16 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_SUPPORT_RISCVATTRIBUTES_H
18 #define LLVM_SUPPORT_RISCVATTRIBUTES_H
20 #include "llvm/Support/ELFAttributes.h"
23 namespace RISCVAttrs {
25 extern const TagNameMap RISCVAttributeTags;
27 enum AttrType : unsigned {
28 // Attribute types in ELF/.riscv.attributes.
34 PRIV_SPEC_REVISION = 12,
37 enum StackAlign { ALIGN_4 = 4, ALIGN_16 = 16 };
39 enum { NOT_ALLOWED = 0, ALLOWED = 1 };
41 } // namespace RISCVAttrs