This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Darwin specific codegen improvement (3)
- From: Dale Johannesen <dalej at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Dec 2001 11:46:02 -0800
- Subject: PATCH: Darwin specific codegen improvement (3)
Correct the (Darwin specific) generation of addresses within
very large data objects.
2001-12-05 Dale Johannesen <dalej@apple.com>
* config/rs6000/rs6000.c (rs6000_machopic_legitimize_pic_address):
Fix darwin-specific generation of addresses within very large
data objects.
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.250
diff -u -d -b -w -c -3 -p -r1.250 rs6000.c
*** rs6000.c 2001/12/03 19:13:35 1.250
--- rs6000.c 2001/12/05 19:12:33
*************** machopic_output_stub (file, symb, stub)
*** 9901,9907 ****
position-independent addresses go into a reg. This is REG if non
zero, otherwise we allocate register(s) as necessary. */
! #define SMALL_INT(X) ((unsigned) (INTVAL(X) + 0x4000) < 0x8000)
rtx
rs6000_machopic_legitimize_pic_address (orig, mode, reg)
--- 9908,9914 ----
position-independent addresses go into a reg. This is REG if non
zero, otherwise we allocate register(s) as necessary. */
! #define SMALL_INT(X) ((unsigned) (INTVAL(X) + 0x8000) < 0x10000)
rtx
rs6000_machopic_legitimize_pic_address (orig, mode, reg)
*************** rs6000_machopic_legitimize_pic_address (
*** 9939,9945 ****
else if (! reload_in_progress && ! reload_completed)
offset = force_reg (Pmode, offset);
else
! abort ();
}
return gen_rtx (PLUS, Pmode, base, offset);
}
--- 9946,9955 ----
else if (! reload_in_progress && ! reload_completed)
offset = force_reg (Pmode, offset);
else
! {
! rtx mem = force_const_mem (Pmode, orig);
! return machopic_legitimize_pic_address (mem, Pmode, reg);
! }
}
return gen_rtx (PLUS, Pmode, base, offset);
}