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 attribu
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
cfe-commits@lists.
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 li
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
cfe-
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
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:
>> >
>> > > For what i
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:
> >
> > > For what it is worth, this certainly seems to be misnamed. By nature,
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 nature
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 wa
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 with
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
> > doe
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, "ExpectedFunction
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, "Expected
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?
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
_
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:
> > > aaron
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:
>
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:
> > >
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:
> > aar
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 i
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 it
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, "ExpectedFunction
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 c
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 th
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 results as calling the
func
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
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
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
test/CodeGenCXX/attr-x86-no_calle
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, "ExpectedFunc
aaron.ballman added inline comments.
Comment at: include/clang/Basic/Attr.td:1657
@@ +1656,3 @@
+ TargetSpecificAttr {
+ let Spellings = [GNU<"no_caller_saved_registers">];
+ let Subjects = SubjectList<[FunctionLike], WarnDiag, "ExpectedFunction
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 [[
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5ed3cc7b66af4758f
30 matches
Mail list logo