aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2003-03-10 17:53:19 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2003-03-10 17:53:19 +0000
commit29ad9694303d826163fd471c5e4bfc2fe3391481 (patch)
treed2e3929b2eaf4c7010f467bf2a2ee1f95672c56f /gcc
parentc94432c5502800431e9822b60ac28c1d7b74a1e7 (diff)
downloadgcc-29ad9694303d826163fd471c5e4bfc2fe3391481.zip
gcc-29ad9694303d826163fd471c5e4bfc2fe3391481.tar.gz
gcc-29ad9694303d826163fd471c5e4bfc2fe3391481.tar.bz2
arm.h (enum floating_point_type): Delete.
* arm.h (enum floating_point_type): Delete. Replace with... (enum fputype): ... new. (FPUTYPE_DEFAULT): Renamed from FP_DEFAULT. Values reworked. * linux-elf.h (FPUTYPE_DEFAULT): Likewise. * arm.md (attr fpu): Reworked for new underlying enum values. * arm.c (arm_fpu_arch): Now enum fputype. (arm_fpu_tune): Renamed from arm_fpu. Now enum fputype. (arm_override_options, arm_output_epilogue, arm_expand_prologue): Update uses of arm_fpu_arch and arm_fpu_tune. From-SVN: r64099
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/arm/arm.c44
-rw-r--r--gcc/config/arm/arm.h30
-rw-r--r--gcc/config/arm/arm.md3
-rw-r--r--gcc/config/arm/linux-elf.h4
5 files changed, 57 insertions, 36 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b16ebd3..fafe995 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2003-03-10 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm.h (enum floating_point_type): Delete. Replace with...
+ (enum fputype): ... new.
+ (FPUTYPE_DEFAULT): Renamed from FP_DEFAULT. Values reworked.
+ * linux-elf.h (FPUTYPE_DEFAULT): Likewise.
+ * arm.md (attr fpu): Reworked for new underlying enum values.
+ * arm.c (arm_fpu_arch): Now enum fputype.
+ (arm_fpu_tune): Renamed from arm_fpu. Now enum fputype.
+ (arm_override_options, arm_output_epilogue, arm_expand_prologue):
+ Update uses of arm_fpu_arch and arm_fpu_tune.
+
2003-03-10 Josef Zlomek <zlomekj@suse.cz>
* cfgcleanup.c (outgoing_edges_match): Compare the jump tables.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 4f076a3..808fb8c 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -239,10 +239,10 @@ int making_const_table;
rtx arm_compare_op0, arm_compare_op1;
/* What type of floating point are we tuning for? */
-enum floating_point_type arm_fpu;
+enum fputype arm_fpu_tune;
/* What type of floating point instructions are available? */
-enum floating_point_type arm_fpu_arch;
+enum fputype arm_fpu_arch;
/* What program mode is the cpu running in? 26-bit mode or 32-bit mode. */
enum prog_mode_type arm_prgmode;
@@ -726,7 +726,7 @@ arm_override_options ()
if (arm_is_cirrus)
{
- arm_fpu = FP_CIRRUS;
+ arm_fpu_tune = FPUTYPE_MAVERICK;
/* Ignore -mhard-float if -mcpu=ep9312. */
if (TARGET_HARD_FLOAT)
@@ -738,34 +738,34 @@ arm_override_options ()
assume the user has an FPA.
Note: this does not prevent use of floating point instructions,
-msoft-float does that. */
- arm_fpu = (tune_flags & FL_CO_PROC) ? FP_HARD : FP_SOFT3;
+ arm_fpu_tune = (tune_flags & FL_CO_PROC) ? FPUTYPE_FPA : FPUTYPE_FPA_EMU3;
if (target_fp_name)
{
if (streq (target_fp_name, "2"))
- arm_fpu_arch = FP_SOFT2;
+ arm_fpu_arch = FPUTYPE_FPA_EMU2;
else if (streq (target_fp_name, "3"))
- arm_fpu_arch = FP_SOFT3;
+ arm_fpu_arch = FPUTYPE_FPA_EMU3;
else
error ("invalid floating point emulation option: -mfpe-%s",
target_fp_name);
}
else
- arm_fpu_arch = FP_DEFAULT;
+ arm_fpu_arch = FPUTYPE_DEFAULT;
if (TARGET_FPE)
{
- if (arm_fpu == FP_SOFT3)
- arm_fpu = FP_SOFT2;
- else if (arm_fpu == FP_CIRRUS)
- warning ("-mpfpe switch not supported by ep9312 target cpu - ignored.");
- else if (arm_fpu != FP_HARD)
- arm_fpu = FP_SOFT2;
+ if (arm_fpu_tune == FPUTYPE_FPA_EMU3)
+ arm_fpu_tune = FPUTYPE_FPA_EMU2;
+ else if (arm_fpu_tune == FPUTYPE_MAVERICK)
+ warning ("-mfpe switch not supported by ep9312 target cpu - ignored.");
+ else if (arm_fpu_tune != FPUTYPE_FPA)
+ arm_fpu_tune = FPUTYPE_FPA_EMU2;
}
/* For arm2/3 there is no need to do any scheduling if there is only
a floating point emulator, or we are doing software floating-point. */
- if ((TARGET_SOFT_FLOAT || arm_fpu != FP_HARD)
+ if ((TARGET_SOFT_FLOAT || arm_fpu_tune != FPUTYPE_FPA)
&& (tune_flags & FL_MODE32) == 0)
flag_schedule_insns = flag_schedule_insns_after_reload = 0;
@@ -8452,7 +8452,7 @@ arm_output_epilogue (really_return)
{
int vfp_offset = 4;
- if (arm_fpu_arch == FP_SOFT2)
+ if (arm_fpu_arch == FPUTYPE_FPA_EMU2)
{
for (reg = LAST_ARM_FP_REGNUM; reg >= FIRST_ARM_FP_REGNUM; reg--)
if (regs_ever_live[reg] && !call_used_regs[reg])
@@ -8535,7 +8535,7 @@ arm_output_epilogue (really_return)
output_add_immediate (operands);
}
- if (arm_fpu_arch == FP_SOFT2)
+ if (arm_fpu_arch == FPUTYPE_FPA_EMU2)
{
for (reg = FIRST_ARM_FP_REGNUM; reg <= LAST_ARM_FP_REGNUM; reg++)
if (regs_ever_live[reg] && !call_used_regs[reg])
@@ -9294,10 +9294,11 @@ arm_expand_prologue ()
if (! IS_VOLATILE (func_type))
{
- /* Save any floating point call-saved registers used by this function. */
- if (arm_fpu_arch == FP_SOFT2)
+ /* Save any floating point call-saved registers used by this
+ function. */
+ if (arm_fpu_arch == FPUTYPE_FPA_EMU2)
{
- for (reg = LAST_ARM_FP_REGNUM; reg >= FIRST_ARM_FP_REGNUM; reg --)
+ for (reg = LAST_ARM_FP_REGNUM; reg >= FIRST_ARM_FP_REGNUM; reg--)
if (regs_ever_live[reg] && !call_used_regs[reg])
{
insn = gen_rtx_PRE_DEC (XFmode, stack_pointer_rtx);
@@ -9311,7 +9312,7 @@ arm_expand_prologue ()
{
int start_reg = LAST_ARM_FP_REGNUM;
- for (reg = LAST_ARM_FP_REGNUM; reg >= FIRST_ARM_FP_REGNUM; reg --)
+ for (reg = LAST_ARM_FP_REGNUM; reg >= FIRST_ARM_FP_REGNUM; reg--)
{
if (regs_ever_live[reg] && !call_used_regs[reg])
{
@@ -9356,7 +9357,8 @@ arm_expand_prologue ()
insn = gen_rtx_REG (SImode, 3);
else /* if (current_function_pretend_args_size == 0) */
{
- insn = gen_rtx_PLUS (SImode, hard_frame_pointer_rtx, GEN_INT (4));
+ insn = gen_rtx_PLUS (SImode, hard_frame_pointer_rtx,
+ GEN_INT (4));
insn = gen_rtx_MEM (SImode, insn);
}
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 2417ff4..33f3da0 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -550,32 +550,38 @@ extern enum prog_mode_type arm_prgmode;
/* What sort of floating point unit do we have? Hardware or software.
If software, is it issue 2 or issue 3? */
-enum floating_point_type
+enum fputype
{
- FP_HARD,
- FP_SOFT2,
- FP_SOFT3,
- FP_CIRRUS
+ /* Software floating point, FPA style double fmt. */
+ FPUTYPE_SOFT_FPA,
+ /* Full FPA support. */
+ FPUTYPE_FPA,
+ /* Emulated FPA hardware, Issue 2 emulator (no LFM/SFM). */
+ FPUTYPE_FPA_EMU2,
+ /* Emulated FPA hardware, Issue 3 emulator. */
+ FPUTYPE_FPA_EMU3,
+ /* Cirrus Maverick floating point co-processor. */
+ FPUTYPE_MAVERICK
};
/* Recast the floating point class to be the floating point attribute. */
-#define arm_fpu_attr ((enum attr_fpu) arm_fpu)
+#define arm_fpu_attr ((enum attr_fpu) arm_fpu_tune)
/* What type of floating point to tune for */
-extern enum floating_point_type arm_fpu;
+extern enum fputype arm_fpu_tune;
/* What type of floating point instructions are available */
-extern enum floating_point_type arm_fpu_arch;
+extern enum fputype arm_fpu_arch;
/* Default floating point architecture. Override in sub-target if
necessary. */
-#ifndef FP_DEFAULT
-#define FP_DEFAULT FP_SOFT2
+#ifndef FPUTYPE_DEFAULT
+#define FPUTYPE_DEFAULT FPUTYPE_FPA_EMU2
#endif
#if TARGET_CPU_DEFAULT == TARGET_CPU_ep9312
-#undef FP_DEFAULT
-#define FP_DEFAULT FP_CIRRUS
+#undef FPUTYPE_DEFAULT
+#define FPUTYPE_DEFAULT FPUTYPE_MAVERICK
#endif
/* Nonzero if the processor has a fast multiply insn, and one that does
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index bef84dc..7ad63f2 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -116,7 +116,8 @@
; Floating Point Unit. If we only have floating point emulation, then there
; is no point in scheduling the floating point insns. (Well, for best
; performance we should try and group them together).
-(define_attr "fpu" "fpa,fpe2,fpe3" (const (symbol_ref "arm_fpu_attr")))
+(define_attr "fpu" "softfpa,fpa,fpe2,fpe3,maverick"
+ (const (symbol_ref "arm_fpu_attr")))
; LENGTH of an instruction (in bytes)
(define_attr "length" "" (const_int 4))
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index e3f7b00..ec5c69f 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -111,8 +111,8 @@
while (0)
/* NWFPE always understands FPA instructions. */
-#undef FP_DEFAULT
-#define FP_DEFAULT FP_SOFT3
+#undef FPUTYPE_DEFAULT
+#define FPUTYPE_DEFAULT FPUTYPE_FPA_EMU3
/* Call the function profiler with a given profile label. */
#undef ARM_FUNCTION_PROFILER