This patch implements the Clang part for no_caller_saved_registers attribute as appear in interrupt and exception handler proposal
The review is a update for an old review:
Support of no_caller_saved_registers attribute (Clang part).
Paths
| Differential D31871
[X86] Support of no_caller_saved_registers attribute (Clang part) - restart ClosedPublic Authored by oren_ben_simhon on Apr 9 2017, 11:04 PM.
Details Summary This patch implements the Clang part for no_caller_saved_registers attribute as appear in interrupt and exception handler proposal The review is a update for an old review:
Diff Detail
Event Timelineoren_ben_simhon added a child revision: D22045: [X86] Support of no_caller_saved_registers attribute (Clang part).Apr 9 2017, 11:06 PM oren_ben_simhon removed a child revision: D22045: [X86] Support of no_caller_saved_registers attribute (Clang part). Comment Actions Please remove the svn prop changes for the two test files. Also, I'd like to see a test that this is properly diagnosed as both a function and a type attribute on a non-x86 architecture, as well as tests that it is properly diagnosed on a type other than a function pointer as well as with arguments on a function pointer (the current tests only test on a declaration rather than a type).
Comment Actions
I removed the properties. I think all the suggested testcases are covered.
oren_ben_simhon marked an inline comment as done. Comment ActionsImplemented comments posted until 04/10 (Thank you Aaron)
Comment Actions Implemented comments posted until 04/17 (Thank you Aaron for reviewing, Thank you Erich for helping me)
oren_ben_simhon marked an inline comment as done. Comment ActionsImplemented comments posted until 04/23 (10x Aaron)
Comment Actions
The missing test case is my last remaining issue with the patch. Comment Actions
I added the test case in file test/SemaCXX/attr-x86-no_caller_saved_registers.cpp lines 22-24. Let me know if another test case is missing. This revision is now accepted and ready to land.Apr 26 2017, 11:27 AM Closed by commit rL301535: [X86] Support of no_caller_saved_registers attribute (authored by orenb). · Explain WhyApr 27 2017, 5:14 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 94635 include/clang/AST/Type.h
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/CodeGen/CGFunctionInfo.h
include/clang/Sema/Sema.h
lib/AST/ASTContext.cpp
lib/AST/TypePrinter.cpp
lib/CodeGen/CGCall.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaType.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp
test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp
test/SemaCXX/attr-x86-no_caller_saved_registers.cpp |
You should read the comment above -- this goes over 10 bits, but you forgot to update the comment and Type::FunctionTypeBitfields.