This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
dwarf2 call frame related question
- From: "Dhananjay R. Deshpande" <dhananjayd at KPITCummins dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Tue, 10 Jun 2003 16:21:09 +0530
- Subject: dwarf2 call frame related question
Hi
I am trying to generate stack frame information for h8300-elf.
For H8/300, it is not possible to add/ subtract large constant ( only 1 and 2 ) so the stack pointer adjustment by
frame size is done by moving a constant to a register and then add/subtract register to/from stack pointer.
mov # -12, r3
add r3, r7
If this instruction ( add r3, r7 ) is marked RTX_FRAME_RELATED_P, the following code from
dwarf2out_frame_debug_expr() in dwarf2out.c aborts.
case PLUS:
case MINUS:
case LO_SUM:
if (dest == stack_pointer_rtx)
{
/* Rule 2 */
/* Adjusting SP. */
switch (GET_CODE (XEXP (src, 1)))
{
case CONST_INT:
offset = INTVAL (XEXP (src, 1));
break;
case REG:
if ((unsigned) REGNO (XEXP (src, 1)) != cfa_temp.reg)
abort ();
It appears that this code does not support adjusting of stack pointer by temporary register.
Any help on this is appreciated.
Regards,
Dhananjay