Commit 8f9f5b12 by Richard Henderson Committed by Jeff Law

m68k.c (output_function_prologue): Add pic register to mask if live and flag_pic.

�
        * m68k.c (output_function_prologue): Add pic register to mask
        if live and flag_pic.
        (output_function_epilogue): Likewise.

From-SVN: r28023
parent ca21e4da
...@@ -357,6 +357,8 @@ output_function_prologue (stream, size) ...@@ -357,6 +357,8 @@ output_function_prologue (stream, size)
mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM)); mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM));
num_saved_regs--; num_saved_regs--;
} }
if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
#if NEED_PROBE #if NEED_PROBE
#ifdef MOTOROLA #ifdef MOTOROLA
...@@ -564,6 +566,11 @@ output_function_epilogue (stream, size) ...@@ -564,6 +566,11 @@ output_function_epilogue (stream, size)
nregs++; nregs++;
mask |= 1 << regno; mask |= 1 << regno;
} }
if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
{
nregs++;
mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
}
offset = foffset + nregs * 4; offset = foffset + nregs * 4;
/* FIXME : leaf_function_p below is too strong. /* FIXME : leaf_function_p below is too strong.
What we really need to know there is if there could be pending What we really need to know there is if there could be pending
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment