PR target/68467 is libgcc failing to build for m68k-linux-gnu configured for ColdFire. Jeff has an analysis in the PR identifying the problem as resulting from the callers of libcalls with 1-byte or 2-byte arguments wanting to push just 1 or 2 bytes on the stack, while the libcall implementations have the normal C ABI and expect 4-byte arguments. For normal C functions, I believe the TARGET_PROMOTE_PROTOTYPES definition would ensure such arguments get passed as 4-byte, but that does not apply for libcalls. This patch fixes the issue by defining TARGET_PROMOTE_FUNCTION_MODE for m68k. The definition is conservative, only applying promotions in the case of arguments to libcalls; otherwise it returns the unpromoted type, which I believe matches what the default implementation of the hook would have done on m68k. I have tested that this fixes the libgcc build for ColdFire, and, in conjunction with one glibc patch, this enables glibc to build cleanly for ColdFire and to pass the compilation parts of the glibc testsuite except for one test unrelated to this patch (while glibc and the compilation parts of the testsuite continue to build OK for non-ColdFire m68k, as expected). I have *not* run any GCC tests for this patch, or any execution tests for m68k. PR target/68467 * config/m68k/m68k.c (m68k_promote_function_mode): New function. (TARGET_PROMOTE_FUNCTION_MODE): New macro. From-SVN: r257032
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
cf.md | Loading commit data... | |
constraints.md | Loading commit data... | |
genopt.sh | Loading commit data... | |
ieee.opt | Loading commit data... | |
linux.h | Loading commit data... | |
m68020-elf.h | Loading commit data... | |
m68k-devices.def | Loading commit data... | |
m68k-isas.def | Loading commit data... | |
m68k-microarchs.def | Loading commit data... | |
m68k-modes.def | Loading commit data... | |
m68k-none.h | Loading commit data... | |
m68k-opts.h | Loading commit data... | |
m68k-protos.h | Loading commit data... | |
m68k-tables.opt | Loading commit data... | |
m68k.c | Loading commit data... | |
m68k.h | Loading commit data... | |
m68k.md | Loading commit data... | |
m68k.opt | Loading commit data... | |
m68kelf.h | Loading commit data... | |
m68kemb.h | Loading commit data... | |
math-68881.h | Loading commit data... | |
netbsd-elf.h | Loading commit data... | |
openbsd.h | Loading commit data... | |
predicates.md | Loading commit data... | |
print-sysroot-suffix.sh | Loading commit data... | |
rtemself.h | Loading commit data... | |
sync.md | Loading commit data... | |
t-cf | Loading commit data... | |
t-linux | Loading commit data... | |
t-m68k | Loading commit data... | |
t-m68kbare | Loading commit data... | |
t-mlibs | Loading commit data... | |
t-openbsd | Loading commit data... | |
t-opts | Loading commit data... | |
t-rtems | Loading commit data... | |
t-uclinux | Loading commit data... | |
uclinux.h | Loading commit data... | |
uclinux.opt | Loading commit data... |