aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarc Espie <espie@openbsd.org>2001-09-14 16:40:12 +0000
committerMarc Espie <espie@gcc.gnu.org>2001-09-14 16:40:12 +0000
commit95a37e3f62483eefecdca236d5c90c368603809b (patch)
treef6859b13492ea2dce5817b0262e28291a4bce71a /gcc
parente91c2a245c5f8019adb23fcc1b7a2818758eaae6 (diff)
downloadgcc-95a37e3f62483eefecdca236d5c90c368603809b.zip
gcc-95a37e3f62483eefecdca236d5c90c368603809b.tar.gz
gcc-95a37e3f62483eefecdca236d5c90c368603809b.tar.bz2
unix.h (ASM_OUTPUT_MI_THUNK): Generate reference to GOT correctly.
2001-09-14 Marc Espie <espie@openbsd.org> * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Generate reference to GOT correctly. From-SVN: r45601
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/i386/unix.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5855c43..1e15f4f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2001-09-14 Marc Espie <espie@openbsd.org>
+ * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Generate reference to GOT
+ correctly.
+
2001-09-14 Roman Lechtchinsky <rl@cs.tu-berlin.de>
* config/alpha/alpha.md (unaligned_extendhidi_be): Fix.
diff --git a/gcc/config/i386/unix.h b/gcc/config/i386/unix.h
index a1fab03..1fe829a 100644
--- a/gcc/config/i386/unix.h
+++ b/gcc/config/i386/unix.h
@@ -87,7 +87,7 @@ Boston, MA 02111-1307, USA. */
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
do { \
tree parm; \
- rtx xops[2]; \
+ rtx xops[3]; \
\
if (ix86_regparm > 0) \
parm = TYPE_ARG_TYPES (TREE_TYPE (function)); \
@@ -110,6 +110,7 @@ do { \
{ \
xops[0] = pic_offset_table_rtx; \
xops[1] = gen_label_rtx (); \
+ xops[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); \
\
if (ix86_regparm > 2) \
abort (); \
@@ -117,7 +118,7 @@ do { \
output_asm_insn ("call\t%P1", xops); \
ASM_OUTPUT_INTERNAL_LABEL (FILE, "L", CODE_LABEL_NUMBER (xops[1])); \
output_asm_insn ("pop{l}\t%0", xops); \
- output_asm_insn ("add{l}\t{$_GLOBAL_OFFSET_TABLE_+[.-%P1], %0|%0, OFFSET FLAT: _GLOBAL_OFFSET_TABLE_+[.-%P1]}", xops); \
+ output_asm_insn ("add{l}\t{%2+[.-%P1], %0|%0, OFFSET FLAT: %2+[.-%P1]}", xops); \
xops[0] = gen_rtx_MEM (SImode, XEXP (DECL_RTL (FUNCTION), 0)); \
output_asm_insn ("mov{l}\t{%0@GOT(%%ebx), %%ecx|%%ecx, %0@GOT[%%ebx]}",\
xops); \