summaryrefslogtreecommitdiff
path: root/gcc/config/m68k
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-07-08 13:21:01 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-07-08 13:21:01 +0000
commit0e2433cf63642d9d26c84f34d4fbef14f06fbe4d (patch)
tree070c3bf96cd8d40c5c4df0cca0a61e2fd16cdc04 /gcc/config/m68k
parenta7aa6a4f8bc55f4f2c3eb3e049d14cf39d568bc5 (diff)
downloadgcc-0e2433cf63642d9d26c84f34d4fbef14f06fbe4d.tar.gz
* m68k.c (output_function_prologue): Add pic register to mask if live and flag_pic. (output_function_epilogue): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28023 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r--gcc/config/m68k/m68k.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 9d1a37f9abb..0431750b5f1 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -357,6 +357,8 @@ output_function_prologue (stream, size)
mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM));
num_saved_regs--;
}
+ if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+ mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
#if NEED_PROBE
#ifdef MOTOROLA
@@ -564,6 +566,11 @@ output_function_epilogue (stream, size)
nregs++;
mask |= 1 << regno;
}
+ if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+ {
+ nregs++;
+ mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
+ }
offset = foffset + nregs * 4;
/* FIXME : leaf_function_p below is too strong.
What we really need to know there is if there could be pending