This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] m68k: don't try to push bytes
> Speaking of parenthesis, There's a pair around the < that is
> unneeded, and not one around the entire expression, which is.
I'll fix it.
> But why would 5200 want to allow byte pushing when 68000 doesn't?
The 5200 can push a single byte and have it end up in the right place
on the stack, with the stack pointer incremented by one. Other m68k
chips increment the stack pointer by *two*, and put the single byte in
the wrong half of the 16-bit slot (at least, that's what the comments
in m68k.c say). The m68k.c file has some code to work around it, but
it confesses that it's not right for pushing multi-byte structs.
While the m68k has PUSH_ROUNDING defined correctly, move_by_parts
ignores it, and attemps to convert a 2-byte unaligned push to two
1-byte pushes. I contemplated adding something like "&&
PUSH_ROUNDING(align) == align" to the tests for choosing
move_by_parts, but there was already a macro the m68k could use, so I
used it.