Commit fce5a9f2 by Eric Christopher Committed by Eric Christopher

i386.c (ix86_osf_output_function_prologue): Remove prototype and function.

2002-06-10  Eric Christopher  <echristo@redhat.com>

	* config/i386/i386.c (ix86_osf_output_function_prologue): Remove
	prototype and function.
	(TARGET_ASM_FUNCTION_PROLOGUE): Remove OSF version.
	(call_insn_operand): Remove half pic references.
	(legitimate_address_p): Ditto.
	* config/i386/i386.h: Remove half pic defines.

From-SVN: r54451
parent e9f09586
2002-06-10 Eric Christopher <echristo@redhat.com>
* config/i386/i386.c (ix86_osf_output_function_prologue): Remove
prototype and function.
(TARGET_ASM_FUNCTION_PROLOGUE): Remove OSF version.
(call_insn_operand): Remove half pic references.
(legitimate_address_p): Ditto.
* config/i386/i386.h: Remove half pic defines.
2002-06-10 Eric Christopher <echristo@redhat.com>
* doc/extend.texi (Return Address): Add note explaining the side-
effects of inlining on __builtin_return_address.
......
......@@ -801,12 +801,6 @@ static enum x86_64_reg_class merge_classes PARAMS ((enum x86_64_reg_class,
#undef TARGET_EXPAND_BUILTIN
#define TARGET_EXPAND_BUILTIN ix86_expand_builtin
#if defined (OSF_OS) || defined (TARGET_OSF1ELF)
static void ix86_osf_output_function_prologue PARAMS ((FILE *,
HOST_WIDE_INT));
# undef TARGET_ASM_FUNCTION_PROLOGUE
# define TARGET_ASM_FUNCTION_PROLOGUE ix86_osf_output_function_prologue
#endif
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE ix86_output_function_epilogue
......@@ -1354,105 +1348,6 @@ ix86_handle_regparm_attribute (node, name, args, flags, no_add_attrs)
return NULL_TREE;
}
#if defined (OSF_OS) || defined (TARGET_OSF1ELF)
/* Generate the assembly code for function entry. FILE is a stdio
stream to output the code to. SIZE is an int: how many units of
temporary storage to allocate.
Refer to the array `regs_ever_live' to determine which registers to
save; `regs_ever_live[I]' is nonzero if register number I is ever
used in the function. This function is responsible for knowing
which registers should not be saved even if used.
We override it here to allow for the new profiling code to go before
the prologue and the old mcount code to go after the prologue (and
after %ebx has been set up for ELF shared library support). */
static void
ix86_osf_output_function_prologue (file, size)
FILE *file;
HOST_WIDE_INT size;
{
const char *prefix = "";
const char *const lprefix = LPREFIX;
int labelno = current_function_profile_label_no;
#ifdef OSF_OS
if (TARGET_UNDERSCORES)
prefix = "_";
if (current_function_profile && OSF_PROFILE_BEFORE_PROLOGUE)
{
if (!flag_pic && !HALF_PIC_P ())
{
fprintf (file, "\tmovl $%sP%d,%%edx\n", lprefix, labelno);
fprintf (file, "\tcall *%s_mcount_ptr\n", prefix);
}
else if (HALF_PIC_P ())
{
rtx symref;
HALF_PIC_EXTERNAL ("_mcount_ptr");
symref = HALF_PIC_PTR (gen_rtx_SYMBOL_REF (Pmode,
"_mcount_ptr"));
fprintf (file, "\tmovl $%sP%d,%%edx\n", lprefix, labelno);
fprintf (file, "\tmovl %s%s,%%eax\n", prefix,
XSTR (symref, 0));
fprintf (file, "\tcall *(%%eax)\n");
}
else
{
static int call_no = 0;
fprintf (file, "\tcall %sPc%d\n", lprefix, call_no);
fprintf (file, "%sPc%d:\tpopl %%eax\n", lprefix, call_no);
fprintf (file, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-%sPc%d],%%eax\n",
lprefix, call_no++);
fprintf (file, "\tleal %sP%d@GOTOFF(%%eax),%%edx\n",
lprefix, labelno);
fprintf (file, "\tmovl %s_mcount_ptr@GOT(%%eax),%%eax\n",
prefix);
fprintf (file, "\tcall *(%%eax)\n");
}
}
#else /* !OSF_OS */
if (current_function_profile && OSF_PROFILE_BEFORE_PROLOGUE)
{
if (!flag_pic)
{
fprintf (file, "\tmovl $%sP%d,%%edx\n", lprefix, labelno);
fprintf (file, "\tcall *%s_mcount_ptr\n", prefix);
}
else
{
static int call_no = 0;
fprintf (file, "\tcall %sPc%d\n", lprefix, call_no);
fprintf (file, "%sPc%d:\tpopl %%eax\n", lprefix, call_no);
fprintf (file, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-%sPc%d],%%eax\n",
lprefix, call_no++);
fprintf (file, "\tleal %sP%d@GOTOFF(%%eax),%%edx\n",
lprefix, labelno);
fprintf (file, "\tmovl %s_mcount_ptr@GOT(%%eax),%%eax\n",
prefix);
fprintf (file, "\tcall *(%%eax)\n");
}
}
#endif /* !OSF_OS */
function_prologue (file, size);
}
#endif /* OSF_OS || TARGET_OSF1ELF */
/* Return 0 if the attributes for two types are incompatible, 1 if they
are compatible, and 2 if they are nearly compatible (which causes a
warning to be generated). */
......@@ -3139,11 +3034,6 @@ call_insn_operand (op, mode)
if (GET_CODE (op) == SYMBOL_REF)
return 1;
/* Half-pic doesn't allow anything but registers and constants.
We've just taken care of the later. */
if (HALF_PIC_P ())
return register_operand (op, Pmode);
/* Otherwise we can allow any general_operand in the address. */
return general_operand (op, Pmode);
}
......@@ -5291,15 +5181,6 @@ legitimate_address_p (mode, addr, strict)
that never results in lea, this seems to be easier and
correct fix for crash to disable this test. */
}
else if (HALF_PIC_P ())
{
if (! HALF_PIC_ADDRESS_P (disp)
|| (base != NULL_RTX || index != NULL_RTX))
{
reason = "displacement is an invalid half-pic reference";
goto report_error;
}
}
else if (!CONSTANT_ADDRESS_P (disp))
{
reason = "displacement is not constant";
......
......@@ -34,20 +34,6 @@ Boston, MA 02111-1307, USA. */
ADDR_BEG, ADDR_END, PRINT_IREG, PRINT_SCALE, PRINT_B_I_S, and many
that start with ASM_ or end in ASM_OP. */
/* Stubs for half-pic support if not OSF/1 reference platform. */
#ifndef HALF_PIC_P
#define HALF_PIC_P() 0
#define HALF_PIC_NUMBER_PTRS 0
#define HALF_PIC_NUMBER_REFS 0
#define HALF_PIC_ENCODE(DECL)
#define HALF_PIC_DECLARE(NAME)
#define HALF_PIC_INIT() error ("half-pic init called on systems that don't support it")
#define HALF_PIC_ADDRESS_P(X) 0
#define HALF_PIC_PTR(X) (X)
#define HALF_PIC_FINISH(STREAM)
#endif
/* Define the specific costs for a given cpu */
struct processor_costs {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment