Re: Set environment variable on remote target

2008-07-17 Thread Andreas Schwab
Jie Zhang <[EMAIL PROTECTED]> writes:

> Andreas Schwab wrote:
>> Jie Zhang <[EMAIL PROTECTED]> writes:
>>
>>> @@ -261,7 +262,11 @@ proc rsh_exec { boardname program pargs inp outp } {
>>> set inp "/dev/null"
>>>  }
>>>  -set ret [local_exec "$RSH $rsh_useropts $hostname sh -c '$program
>>> $pargs \\; echo XYZ\\\${?}ZYX'" $inp $outp $timeout]
>>> +set remote_envs ""
>>> +foreach envvar [array names remote_env] {
>>> +   set remote_envs "$remote_envs $envvar=$remote_env($envvar)"
>>
>> That needs to do proper quoting to protect shell meta characters.
>>
> Thanks for pointing out this. A new patch is attached. Is the quoting right?

That won't protect all meta characters.  Inside double quotes the dollar
sign, backslash and backquote are still special.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


RE: Question about doloop_end pattern

2008-07-17 Thread Bingfeng Mei
Thanks. I was looking at bfin. MT's implementation looks similar but
simpler.  

> -Original Message-
> From: Ramana Radhakrishnan [mailto:[EMAIL PROTECTED] 
> Sent: 16 July 2008 19:17
> To: Bingfeng Mei
> Cc: gcc@gcc.gnu.org
> Subject: Re: Question about doloop_end pattern
> 
> Hi Bingfeng,
> 
> > Hello,
> > I tried to use doloop_end pattern to reduce loop overhead 
> for our target
> > processor, which features a dedicated loop instruction.  
> Somehow even a
> > simple loop just cannot pass the test of doloop_condition_get, which
> > requires following canonical pattern.
> 
> 
> I checked this on our private port of GCC .  This is based off 4.3
> branch which is off what we are working on right now .  We do use the
> doloop pattern to generate out these cases in our port and I can
> confirm that for our case we generate the following bit of code. Our
> tree does have a few other tweaks that we maintain that we'd like to
> contribute once the copyright assignments are in place.
> 
> Unroll:
>c2c $c5,$c2
>i2cs$c4,63
> .L2:
>ldw $c2,($c5)+=1
>add $c2,$c1,$c2
>stw ($c3)+=1,$c2
>brinzdec$c4,.L2
>brz $zero,$link
> 
> You probably want to see the mt backend for some example as to how to
> do it . It looks similar to how we do it in ours.
> 
> 
> cheers
> Ramana
> 
> 
> Ramana Radhakrishnan
> Icera Semiconductor
> 
> On Wed, Jul 16, 2008 at 12:05 PM, Bingfeng Mei 
> <[EMAIL PROTECTED]> wrote:
> > Hello,
> > I tried to use doloop_end pattern to reduce loop overhead 
> for our target
> > processor, which features a dedicated loop instruction.  
> Somehow even a
> > simple loop just cannot pass the test of doloop_condition_get, which
> > requires following canonical pattern.
> >
> >  /* The canonical doloop pattern we expect has one of the following
> > forms:
> >
> > 1)  (parallel [(set (pc) (if_then_else (condition)
> >(label_ref (label))
> >(pc)))
> > (set (reg) (plus (reg) (const_int -1)))
> > (additional clobbers and uses)])
> >
> > The branch must be the first entry of the parallel 
> (also required
> > by jump.c), and the second entry of the parallel must 
> be a set of
> > the loop counter register.  Some targets (IA-64) wrap the set of
> > the loop counter in an if_then_else too.
> >
> > 2)  (set (reg) (plus (reg) (const_int -1))
> > (set (pc) (if_then_else (reg != 0)
> > (label_ref (label))
> > (pc))).  */
> >
> >
> > Here is a simple function I used, it should meet all doloop 
> optimization
> > requirements.
> > void Unroll( short s, int * restrict b_inout, int *restrict 
> out, int N)
> > {
> >int i;
> >for (i=0; i<64; i++)
> >{
> >out[i] = b_inout[i] +  s;
> >}
> > }
> >
> >
> > In tree ivcanon pass, it is converted to
> > ;; Function Unroll (Unroll)
> >
> > Unroll (short int s, int * restrict b_inout, int * restrict 
> out, int N)
> > {
> >  unsigned int ivtmp.14;
> >  int pretmp.9;
> >  long unsigned int pretmp.8;
> >  int storetmp.6;
> >  int i;
> >  int D.1459;
> >  int D.1458;
> >  int D.1457;
> >  int * D.1456;
> >  int * D.1455;
> >  long unsigned int D.1454;
> >  long unsigned int D.1453;
> >
> > :
> >  pretmp.9_8 = (int) s_12(D);
> >
> > :
> >  # ivtmp.14_13 = PHI 
> >  # i_19 = PHI 
> >  D.1453_3 = (long unsigned int) i_19;
> >  D.1454_4 = D.1453_3 * 4;
> >  D.1455_6 = out_5(D) + D.1454_4;
> >  D.1456_10 = b_inout_9(D) + D.1454_4;
> >  D.1457_11 = *D.1456_10;
> >  D.1459_14 = pretmp.9_8 + D.1457_11;
> >  *D.1455_6 = D.1459_14;
> >  i_15 = i_19 + 1;
> >  ivtmp.14_21 = ivtmp.14_13 - 1;
> >  if (ivtmp.14_21 != 0)
> >goto ;
> >  else
> >goto ;
> >
> > :
> >  goto ;
> >
> > :
> >  return;
> >
> > }
> >
> >
> > This should match requirements of doloop_condition_get.  But after
> > ivopts pass, the code is transformed to:
> >
> > ;; Function Unroll (Unroll)
> >
> > Unroll (short int s, int * restrict b_inout, int * restrict 
> out, int N)
> > {
> >  long unsigned int ivtmp.21;
> >  unsigned int ivtmp.14;
> >  int pretmp.9;
> >  long unsigned int pretmp.8;
> >  int storetmp.6;
> >  int i;
> >  int D.1459;
> >  int D.1458;
> >  int D.1457;
> >  int * D.1456;
> >  int * D.1455;
> >  long unsigned int D.1454;
> >  long unsigned int D.1453;
> >
> > :
> >  pretmp.9_8 = (int) s_12(D);
> >
> > :
> >  # ivtmp.21_7 = PHI 
> >  D.1457_11 = MEM[base: b_inout_9(D), index: ivtmp.21_7];
> >  D.1459_14 = pretmp.9_8 + D.1457_11;
> >  MEM[base: out_5(D), index: ivtmp.21_7] = D.1459_14;
> >  ivtmp.21_16 = ivtmp.21_7 + 4;
> >  if (ivtmp.21_16 != 256)
> >goto ;
> >  else
> >goto ;
> >
> > :
> >  goto ;
> >
> > :
> >  return;
> >
> > }
> >
> >
> > It is not required canonical form anymore. And later RTL level
> > optimizations cannot 

size of array "" is too large

2008-07-17 Thread Hariharan

Hello,
I see that in x86 GCC, you can define a structure with

struct trial
{
  long a[10];
};


Whereas in a 16-bit target (picochip), you cannot define,

struct trial
{
  long a[1];
};

In the case above, i get a
"size of array ‘a’ is too large" error.

The thing that took me by surprise was, if i split the structure to

struct trial
{
  long a[5000];
  long b[5000];
};

This works fine.

I looked around the mailing list a bit. This issue seems to have been 
raised a few times before, but i couldnt find any definitive answer.


Is this a bug in GCC? Do i file a report?

Cheers
Hari


Re: Set environment variable on remote target

2008-07-17 Thread Jie Zhang

Andreas Schwab wrote:

Jie Zhang <[EMAIL PROTECTED]> writes:


Andreas Schwab wrote:

Jie Zhang <[EMAIL PROTECTED]> writes:


@@ -261,7 +262,11 @@ proc rsh_exec { boardname program pargs inp outp } {
set inp "/dev/null"
 }
 -set ret [local_exec "$RSH $rsh_useropts $hostname sh -c '$program
$pargs \\; echo XYZ\\\${?}ZYX'" $inp $outp $timeout]
+set remote_envs ""
+foreach envvar [array names remote_env] {
+   set remote_envs "$remote_envs $envvar=$remote_env($envvar)"

That needs to do proper quoting to protect shell meta characters.


Thanks for pointing out this. A new patch is attached. Is the quoting right?


That won't protect all meta characters.  Inside double quotes the dollar
sign, backslash and backquote are still special.


So we have to use single quotes. The updated patch is attached.

Thanks,
Jie
diff --git a/lib/rsh.exp b/lib/rsh.exp
index 1a207a8..94122e8 100644
--- a/lib/rsh.exp
+++ b/lib/rsh.exp
@@ -225,6 +225,7 @@ proc rsh_upload {desthost srcfile destfile} {
 #
 proc rsh_exec { boardname program pargs inp outp } {
 global timeout
+global remote_env
 
 verbose "Executing $boardname:$program $pargs < $inp"
 
@@ -261,7 +262,11 @@ proc rsh_exec { boardname program pargs inp outp } {
 	set inp "/dev/null"
 }
 
-set ret [local_exec "$RSH $rsh_useropts $hostname sh -c '$program $pargs \\; echo XYZ\\\${?}ZYX'" $inp $outp $timeout]
+set remote_envs ""
+foreach envvar [array names remote_env] {
+	set remote_envs "$remote_envs $envvar='$remote_env($envvar)'"
+}
+set ret [local_exec "$RSH $rsh_useropts $hostname sh -c '$remote_envs $program $pargs \\; echo XYZ\\\${?}ZYX'" $inp $outp $timeout]
 set status [lindex $ret 0]
 set output [lindex $ret 1]
 
diff --git a/lib/utils.exp b/lib/utils.exp
index 6c9ff98..6325dd8 100644
--- a/lib/utils.exp
+++ b/lib/utils.exp
@@ -414,3 +414,12 @@ proc getenv { var } {
 }
 }
 
+#
+# Set an environment variable remotely
+#
+proc remote_setenv { var val } {
+global remote_env
+
+set remote_env($var) $val
+}
+


Re: size of array "" is too large

2008-07-17 Thread Nicholas Sherlock

Hariharan wrote:

[...] in a 16-bit target (picochip), you cannot define,

struct trial
{
  long a[1];
};

In the case above, i get a
"size of array ‘a’ is too large" error.

The thing that took me by surprise was, if i split the structure to

struct trial
{
  long a[5000];
  long b[5000];
};

This works fine. 
If your "long" is 32-bit, then your first array covers more memory than 
the range of a signed 16-bit integer, whereas the second set of arrays 
doesn't hit this limitation. Perhaps the limitation is forced on GCC by 
the limitations of your target.


Cheers,
Nicholas Sherlock


Re: Set environment variable on remote target

2008-07-17 Thread Andreas Schwab
Jie Zhang <[EMAIL PROTECTED]> writes:

> So we have to use single quotes. The updated patch is attached.

This will break if the value can contain single quotes.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Bootstrap failure in stage 1 on trunk for i686-pc-linux-gnu

2008-07-17 Thread Rainer Emrich

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

/opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c: In function ‘choose_reload_regs’:
/opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected expression at end
of input
/opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration or
statement at end of input
/opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: warning: unused variable ‘nr’
/opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration or
statement at end of input
/opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration or
statement at end of input
/opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration or
statement at end of input
/opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration or
statement at end of input
/opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:5621: warning: unused variable ‘pass’
gmake[3]: *** [reload1.o] Error 1

- --
Mit freundlichen Grüßen / Best Regards

Dipl.-Ing. Rainer Emrich
Dept. Manager IT/Softwareentwicklung
TECOSIM Technische Simulation GmbH
Ferdinand-Stuttmann-Straße 15
D-65428 Rüsselsheim
Phone  +49 (0) 6142 8272-330
Fax+49 (0) 6142 8272-249
Mobile +49 (0) 163 5694920
www.tecosim.com
best partner for simulation
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TECOSIM Technische Simulation GmbH, Rüsselsheim
Firmensitz: Ferdinand-Stuttmann-Straße 15, 65428 Rüsselsheim
Registergericht: Amtsgericht Darmstadt, HRB 83704
Geschäftsführer: Udo Jankowski, Jürgen Veith
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIf1yF3s6elE6CYeURAuQ2AJ9MQE7w35IjUpYAxrE/t8EcTsgi9gCfSXQE
6m7ey1PZ8fal5D2OycrsKNY=
=xsHE
-END PGP SIGNATURE-


Re: Bootstrap failure in stage 1 on trunk for i686-pc-linux-gnu

2008-07-17 Thread H.J. Lu
On Thu, Jul 17, 2008 at 7:51 AM, Rainer Emrich <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c: In function 'choose_reload_regs':
> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected expression at
> end
> of input
> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
> or
> statement at end of input
> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: warning: unused variable 'nr'
> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
> or
> statement at end of input
> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
> or
> statement at end of input
> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
> or
> statement at end of input
> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
> or
> statement at end of input
> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:5621: warning: unused variable
> 'pass'
> gmake[3]: *** [reload1.o] Error 1
>

This report is meaningless without revision information.


-- 
H.J.


Re: Bootstrap failure in stage 1 on trunk for i686-pc-linux-gnu

2008-07-17 Thread Rainer Emrich

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

H.J. Lu schrieb:
| On Thu, Jul 17, 2008 at 7:51 AM, Rainer Emrich <[EMAIL PROTECTED]> wrote:
|> -BEGIN PGP SIGNED MESSAGE-
|> Hash: SHA1
|>
|> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c: In function 'choose_reload_regs':
|> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected expression at
|> end
|> of input
|> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
|> or
|> statement at end of input
|> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: warning: unused variable 'nr'
|> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
|> or
|> statement at end of input
|> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
|> or
|> statement at end of input
|> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
|> or
|> statement at end of input
|> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected declaration
|> or
|> statement at end of input
|> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:5621: warning: unused variable
|> 'pass'
|> gmake[3]: *** [reload1.o] Error 1
|>
|
| This report is meaningless without revision information.
|
|

It's revision 137923.


- --
Mit freundlichen Grüßen / Best Regards

Dipl.-Ing. Rainer Emrich
Dept. Manager IT/Softwareentwicklung
TECOSIM Technische Simulation GmbH
Ferdinand-Stuttmann-Straße 15
D-65428 Rüsselsheim
Phone  +49 (0) 6142 8272-330
Fax+49 (0) 6142 8272-249
Mobile +49 (0) 163 5694920
www.tecosim.com
best partner for simulation
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TECOSIM Technische Simulation GmbH, Rüsselsheim
Firmensitz: Ferdinand-Stuttmann-Straße 15, 65428 Rüsselsheim
Registergericht: Amtsgericht Darmstadt, HRB 83704
Geschäftsführer: Udo Jankowski, Jürgen Veith
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIf2m13s6elE6CYeURAhmlAKDReZHemh+/kpruYEKx44sFCEyaBgCfcHx3
g1sPPBXYJnBoKxF2FQUlnQ0=
=L+az
-END PGP SIGNATURE-


Re: Bootstrap failure in stage 1 on trunk for i686-pc-linux-gnu

2008-07-17 Thread H.J. Lu
On Thu, Jul 17, 2008 at 8:48 AM, Rainer Emrich <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> H.J. Lu schrieb:
> | On Thu, Jul 17, 2008 at 7:51 AM, Rainer Emrich <[EMAIL PROTECTED]>
> wrote:
> |> -BEGIN PGP SIGNED MESSAGE-
> |> Hash: SHA1
> |>
> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c: In function
> 'choose_reload_regs':
> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected expression
> at
> |> end
> |> of input
> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
> declaration
> |> or
> |> statement at end of input
> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: warning: unused variable
> 'nr'
> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
> declaration
> |> or
> |> statement at end of input
> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
> declaration
> |> or
> |> statement at end of input
> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
> declaration
> |> or
> |> statement at end of input
> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
> declaration
> |> or
> |> statement at end of input
> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:5621: warning: unused variable
> |> 'pass'
> |> gmake[3]: *** [reload1.o] Error 1
> |>
> |
> | This report is meaningless without revision information.
> |
> |
>
> It's revision 137923.

Revision 137923 seems OK on Linux/x86:

http://gcc.gnu.org/ml/gcc-testresults/2008-07/msg01605.html


-- 
H.J.


Re: Bootstrap failure in stage 1 on trunk for i686-pc-linux-gnu

2008-07-17 Thread Rainer Emrich

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

H.J. Lu schrieb:
| On Thu, Jul 17, 2008 at 8:48 AM, Rainer Emrich <[EMAIL PROTECTED]> wrote:
|> -BEGIN PGP SIGNED MESSAGE-
|> Hash: SHA1
|>
|> H.J. Lu schrieb:
|> | On Thu, Jul 17, 2008 at 7:51 AM, Rainer Emrich <[EMAIL PROTECTED]>
|> wrote:
|> |> -BEGIN PGP SIGNED MESSAGE-
|> |> Hash: SHA1
|> |>
|> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c: In function
|> 'choose_reload_regs':
|> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected expression
|> at
|> |> end
|> |> of input
|> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
|> declaration
|> |> or
|> |> statement at end of input
|> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: warning: unused variable
|> 'nr'
|> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
|> declaration
|> |> or
|> |> statement at end of input
|> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
|> declaration
|> |> or
|> |> statement at end of input
|> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
|> declaration
|> |> or
|> |> statement at end of input
|> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected
|> declaration
|> |> or
|> |> statement at end of input
|> |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:5621: warning: unused variable
|> |> 'pass'
|> |> gmake[3]: *** [reload1.o] Error 1
|> |>
|> |
|> | This report is meaningless without revision information.
|> |
|> |
|>
|> It's revision 137923.
|
| Revision 137923 seems OK on Linux/x86:
|
| http://gcc.gnu.org/ml/gcc-testresults/2008-07/msg01605.html
|
|

I will recheck tomorrow.

- --
Mit freundlichen Grüßen / Best Regards

Dipl.-Ing. Rainer Emrich
Dept. Manager IT/Softwareentwicklung
TECOSIM Technische Simulation GmbH
Ferdinand-Stuttmann-Straße 15
D-65428 Rüsselsheim
Phone  +49 (0) 6142 8272-330
Fax+49 (0) 6142 8272-249
Mobile +49 (0) 163 5694920
www.tecosim.com
best partner for simulation
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TECOSIM Technische Simulation GmbH, Rüsselsheim
Firmensitz: Ferdinand-Stuttmann-Straße 15, 65428 Rüsselsheim
Registergericht: Amtsgericht Darmstadt, HRB 83704
Geschäftsführer: Udo Jankowski, Jürgen Veith
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIf3PO3s6elE6CYeURAqywAJ0YQCYv92sl2jdS0D19ev3N79e2zwCeOFFi
hAF/CA6s85UR2P/pQ4S4bh8=
=/fKL
-END PGP SIGNATURE-


Re: How to implement conditional execution

2008-07-17 Thread Paul Brook
On Friday 27 June 2008, Julian Brown wrote:
> On Fri, 27 Jun 2008 15:52:22 +0530
>
> "Mohamed Shafi" <[EMAIL PROTECTED]> wrote:
> > If the condition in the 'if' instruction is satisfied the processor
> > will execute the next instruction or it will replace with a nop. So
> > this means that i can instructions similar to:
> >
> > if eq Rx, Ry
> >   add Rx, Ry
> > add Rx, 2
> >
> > Will it be possible to implement this in the Gcc backend ?
> > Does any other targets have similar instructions?
>
> This is very much like (a simpler version of) the ARM Thumb-2 IT
> instruction. Look how config/arm/thumb2.md handles that. I think the
> basic idea should be that you should define conditional instruction
> patterns which emit assembly for both instructions simultaneously.

Not quite.  For Thumb-2 we describe most instruction as having conditional 
variants using define_cond_exec. Then arrange for the necessary IfThen 
instructions to be generated via ASM_OUTPUT_OPCODE. Multiple assembly 
instructions from the same pattern are either a historical leftover, or when 
it's inconvenient to describe the operation with proper cond_exec RTL.

Thumb-2 is a bit different to the machine described above because because the 
conditional execution is based on the condition code register, with the 
comparison occurring as a separate instruction, and the IT instruction can 
skip multiple subsequent instructions. I'd expect the same technique to be 
applicable though.

Paul



Re: Bootstrap failure in stage 1 on trunk for i686-pc-linux-gnu

2008-07-17 Thread Ralf Wildenhues
> > | On Thu, Jul 17, 2008 at 7:51 AM, Rainer Emrich <[EMAIL PROTECTED]> wrote:
> > |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c: In function 
> > 'choose_reload_regs':
> > |> /opt/gnu/src/gcc/gcc-4.4.0/gcc/reload1.c:6083: error: expected 
> > expression at end of input

Looks like a corrupted file.  Interrupted download, full disk?

Cheers,
Ralf


gcc-4.3-20080717 is now available

2008-07-17 Thread gccadmin
Snapshot gcc-4.3-20080717 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/4.3-20080717/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 4.3 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-4_3-branch 
revision 137932

You'll find:

gcc-4.3-20080717.tar.bz2  Complete GCC (includes all of below)

gcc-core-4.3-20080717.tar.bz2 C front end and core compiler

gcc-ada-4.3-20080717.tar.bz2  Ada front end and runtime

gcc-fortran-4.3-20080717.tar.bz2  Fortran front end and runtime

gcc-g++-4.3-20080717.tar.bz2  C++ front end and runtime

gcc-java-4.3-20080717.tar.bz2 Java front end and runtime

gcc-objc-4.3-20080717.tar.bz2 Objective-C front end and runtime

gcc-testsuite-4.3-20080717.tar.bz2The GCC testsuite

Diffs from 4.3-20080710 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-4.3
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.