aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1993-10-13 14:57:48 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1993-10-13 14:57:48 +0000
commitcd93179bd4b7aaa62111c9d9d5bf83770bdcd0c9 (patch)
treeb2ee840540c85d4993696609ffc7b796eb231030 /gcc/config/i386
parenteb5ad42ab31f67d1434271023648a2401380ff01 (diff)
downloadgcc-cd93179bd4b7aaa62111c9d9d5bf83770bdcd0c9.zip
gcc-cd93179bd4b7aaa62111c9d9d5bf83770bdcd0c9.tar.gz
gcc-cd93179bd4b7aaa62111c9d9d5bf83770bdcd0c9.tar.bz2
Define ASM_OUTPUT_ADDR_DIFF_ELT; save some cycles in profiling.
From-SVN: r5770
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/osfrose.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h
index 42b1037..2b94588 100644
--- a/gcc/config/i386/osfrose.h
+++ b/gcc/config/i386/osfrose.h
@@ -200,8 +200,7 @@ do \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
fprintf (FILE, "\tmovl %s%s,%%eax\n", prefix, \
XSTR (symref, 0)); \
- fprintf (FILE, "\tmovl (%%eax),%%eax\n"); \
- fprintf (FILE, "\tcall *%%eax\n"); \
+ fprintf (FILE, "\tcall *(%%eax)\n"); \
} \
\
else \
@@ -216,8 +215,7 @@ do \
lprefix, labelno); \
fprintf (FILE, "\tmovl %s_mcount_ptr@GOT(%%eax),%%eax\n", \
prefix); \
- fprintf (FILE, "\tmovl (%%eax),%%eax\n"); \
- fprintf (FILE, "\tcall *%%eax\n"); \
+ fprintf (FILE, "\tcall *(%%eax)\n"); \
} \
} \
\
@@ -271,8 +269,7 @@ do \
HALF_PIC_EXTERNAL ("mcount"); \
symdef = HALF_PIC_PTR (gen_rtx (SYMBOL_REF, Pmode, "mcount")); \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
- fprintf (FILE, "\tmovl %s%s,%%eax\n", prefix, XSTR (symdef, 0)); \
- fprintf (FILE, "\tcall *%%eax\n"); \
+ fprintf (FILE, "\tcall *%s%s\n", prefix, XSTR (symdef, 0)); \
} \
\
else if (TARGET_MCOUNT) \
@@ -288,8 +285,7 @@ do \
fprintf (FILE, "\tleal $%sP%d@GOTOFF(%%ebx),%%edx\n", \
lprefix, labelno); \
fprintf (FILE, "\tmovl _mcount_ptr@GOT(%%eax),%%eax\n"); \
- fprintf (FILE, "\tmovl (%%eax),%%eax\n"); \
- fprintf (FILE, "\tcall *%%eax\n"); \
+ fprintf (FILE, "\tcall *(%%eax)\n"); \
fprintf (FILE, "\tpopl %%eax\n"); \
} \
\
@@ -424,6 +420,14 @@ while (0)
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
fprintf (FILE, "%s%s", (TARGET_UNDERSCORES) ? "_" : "", NAME)
+/* This is how to output an element of a case-vector that is relative.
+ This is only used for PIC code. See comments by the `casesi' insn in
+ i386.md for an explanation of the expression this outputs. */
+
+#undef ASM_OUTPUT_ADDR_DIFF_ELT
+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
+ fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
+
/* A C expression to output text to align the location counter in the
way that is desirable at a point in the code that is reached only
by jumping.