Skip site navigation (1) Skip section navigation (2)

Re: Regression fails on Alpha True64 V5.0 for

From: "Tegge, Bernd" <tegge(at)repas-aeg(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-ports(at)postgresql(dot)org
Subject: Re: Regression fails on Alpha True64 V5.0 for
Date: 2001-11-19 18:56:46
Message-ID: (view raw or whole thread)
Lists: pgsql-ports
Am 11:38 19.11.01 -0500 schrieb Tom Lane:
> > Hmm.  The "memcpy" at that line is intended specifically to get around
> > any possible misaligned-pointer problem.  I have a nasty feeling that
> > Compaq's compiler is misoptimizing the memcpy into a
> > load-and-store-double kind of instruction sequence.

I wouldn't be surprised. Memcpy et al. are being inlined at even O-level 1.
The optimizer might notice a data size of 8 and reduce the code to a single
load/store operation. However, this is usually only a performance problem.
You get an alignment exception and the exception handler corrects the
fetches/writes the missing part ( besides writing the address to stdout).

BTW. : The Linux version of the Compaq Compiler is available for download
from You can even
sign up for a test account on an True64 or Linux/Alpha system.

>If it is doing that, perhaps it could be convinced not to with
>explicit casts, say
>memcpy((void *) &sumX, (void *) DatumGetIntervalP(transdatums[0]), 
>memcpy((void *) &N, (void *) DatumGetIntervalP(transdatums[1]), 

Nope, this does not fix it. Compiling timestamp.c with the additional
options "-noinline -nointrinsic" does, but I would still hesitate to
use this on the whole project.

>(note similar code in interval_avg would also need to be fixed).  If
>that works it'd be nicer than making a global reduction in optimization

I've got a rather ugly but usable workaround. See attached timestamp.c
If you can think of anything better, I'm open to suggestions.

In response to


pgsql-ports by date

Next:From: Tom LaneDate: 2001-11-19 19:27:36
Subject: Re: Regression fails on Alpha True64 V5.0 for yesterdays cvs
Previous:From: Tom LaneDate: 2001-11-19 16:31:42
Subject: Re: Regression fails on Alpha True64 V5.0 for yesterdays cvs

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group