Re: RFA: Add Epiphany port

2012-08-26 Thread Gerald Pfeifer
On Fri, 4 Nov 2011, Joern Rennecke wrote: install.texi is a bit funny. sourcebuild.texi says to add configurations to the list in config.texi even if you have nothing to say about them. install.texi says you shouldn't do that. But after a while, it does do that for a number of newer ports. So

Re: RFA: Add Epiphany port

2011-11-05 Thread Richard Henderson
> #define __builtin_epiphany_fmsub(a, b, c) __builtin_fmaf (-b, c, a) Needs -(b), or conversion to __always_inline__ functions, as with the intrinsics used by the i386 target. Otherwise, you've taken care of all of my concerns. r~

Re: RFA: Add Epiphany port

2011-11-04 Thread Joern Rennecke
Quoting Richard Henderson : Look much closer. These patterns are 100% identical. The *move_frame_1 pattern will _never_ be matched, because such an insn will always be matched by move_frame. move_frame only matches if: operands[1] == frame_pointer_rtx || operands[1] == arg_pointer_rtx mov

TARGET_FRAME_POINTER_REQUIRED (Was: Re: RFA: Add Epiphany port)

2011-11-04 Thread Joern Rennecke
Quoting Richard Henderson : static bool epiphany_frame_pointer_required (void) { return cfun->calls_alloca; Isn't this automatic? Only if EXIT_IGNORE_STACK is nonzero; it's zero for epiphany. But I think I can change that.

Re: P.S.: Re: RFA: Add Epiphany port

2011-11-04 Thread Richard Henderson
On 11/04/2011 05:40 PM, Joern Rennecke wrote: > Actually, it's not that simple. The not:SI operaration can be generated > by combine. But it won't generate (xor:SI (reg:SI foo) (const_int -1)) . > > So I need one_cmplsi2_i as combiner pattern no matter what. Oh, right. I forgot about combine n

P.S.: Re: RFA: Add Epiphany port

2011-11-04 Thread Joern Rennecke
Quoting Joern Rennecke : Quoting Richard Henderson : >>> (define_expand "one_cmplsi2" ... Why not combine these? I'm pretty sure that expand_binop will try the xor solution all on its own. Actually, it's expand_unop, and it doesn't. Left to its own devices, it will generate a libcall i

Re: RFA: Add Epiphany port

2011-11-04 Thread Richard Henderson
On 11/04/2011 05:00 PM, Joern Rennecke wrote: >>> (define_insn_and_split "move_frame" >>> [(set (match_operand:SI 0 "gpr_operand" "=r") >>> (match_operand:SI 1 "register_operand" "r")) >>>(clobber (reg:CC CC_REGNUM))] >>> "operands[1] == frame_pointer_rtx || operands[1] == arg_point

Re: RFA: Add Epiphany port

2011-11-04 Thread Joern Rennecke
Quoting Richard Henderson : (define_special_predicate "any_gpr_operand" (match_code "subreg,reg") { return gpr_operand (op, mode); }) (define_special_predicate "any_gpr_operand" (match_operand 0 "gpr_operand")) though, I'm not sure what this achieves... while any_gpr_operand will ignor

Re: RFA: Add Epiphany port

2011-11-04 Thread Richard Henderson
> (define_predicate "call_address_operand" > (match_code "symbol_ref,const,reg") > { > return (symbolic_operand (op, mode) || (GET_CODE (op) == REG)); > }) Nit. (define_predicate "call_address_operand" (ior (match_code "reg") (match_operand 0 "symbolic_operand"))) > (define_special_

Re: RFA: Add Epiphany port

2011-11-04 Thread Joseph S. Myers
On Fri, 4 Nov 2011, Joern Rennecke wrote: > :@item > :Normally, one or more maintainers of that target listed in > :@file{MAINTAINERS}. Some existing architectures may be unmaintained, > :but it would be unusual to add support for a target that does not have > :a maintainer when support is added.

Re: RFA: Add Epiphany port

2011-11-04 Thread Rainer Orth
Joern Rennecke writes: > Index: libgcc/config.host > === > --- libgcc/config.host(revision 180924) > +++ libgcc/config.host(working copy) > @@ -433,6 +433,10 @@ > cris-*-linux* | crisv32-*-linux*) > tmake_file=

Re: RFA: Add Epiphany port

2011-11-03 Thread Joseph S. Myers
On Thu, 3 Nov 2011, Joern Rennecke wrote: > > Comment about the reason for this option? > > Would this be OK? > > /* { dg-options "-O2" } */ > +/* Using -mshort-calls avoids constant loading the function addresses in > + registers and thus getting the counts wrong. */ > +/* { dg-options "-O2

Re: RFA: Add Epiphany port

2011-11-03 Thread Joern Rennecke
Quoting "Joseph S. Myers" : +@item -mstack-offse@var{num} It appears to be -mstack-offset=@var{num}, not -mstack-offse@var{num}. Yes, I typoed a backspace for an =. Index: gcc/testsuite/gcc.dg/pragma-pack-3.c === --- gcc/tests

Re: RFA: Add Epiphany port

2011-11-03 Thread Joseph S. Myers
On Thu, 3 Nov 2011, Joern Rennecke wrote: > @@ -2723,7 +2723,8 @@ least version 2.20.1), and GNU C library > @item long_call/short_call > @cindex indirect calls on ARM > This attribute specifies how a particular function is called on > -ARM@. Both attributes override the @option{-mlong-calls}

Re: RFA: Add Epiphany port

2011-11-03 Thread Richard Henderson
On 11/03/2011 12:04 PM, Joern Rennecke wrote: > I could conceivably implement __builtin_epiphany_fmadd in a header file > using fma, reordering the operands, but that would only make the port > messier. The semantics of fma are not documented in extend.texi. Well, we managed to get the docs into

Re: RFA: Add Epiphany port

2011-11-03 Thread Joern Rennecke
Quoting Andrew Pinski : On Thu, Nov 3, 2011 at 11:08 AM, Joern Rennecke wrote: +@smallexample +float __builtin_epiphany_fmadd (float a, float b, float c) /* a + b * c */ +float __builtin_epiphany_fmsub (float a, float b, float c) /* a - b * c */ +@end smallexample I don't think you need tar

Re: RFA: Add Epiphany port

2011-11-03 Thread Andrew Pinski
On Thu, Nov 3, 2011 at 11:08 AM, Joern Rennecke wrote: > +@smallexample > +float __builtin_epiphany_fmadd (float a, float b, float c) /* a + b * c */ > +float __builtin_epiphany_fmsub (float a, float b, float c) /* a - b * c */ > +@end smallexample I don't think you need target specific builtins