Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 14 | pmbaty | 1 | //===-- RISCVAttributes.h - RISCV Attributes --------------------*- C++ -*-===// | 
| 2 | // | ||
| 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 | ||
| 6 | // | ||
| 7 | //===----------------------------------------------------------------------===// | ||
| 8 | // | ||
| 9 | // This file contains enumerations for RISCV attributes as defined in RISC-V | ||
| 10 | // ELF psABI specification. | ||
| 11 | // | ||
| 12 | // RISC-V ELF psABI specification | ||
| 13 | // | ||
| 14 | // https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md | ||
| 15 | // | ||
| 16 | //===----------------------------------------------------------------------===// | ||
| 17 | #ifndef LLVM_SUPPORT_RISCVATTRIBUTES_H | ||
| 18 | #define LLVM_SUPPORT_RISCVATTRIBUTES_H | ||
| 19 | |||
| 20 | #include "llvm/Support/ELFAttributes.h" | ||
| 21 | |||
| 22 | namespace llvm { | ||
| 23 | namespace RISCVAttrs { | ||
| 24 | |||
| 25 | const TagNameMap &getRISCVAttributeTags(); | ||
| 26 | |||
| 27 | enum AttrType : unsigned { | ||
| 28 |   // Attribute types in ELF/.riscv.attributes. | ||
| 29 | STACK_ALIGN = 4, | ||
| 30 | ARCH = 5, | ||
| 31 | UNALIGNED_ACCESS = 6, | ||
| 32 | PRIV_SPEC = 8, | ||
| 33 | PRIV_SPEC_MINOR = 10, | ||
| 34 | PRIV_SPEC_REVISION = 12, | ||
| 35 | }; | ||
| 36 | |||
| 37 | enum StackAlign { ALIGN_4 = 4, ALIGN_16 = 16 }; | ||
| 38 | |||
| 39 | enum { NOT_ALLOWED = 0, ALLOWED = 1 }; | ||
| 40 | |||
| 41 | } // namespace RISCVAttrs | ||
| 42 | } // namespace llvm | ||
| 43 | |||
| 44 | #endif |