This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix for mips PR12485
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 03 Oct 2003 08:00:09 +0100
- Subject: Fix for mips PR12485
This patch fixes PR12485, in which we thought GOT accesses might trap.
Tested on mips64-linux-gnu, committed as obvious.
PR target/12485
* config/mips/mips.c (mips_load_got): GOT accesses can't trap.
Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.318
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.318 mips.c
*** config/mips/mips.c 2 Oct 2003 00:44:24 -0000 1.318
--- config/mips/mips.c 2 Oct 2003 11:18:46 -0000
*************** mips_load_got (rtx base, rtx addr, int r
*** 1634,1639 ****
--- 1700,1708 ----
gen_rtx_PLUS (Pmode, base, mips_reloc (addr, reloc)));
set_mem_alias_set (mem, mips_got_alias_set);
+ /* GOT references can't trap. */
+ MEM_NOTRAP_P (mem) = 1;
+
/* If we allow a function's address to be lazily bound, its entry
may change after the first call. Other entries are constant. */
if (reloc != RELOC_CALL16 && reloc != RELOC_CALL_LO)