Re: Inline Assembly Error: suffix or operands invalid for 'shr'

2009-03-24 Thread Chris Lattner
On Mar 24, 2009, at 11:02 AM, Rodrigo Dominguez wrote: When assembling this program, 'cc1' emits a 'shrl %ecx, %eax' instruction. The 'shr' instruction can only take an 8-bit register as the first operand. The emitted instruction should have been 'shrl %cl, %eax'. Therefore, the compilation

Re: Inline Assembly Error: suffix or operands invalid for 'shr'

2009-03-24 Thread H.J. Lu
On Tue, Mar 24, 2009 at 1:18 PM, Rodrigo Dominguez wrote: > H.J, > > Thanks for replying but this doesn't answer my question. Shouldn't __asm__ > generate the right code without using the %b1 trick? The reason I am asking > is I have a 350 line macro which I can't change. Those macros are wrong.

RE: Inline Assembly Error: suffix or operands invalid for 'shr'

2009-03-24 Thread Paul Koning
> "Rodrigo" == Rodrigo Dominguez writes: Rodrigo> H.J, Thanks for replying but this doesn't answer my Rodrigo> question. Shouldn't __asm__ generate the right code without Rodrigo> using the %b1 trick? The reason I am asking is I have a 350 Rodrigo> line macro which I can't change. GCC do

RE: Inline Assembly Error: suffix or operands invalid for 'shr'

2009-03-24 Thread Rodrigo Dominguez
H.J, Thanks for replying but this doesn't answer my question. Shouldn't __asm__ generate the right code without using the %b1 trick? The reason I am asking is I have a 350 line macro which I can't change. Is there any documentation about __asm__ default behavior regarding this issue? Something li

Re: Inline Assembly Error: suffix or operands invalid for 'shr'

2009-03-24 Thread H.J. Lu
On Tue, Mar 24, 2009 at 11:02 AM, Rodrigo Dominguez wrote: > Hi, > > While debugging a problem with Open64, I ran into a similar problem with > GCC. I created the following unit test program: > > #include > > int main(void) > { >    uint32_t    a = 7; >    int8_t      s = -1; > >    __asm__ ("shr

Google Summer of Code 2009

2009-03-24 Thread Pranav
Hi Sebastian and Tobias, I am a final year undergraduate in the Indian Institute of Technology Kanpur, India and I would like to work in the summers on the auto-parallelization of loops in the Graphite framework. I'll be have a long summer break of 3 months and I would like to pursue this proj

Inline Assembly Error: suffix or operands invalid for 'shr'

2009-03-24 Thread Rodrigo Dominguez
Hi, While debugging a problem with Open64, I ran into a similar problem with GCC. I created the following unit test program: #include int main(void) { uint32_ta = 7; int8_t s = -1; __asm__ ("shrl %1, %0\n\t" : "+r" (a) : "c" (-s) );

Re: Should structure with flexible array be allowed to be passed by value?

