Commit bd4dc3cd by Paul Brook Committed by Paul Brook

cortex-r4.md: New.

2008-03-10  Paul Brook  <paul@codesourcery.com>
	Mark Shinwell  <shinwell@codesourcery.com>

	gcc/
	* config/arm/cortex-r4.md: New.
	* config/arm/thumb2.md (divsi3, udivsi3): Annotate with
	insn attributes.
	* config/arm/arm.md: Include cortex-r4.md.
	(insn): Add smmls, sdiv and udiv values.
	(generic_sched): Don't use generic scheduling for Cortex-R4.
	(arm_issue_rate): New function.
	(TARGET_SCHED_ISSUE_RATE): Define.


Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com>

From-SVN: r133078
parent 3b509e33
2008-03-10 Paul Brook <paul@codesourcery.com>
Mark Shinwell <shinwell@codesourcery.com>
gcc/
* config/arm/cortex-r4.md: New.
* config/arm/thumb2.md (divsi3, udivsi3): Annotate with
insn attributes.
* config/arm/arm.md: Include cortex-r4.md.
(insn): Add smmls, sdiv and udiv values.
(generic_sched): Don't use generic scheduling for Cortex-R4.
(arm_issue_rate): New function.
(TARGET_SCHED_ISSUE_RATE): Define.
2008-03-10 Sebastian Pop <sebastian.pop@amd.com>
* doc/invoke.texi (-ftree-loop-distribution): Add an example.
......
......@@ -188,6 +188,7 @@ static void arm_target_help (void);
static unsigned HOST_WIDE_INT arm_shift_truncation_mask (enum machine_mode);
static bool arm_cannot_copy_insn_p (rtx);
static bool arm_tls_symbol_p (rtx x);
static int arm_issue_rate (void);
static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
......@@ -358,6 +359,9 @@ static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
#undef TARGET_CANNOT_FORCE_CONST_MEM
#define TARGET_CANNOT_FORCE_CONST_MEM arm_cannot_force_const_mem
#undef TARGET_SCHED_ISSUE_RATE
#define TARGET_SCHED_ISSUE_RATE arm_issue_rate
#undef TARGET_MANGLE_TYPE
#define TARGET_MANGLE_TYPE arm_mangle_type
......@@ -18710,6 +18714,22 @@ thumb2_output_casesi (rtx *operands)
}
}
/* Most ARM cores are single issue, but some newer ones can dual issue.
The scheduler descriptions rely on this being correct. */
static int
arm_issue_rate (void)
{
switch (arm_tune)
{
case cortexr4:
case cortexa8:
return 2;
default:
return 1;
}
}
/* A table and a function to perform ARM-specific name mangling for
NEON vector types in order to conform to the AAPCS (see "Procedure
Call Standard for the ARM Architecture", Appendix A). To qualify
......
;;- Machine description for ARM for GNU compiler
;; Copyright 1991, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000,
;; 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
;; Free Software Foundation, Inc.
;; Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
;; and Martin Simmons (@harleqn.co.uk).
;; More major hacks by Richard Earnshaw (rearnsha@arm.com).
......@@ -183,7 +184,7 @@
;; scheduling information.
(define_attr "insn"
"mov,mvn,smulxy,smlaxy,smlalxy,smulwy,smlawx,mul,muls,mla,mlas,umull,umulls,umlal,umlals,smull,smulls,smlal,smlals,smlawy,smuad,smuadx,smlad,smladx,smusd,smusdx,smlsd,smlsdx,smmul,smmulr,smmla,umaal,smlald,smlsld,clz,mrs,msr,xtab,other"
"mov,mvn,smulxy,smlaxy,smlalxy,smulwy,smlawx,mul,muls,mla,mlas,umull,umulls,umlal,umlals,smull,smulls,smlal,smlals,smlawy,smuad,smuadx,smlad,smladx,smusd,smusdx,smlsd,smlsdx,smmul,smmulr,smmla,umaal,smlald,smlsld,clz,mrs,msr,xtab,sdiv,udiv,other"
(const_string "other"))
; TYPE attribute is used to detect floating point instructions which, if
......@@ -332,7 +333,7 @@
(define_attr "generic_sched" "yes,no"
(const (if_then_else
(eq_attr "tune" "arm926ejs,arm1020e,arm1026ejs,arm1136js,arm1136jfs,cortexa8")
(eq_attr "tune" "arm926ejs,arm1020e,arm1026ejs,arm1136js,arm1136jfs,cortexa8,cortexr4")
(const_string "no")
(const_string "yes"))))
......@@ -349,6 +350,7 @@
(include "arm1026ejs.md")
(include "arm1136jfs.md")
(include "cortex-a8.md")
(include "cortex-r4.md")
;;---------------------------------------------------------------------------
......
;; ARM Thumb-2 Machine Description
;; Copyright (C) 2007 Free Software Foundation, Inc.
;; Copyright (C) 2007, 2008 Free Software Foundation, Inc.
;; Written by CodeSourcery, LLC.
;;
;; This file is part of GCC.
......@@ -1131,7 +1131,8 @@
(match_operand:SI 2 "s_register_operand" "r")))]
"TARGET_THUMB2 && arm_arch_hwdiv"
"sdiv%?\t%0, %1, %2"
[(set_attr "predicable" "yes")]
[(set_attr "predicable" "yes")
(set_attr "insn" "sdiv")]
)
(define_insn "udivsi3"
......@@ -1140,7 +1141,8 @@
(match_operand:SI 2 "s_register_operand" "r")))]
"TARGET_THUMB2 && arm_arch_hwdiv"
"udiv%?\t%0, %1, %2"
[(set_attr "predicable" "yes")]
[(set_attr "predicable" "yes")
(set_attr "insn" "udiv")]
)
(define_insn "*thumb2_cbz"
......
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