[Sparc] size of input arguments with doubles in llvm byte code?

Hi,

I have a llvm asssembly version of radix_mod.c modified from radix (a
splash2 bench mark). It is named radix.bc.

I have extended the number of arguments from 2 to 4 in the function called
product_mod_46 and saved it as a new file called radix_mod.bc . Although the
extra arguments does not do anything in the function. It still broke the
code on sparc. However, both versions of the byte code work well on Linux.

I also attached the Sparc assembly code for reference:

radix.bc -> radix_suno.s
radix_mod.bc -> radix_sun.s

Any idea what could be going wrong by doubling the number of arguments in a
function?

Thanks,

Chris

http://old.nabble.com/file/p33219240/radix_mod.c radix_mod.c
http://old.nabble.com/file/p33219240/radix.bc radix.bc
http://old.nabble.com/file/p33219240/radix_mod.bc radix_mod.bc

ckathy wrote:

Hi,

I have a llvm asssembly version of radix_mod.c modified from radix (a
splash2 bench mark). It is named radix.bc.

I have extended the number of arguments from 2 to 4 in the function called
product_mod_46 and saved it as a new file called radix_mod.bc . Although
the extra arguments does not do anything in the function. It still broke
the code on sparc. However, both versions of the byte code work well on
Linux.

I also attached the Sparc assembly code for reference:

radix.bc -> radix_suno.s
radix_mod.bc -> radix_sun.s

Any idea what could be going wrong by doubling the number of arguments in
a function?

Thanks,

Chris

http://old.nabble.com/file/p33219240/radix_mod.c radix_mod.c
http://old.nabble.com/file/p33219240/radix.bc radix.bc
http://old.nabble.com/file/p33219240/radix_mod.bc radix_mod.bc

http://old.nabble.com/file/p33219245/radix_sun.s radix_sun.s

Hi,

I think that I have found a bug in the translated Sparc assembly.

In the Sparc code, it uses 'store double' to store the double precision
floating point values. In that particular function, the numbers are so big
that it needs to use the space for reg window pointed by %sp as the store
double destination, in addition to the usual space for the locals pointed by
%fp.

'store double' is okay with space pointed by %fp but not the space pointed
by %sp. After I convert the 'store double' operation into two 'store
(single)' operations to store the double into stack space, the program
works!

ckathy wrote:

Hi,

I think that I have found a bug in the translated Sparc assembly.

In the Sparc code, it uses 'store double' to store the double precision
floating point values. In that particular function, the numbers are so big
that it needs to use the space for reg window pointed by %sp as the store
double destination, in addition to the usual space for the locals pointed by
%fp.

'store double' is okay with space pointed by %fp but not the space pointed
by %sp. After I convert the 'store double' operation into two 'store
(single)' operations to store the double into stack space, the program
works!

ckathy wrote: