This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ColdFire 55/63] Add support for vcall_offset thunks
On Wed, 2007-01-10 at 12:13 +0000, Richard Sandiford wrote:
> This patch makes m68k_output_mi_thunk hnour vcall_offset. It was
> easier to do this in rtl than by writing assembly directly, so the
> patch converts the entire function to use rtl.
>
> The main difficulty is in using a call-clobbered PIC register for the
> duration of the thunk. I've used the same PIC_OFFSET_TABLE_REGNUM trick
> that x86 and MIPS use.
>
> Richard
>
>
> gcc/
> * config/m68k/m68k.h (PIC_OFFSET_TABLE_REGNUM): Use the REGNO
> of pic_offset_table_rtx if reload_completed.
> (CONDITIONAL_REGISTER_USAGE): Use PIC_REG instead of
> PIC_OFFSET_TABLE_REGNUM.
> * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Always
> return true.
> (m68k_save_reg): Use PIC_REG instead of PIC_OFFSET_TABLE_REGNO.
> (m68k_output_mi_thunk): Rewrite to use RTL. Honor vcall_offset.
OK.
Jeff