Commit 66c432a7 by Richard Stallman

(output_function_prologue): Use m68k svr4 PIC format to load the address of...

(output_function_prologue): Use m68k svr4 PIC format to
load the address of _GLOBAL_OFFSET_TABLE_ into PIC_OFFSET_TABLE_REG
in function prologue when doing PIC.

(print_operand_address): Always add "@GOT" suffix for the
global object operand when doing PIC.

From-SVN: r3595
parent 2b362d2c
......@@ -216,10 +216,7 @@ output_function_prologue (stream, size)
if (flag_pic && current_function_uses_pic_offset_table)
{
#ifdef MOTOROLA
asm_fprintf (stream, "\t%Omove.l %0I__GLOBAL_OFFSET_TABLE_, %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM]);
asm_fprintf (stream, "\tlea.l (%Rpc,%s.l),%s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM],
asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM]);
#else
asm_fprintf (stream, "\tmovel %0I__GLOBAL_OFFSET_TABLE_, %s\n",
......@@ -1873,10 +1870,8 @@ print_operand_address (file, addr)
if (addr != 0)
{
output_addr_const (file, addr);
if ((flag_pic == 1) && (breg == pic_offset_table_rtx))
fprintf (file, ".w");
if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
fprintf (file, ".l");
if (flag_pic && (breg == pic_offset_table_rtx))
fprintf (file, "@GOT");
}
fprintf (file, "(%s", reg_names[REGNO (breg)]);
if (ireg != 0)
......
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