Commit 66617831 by Richard Sandiford Committed by Richard Sandiford

config.gcc (hppa[12]*-*-hpux10*): Add pa/pa-hpux.opt to $extra_options.

	* config.gcc (hppa[12]*-*-hpux10*): Add pa/pa-hpux.opt to
	$extra_options.  Also add pa/pa-hpux1010.opt for hpux10.[1-9]*.
	(hppa*64*-*-hpux11*): Add pa/pa-hpux1010.h to $tm_file.  Add
	pa/pa-hpux.opt, pa/pa-hpux1010.opt and pa/pa64-hpux.opt to
	$extra_options.  Also add pa/pa-hpux1111.opt for hpux11.[1-9]*.
	(hppa[12]*-*-hpux11*): Add pa/pa-hpux1010.h to $tm_file.  Add
	pa/pa-hpux.opt to $extra_options.  Also add pa/pa-hpux1111.opt
	for hpux11.[1-9]*.
	* config/pa/pa.h (architecture_type, rtx_def, pa_arch_string, pa_arch)
	(pa_fixed_range_string, pa_cpu_string, pa_unix_string, target_flags)
	(MASK_PA_11, MASK_DISABLE_FPREGS, TARGET_DISABLE_FPREGS)
	(MASK_NO_SPACE_REGS, TARGET_NO_SPACE_REGS, MASK_JUMP_IN_DELAY)
	(TARGET_JUMP_IN_DELAY, MASK_DISABLE_INDEXING, TARGET_DISABLE_INDEXING)
	(MASK_PORTABLE_RUNTIME, TARGET_PORTABLE_RUNTIME, MASK_GAS, TARGET_GAS)
	(MASK_SOFT_FLOAT, TARGET_SOFT_FLOAT, MASK_LONG_LOAD_STORE)
	(TARGET_LONG_LOAD_STORE, MASK_FAST_INDIRECT_CALLS)
	(TARGET_FAST_INDIRECT_CALLS, MASK_BIG_SWITCH, TARGET_BIG_SWITCH)
	(MASK_PA_20, MASK_SIO, TARGET_SIO, MASK_GNU_LD, TARGET_GNU_LD)
	(MASK_LONG_CALLS, TARGET_LONG_CALLS, TARGET_PA_11, TARGET_PA_20)
	(TARGET_SWITCHES, SUBTARGET_SWITCHES, TARGET_OPTIONS)
	(SUBTARGET_OPTIONS): Delete.
	(TARGET_PA_10): Redefine in terms of TARGET_PA_11 and TARGET_PA_20.
	(TARGET_SCHED_DEFAULT): Define to a PROCESSOR_* enum (PROCESSOR_8000)
	instead of a string.
	* config/pa/pa.c (pa_arch, pa_arch_string, pa_fixed_range_string)
	(pa_cpu_string, pa_unix_string): Delete.
	(pa_cpu): Initialize to TARGET_SCHED_DEFAULT.
	(flag_pa_unix): Initialize based on TARGET_HPUX_11_11 and
	TARGET_HPUX_10_10.
	(TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Override defaults.
	(pa_handle_option): New function.
	(override_options): Remove handling of -march=, -mfixed-range=,
	-mschedule= and -munix=.
	* config/pa/pa-hpux.h (SUBTARGET_SWITCHES): Delete.
	* config/pa/pa-hpux1010.h (SUBTARGET_OPTIONS): Delete.
	* config/pa/pa-hpux10.h (SUBTARGET_OPTIONS): Delete.
	* config/pa/pa-hpux1111.h (SUBTARGET_OPTIONS): Delete.
	* config/pa/pa-hpux11.h (SUBTARGET_OPTIONS): Delete.
	* config/pa/pa64-hpux.h (SUBTARGET_SWITCHES): Delete.
	* config/pa/pa64-start.h (TARGET_PA_11, TARGET_PA_20): #undef before
	redefining.
	* config/pa/pa.opt: New file.
	* config/pa/pa-hpux.opt: New file.
	* config/pa/pa-hpux1010.opt: New file.
	* config/pa/pa-hpux1111.opt: New file.
	* config/pa/pa64-hpux.opt: New file.

From-SVN: r98605
parent 6a47d88f
2005-04-23 Richard Sandiford <rsandifo@redhat.com>
* config.gcc (hppa[12]*-*-hpux10*): Add pa/pa-hpux.opt to
$extra_options. Also add pa/pa-hpux1010.opt for hpux10.[1-9]*.
(hppa*64*-*-hpux11*): Add pa/pa-hpux1010.h to $tm_file. Add
pa/pa-hpux.opt, pa/pa-hpux1010.opt and pa/pa64-hpux.opt to
$extra_options. Also add pa/pa-hpux1111.opt for hpux11.[1-9]*.
(hppa[12]*-*-hpux11*): Add pa/pa-hpux1010.h to $tm_file. Add
pa/pa-hpux.opt to $extra_options. Also add pa/pa-hpux1111.opt
for hpux11.[1-9]*.
* config/pa/pa.h (architecture_type, rtx_def, pa_arch_string, pa_arch)
(pa_fixed_range_string, pa_cpu_string, pa_unix_string, target_flags)
(MASK_PA_11, MASK_DISABLE_FPREGS, TARGET_DISABLE_FPREGS)
(MASK_NO_SPACE_REGS, TARGET_NO_SPACE_REGS, MASK_JUMP_IN_DELAY)
(TARGET_JUMP_IN_DELAY, MASK_DISABLE_INDEXING, TARGET_DISABLE_INDEXING)
(MASK_PORTABLE_RUNTIME, TARGET_PORTABLE_RUNTIME, MASK_GAS, TARGET_GAS)
(MASK_SOFT_FLOAT, TARGET_SOFT_FLOAT, MASK_LONG_LOAD_STORE)
(TARGET_LONG_LOAD_STORE, MASK_FAST_INDIRECT_CALLS)
(TARGET_FAST_INDIRECT_CALLS, MASK_BIG_SWITCH, TARGET_BIG_SWITCH)
(MASK_PA_20, MASK_SIO, TARGET_SIO, MASK_GNU_LD, TARGET_GNU_LD)
(MASK_LONG_CALLS, TARGET_LONG_CALLS, TARGET_PA_11, TARGET_PA_20)
(TARGET_SWITCHES, SUBTARGET_SWITCHES, TARGET_OPTIONS)
(SUBTARGET_OPTIONS): Delete.
(TARGET_PA_10): Redefine in terms of TARGET_PA_11 and TARGET_PA_20.
(TARGET_SCHED_DEFAULT): Define to a PROCESSOR_* enum (PROCESSOR_8000)
instead of a string.
* config/pa/pa.c (pa_arch, pa_arch_string, pa_fixed_range_string)
(pa_cpu_string, pa_unix_string): Delete.
(pa_cpu): Initialize to TARGET_SCHED_DEFAULT.
(flag_pa_unix): Initialize based on TARGET_HPUX_11_11 and
TARGET_HPUX_10_10.
(TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Override defaults.
(pa_handle_option): New function.
(override_options): Remove handling of -march=, -mfixed-range=,
-mschedule= and -munix=.
* config/pa/pa-hpux.h (SUBTARGET_SWITCHES): Delete.
* config/pa/pa-hpux1010.h (SUBTARGET_OPTIONS): Delete.
* config/pa/pa-hpux10.h (SUBTARGET_OPTIONS): Delete.
* config/pa/pa-hpux1111.h (SUBTARGET_OPTIONS): Delete.
* config/pa/pa-hpux11.h (SUBTARGET_OPTIONS): Delete.
* config/pa/pa64-hpux.h (SUBTARGET_SWITCHES): Delete.
* config/pa/pa64-start.h (TARGET_PA_11, TARGET_PA_20): #undef before
redefining.
* config/pa/pa.opt: New file.
* config/pa/pa-hpux.opt: New file.
* config/pa/pa-hpux1010.opt: New file.
* config/pa/pa-hpux1111.opt: New file.
* config/pa/pa64-hpux.opt: New file.
2005-04-22 David S. Miller <davem@davemloft.net>
* rtl.h (CONST_DOUBLE): Fix comment, a CONST_DOUBLE holds an
......
......@@ -852,9 +852,11 @@ hppa[12]*-*-hpux10*)
esac
tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
pa/pa-hpux.h pa/pa-hpux10.h"
extra_options="${extra_options} pa/pa-hpux.opt"
case ${target} in
*-*-hpux10.[1-9]*)
tm_file="${tm_file} pa/pa-hpux1010.h"
extra_options="${extra_options} pa/pa-hpux1010.opt"
;;
esac
tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
......@@ -880,19 +882,24 @@ hppa*64*-*-hpux11*)
if test x$gas = xyes
then
tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux11.h"
pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
pa/pa-hpux11.h"
else
tm_file="pa/pa64-start.h ${tm_file} dbxelf.h pa/elf.h \
pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux11.h"
pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
pa/pa-hpux11.h"
fi
case ${target} in
*-*-hpux11.[1-9]*)
tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
extra_options="${extra_options} pa/pa-hpux1111.opt"
;;
*)
tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
;;
esac
extra_options="${extra_options} pa/pa-hpux.opt \
pa/pa-hpux1010.opt pa/pa64-hpux.opt"
need_64bit_hwint=yes
tmake_file="pa/t-pa64 pa/t-pa-hpux pa/t-hpux-shlib"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
......@@ -909,10 +916,12 @@ hppa[12]*-*-hpux11*)
;;
esac
tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
pa/pa-hpux.h pa/pa-hpux11.h"
pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt"
case ${target} in
*-*-hpux11.[1-9]*)
tm_file="${tm_file} pa/pa-hpux1111.h"
extra_options="${extra_options} pa/pa-hpux1111.opt"
;;
esac
tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
......
......@@ -91,11 +91,6 @@ Boston, MA 02111-1307, USA. */
} \
while (0)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "sio", MASK_SIO, N_("Generate cpp defines for server IO") }, \
{ "wsio", -MASK_SIO, N_("Generate cpp defines for workstation IO") },
/* Like the default, except no -lg. */
#undef LIB_SPEC
#define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}"
......
; Options for the HP PA-RISC port of the compiler.
; Copyright (C) 2005 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 2, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING. If not, write to the Free
; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
; 02111-1307, USA.
msio
Target RejectNegative Mask(SIO) MaskExists
Generate cpp defines for server IO
munix=93
Target RejectNegative
Specify UNIX standard for predefines and linking
mwsio
Target RejectNegative InverseMask(SIO)
Generate cpp defines for workstation IO
......@@ -78,12 +78,6 @@ Boston, MA 02111-1307, USA. */
} \
while (0)
#undef SUBTARGET_OPTIONS
#define SUBTARGET_OPTIONS \
{ "unix=", &pa_unix_string, \
N_("Specify UNIX standard for predefines and linking.\n" \
"Supported value is 93."), 0}
#define CPP_SPEC "%{threads: -D_REENTRANT -D_DCE_THREADS}"
/* We can debug dynamically linked executables on hpux9; we also want
......
......@@ -22,12 +22,6 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_HPUX_10_10
#define TARGET_HPUX_10_10 1
#undef SUBTARGET_OPTIONS
#define SUBTARGET_OPTIONS \
{ "unix=", &pa_unix_string, \
N_("Specify UNIX standard for predefines and linking.\n" \
"Supported values are 93 and 95."), 0}
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}} \
......
; Options for the HP PA-RISC port of the compiler.
; Copyright (C) 2005 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 2, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING. If not, write to the Free
; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
; 02111-1307, USA.
munix=95
Target RejectNegative
Specify UNIX standard for predefines and linking
......@@ -93,12 +93,6 @@ Boston, MA 02111-1307, USA. */
} \
while (0)
#undef SUBTARGET_OPTIONS
#define SUBTARGET_OPTIONS \
{ "unix=", &pa_unix_string, \
N_("Specify UNIX standard for predefines and linking.\n" \
"Supported values are 93 and 95."), 0}
#undef CPP_SPEC
#define CPP_SPEC \
"%{mt|pthread:-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L}"
......
......@@ -22,12 +22,6 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_HPUX_11_11
#define TARGET_HPUX_11_11 1
#undef SUBTARGET_OPTIONS
#define SUBTARGET_OPTIONS \
{ "unix=", &pa_unix_string, \
N_("Specify UNIX standard for predefines and linking.\n" \
"Supported values are 93, 95 and 98."), 0}
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}} \
......
; Options for the HP PA-RISC port of the compiler.
; Copyright (C) 2005 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 2, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING. If not, write to the Free
; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
; 02111-1307, USA.
munix=98
Target RejectNegative
Specify UNIX standard for predefines and linking
......@@ -84,6 +84,7 @@ hppa_fpstore_bypass_p (rtx out_insn, rtx in_insn)
static void copy_reg_pointer (rtx, rtx);
static void fix_range (const char *);
static bool pa_handle_option (size_t, const char *, int);
static int hppa_address_cost (rtx);
static bool hppa_rtx_costs (rtx, int, int, int *);
static inline rtx force_mode (enum machine_mode, rtx);
......@@ -155,26 +156,11 @@ static struct machine_function * pa_init_machine_status (void);
rtx hppa_compare_op0, hppa_compare_op1;
enum cmp_type hppa_branch_type;
/* Which architecture we are generating code for. */
enum architecture_type pa_arch;
/* String to hold which architecture we are generating code for. */
const char *pa_arch_string;
/* String used with the -mfixed-range= option. */
const char *pa_fixed_range_string;
/* Which cpu we are scheduling for. */
enum processor_type pa_cpu;
/* String to hold which cpu we are scheduling for. */
const char *pa_cpu_string;
/* String used with the -munix= option. */
const char *pa_unix_string;
enum processor_type pa_cpu = TARGET_SCHED_DEFAULT;
/* The UNIX standard to use for predefines and linking. */
int flag_pa_unix;
int flag_pa_unix = TARGET_HPUX_11_11 ? 1998 : TARGET_HPUX_10_10 ? 1995 : 1993;
/* Counts for the number of callee-saved general and floating point
registers which were saved by the current function's prologue. */
......@@ -259,6 +245,11 @@ static size_t n_deferred_plabels = 0;
#define TARGET_ASM_DESTRUCTOR pa_asm_out_destructor
#endif
#undef TARGET_DEFAULT_TARGET_FLAGS
#define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | TARGET_CPU_DEFAULT)
#undef TARGET_HANDLE_OPTION
#define TARGET_HANDLE_OPTION pa_handle_option
#undef TARGET_INIT_BUILTINS
#define TARGET_INIT_BUILTINS pa_init_builtins
......@@ -376,105 +367,78 @@ fix_range (const char *const_str)
target_flags |= MASK_DISABLE_FPREGS;
}
void
override_options (void)
{
if (pa_cpu_string == NULL)
pa_cpu_string = TARGET_SCHED_DEFAULT;
if (! strcmp (pa_cpu_string, "8000"))
{
pa_cpu_string = "8000";
pa_cpu = PROCESSOR_8000;
}
else if (! strcmp (pa_cpu_string, "7100"))
{
pa_cpu_string = "7100";
pa_cpu = PROCESSOR_7100;
}
else if (! strcmp (pa_cpu_string, "700"))
{
pa_cpu_string = "700";
pa_cpu = PROCESSOR_700;
}
else if (! strcmp (pa_cpu_string, "7100LC"))
{
pa_cpu_string = "7100LC";
pa_cpu = PROCESSOR_7100LC;
}
else if (! strcmp (pa_cpu_string, "7200"))
{
pa_cpu_string = "7200";
pa_cpu = PROCESSOR_7200;
}
else if (! strcmp (pa_cpu_string, "7300"))
{
pa_cpu_string = "7300";
pa_cpu = PROCESSOR_7300;
}
else
{
warning ("unknown -mschedule= option (%s).\nValid options are 700, 7100, 7100LC, 7200, 7300, and 8000\n", pa_cpu_string);
}
/* Implement TARGET_HANDLE_OPTION. */
/* Set the instruction architecture. */
if (pa_arch_string && ! strcmp (pa_arch_string, "1.0"))
static bool
pa_handle_option (size_t code, const char *arg, int value ATTRIBUTE_UNUSED)
{
switch (code)
{
pa_arch_string = "1.0";
pa_arch = ARCHITECTURE_10;
case OPT_mnosnake:
case OPT_mpa_risc_1_0:
case OPT_march_1_0:
target_flags &= ~(MASK_PA_11 | MASK_PA_20);
}
else if (pa_arch_string && ! strcmp (pa_arch_string, "1.1"))
{
pa_arch_string = "1.1";
pa_arch = ARCHITECTURE_11;
return true;
case OPT_msnake:
case OPT_mpa_risc_1_1:
case OPT_march_1_1:
target_flags &= ~MASK_PA_20;
target_flags |= MASK_PA_11;
}
else if (pa_arch_string && ! strcmp (pa_arch_string, "2.0"))
{
pa_arch_string = "2.0";
pa_arch = ARCHITECTURE_20;
target_flags |= MASK_PA_11 | MASK_PA_20;
}
else if (pa_arch_string)
{
warning ("unknown -march= option (%s).\nValid options are 1.0, 1.1, and 2.0\n", pa_arch_string);
}
return true;
if (TARGET_HPUX)
{
/* Set the default UNIX standard for HP-UX. This affects the
predefines and startfiles used for the target. */
if (pa_unix_string == NULL)
pa_unix_string
= TARGET_HPUX_11_11 ? "98" : (TARGET_HPUX_10_10 ? "95" : "93");
case OPT_mpa_risc_2_0:
case OPT_march_2_0:
target_flags |= MASK_PA_11 | MASK_PA_20;
return true;
if (!strcmp (pa_unix_string, "93"))
flag_pa_unix = 1993;
else if (!strcmp (pa_unix_string, "95"))
flag_pa_unix = 1995;
else if (TARGET_HPUX_11_11)
{
if (!strcmp (pa_unix_string, "98"))
flag_pa_unix = 1998;
else
warning ("unknown -munix= option (%s).\n"
"Valid options are 93, 95 and 98.\n",
pa_unix_string);
}
else if (TARGET_HPUX_10_10)
warning ("unknown -munix= option (%s)."
"\nValid options are 93 and 95.\n",
pa_unix_string);
case OPT_mschedule_:
if (strcmp (arg, "8000") == 0)
pa_cpu = PROCESSOR_8000;
else if (strcmp (arg, "7100") == 0)
pa_cpu = PROCESSOR_7100;
else if (strcmp (arg, "700") == 0)
pa_cpu = PROCESSOR_700;
else if (strcmp (arg, "7100LC") == 0)
pa_cpu = PROCESSOR_7100LC;
else if (strcmp (arg, "7200") == 0)
pa_cpu = PROCESSOR_7200;
else if (strcmp (arg, "7300") == 0)
pa_cpu = PROCESSOR_7300;
else
warning ("unknown -munix= option (%s).\nValid option is 93.\n",
pa_unix_string);
}
return false;
return true;
case OPT_mfixed_range_:
fix_range (arg);
return true;
if (pa_fixed_range_string)
fix_range (pa_fixed_range_string);
#if TARGET_HPUX
case OPT_munix_93:
flag_pa_unix = 1993;
return true;
#endif
#if TARGET_HPUX_10_10
case OPT_munix_95:
flag_pa_unix = 1995;
return true;
#endif
#if TARGET_HPUX_11_11
case OPT_munix_98:
flag_pa_unix = 1998;
return true;
#endif
default:
return true;
}
}
void
override_options (void)
{
/* Unconditional branches in the delay slot are not compatible with dwarf2
call frame information. There is no benefit in using this optimization
on PA8000 and later processors. */
......
......@@ -45,30 +45,10 @@ enum processor_type
PROCESSOR_8000
};
/* Which architecture to generate code for. */
enum architecture_type
{
ARCHITECTURE_10,
ARCHITECTURE_11,
ARCHITECTURE_20
};
struct rtx_def;
/* For -march= option. */
extern const char *pa_arch_string;
extern enum architecture_type pa_arch;
/* For -mfixed-range= option. */
extern const char *pa_fixed_range_string;
/* For -mschedule= option. */
extern const char *pa_cpu_string;
extern enum processor_type pa_cpu;
/* For -munix= option. */
extern const char *pa_unix_string;
extern int flag_pa_unix;
#define pa_cpu_attr ((enum attr_cpu)pa_cpu)
......@@ -77,105 +57,7 @@ extern int flag_pa_unix;
#define TARGET_VERSION fputs (" (hppa)", stderr);
/* Run-time compilation parameters selecting different hardware subsets. */
extern int target_flags;
/* compile code for HP-PA 1.1 ("Snake"). */
#define MASK_PA_11 1
/* Disable all FP registers (they all become fixed). This may be necessary
for compiling kernels which perform lazy context switching of FP regs.
Note if you use this option and try to perform floating point operations
the compiler will abort! */
#define MASK_DISABLE_FPREGS 2
#define TARGET_DISABLE_FPREGS (target_flags & MASK_DISABLE_FPREGS)
/* Generate code which assumes that all space register are equivalent.
Triggers aggressive unscaled index addressing and faster
builtin_return_address. */
#define MASK_NO_SPACE_REGS 4
#define TARGET_NO_SPACE_REGS (target_flags & MASK_NO_SPACE_REGS)
/* Allow unconditional jumps in the delay slots of call instructions. */
#define MASK_JUMP_IN_DELAY 8
#define TARGET_JUMP_IN_DELAY (target_flags & MASK_JUMP_IN_DELAY)
/* Disable indexed addressing modes. */
#define MASK_DISABLE_INDEXING 32
#define TARGET_DISABLE_INDEXING (target_flags & MASK_DISABLE_INDEXING)
/* Emit code which follows the new portable runtime calling conventions
HP wants everyone to use for ELF objects. If at all possible you want
to avoid this since it's a performance loss for non-prototyped code.
Note TARGET_PORTABLE_RUNTIME also forces all calls to use inline
long-call stubs which is quite expensive. */
#define MASK_PORTABLE_RUNTIME 64
#define TARGET_PORTABLE_RUNTIME (target_flags & MASK_PORTABLE_RUNTIME)
/* Emit directives only understood by GAS. This allows parameter
relocations to work for static functions. There is no way
to make them work the HP assembler at this time. */
#define MASK_GAS 128
#define TARGET_GAS (target_flags & MASK_GAS)
/* Emit code for processors which do not have an FPU. */
#define MASK_SOFT_FLOAT 256
#define TARGET_SOFT_FLOAT (target_flags & MASK_SOFT_FLOAT)
/* Use 3-insn load/store sequences for access to large data segments
in shared libraries on hpux10. */
#define MASK_LONG_LOAD_STORE 512
#define TARGET_LONG_LOAD_STORE (target_flags & MASK_LONG_LOAD_STORE)
/* Use a faster sequence for indirect calls. This assumes that calls
through function pointers will never cross a space boundary, and
that the executable is not dynamically linked. Such assumptions
are generally safe for building kernels and statically linked
executables. Code compiled with this option will fail miserably if
the executable is dynamically linked or uses nested functions! */
#define MASK_FAST_INDIRECT_CALLS 1024
#define TARGET_FAST_INDIRECT_CALLS (target_flags & MASK_FAST_INDIRECT_CALLS)
/* Generate code with big switch statements to avoid out of range branches
occurring within the switch table. */
#define MASK_BIG_SWITCH 2048
#define TARGET_BIG_SWITCH (target_flags & MASK_BIG_SWITCH)
/* Generate code for the HPPA 2.0 architecture. TARGET_PA_11 should also be
true when this is true. */
#define MASK_PA_20 4096
/* Generate cpp defines for server I/O. */
#define MASK_SIO 8192
#define TARGET_SIO (target_flags & MASK_SIO)
/* Assume GNU linker by default. */
#define MASK_GNU_LD 16384
#ifndef TARGET_GNU_LD
#define TARGET_GNU_LD (target_flags & MASK_GNU_LD)
#endif
/* Force generation of long calls. */
#define MASK_LONG_CALLS 32768
#ifndef TARGET_LONG_CALLS
#define TARGET_LONG_CALLS (target_flags & MASK_LONG_CALLS)
#endif
#ifndef TARGET_PA_10
#define TARGET_PA_10 (target_flags & (MASK_PA_11 | MASK_PA_20) == 0)
#endif
#ifndef TARGET_PA_11
#define TARGET_PA_11 (target_flags & MASK_PA_11)
#endif
#ifndef TARGET_PA_20
#define TARGET_PA_20 (target_flags & MASK_PA_20)
#endif
#define TARGET_PA_10 (!TARGET_PA_11 && !TARGET_PA_20)
/* Generate code for the HPPA 2.0 architecture in 64bit mode. */
#ifndef TARGET_64BIT
......@@ -242,74 +124,6 @@ extern int target_flags;
need to generate additional code to save SP into the frame marker. */
#define TARGET_HPUX_UNWIND_LIBRARY 0
/* Macro to define tables used to set the flags. This is a
list in braces of target switches with each switch being
{ "NAME", VALUE, "HELP_STRING" }. VALUE is the bits to set,
or minus the bits to clear. An empty string NAME is used to
identify the default VALUE. Do not mark empty strings for
translation. */
#define TARGET_SWITCHES \
{{ "snake", MASK_PA_11, \
N_("Generate PA1.1 code") }, \
{ "nosnake", -(MASK_PA_11 | MASK_PA_20), \
N_("Generate PA1.0 code") }, \
{ "pa-risc-1-0", -(MASK_PA_11 | MASK_PA_20), \
N_("Generate PA1.0 code") }, \
{ "pa-risc-1-1", MASK_PA_11, \
N_("Generate PA1.1 code") }, \
{ "pa-risc-2-0", MASK_PA_20, \
N_("Generate PA2.0 code (requires binutils 2.10 or later)") }, \
{ "disable-fpregs", MASK_DISABLE_FPREGS, \
N_("Disable FP regs") }, \
{ "no-disable-fpregs", -MASK_DISABLE_FPREGS, \
N_("Do not disable FP regs") }, \
{ "no-space-regs", MASK_NO_SPACE_REGS, \
N_("Disable space regs") }, \
{ "space-regs", -MASK_NO_SPACE_REGS, \
N_("Do not disable space regs") }, \
{ "jump-in-delay", MASK_JUMP_IN_DELAY, \
N_("Put jumps in call delay slots") }, \
{ "no-jump-in-delay", -MASK_JUMP_IN_DELAY, \
N_("Do not put jumps in call delay slots") }, \
{ "disable-indexing", MASK_DISABLE_INDEXING, \
N_("Disable indexed addressing") }, \
{ "no-disable-indexing", -MASK_DISABLE_INDEXING, \
N_("Do not disable indexed addressing") }, \
{ "portable-runtime", MASK_PORTABLE_RUNTIME, \
N_("Use portable calling conventions") }, \
{ "no-portable-runtime", -MASK_PORTABLE_RUNTIME, \
N_("Do not use portable calling conventions") }, \
{ "gas", MASK_GAS, \
N_("Assume code will be assembled by GAS") }, \
{ "no-gas", -MASK_GAS, \
N_("Do not assume code will be assembled by GAS") }, \
{ "soft-float", MASK_SOFT_FLOAT, \
N_("Use software floating point") }, \
{ "no-soft-float", -MASK_SOFT_FLOAT, \
N_("Do not use software floating point") }, \
{ "long-load-store", MASK_LONG_LOAD_STORE, \
N_("Emit long load/store sequences") }, \
{ "no-long-load-store", -MASK_LONG_LOAD_STORE, \
N_("Do not emit long load/store sequences") }, \
{ "fast-indirect-calls", MASK_FAST_INDIRECT_CALLS, \
N_("Generate fast indirect calls") }, \
{ "no-fast-indirect-calls", -MASK_FAST_INDIRECT_CALLS, \
N_("Do not generate fast indirect calls") }, \
{ "big-switch", MASK_BIG_SWITCH, \
N_("Generate code for huge switch statements") }, \
{ "no-big-switch", -MASK_BIG_SWITCH, \
N_("Do not generate code for huge switch statements") }, \
{ "long-calls", MASK_LONG_CALLS, \
N_("Always generate long calls") }, \
{ "no-long-calls", -MASK_LONG_CALLS, \
N_("Generate long calls only when needed") }, \
{ "linker-opt", 0, \
N_("Enable linker optimizations") }, \
SUBTARGET_SWITCHES \
{ "", TARGET_DEFAULT | TARGET_CPU_DEFAULT, \
NULL }}
#ifndef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_GAS | MASK_JUMP_IN_DELAY | MASK_BIG_SWITCH)
#endif
......@@ -318,28 +132,8 @@ extern int target_flags;
#define TARGET_CPU_DEFAULT 0
#endif
#ifndef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES
#endif
#ifndef TARGET_SCHED_DEFAULT
#define TARGET_SCHED_DEFAULT "8000"
#endif
#define TARGET_OPTIONS \
{ \
{ "arch=", &pa_arch_string, \
N_("Specify PA-RISC architecture for code generation.\n" \
"Values are 1.0, 1.1 and 2.0."), 0}, \
{ "fixed-range=", &pa_fixed_range_string, \
N_("Specify range of registers to make fixed."), 0}, \
{ "schedule=", &pa_cpu_string, \
N_("Specify CPU for scheduling purposes."), 0}, \
SUBTARGET_OPTIONS \
}
#ifndef SUBTARGET_OPTIONS
#define SUBTARGET_OPTIONS
#define TARGET_SCHED_DEFAULT PROCESSOR_8000
#endif
/* Support for a compile-time default CPU, et cetera. The rules are:
......
; Options for the HP PA-RISC port of the compiler.
; Copyright (C) 2005 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 2, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING. If not, write to the Free
; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
; 02111-1307, USA.
march=1.0
Target RejectNegative
Generate PA1.0 code
march=1.1
Target RejectNegative
Generate PA1.1 code
march=2.0
Target RejectNegative
Generate PA2.0 code (requires binutils 2.10 or later)
mbig-switch
Target Report Mask(BIG_SWITCH)
Generate code for huge switch statements
mdisable-fpregs
Target Report Mask(DISABLE_FPREGS)
Disable FP regs
mdisable-indexing
Target Report Mask(DISABLE_INDEXING)
Disable indexed addressing
mfast-indirect-calls
Target Report Mask(FAST_INDIRECT_CALLS)
Generate fast indirect calls
mfixed-range=
Target RejectNegative Joined
Specify range of registers to make fixed.
mgas
Target Report Mask(GAS)
Assume code will be assembled by GAS
mjump-in-delay
Target Report Mask(JUMP_IN_DELAY)
Put jumps in call delay slots
;; Not used by gcc
mlinker-opt
Target RejectNegative
Enable linker optimizations
mlong-calls
Target Report Mask(LONG_CALLS)
Always generate long calls
mlong-load-store
Target Report Mask(LONG_LOAD_STORE)
Emit long load/store sequences
mnosnake
Target RejectNegative
Generate PA1.0 code
mno-space-regs
Target RejectNegative Report Mask(NO_SPACE_REGS)
Disable space regs
mpa-risc-1-0
Target RejectNegative
Generate PA1.0 code
mpa-risc-1-1
Target RejectNegative Mask(PA_11)
Generate PA1.1 code
mpa-risc-2-0
Target RejectNegative Mask(PA_20)
Generate PA2.0 code (requires binutils 2.10 or later)
mportable-runtime
Target Report Mask(PORTABLE_RUNTIME)
Use portable calling conventions
mschedule=
Target RejectNegative Joined
Specify CPU for scheduling purposes. Valid arguments are 700, 7100, 7100LC, 7200, 7300, and 8000.
msoft-float
Target Report Mask(SOFT_FLOAT)
Use software floating point
msnake
Target RejectNegative
Generate PA1.1 code
mspace-regs
Target RejectNegative Report InverseMask(NO_SPACE_REGS)
Do not disable space regs
Mask(SIO)
;; Generate cpp defines for server I/O.
Mask(GNU_LD)
;; Assume GNU linker by default
......@@ -20,17 +20,6 @@ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "sio", MASK_SIO, \
N_("Generate cpp defines for server IO") }, \
{ "wsio", -MASK_SIO, \
N_("Generate cpp defines for workstation IO") }, \
{"gnu-ld", MASK_GNU_LD, \
N_("Assume code will be linked by GNU ld") }, \
{"hp-ld", -MASK_GNU_LD, \
N_("Assume code will be linked by HP ld") },
/* We can debug dynamically linked executables on hpux11; we also
want dereferencing of a NULL pointer to cause a SEGV. Do not move
the "+Accept TypeMismatch" switch. We check for it in collect2
......
; Options for the HP PA-RISC port of the compiler.
; Copyright (C) 2005 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 2, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING. If not, write to the Free
; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
; 02111-1307, USA.
mgnu-ld
Target RejectNegative Mask(GNU_LD) MaskExists
Assume code will be linked by GNU ld
mhp-ld
Target RejectNegative InverseMask(GNU_LD)
Assume code will be linked by HP ld
......@@ -2,5 +2,7 @@
runtime compiler switch. So we might as well lose the overhead with
checking for TARGET_64BIT. */
#define TARGET_64BIT 1
#undef TARGET_PA_11
#define TARGET_PA_11 1
#undef TARGET_PA_20
#define TARGET_PA_20 1
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