This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch RFC] SH: Use FRAME_GROWS_DOWNWARD
Joern RENNECKE <joern.rennecke@st.com> wrote:
> Oops, I analyzed the problem with apply_result_mode /
> apply_result_size, but when I intended to return to the function to
> patch it,
> I ended up in apply_args_size. FUNCTION_ARG_REGNO_P is true for
> to all function argument passing registers, so apply_args_mode s hould
> be fine.
builtin-apply4.c passes for sh-elf and sh-elf/-m4 with the new
patch. The tweaked testcase in
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01282.html
passes for sh-elf but fails for sh-elf/-m4. The assembler output
for the last case looks like:
...
jsr @r11 ; <- call foo
fsts fpul,fr11
flds fr0,fpul
sts fpul,r1
mov.l r0,@r14
flds fr1,fpul
mov.l r1,@r10
mov.l r1,@(4,r14)
sts fpul,r1
flds fr2,fpul
mov.l r1,@(4,r10)
sts fpul,r1
mov.l r2,@(8,r14)
flds fr3,fpul
mov.l r1,@(8,r10)
sts fpul,r1
mov.l r3,@(12,r14)
mov.l r1,@(12,r10)
mov.l r4,@(16,r14)
mov.l r5,@(20,r14)
mov.l r6,@(24,r14)
mov.l r7,@(28,r14)
...
and r1 is used to save fr1 before saving itself to the block.
Regards,
kaz