aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2003-08-19 17:17:27 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2003-08-19 10:17:27 -0700
commit86ecdfb60e9fd88c17351cd0cacf57a98f99ee7f (patch)
tree5a1332147dacf7a7733eaabefa288de5f76844b7
parent7f5d157fce49ba47b52d1952f0da088ac93ae538 (diff)
downloadgcc-86ecdfb60e9fd88c17351cd0cacf57a98f99ee7f.zip
gcc-86ecdfb60e9fd88c17351cd0cacf57a98f99ee7f.tar.gz
gcc-86ecdfb60e9fd88c17351cd0cacf57a98f99ee7f.tar.bz2
i386.c (legitimate_pic_address_disp_p): Change the strstr with $pb to a strcompare with "<pic base>"
2003-08-19 Andrew Pinski <pinskia@physics.uc.edu> * config/i386/i386.c (legitimate_pic_address_disp_p): Change the strstr with $pb to a strcompare with "<pic base>" (ix86_output_addr_diff_elt): Output the real pic base. From-SVN: r70569
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8c8825a..f323db2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * config/i386/i386.c (legitimate_pic_address_disp_p): Change the
+ strstr with $pb to a strcompare with "<pic base>"
+ (ix86_output_addr_diff_elt): Output the real pic base.
+
2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
* langhooks-def.h (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index db404f0..3cba33a 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5715,7 +5715,7 @@ legitimate_pic_address_disp_p (register rtx disp)
if (GET_CODE (XEXP (disp, 1)) == SYMBOL_REF)
{
const char *sym_name = XSTR (XEXP (disp, 1), 0);
- if (strstr (sym_name, "$pb") != 0)
+ if (! strcmp (sym_name, "<pic base>"))
return 1;
}
}
@@ -8027,8 +8027,11 @@ ix86_output_addr_diff_elt (FILE *file, int value, int rel)
fprintf (file, "%s%s%d@GOTOFF\n", ASM_LONG, LPREFIX, value);
#if TARGET_MACHO
else if (TARGET_MACHO)
- fprintf (file, "%s%s%d-%s\n", ASM_LONG, LPREFIX, value,
- machopic_function_base_name () + 1);
+ {
+ fprintf (file, "%s%s%d-", ASM_LONG, LPREFIX, value);
+ machopic_output_function_base_name (file);
+ fprintf(file, "\n");
+ }
#endif
else
asm_fprintf (file, "%s%U%s+[.-%s%d]\n",