diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-08 07:57:27 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-08 07:57:27 +0000 |
commit | 03ea9d8a4c32ddbb2983ba472d6b3c5f8f01c7be (patch) | |
tree | 33bc7d49485f3cb3420206eb6fcf9d0b0988533a | |
parent | 8c638bd7c790fbb2a4de17076271bdbe7edcaa92 (diff) | |
download | gcc-03ea9d8a4c32ddbb2983ba472d6b3c5f8f01c7be.tar.gz |
* config/xtensa/xtensa.h (target_flags, MASK_NO_FUSED_MADD)
(MASK_CONST16, TARGET_NO_FUSED_MADD, TARGET_CONST16)
(TARGET_SWITCHES): Delete.
* config/xtensa/xtensa.c (TARGET_DEFAULT_TARGET_FLAGS): Define.
* config/xtensa/xtensa.md (muladdsf3, mulsubsf3): Check
TARGET_FUSED_MADD instead of !TARGET_NO_FUSED_MADD.
* config/xtensa/xtensa.opt: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97822 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.c | 3 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.h | 35 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.md | 4 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.opt | 40 |
5 files changed, 55 insertions, 37 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ac794255a9..8308b7b0f09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2005-04-08 Richard Sandiford <rsandifo@redhat.com> + + * config/xtensa/xtensa.h (target_flags, MASK_NO_FUSED_MADD) + (MASK_CONST16, TARGET_NO_FUSED_MADD, TARGET_CONST16) + (TARGET_SWITCHES): Delete. + * config/xtensa/xtensa.c (TARGET_DEFAULT_TARGET_FLAGS): Define. + * config/xtensa/xtensa.md (muladdsf3, mulsubsf3): Check + TARGET_FUSED_MADD instead of !TARGET_NO_FUSED_MADD. + * config/xtensa/xtensa.opt: New file. + 2005-04-08 Ben Elliston <bje@au.ibm.com> * config/fp-bit.c: Include L_mul_tf in #endif comment. diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index b6084c9c5d2..7d0ba485f65 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -232,6 +232,9 @@ static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] = #undef TARGET_ASM_SELECT_RTX_SECTION #define TARGET_ASM_SELECT_RTX_SECTION xtensa_select_rtx_section +#undef TARGET_DEFAULT_TARGET_FLAGS +#define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | MASK_FUSED_MADD) + #undef TARGET_RTX_COSTS #define TARGET_RTX_COSTS xtensa_rtx_costs #undef TARGET_ADDRESS_COST diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h index ebaed273d14..fc5351a92ec 100644 --- a/gcc/config/xtensa/xtensa.h +++ b/gcc/config/xtensa/xtensa.h @@ -24,7 +24,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Standard GCC variables that we reference. */ extern int current_function_calls_alloca; -extern int target_flags; extern int optimize; /* External variables defined in xtensa.c. */ @@ -42,10 +41,6 @@ extern struct rtx_def * branch_cmp[2]; /* operands for compare */ extern enum cmp_type branch_type; /* what type of branch to use */ extern unsigned xtensa_current_frame_size; -/* Masks for the -m switches */ -#define MASK_NO_FUSED_MADD 0x00000001 /* avoid f-p mul/add */ -#define MASK_CONST16 0x00000002 /* use CONST16 instruction */ - /* Macros used in the machine description to select various Xtensa configuration options. */ #define TARGET_BIG_ENDIAN XCHAL_HAVE_BE @@ -66,39 +61,9 @@ extern unsigned xtensa_current_frame_size; #define TARGET_ABS XCHAL_HAVE_ABS #define TARGET_ADDX XCHAL_HAVE_ADDX -/* Macros controlled by command-line options. */ -#define TARGET_NO_FUSED_MADD (target_flags & MASK_NO_FUSED_MADD) -#define TARGET_CONST16 (target_flags & MASK_CONST16) - #define TARGET_DEFAULT ( \ (XCHAL_HAVE_L32R ? 0 : MASK_CONST16)) -#define TARGET_SWITCHES \ -{ \ - {"const16", MASK_CONST16, \ - N_("Use CONST16 instruction to load constants")}, \ - {"no-const16", -MASK_CONST16, \ - N_("Use PC-relative L32R instruction to load constants")}, \ - {"no-fused-madd", MASK_NO_FUSED_MADD, \ - N_("Disable fused multiply/add and multiply/subtract FP instructions")}, \ - {"fused-madd", -MASK_NO_FUSED_MADD, \ - N_("Enable fused multiply/add and multiply/subtract FP instructions")}, \ - {"text-section-literals", 0, \ - N_("Intersperse literal pools with code in the text section")}, \ - {"no-text-section-literals", 0, \ - N_("Put literal pools in a separate literal section")}, \ - {"target-align", 0, \ - N_("Automatically align branch targets to reduce branch penalties")}, \ - {"no-target-align", 0, \ - N_("Do not automatically align branch targets")}, \ - {"longcalls", 0, \ - N_("Use indirect CALLXn instructions for large programs")}, \ - {"no-longcalls", 0, \ - N_("Use direct CALLn instructions for fast calls")}, \ - {"", TARGET_DEFAULT, 0} \ -} - - #define OVERRIDE_OPTIONS override_options () /* Target CPU builtins. */ diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md index 50746512410..c40ad345def 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -371,7 +371,7 @@ (plus:SF (mult:SF (match_operand:SF 1 "register_operand" "%f") (match_operand:SF 2 "register_operand" "f")) (match_operand:SF 3 "register_operand" "0")))] - "TARGET_HARD_FLOAT && !TARGET_NO_FUSED_MADD" + "TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "madd.s\t%0, %1, %2" [(set_attr "type" "fmadd") (set_attr "mode" "SF") @@ -382,7 +382,7 @@ (minus:SF (match_operand:SF 1 "register_operand" "0") (mult:SF (match_operand:SF 2 "register_operand" "%f") (match_operand:SF 3 "register_operand" "f"))))] - "TARGET_HARD_FLOAT && !TARGET_NO_FUSED_MADD" + "TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "msub.s\t%0, %2, %3" [(set_attr "type" "fmadd") (set_attr "mode" "SF") diff --git a/gcc/config/xtensa/xtensa.opt b/gcc/config/xtensa/xtensa.opt new file mode 100644 index 00000000000..6be1b3862be --- /dev/null +++ b/gcc/config/xtensa/xtensa.opt @@ -0,0 +1,40 @@ +; Options for the Tensilica Xtensa 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. + +mconst16 +Target Report Mask(CONST16) +Use CONST16 instruction to load constants + +mfused-madd +Target Report Mask(FUSED_MADD) +Enable fused multiply/add and multiply/subtract FP instructions + +mlongcalls +Target +Use indirect CALLXn instructions for large programs + +mtarget-align +Target +Automatically align branch targets to reduce branch penalties + +mtext-section-literals +Target +Intersperse literal pools with code in the text section |