I386.md: *_mixed and *_sse

2008-04-22 Thread Ye, Joey
Hi, From i386.md, alternative 1 of *fop_sf_comm_mixed is duplicated with *fop_sf_comm_sse. Why do we define a _mixed pattern here? (define_insn "*fop_sf_comm_mixed" [(set (match_operand:SF 0 "register_operand" "=f,x") (match_operator:SF 3 "binary_fp_operator" [(m

Re: How to teach gcc, that registers are clobbered by api calls?

2008-04-22 Thread Ross Ridge
Kai Tietz writes: >I read that too, but how can I teach gcc to do this that registers are >callee-saved? I tried it by use of call_used part in regclass.c, but >this didn't worked as expected. I think you need to modify CALL_USED_REGISTERS and/or CONDITIONAL_REGISTER_USAGE in i386.h. Making any c

Re: no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi, I wanted support for software floating point on the architecture. I am using fp-bit.c & dp-bit.c and have defined FLOAT_TYPE_SIZE as 32 and DOUBLE_TYPE_SIZE as 64. dp-bit.c requires __muldi3. How do I enable emulation of 64 bit multiply in libgcc2.a ? Thanks in advance, Kunal Parmar

Re: no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi Ian, On Tue, Apr 22, 2008 at 7:12 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > Looking at libgcc2.h, it seems like you might need to define > LIBGCC2_UNITS_PER_WORD in your tm.h file. That solved my problem. Thanks a ton ! Kunal

Re: no mul/div instruction

2008-04-22 Thread Ian Lance Taylor
"Kunal Parmar" <[EMAIL PROTECTED]> writes: >> Yes, I think __mulsi3 will be built for you automatically. > > I gave a definition of __mulhi3 for my architecture. But I don't get > __mulsi3 in libgcc.a. Do I have to enable some options for this ? Looking at libgcc2.h, it seems like you might need

Re: US-CERT Vulnerability Note VU#162289

2008-04-22 Thread Brad Roberts
On Tue, 22 Apr 2008, Mark Mitchell wrote: > Chad Dougherty wrote: > > > The vulnerability note has been significantly reworked to focus on the issue > > of undefined behavior handling in the compiler and the fact that conforming > > implementations are not required to warn of this condition. I've

Re: no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi Ian, > Yes, I think __mulsi3 will be built for you automatically. I gave a definition of __mulhi3 for my architecture. But I don't get __mulsi3 in libgcc.a. Do I have to enable some options for this ? Thanks in advance, Kunal Parmar

Re: no mul/div instruction

2008-04-22 Thread Ian Lance Taylor
"Kunal Parmar" <[EMAIL PROTECTED]> writes: > On Tue, Apr 22, 2008 at 1:24 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: >> It depends on UNITS_PER_WORD. If UNITS_PER_WORD is 4, you need >> __mulsi3. If UNITS_PER_WORD is 2, you need __mulhi3, and, if you have >> 32-bit integer types, you wil

Re: no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi Ian, On Tue, Apr 22, 2008 at 1:24 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > It depends on UNITS_PER_WORD. If UNITS_PER_WORD is 4, you need > __mulsi3. If UNITS_PER_WORD is 2, you need __mulhi3, and, if you have > 32-bit integer types, you will also need __mulsi3. In the latter cas

Re: US-CERT Vulnerability Note VU#162289

2008-04-22 Thread Mark Mitchell
Chad Dougherty wrote: The vulnerability note has been significantly reworked to focus on the issue of undefined behavior handling in the compiler and the fact that conforming implementations are not required to warn of this condition. I've tried to incorporate many of the valid concerns that w

Re: US-CERT Vulnerability Note VU#162289

2008-04-22 Thread Chad Dougherty
Joe Buck wrote: Thanks. I hope that you will correct the advisory promptly to avoid any implication that one should switch from GCC to a different compiler based on this issue, since we've already established that most of GCC's competitors perform similar optimizations under some cicumstances (e

Re: namelookup bug in gcc?

2008-04-22 Thread Joe Buck
On Tue, Apr 22, 2008 at 02:28:15PM +0200, Balazs Dezso wrote: > I have tested the following code on g++ 4.3, 4.2, 4.1 and 3.4. Looks like a bug. Please file a bug report at http://gcc.gnu.org/bugzilla > #include > > struct B { > static const int x = 1; > }; > > struct A { > static const

Re: no mul/div instruction

2008-04-22 Thread Ian Lance Taylor
Kunal Parmar <[EMAIL PROTECTED]> writes: > I am porting GCC to a new 16 bit RISC architecture which does not have > multiplication and division instructions. I figured that I have to provide > emulation routines for the multiplication and division which will be > inserted into libgcc2.a. But I am

no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi all, I am porting GCC to a new 16 bit RISC architecture which does not have multiplication and division instructions. I figured that I have to provide emulation routines for the multiplication and division which will be inserted into libgcc2.a. But I am confused about which versions of these r

Re: Google Summer of Code 2008: seven approved applications for gcc

2008-04-22 Thread Manuel López-Ibáñez
And in our wiki: http://gcc.gnu.org/wiki/SummerOfCode which our new developers are welcome to use to document their progress. Cheers, Manuel. On 22/04/2008, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > I'm happy to report that Google approved seven applications for Summer > of Code for the

Google Summer of Code 2008: seven approved applications for gcc

2008-04-22 Thread Ian Lance Taylor
I'm happy to report that Google approved seven applications for Summer of Code for the gcc project. The approved applications can be found here: http://code.google.com/soc/2008/gcc/about.html . Ian

namelookup bug in gcc?

2008-04-22 Thread Balazs Dezso
Hello all, I have tested the following code on g++ 4.3, 4.2, 4.1 and 3.4. #include struct B { static const int x = 1; }; struct A { static const int x = 0; template static void f() { std::cerr << A::x << std::endl; } }; int main() { A::f(); return 0; } The gcc result: 0 W

Re: How to insert functions?

2008-04-22 Thread Hugh Leather
Hi Andrew, Yes, I did a bit. it segfaults at cgraphunit.c:cgraph_expand_all_functions:1323 node->lowered = DECL_STRUCT_FUNCTION (node->decl)->cfg != NULL; It seems that the node->decl has been nulled by the time it gets here. It definitely isn't NULL after leaving my c

Re: How to insert functions?

2008-04-22 Thread Andrew Haley
Hugh Leather wrote: > Hi, > > I am trying to add a new destructor function to object files I > compile. I'm doing this to instrument programs and then, once the > program has finished I want to print out the statistics I've gathered. > So, just before pass 'remove_useless_stmts' is called on

How to insert functions?

2008-04-22 Thread Hugh Leather
Hi, I am trying to add a new destructor function to object files I compile. I'm doing this to instrument programs and then, once the program has finished I want to print out the statistics I've gathered. So, just before pass 'remove_useless_stmts' is called on each function I try to creat

Re: ada: What is libgnalasup?

2008-04-22 Thread Samuel Tardieu
> "Arnaud" == Arnaud Charlet <[EMAIL PROTECTED]> writes: Arnaud> Yes, libgnalasup is a bundled version of lapack/blas Arnaud> libraries. Thanks. I've submitted a patch to make lapack/blas the default version. Sam -- Samuel Tardieu -- [EMAIL PROTECTED] -- http://www.rfc1149.net/