Inter register constraints

2013-07-05 Thread Paulo Matos
Hi,

I am convinced that what I am about to ask is not possible but I would like 
someone to confirm this.

Can I define in an insn a register constraint that depends on another register 
value?
So, for 
(set (match_operand:SI 0 "register_operand" "r")
 (match_operand:SI 1 "register_operand" "r"))

What I would like to represent is the fact that 0 and 1 are register pairs, so 
op0 is even and op1 is op0 + 1.
I noticed that avr defines register pair constraints but only for specific 
registers. If you have 64 registers that will give you 22 pairs. I could, of 
course, create all of these by hand by defining 23 classes and define a single 
constraint that matches these classes but I would like to know if there's 
another way. 

Cheers,

Paulo Matos




Re: Inter register constraints

2013-07-05 Thread Denis Chertykov
2013/7/5 Paulo Matos 
>
> Hi,
>
> I am convinced that what I am about to ask is not possible but I would like 
> someone to confirm this.
>
> Can I define in an insn a register constraint that depends on another 
> register value?
> So, for
> (set (match_operand:SI 0 "register_operand" "r")
>  (match_operand:SI 1 "register_operand" "r"))
>
> What I would like to represent is the fact that 0 and 1 are register pairs, 
> so op0 is even and op1 is op0 + 1.
> I noticed that avr defines register pair constraints but only for specific 
> registers. If you have 64 registers that will give you 22 pairs. I could, of 
> course, create all of these by hand by defining 23 classes and define a 
> single constraint that matches these classes but I would like to know if 
> there's another way.

You can try to play with DImode register and two SImode subregs of it.

Denis.


Test case g++.dg/tls/thread_local5.C on non-native targets

2013-07-05 Thread Sebastian Huber

Hello,

the DejaGnu testing framework uses text output to return status information for 
non-native targets, e.g.


PASS: g++.dg/tls/thread_local6.C (test for excess errors)
spawn psim -i ./thread_local6.exe
powerpc-rtems4.11-run is /opt/rtems-4.11/bin/powerpc-rtems4.11-run
OpenPIC Version 1.2 (2 CPUs and 17 IRQ sources) at 0x0C13
OpenPIC Vendor 0 (Unknown), Device 0 (Unknown), Stepping 0
Overriding NumSources (17) from configuration with 16
OpenPIC timer frequency is 1 Hz
*** EXIT code 1
FAIL: g++.dg/tls/thread_local6.C execution test

In order to prevent multiple output from exit() and _exit() calls there is a 
global variable done_exit_message in testglue.c (part of DejaGnu) which is used 
in the wrapper functions __wrap_exit() and __wrap__exit().


Now in g++.dg/tls/thread_local6.C we have the problem that the main thread 
returns with a status code of 1 and the test succeeds if a thread-local object 
of the main thread is destroyed properly.  In this case _exit(0) is called. 
This happens in my case, but the output is suppressed due to done_exit_message 
== 1.


How can I address this problem?  I don't think it is possible to alter the test 
in GCC to fix this problem.  One option is to store the latest exit code in 
testglue.c and print a new exit status it is different.


--- /usr/share/dejagnu/testglue.c   2011-10-22 20:40:24.0 +0200
+++ testglue.c  2013-07-05 16:28:04.906597399 +0200
@@ -52,6 +52,7 @@
 #endif

 static int done_exit_message = 0;
+static int last_exit_code = 0;
 int ___constval = 1;

 #ifdef VXWORKS
@@ -86,6 +87,7 @@
 #ifdef VXWORKS
   __runexit ();
 #endif
+  last_exit_code = code;
   strcpy (buf, "\n*** EXIT code ");
   ptr = write_int (code, buf + strlen(buf));
   *(ptr++) = '\n';
@@ -104,8 +106,9 @@
   char *ptr;

   /* Since exit may call _exit, we need to avoid a second message.  */
