http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28896
--- Comment #42 from Larry Baker <baker at usgs dot gov> 2012-09-25 20:39:10 UTC --- Change log for patches here. The patches here implement GCC stack limit checking for Freescale ColdFire processors (bug no. 28896) and fix the issues identified in the existing GCC source code (bug nos. 53833 and 54584). GCC version 4.6 and later (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28896): • gcc/config/m68k/m68k.md – Modify the expansion of "movsi" pseudo instructions that require PIC relocation to use the destination register for all cases when a pseudo register cannot be created (vs. only when reload_in_progress is set). • gcc/config/m68k/m68k.md – Implement a code generator for the generic conditional trap instruction pattern ("*conditional_trap") for all M68000-family processors. Rename the M68020 processor-specific conditional trap instruction pattern (from "*conditional_trap" to "*conditional_trap_68020"). • gcc/config/m68k/m68k.md – Remove the M68020 processor-specific filter on the conditional trap pseudo instructions "ctrapdi4", "ctrapsi4", "ctraphi4", and "ctrapqi4". • gcc/config/m68k/m68k.c – Compare the stack limit with the stack frame size (fsize_with_regs) after it has been adjusted for the additional stack space used by ColdFire processors (vs. the unadjusted current_frame.size). • gcc/config/m68k/m68k.c – Use a temporary Global Offset Table (GOT) pointer register, a0, for PIC code. • gcc/config/m68k/m68k.c – Change the temporary register used for the stack limit check to address register a0 (vs. data register d0) to enable the code generator to emit a load effective address (lea) instruction. • gcc/config/m68k/m68k.c – Check a stack limit register value before the stack is allocated (vs. after). • gcc/config/m68k/m68k.c – Move the implementation of stack limit checking from the "prologue" pseudo instruction code generator, m68k_expand_prologue, to a new TARGET_ASM_FUNCTION_PROLOGUE compiler hook function, m68k_function_prologue. (Eliminates the need to save/restore the GOT pointer register, a5, if done in m68k_expand_prologue.) • gcc/opts-global.c and gcc/config/m68k/m68k.c – Reject the use of a floating-point registers (fpn), a volatile registers (d0, d1, a0, a1), or the stack pointer (sp) as the stack limit register. GCC version 4.7 and later (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833) • libgcc/config.host – Disable atomics for ColdFire processors (internal compiler error). GCC version 4.7 and later (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584) • gcc/config/m68k/uclinux.h – Disable Transactional Memory for uClinux (-msep-data/-fPIC -elf2flt final link failure).