[PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2017-04-27 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. In https://reviews.llvm.org/D22045#739627, @MatzeB wrote: > Just out of interested: I can see how `__attribute__ ((interrupt))` is > useful, but in what situations would you use `no_caller_saved_registers`? Actually please answer this question by documenting the

[PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2017-04-27 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. Just out of interested: I can see how `__attribute__ ((interrupt))` is useful, but in what situations would you use `no_caller_saved_registers`? https://reviews.llvm.org/D22045 ___ cfe-commits mailing list

[PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2017-04-12 Thread Amjad Aboud via Phabricator via cfe-commits
aaboud abandoned this revision. aaboud marked an inline comment as not done. aaboud added a comment. Changes in this patch are being reviewed in a new patch https://reviews.llvm.org/D31871. https://reviews.llvm.org/D22045 ___ cfe-commits mailing

[PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2017-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. There appears to be two reviews out for this same functionality. You should probably close one of the reviews (but still address the comments from it). https://reviews.llvm.org/D22045 ___ cfe-commits mailing list

[PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-10-17 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/Type.h:2934 ExtInfo(bool noReturn, bool hasRegParm, unsigned regParm, CallingConv cc, -bool producesResult) { +bool producesResult, bool noCallerSavedRegs) { assert((!hasRegParm ||

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-08 Thread Aaron Ballman via cfe-commits
On Mon, Aug 8, 2016 at 11:50 AM, H.J Lu wrote: > hjl.tools added a comment. > > In https://reviews.llvm.org/D22045#508648, @aaron.ballman wrote: > >> In https://reviews.llvm.org/D22045#508644, @hjl.tools wrote: >> >> > In https://reviews.llvm.org/D22045#506996, @joerg wrote:

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-08 Thread Erich Keane via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D22045#508648, @aaron.ballman wrote: > In https://reviews.llvm.org/D22045#508644, @hjl.tools wrote: > > > In https://reviews.llvm.org/D22045#506996, @joerg wrote: > > > > > For what it is worth, this certainly seems to be misnamed. By

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-08 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D22045#508644, @hjl.tools wrote: > In https://reviews.llvm.org/D22045#506996, @joerg wrote: > > > For what it is worth, this certainly seems to be misnamed. By nature, if it > > doesn't preserve at least the stack pointer, there is no

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-08 Thread H.J Lu via cfe-commits
hjl.tools added a comment. In https://reviews.llvm.org/D22045#506996, @joerg wrote: > For what it is worth, this certainly seems to be misnamed. By nature, if it > doesn't preserve at least the stack pointer, there is no way to recover on > return, right? This is the best name we came up

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-07 Thread Joerg Sonnenberger via cfe-commits
On Sun, Aug 07, 2016 at 11:08:22AM +, Amjad Aboud via cfe-commits wrote: > aaboud marked 3 inline comments as done. > aaboud added a comment. > > In https://reviews.llvm.org/D22045#506996, @joerg wrote: > > > For what it is worth, this certainly seems to be misnamed. By nature, if it > >

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-07 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1674 @@ +1673,3 @@ + TargetSpecificAttr { + let Spellings = [GNU<"no_caller_saved_registers">]; + let Subjects = SubjectList<[FunctionLike], WarnDiag,

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-07 Thread Amjad Aboud via cfe-commits
aaboud marked an inline comment as not done. Comment at: include/clang/Basic/Attr.td:1674 @@ +1673,3 @@ + TargetSpecificAttr { + let Spellings = [GNU<"no_caller_saved_registers">]; + let Subjects = SubjectList<[FunctionLike], WarnDiag,

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-07 Thread Amjad Aboud via cfe-commits
aaboud marked 3 inline comments as done. aaboud added a comment. In https://reviews.llvm.org/D22045#506996, @joerg wrote: > For what it is worth, this certainly seems to be misnamed. By nature, if it > doesn't preserve at least the stack pointer, there is no way to recover on > return, right?

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-05 Thread Joerg Sonnenberger via cfe-commits
joerg added a subscriber: joerg. joerg added a comment. For what it is worth, this certainly seems to be misnamed. By nature, if it doesn't preserve at least the stack pointer, there is no way to recover on return, right? https://reviews.llvm.org/D22045

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-04 Thread Erich Keane via cfe-commits
erichkeane added inline comments. Comment at: include/clang/CodeGen/CGFunctionInfo.h:479 @@ +478,3 @@ + /// Whether this function saved caller registers. + unsigned NoCallerSavedRegs : 1; + majnemer wrote: > aaron.ballman wrote: > > erichkeane wrote: > > >

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-04 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: include/clang/CodeGen/CGFunctionInfo.h:479 @@ +478,3 @@ + /// Whether this function saved caller registers. + unsigned NoCallerSavedRegs : 1; + aaron.ballman wrote: > erichkeane wrote: > > aaron.ballman wrote:

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-04 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/CodeGen/CGFunctionInfo.h:479 @@ +478,3 @@ + /// Whether this function saved caller registers. + unsigned NoCallerSavedRegs : 1; + erichkeane wrote: > aaron.ballman wrote: > > erichkeane wrote: > > >

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-04 Thread Erich Keane via cfe-commits
erichkeane added a comment. Response on CGFucntionInfo. Comment at: include/clang/CodeGen/CGFunctionInfo.h:479 @@ +478,3 @@ + /// Whether this function saved caller registers. + unsigned NoCallerSavedRegs : 1; + aaron.ballman wrote: > erichkeane wrote: > >

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-04 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/CodeGen/CGFunctionInfo.h:479 @@ +478,3 @@ + /// Whether this function saved caller registers. + unsigned NoCallerSavedRegs : 1; + erichkeane wrote: > aaron.ballman wrote: > > This is unfortunate as

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-04 Thread Erich Keane via cfe-commits
erichkeane added a comment. Response on CGFucntionInfo. Comment at: include/clang/CodeGen/CGFunctionInfo.h:479 @@ +478,3 @@ + /// Whether this function saved caller registers. + unsigned NoCallerSavedRegs : 1; + aaron.ballman wrote: > This is unfortunate as

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-04 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1674 @@ +1673,3 @@ + TargetSpecificAttr { + let Spellings = [GNU<"no_caller_saved_registers">]; + let Subjects = SubjectList<[FunctionLike], WarnDiag,

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-04 Thread Amjad Aboud via cfe-commits
aaboud updated this revision to Diff 66810. aaboud added a comment. Made "no_caller_saved_registers" part of function prototype. This will allow Clang to yell a warning when there is a mismatch between function pointer and assigned function value. Thanks to Erich for implementing this addition

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-07-25 Thread David Kreitzer via cfe-commits
DavidKreitzer added a comment. The example Aaron sent in email is a good one: void func(int, int, int, int) __attribute__((no_caller_saved_registers, cdecl)); int main() { void (*fp)(int, int, int, int) __attribute__((cdecl)) = func; func(1, 2, 3, 4); fp(1, 2, 3, 4); // Not

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-07-25 Thread Aaron Ballman via cfe-commits
On Mon, Jul 25, 2016 at 11:15 AM, H.J Lu wrote: > hjl.tools added a comment. > > no_caller_saved_registers attribute can be used with any calling conventions. Okay, so is it expected that use of this attribute through a function pointer is not going to produce the same

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-07-25 Thread H.J Lu via cfe-commits
hjl.tools added a comment. no_caller_saved_registers attribute can be used with any calling conventions. https://reviews.llvm.org/D22045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-07-24 Thread Amjad Aboud via cfe-commits
aaboud updated this revision to Diff 65269. aaboud added a comment. Updated test according to comments. https://reviews.llvm.org/D22045 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/CGCall.cpp lib/Sema/SemaDeclAttr.cpp

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-07-24 Thread Amjad Aboud via cfe-commits
aaboud marked an inline comment as done. Comment at: include/clang/Basic/Attr.td:1657 @@ +1656,3 @@ + TargetSpecificAttr { + let Spellings = [GNU<"no_caller_saved_registers">]; + let Subjects = SubjectList<[FunctionLike], WarnDiag,

[PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-07-06 Thread Amjad Aboud via cfe-commits
aaboud created this revision. aaboud added reviewers: ABataev, DavidKreitzer, hjl.tools, qcolombet. aaboud added a subscriber: cfe-commits. This patch implements the Clang part for no_caller_saved_registers attribute as appear in [[