-  if (! done_exit_message)
+  if (! done_exit_message || code != last_exit_code)
 {
+  last_exit_code = code;
   strcpy (buf, "\n*** EXIT code ");
   ptr = write_int (code, buf + strlen(buf));
   *(ptr++) = '\n';

This will lead to:

*** EXIT code 1
*** EXIT code 0

Is this a reasonable approach?

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


List of typos.

2013-07-05 Thread Ondřej Bílka
On Thu, Jul 04, 2013 at 11:04:32AM +0100, Jonathan Wakely wrote:
> On 4 July 2013 08:20, Marc Glisse wrote:
> >
> > The script could do with some improvements, but it would be good indeed to
> > fix some of those typos.
> >
> > - the script creates non-words : suppresss
> 
> Yes, I noticed "functino" being changed to "functiono" :-)
> 
> > I also believe you should separate comment/doc changes from code changes
> > (which break the code in several places) and submit only the first category.
> 
> The only valid changes to libstdc++-v3 files are in comments and
> documentation, but they are valid so I'm going to fix them later
> today, thanks for reporting them.

Hi, I ran aspell on comments in gcc. After bit of cleaning a list with
frequencies is here. It is still relatively noisy and more heuristics
are needed.

http://kam.mff.cuni.cz/~ondra/gcc_misspells

What we will do with this now?

Generator is available here. 

https://github.com/neleai/stylepp ,file script stylepp_spellcheck_all

I will write a script to replace word in comment by another probably by
tomorrow.

Ondra



Re: List of typos.

2013-07-05 Thread Jonathan Wakely
On 5 July 2013 16:43, Ondřej Bílka wrote:
>
> Hi, I ran aspell on comments in gcc. After bit of cleaning a list with
> frequencies is here. It is still relatively noisy and more heuristics
> are needed.
>
> http://kam.mff.cuni.cz/~ondra/gcc_misspells
>
> What we will do with this now?

It doesn't look very useful yet, clearly "namespace" and "param" are not errors.

"acccepted" and "accestor" and "actullay" are real spelling mistakes,
but someone will have to do a grep through the whole tree to see where
they come from, and then ignore all the ones in ChangeLog files.


Re: Inter register constraints

2013-07-05 Thread Georg-Johann Lay

Paulo Matos schrieb:


I am convinced that what I am about to ask is not possible but I
would like someone to confirm this.

Can I define in an insn a register constraint that depends on another
register value? So, for
(set (match_operand:SI 0 "register_operand" "r")
 (match_operand:SI 1 "register_operand" "r"))

What I would like to represent is the fact that 0 and 1 are register
pairs, so op0 is even and op1 is op0 + 1. I noticed that avr defines
register pair constraints but only for specific registers. If you


On avr, modes > 1 byte always start in an even register, see 
avr_hard_regno_mode_ok.



have 64 registers that will give you 22 pairs. I could, of course,
create all of these by hand by defining 23 classes and define a
single constraint that matches these classes but I would like to know
if there's another way.


What are you trying to achieve?  In order so synthesize MOVW 
instructions after reload, see respective RTL peepholes.


Johann




Re: Remove the __GXX_EXPERIMENTAL_CXX0X__?

2013-07-05 Thread Benjamin De Kosnik

> Deprecate it for 4.9.x.
> Remove it later.  We don't need to keep around
> this macro which has been obsolete for at least
> two releases.

Agreed. Definitely deprecated for 4.9.

The internal style is to now check __cplusplus and in the future
whatever feature testing macros are developed.

-benjamin


Re: List of typos.

2013-07-05 Thread Ondřej Bílka
On Fri, Jul 05, 2013 at 05:17:54PM +0100, Jonathan Wakely wrote:
> On 5 July 2013 16:43, Ondřej Bílka wrote:
> >
> > Hi, I ran aspell on comments in gcc. After bit of cleaning a list with
> > frequencies is here. It is still relatively noisy and more heuristics
> > are needed.
> >
> > http://kam.mff.cuni.cz/~ondra/gcc_misspells
> >
> > What we will do with this now?
> 
> It doesn't look very useful yet, clearly "namespace" and "param" are not 
> errors.
We need to teach aspell about these. I am thinking about creating shared
wordlist that will gcc developers use. It is mainly logistics problem, I
could imagine having shared file on sourceware and using script like
this.

scp remote_wordlist wordlist 
aspell merge english wordlist
aspell -m wordlist -p new
scp remote_wordlist wordlist # To decrease race conditions.
aspell merge wordlist new
scp wordlist remote_wordlist

> 
> "acccepted" and "accestor" and "actullay" are real spelling mistakes,
> but someone will have to do a grep through the whole tree to see where
> they come from, and then ignore all the ones in ChangeLog files.

If I could extract score from which aspell determines candidate I can
sort them from most likely ones. I tried to write to aspell-user but got no
response yet.

This touches only comments, not changelogs.

Ondra