Commit 66beb87a by Richard Sandiford Committed by Richard Sandiford

* 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.

From-SVN: r97822
parent 1a269cbb
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.
......
......@@ -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
......
......@@ -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. */
......
......@@ -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")
......
; 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
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