Richard Henderson wrote: > emit_stack_restore (SAVE_BLOCK, old_stack_level); > stack_pointer_delta = old_stack_pointer_delta; > + > + /* ??? Is this assert warrented, given emit_stack_restore? > + or should we just mark the last insn no matter what? */ > + last = get_last_insn (); > + set = single_set (last); > + gcc_assert (set != NULL); > + gcc_assert (SET_DEST (set) == stack_pointer_rtx);
This assert triggers on spu-elf, because our restore_stack_block pattern emits something else as its last instruction: we restore a stack backchain link after restoring the stack pointer. Even if we were to swap the order to restore the backchain first, like rs6000 does, the assert would still trigger, since we cannot use stack_pointer_rtx to restore the stack pointer; this is because on SPU, the stack pointer is a vector register, and the ABI says to maintain the remaining free stack space in a high slot of that vector. Therefore, restore_stack_block uses a vector add into a register generated via gen_rtx_REG (V4SImode, STACK_POINTER_REGNUM) instead of just plain stack_pointer_rtx ... Was this assert intended to impose requirements on target's restore_stack_block implemtations? What exactly are those supposed to be? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE ulrich.weig...@de.ibm.com