How to get attribute of callee

2010-09-02 Thread Phung Nguyen
Dear all, I am porting GCC to a new target. I don't know how to get attribute of callee of a call. I defined a new attribute to assign to a function but when writing for pattern name "call" or "call_value", I don't know how to know if the callee is assigned the attribute. As the code for the cal

Re: How to get attribute of callee

2010-09-02 Thread Georg Lay
Phung Nguyen schrieb: > Dear all, > > I am porting GCC to a new target. I don't know how to get attribute of > callee of a call. > > I defined a new attribute to assign to a function but when writing for > pattern name "call" or "call_value", I don't know how to know if the > callee is assigned t

Re: How to get attribute of callee

2010-09-02 Thread Jakub Jelinek
On Thu, Sep 02, 2010 at 07:18:29PM +0700, Phung Nguyen wrote: > I am porting GCC to a new target. I don't know how to get attribute of > callee of a call. > > I defined a new attribute to assign to a function but when writing for > pattern name "call" or "call_value", I don't know how to know if t

How to write a SPEC function that gets all arguments passed?

2010-09-02 Thread Georg Lay
Hi, when calling gcc with -frecord-gcc-switch the options passed to cc1 will differ depending on if -save-temps is present or not. E.g. if calling gcc foo.c -I Z -DX=... -UY ... in the forst case (with -save-temps) options_passed is: "-fpreprocessed foo.i ..." in the second case (without -save-temp

Re: How to get attribute of callee

2010-09-02 Thread Phung Nguyen
Hi Jakub, Thank you for your help. For direct call, I solved the problem based on your suggestion. For indirect call, I don't understand much your idea. Could you please clarify it? Phung On Thu, Sep 2, 2010 at 7:59 PM, Jakub Jelinek wrote: > On Thu, Sep 02, 2010 at 07:18:29PM +0700, Phung Ngu

structures & param_structures in gengtype

2010-09-02 Thread Basile Starynkevitch
Hello Laurynas, Diego & all the list. A precise question about gengtype (the current trunk one) I have the impression that every member of the 'param_structs' variable in gengtype.c (viewed as a linked list of types linked thru their next field) is also a member of the 'structures' variable in ge

gcc-4.5-20100902 is now available

2010-09-02 Thread gccadmin
Snapshot gcc-4.5-20100902 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20100902/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.5 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches

Re: How to get attribute of callee

2010-09-02 Thread Phung Nguyen
Thank you for your reply, As I know, operand 0 of call is the address of called function; operand 1 is the number of arguments; operand 2 is the number of args as registers. Therefore, where is the info passed to call ??? As I would like to change the target instruction of call based on the attrib