2009-03-24 Thread Dave Korn
Brian Ellis wrote: > struct dynamic { int size; int array[]; }; > int main() { struct dynamic * pBadness = ((struct dynamic *) malloc( > sizeof(int) * 3) ); > dont_do_this( *pBadness ); Are you even allowed to dereference a pointer to a struct containing a VLA? Should it be treated like an

Re: GCC 4.4.0 Status Report (2009-03-13)

2009-03-24 Thread David Edelsohn
On Tue, Mar 24, 2009 at 12:02 PM, Tim Prince wrote: > Software developers I deal with use gcc because it's a guaranteed included > part of the customer platforms they are targeting.  They're generally > looking for a 20% gain in performance plus support before adopting > commercial alternatives.

Re: Should structure with flexible array be allowed to be passed by value?

2009-03-24 Thread Joseph S. Myers
On Tue, 24 Mar 2009, Gabriel Dos Reis wrote: > > I see nothing about passing by value different from structure assignment, > > which ignores the flexible array member (see 6.7.2.1 paragraph 22 (in > > N1256) for an example stating this).  Although argument passing and return > > aren't strictly as

Re: Should structure with flexible array be allowed to be passed by value?

2009-03-24 Thread Gabriel Dos Reis
On Tue, Mar 24, 2009 at 10:16 AM, Joseph S. Myers wrote: > On Tue, 24 Mar 2009, H.J. Lu wrote: > >> Should >> >> struct line { >>        int length; >>        char contents[0]; >>  }; >> >> or >> >> struct line { >>        int length; >>        char contents[]; >>  }; >> >> be allowed to be passed

Re: Should structure with flexible array be allowed to be passed by value?

2009-03-24 Thread Brian Ellis
Pardon my intrusion on this thread, but if I ever coded anything so catastrophically hazardous, I'd want to at least be warned about it... if not slapped on the wrist and told "No No No No NO." Structures with flexible array members must be created dynamically in order to allocate proper space

Re: GCC 4.4.0 Status Report (2009-03-13)

2009-03-24 Thread Tim Prince
Chris Lattner wrote: > > On Mar 23, 2009, at 8:02 PM, Jeff Law wrote: > >> Chris Lattner wrote: > These companies really don't care about FOSS in the same way GCC developers do. I'd be highly confident that this would still be a serious issue for the majority of the companies

Re: Should structure with flexible array be allowed to be passed by value?

2009-03-24 Thread H.J. Lu
On Tue, Mar 24, 2009 at 8:32 AM, Joseph S. Myers wrote: > On Tue, 24 Mar 2009, H.J. Lu wrote: > >> > I see nothing about passing by value different from structure assignment, >> > which ignores the flexible array member (see 6.7.2.1 paragraph 22 (in >> > N1256) for an example stating this).  Altho

Re: GCC 4.4.0 Status Report (2009-03-13)

2009-03-24 Thread Andrew Haley
Chris Lattner wrote: > > On Mar 23, 2009, at 8:02 PM, Jeff Law wrote: > >> Chris Lattner wrote: > These companies really don't care about FOSS in the same way GCC developers do. I'd be highly confident that this would still be a serious issue for the majority of the companies

Re: Should structure with flexible array be allowed to be passed by value?

2009-03-24 Thread Joseph S. Myers
On Tue, 24 Mar 2009, H.J. Lu wrote: > > I see nothing about passing by value different from structure assignment, > > which ignores the flexible array member (see 6.7.2.1 paragraph 22 (in > > N1256) for an example stating this).  Although argument passing and return > > aren't strictly assignments

Re: Should structure with flexible array be allowed to be passed by value?

2009-03-24 Thread H.J. Lu
On Tue, Mar 24, 2009 at 8:16 AM, Joseph S. Myers wrote: > On Tue, 24 Mar 2009, H.J. Lu wrote: > >> Should >> >> struct line { >>        int length; >>        char contents[0]; >>  }; >> >> or >> >> struct line { >>        int length; >>        char contents[]; >>  }; >> >> be allowed to be passed

Re: Should structure with flexible array be allowed to be passed by value?

2009-03-24 Thread Joseph S. Myers
On Tue, 24 Mar 2009, H.J. Lu wrote: > Should > > struct line { >int length; >char contents[0]; > }; > > or > > struct line { >int length; >char contents[]; > }; > > be allowed to be passed by value? If yes, how do you access the contents > field? I see nothi

Should structure with flexible array be allowed to be passed by value?

2009-03-24 Thread H.J. Lu
Gcc supports zero-length array: http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Zero-Length.html#Zero-Length Should struct line { int length; char contents[0]; }; or struct line { int length; char contents[]; }; be allowed to be passed by value? If yes, how do you ac

Re: GCC 4.4.0 Status Report (2009-03-13)

2009-03-24 Thread Chris Lattner
On Mar 23, 2009, at 8:02 PM, Jeff Law wrote: Chris Lattner wrote: These companies really don't care about FOSS in the same way GCC developers do. I'd be highly confident that this would still be a serious issue for the majority of the companies I've interacted with through the years.

Re: GCC 4.4.0 Status Report (2009-03-13)

2009-03-24 Thread Ian Lance Taylor
domi...@lps.ens.fr (Dominique Dhumieres) writes: > > BOSTON, Massachusetts, USA -- Tuesday, January 27, 2009 -- Today the Free > > ^ > > Software Foundation (FSF), together with the GCC Steering Committee and the > >

Re: GCC 4.4.0 Status Report (2009-03-13)

2009-03-24 Thread Richard Kenner
> I'm referring to the customers where I've personally spent time > discussing tools issues. Obviously there are exceptions and > organizations where other motivations come in to play, or are so big > that they have sub-organizations which look at things from totally > different viewpoints.

Re: GCC 4.4.0 Status Report (2009-03-13)

2009-03-24 Thread Andrew Haley
Dominique Dhumieres wrote: >> BOSTON, Massachusetts, USA -- Tuesday, January 27, 2009 -- Today the Free >> ^ >> Software Foundation (FSF), together with the GCC Steering Committee and the >>^^

Re: GCC 4.4.0 Status Report (2009-03-13)

2009-03-24 Thread Dominique Dhumieres
On 23 Mar 2009, Ian Lance Taylor wrote: > > Could someone at FSF, directly or through the SC, be kind enough to > > explain in plain English for non-native speakers why it was so urgent > > to disrupt the release process for a licence exception. > > I don't think any of us know. You would have t

RE: Typo or intended?

2009-03-24 Thread Bingfeng Mei
That's fine. It seems that other targets don't have such issue. Our target is too special and it is still a private port. I can just use optimize < 1 here. Thanks, Bingfeng > -Original Message- > From: Vladimir Makarov [mailto:vmaka...@redhat.com] > Sent: 23 March 2009 19:40 > To: Bing