[RISCV] Add support for interrupt attribute
authorAna Pazos <apazos@codeaurora.org>
Thu, 26 Jul 2018 17:37:45 +0000 (17:37 +0000)
committerAna Pazos <apazos@codeaurora.org>
Thu, 26 Jul 2018 17:37:45 +0000 (17:37 +0000)
commit1eee1b771f43761e39c1e3bc9e0c31b078290240
treef1afb19d81b8f16649ecca26a839687f85c0f3aa
parent41ba5c1455386c87c4b20aa7a1342e80261b7f79
 [RISCV] Add support for interrupt attribute

Summary:
Clang supports the GNU style ``__attribute__((interrupt))`` attribute  on RISCV targets.
Permissible values for this parameter are user, supervisor, and machine.
If there is no parameter, then it defaults to machine.
Reference: https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Function-Attributes.html
Based on initial patch by Zhaoshi Zheng.

Reviewers: asb, aaron.ballman

Reviewed By: asb, aaron.ballman

Subscribers: rkruppe, the_o, aaron.ballman, MartinMosbeck, brucehoult, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, rogfer01, cfe-commits

Differential Revision: https://reviews.llvm.org/D48412

llvm-svn: 338045
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/CodeGen/TargetInfo.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/Sema/riscv-interrupt-attr.c [new file with mode: 0644]
clang/test/Sema/riscv-interrupt-attr.cpp [new file with mode: 0644]