This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: complex support on alpha
On Sun, Oct 05, 1997 at 07:14:09PM -0400, Weiwen Liu wrote:
> On Wed, 1 Oct 1997, Richard Henderson wrote:
>
> > Well, it is enough to compile those examples properly, but it is
> > not completely correct. The problem is that complex numbers should
> > be treated as two distinct arguments on Alpha, which affects padding
> > of the arguments passed on the stack.
[...]
> On an alpha-dec-osf4.0, this patch correctly compiles the following test
> program with F=char, short, int, long, float, double:
No good.
(1) It is still treating complex float as an 8-byte struct not two
_separate_ float arguments. I sent you f2a and f2b so that you
could verify that their arguments wound up in the same place, but
f2b:
lds $f10,16($30)
lds $f11,20($30)
f2a:
lds $f10,16($30)
lds $f11,24($30)
(2) f1, the one with odd numbered arguments, is _completely_ wrong:
f1:
lda $30,-16($30)
.prologue 0
sts $f21,8($30)
lds $f10,12($30)
Did we write to 12($30), which is below the vfp? No. Your program
happened to run because of this bit from main:
sts $f3,-4($30)
which is a big no-no. No writes may be made below $sp. You take a
signal after that instruction and your data will be corrupted.
r~