--- Andrew Haley <[EMAIL PROTECTED]> wrote:
> Etienne Lorrain writes:
> > > The correct version is I think,
> > >
> > > void longcpy(long* _dst, long* _src, unsigned _numwords)
> > > {
> > > asm volatile (
> > > "cld \n\t"
> > > "rep \n\t"
> > >
[EMAIL PROTECTED] writes:
> On Tue, Jun 13, 2006 at 12:01:39PM +0100, Andrew Haley wrote:
> >
> > All you've got here is an inline asm version of
> >
> > inline void longcpy(long* _dst, long* _src, unsigned _numwords)
> > {
> > __builtin_memcpy (_dst, _src, _numwords * sizeof (long));
Etienne Lorrain writes:
> > The correct version is I think,
> >
> > void longcpy(long* _dst, long* _src, unsigned _numwords)
> > {
> > asm volatile (
> > "cld \n\t"
> > "rep \n\t"
> > "movsl \n\t"
> >// Outputs (read/write)
> >
> The correct version is I think,
>
> void longcpy(long* _dst, long* _src, unsigned _numwords)
> {
> asm volatile (
> "cld \n\t"
> "rep \n\t"
> "movsl \n\t"
> // Outputs (read/write)
> : "=S" (_src), "=D" (_dst), "=c" (_numwords)
>
On Tue, Jun 13, 2006 at 12:01:39PM +0100, Andrew Haley wrote:
>
> All you've got here is an inline asm version of
>
> inline void longcpy(long* _dst, long* _src, unsigned _numwords)
> {
> __builtin_memcpy (_dst, _src, _numwords * sizeof (long));
> }
>
> which gcc will optimize if it can.
>
[EMAIL PROTECTED] writes:
> On Tue, Jun 13, 2006 at 10:37:29AM +, [EMAIL PROTECTED] wrote:
> > On Mon, Jun 12, 2006 at 04:59:04PM -0700, Ian Lance Taylor wrote:
> > >
> > > Probably better to say that these are read-write operands, using the
> > > '+' constraint.
> > >
> > > > Now ever
On Tue, Jun 13, 2006 at 10:37:29AM +, [EMAIL PROTECTED] wrote:
> On Mon, Jun 12, 2006 at 04:59:04PM -0700, Ian Lance Taylor wrote:
> >
> > Probably better to say that these are read-write operands, using the
> > '+' constraint.
> >
> > > Now everything works fine at -O3. However, I really don
On Mon, Jun 12, 2006 at 04:59:04PM -0700, Ian Lance Taylor wrote:
>
> Probably better to say that these are read-write operands, using the
> '+' constraint.
>
> > Now everything works fine at -O3. However, I really don't understand
> > the '&' early clobber constraint modifer. What use is it?
>
[EMAIL PROTECTED] writes:
> void longcpy(long* _dst, long* _src, unsigned _numwords)
> {
> asm volatile (
> "cld \n\t"
> "rep \n\t"
> "movsl \n\t"
> // Outputs
> :
> // Inputs
> : "S" (_src), "D" (_dst), "c" (_numwords)
Ok, I think I have tracked this down to having broken the aliasing
rules, and for the sake of completeness, here was the problem:
Recall that the (big picture) code works fine at -O2, but fails at
-O3. The problem seemed to stem from this inline assembly function:
void longcpy(long* _dst, long* _
On Jun 12, 2006, at 5:45 AM, [EMAIL PROTECTED] wrote:
Well, my point above was that -strict-aliasing is included in -O2 and
my code works fine at -O2. Only -O3 causes problems, so I didn't
expect
-fno-strict-aliasing to make any difference.
Code in violation of the aliasing rules can appear
[EMAIL PROTECTED] writes:
>
> Well, my point above was that -strict-aliasing is included in -O2 and
> my code works fine at -O2. Only -O3 causes problems, so I didn't expect
> -fno-strict-aliasing to make any difference.
That doesn't follow at all. -O3 exposes much more information to the
co
On Mon, Jun 12, 2006 at 01:40:18PM +0100, Andrew Haley wrote:
> [EMAIL PROTECTED] writes:
> > On Mon, Jun 12, 2006 at 12:30:50PM +, [EMAIL PROTECTED] wrote:
> > > On Mon, Jun 12, 2006 at 02:21:21PM +0200, Richard Guenther wrote:
> > > > On 6/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote
[EMAIL PROTECTED] writes:
> On Mon, Jun 12, 2006 at 12:30:50PM +, [EMAIL PROTECTED] wrote:
> > On Mon, Jun 12, 2006 at 02:21:21PM +0200, Richard Guenther wrote:
> > > On 6/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > >On Mon, Jun 12, 2006 at 01:01:47PM +0100, Andrew Haley wrote
[EMAIL PROTECTED] writes:
> On Mon, Jun 12, 2006 at 02:21:21PM +0200, Richard Guenther wrote:
> > On 6/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >On Mon, Jun 12, 2006 at 01:01:47PM +0100, Andrew Haley wrote:
> > >>
> > >> I'm starting to be a little suspicious about host2little()
On Mon, Jun 12, 2006 at 12:30:50PM +, [EMAIL PROTECTED] wrote:
> On Mon, Jun 12, 2006 at 02:21:21PM +0200, Richard Guenther wrote:
> > On 6/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >On Mon, Jun 12, 2006 at 01:01:47PM +0100, Andrew Haley wrote:
> > >>
> > >> I'm starting to be a l
On Mon, Jun 12, 2006 at 02:21:21PM +0200, Richard Guenther wrote:
> On 6/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >On Mon, Jun 12, 2006 at 01:01:47PM +0100, Andrew Haley wrote:
> >>
> >> I'm starting to be a little suspicious about host2little(). I wonder
> >> if that's well-defined.
Richard Guenther writes:
> On 6/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > On Mon, Jun 12, 2006 at 01:01:47PM +0100, Andrew Haley wrote:
> > >
> > > I'm starting to be a little suspicious about host2little(). I wonder
> > > if that's well-defined.
> > >
> > > I'm just guessing
[EMAIL PROTECTED] writes:
> On Mon, Jun 12, 2006 at 01:01:47PM +0100, Andrew Haley wrote:
> >
> > I'm starting to be a little suspicious about host2little(). I wonder
> > if that's well-defined.
> >
> > I'm just guessing here becasue I can't see the code. Is it possible
>
> templat
On 6/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Mon, Jun 12, 2006 at 01:01:47PM +0100, Andrew Haley wrote:
>
> I'm starting to be a little suspicious about host2little(). I wonder
> if that's well-defined.
>
> I'm just guessing here becasue I can't see the code. Is it possible
On Mon, Jun 12, 2006 at 01:01:47PM +0100, Andrew Haley wrote:
>
> I'm starting to be a little suspicious about host2little(). I wonder
> if that's well-defined.
>
> I'm just guessing here becasue I can't see the code. Is it possible
template T swap_endian(T x)
{
char* a = reint
[EMAIL PROTECTED] writes:
> On Mon, Jun 12, 2006 at 12:32:36PM +0100, Andrew Haley wrote:
> > [EMAIL PROTECTED] writes:
> > > I want a reduced test case for this problem for bugzilla, but don't
> > > really know the exact cause. I _think_ code is being improperly
> > > optimized away, but I
On Mon, Jun 12, 2006 at 12:32:36PM +0100, Andrew Haley wrote:
> [EMAIL PROTECTED] writes:
> > I want a reduced test case for this problem for bugzilla, but don't
> > really know the exact cause. I _think_ code is being improperly
> > optimized away, but I don't know. This function is part of a
>
[EMAIL PROTECTED] writes:
> I want a reduced test case for this problem for bugzilla, but don't
> really know the exact cause. I _think_ code is being improperly
> optimized away, but I don't know. This function is part of a
> BigInteger library, and works perfectly upto and including -O2, but
I want a reduced test case for this problem for bugzilla, but don't
really know the exact cause. I _think_ code is being improperly
optimized away, but I don't know. This function is part of a
BigInteger library, and works perfectly upto and including -O2, but
produces bogus results at -O3, unless
25 matches
Mail list logo