[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Math-atlas-devel] Wrapping assembly into C files.



Peter,

>The beta=0 and beta=1 cases works fine, but I cannot get the beta=X case
>to work. It seems to me that you copy the value of beta to a local
>variable with "fstpl 0x40" and "fldl 0x40" (in nasm "fstp qword [0x40]"
>and  "fld qword [0x40]").

This is probably not your prob, but if you are using gcc, you need to be
aware that it automatically allocates a register for any scalar used in
a loop (such as beta).  You have to take action to prevent it from recognizing
that beta is not changing.  For an example of this, scope
   ATLAS/tune/blas/gemm/CASES/ATL_mm4x4x2US_NB.c
where I use a pointer for all in-loop accesses to beta . . .

What I'm wondering is if gcc's messing up your assembler by using one of your
resgisters for beta, which will kind of randomly screws up your code . . .

Let me know,
Clint