source:
rtems-tools/tools/4.11/gcc/sparc/gcc-4.9.2-leon3v7.diff
@
d8a82fd
Last change on this file since d8a82fd was d8a82fd, checked in by Sebastian Huber <sebastian.huber@…>, on 12/04/14 at 12:02:27 | |
---|---|
|
|
File size: 10.6 KB |
-
gcc/config.gcc
From cd763e49bec71fd5ecda42c3fcd7a27fbcbddc5e Mon Sep 17 00:00:00 2001 From: danielh <danielh@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Thu, 6 Nov 2014 10:58:33 +0000 Subject: [PATCH] Backport from mainline 2014-11-06 Daniel Hellstrom <daniel@gaisler.com> * config.gcc (sparc*-*-*): Accept mcpu=leon3v7 processor. * doc/invoke.texi (SPARC options): Add mcpu=leon3v7 comment. * config/sparc/leon.md (leon3_load, leon_store, leon_fp_*): Handle leon3v7 as leon3. * config/sparc/sparc-opts.h (enum processor_type): Add LEON3V7. * config/sparc/sparc.c (sparc_option_override): Add leon3v7 support. * config/sparc/sparc.h (TARGET_CPU_leon3v7): New define. * config/sparc/sparc.md (cpu): Add leon3v7. * config/sparc/sparc.opt (enum processor_type): Add leon3v7. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@217187 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config.gcc | 5 ++++- gcc/config/sparc/leon.md | 14 +++++++------- gcc/config/sparc/sparc-opts.h | 1 + gcc/config/sparc/sparc.c | 3 +++ gcc/config/sparc/sparc.h | 40 +++++++++++++++++++++++++--------------- gcc/config/sparc/sparc.md | 1 + gcc/config/sparc/sparc.opt | 3 +++ gcc/doc/invoke.texi | 16 ++++++++-------- 9 files changed, 64 insertions(+), 31 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 9d3fa57..b36da74 100644
a b if test x$with_cpu = x ; then 3205 3205 *-leon[3-9]*) 3206 3206 with_cpu=leon3 3207 3207 ;; 3208 *-leon[3-9]v7*) 3209 with_cpu=leon3v7 3210 ;; 3208 3211 *) 3209 3212 with_cpu="`echo ${target} | sed 's/-.*$//'`" 3210 3213 ;; … … case "${target}" in 3993 3996 case ${val} in 3994 3997 "" | sparc | sparcv9 | sparc64 \ 3995 3998 | v7 | cypress \ 3996 | v8 | supersparc | hypersparc | leon | leon3 \3999 | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \ 3997 4000 | sparclite | f930 | f934 | sparclite86x \ 3998 4001 | sparclet | tsc701 \ 3999 4002 | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \ -
gcc/config/sparc/leon.md
diff --git a/gcc/config/sparc/leon.md b/gcc/config/sparc/leon.md index 82b6a0d..ad22e3b 100644
a b 29 29 30 30 ;; Use a double reservation to work around the load pipeline hazard on UT699. 31 31 (define_insn_reservation "leon3_load" 1 32 (and (eq_attr "cpu" "leon3 ") (eq_attr "type" "load,sload"))32 (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload")) 33 33 "leon_memory*2") 34 34 35 35 (define_insn_reservation "leon_store" 2 36 (and (eq_attr "cpu" "leon,leon3 ") (eq_attr "type" "store"))36 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store")) 37 37 "leon_memory*2") 38 38 39 39 ;; This describes Gaisler Research's FPU … … 44 44 (define_cpu_unit "grfpu_ds" "grfpu") 45 45 46 46 (define_insn_reservation "leon_fp_alu" 4 47 (and (eq_attr "cpu" "leon,leon3 ") (eq_attr "type" "fp,fpcmp,fpmul"))47 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul")) 48 48 "grfpu_alu, nothing*3") 49 49 50 50 (define_insn_reservation "leon_fp_divs" 16 51 (and (eq_attr "cpu" "leon,leon3 ") (eq_attr "type" "fpdivs"))51 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs")) 52 52 "grfpu_ds*14, nothing*2") 53 53 54 54 (define_insn_reservation "leon_fp_divd" 17 55 (and (eq_attr "cpu" "leon,leon3 ") (eq_attr "type" "fpdivd"))55 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd")) 56 56 "grfpu_ds*15, nothing*2") 57 57 58 58 (define_insn_reservation "leon_fp_sqrts" 24 59 (and (eq_attr "cpu" "leon,leon3 ") (eq_attr "type" "fpsqrts"))59 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts")) 60 60 "grfpu_ds*22, nothing*2") 61 61 62 62 (define_insn_reservation "leon_fp_sqrtd" 25 63 (and (eq_attr "cpu" "leon,leon3 ") (eq_attr "type" "fpsqrtd"))63 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd")) 64 64 "grfpu_ds*23, nothing*2") -
gcc/config/sparc/sparc-opts.h
diff --git a/gcc/config/sparc/sparc-opts.h b/gcc/config/sparc/sparc-opts.h index 13b375a..26017ed 100644
a b enum processor_type { 31 31 PROCESSOR_HYPERSPARC, 32 32 PROCESSOR_LEON, 33 33 PROCESSOR_LEON3, 34 PROCESSOR_LEON3V7, 34 35 PROCESSOR_SPARCLITE, 35 36 PROCESSOR_F930, 36 37 PROCESSOR_F934, -
gcc/config/sparc/sparc.c
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 5b00cca..b77e808 100644
a b sparc_option_override (void) 1246 1246 { TARGET_CPU_hypersparc, PROCESSOR_HYPERSPARC }, 1247 1247 { TARGET_CPU_leon, PROCESSOR_LEON }, 1248 1248 { TARGET_CPU_leon3, PROCESSOR_LEON3 }, 1249 { TARGET_CPU_leon3v7, PROCESSOR_LEON3V7 }, 1249 1250 { TARGET_CPU_sparclite, PROCESSOR_F930 }, 1250 1251 { TARGET_CPU_sparclite86x, PROCESSOR_SPARCLITE86X }, 1251 1252 { TARGET_CPU_sparclet, PROCESSOR_TSC701 }, … … sparc_option_override (void) 1274 1275 { "hypersparc", MASK_ISA, MASK_V8|MASK_FPU }, 1275 1276 { "leon", MASK_ISA, MASK_V8|MASK_LEON|MASK_FPU }, 1276 1277 { "leon3", MASK_ISA, MASK_V8|MASK_LEON3|MASK_FPU }, 1278 { "leon3v7", MASK_ISA, MASK_LEON3|MASK_FPU }, 1277 1279 { "sparclite", MASK_ISA, MASK_SPARCLITE }, 1278 1280 /* The Fujitsu MB86930 is the original sparclite chip, with no FPU. */ 1279 1281 { "f930", MASK_ISA|MASK_FPU, MASK_SPARCLITE }, … … sparc_option_override (void) 1526 1528 sparc_costs = &leon_costs; 1527 1529 break; 1528 1530 case PROCESSOR_LEON3: 1531 case PROCESSOR_LEON3V7: 1529 1532 sparc_costs = &leon3_costs; 1530 1533 break; 1531 1534 case PROCESSOR_SPARCLET: -
gcc/config/sparc/sparc.h
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index dd2b5ad..79dbba2 100644
a b extern enum cmodel sparc_cmodel; 137 137 #define TARGET_CPU_hypersparc 3 138 138 #define TARGET_CPU_leon 4 139 139 #define TARGET_CPU_leon3 5 140 #define TARGET_CPU_sparclite 6 141 #define TARGET_CPU_f930 6 /* alias */ 142 #define TARGET_CPU_f934 6 /* alias */ 143 #define TARGET_CPU_sparclite86x 7 144 #define TARGET_CPU_sparclet 8 145 #define TARGET_CPU_tsc701 8 /* alias */ 146 #define TARGET_CPU_v9 9 /* generic v9 implementation */ 147 #define TARGET_CPU_sparcv9 9 /* alias */ 148 #define TARGET_CPU_sparc64 9 /* alias */ 149 #define TARGET_CPU_ultrasparc 10 150 #define TARGET_CPU_ultrasparc3 11 151 #define TARGET_CPU_niagara 12 152 #define TARGET_CPU_niagara2 13 153 #define TARGET_CPU_niagara3 14 154 #define TARGET_CPU_niagara4 15 140 #define TARGET_CPU_leon3v7 6 141 #define TARGET_CPU_sparclite 7 142 #define TARGET_CPU_f930 7 /* alias */ 143 #define TARGET_CPU_f934 7 /* alias */ 144 #define TARGET_CPU_sparclite86x 8 145 #define TARGET_CPU_sparclet 9 146 #define TARGET_CPU_tsc701 9 /* alias */ 147 #define TARGET_CPU_v9 10 /* generic v9 implementation */ 148 #define TARGET_CPU_sparcv9 10 /* alias */ 149 #define TARGET_CPU_sparc64 10 /* alias */ 150 #define TARGET_CPU_ultrasparc 11 151 #define TARGET_CPU_ultrasparc3 12 152 #define TARGET_CPU_niagara 13 153 #define TARGET_CPU_niagara2 14 154 #define TARGET_CPU_niagara3 15 155 #define TARGET_CPU_niagara4 16 155 156 156 157 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \ 157 158 || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \ … … extern enum cmodel sparc_cmodel; 239 240 #define ASM_CPU32_DEFAULT_SPEC AS_LEON_FLAG 240 241 #endif 241 242 243 #if TARGET_CPU_DEFAULT == TARGET_CPU_leon3v7 244 #define CPP_CPU32_DEFAULT_SPEC "-D__leon__" 245 #define ASM_CPU32_DEFAULT_SPEC AS_LEONV7_FLAG 246 #endif 247 242 248 #endif 243 249 244 250 #if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC) … … extern enum cmodel sparc_cmodel; 285 291 %{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \ 286 292 %{mcpu=leon:-D__leon__ -D__sparc_v8__} \ 287 293 %{mcpu=leon3:-D__leon__ -D__sparc_v8__} \ 294 %{mcpu=leon3v7:-D__leon__} \ 288 295 %{mcpu=v9:-D__sparc_v9__} \ 289 296 %{mcpu=ultrasparc:-D__sparc_v9__} \ 290 297 %{mcpu=ultrasparc3:-D__sparc_v9__} \ … … extern enum cmodel sparc_cmodel; 334 341 %{mcpu=hypersparc:-Av8} \ 335 342 %{mcpu=leon:" AS_LEON_FLAG "} \ 336 343 %{mcpu=leon3:" AS_LEON_FLAG "} \ 344 %{mcpu=leon3v7:" AS_LEONV7_FLAG "} \ 337 345 %{mv8plus:-Av8plus} \ 338 346 %{mcpu=v9:-Av9} \ 339 347 %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \ … … extern int sparc_indent_opcode; 1760 1768 1761 1769 #ifdef HAVE_AS_LEON 1762 1770 #define AS_LEON_FLAG "-Aleon" 1771 #define AS_LEONV7_FLAG "-Aleon" 1763 1772 #else 1764 1773 #define AS_LEON_FLAG "-Av8" 1774 #define AS_LEONV7_FLAG "-Av7" 1765 1775 #endif 1766 1776 1767 1777 /* We use gcc _mcount for profiling. */ -
gcc/config/sparc/sparc.md
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 76c3315..954c297 100644
a b 221 221 hypersparc, 222 222 leon, 223 223 leon3, 224 leon3v7, 224 225 sparclite, 225 226 f930, 226 227 f934, -
gcc/config/sparc/sparc.opt
diff --git a/gcc/config/sparc/sparc.opt b/gcc/config/sparc/sparc.opt index 64e4095..3cd2b60 100644
a b EnumValue 153 153 Enum(sparc_processor_type) String(leon3) Value(PROCESSOR_LEON3) 154 154 155 155 EnumValue 156 Enum(sparc_processor_type) String(leon3v7) Value(PROCESSOR_LEON3V7) 157 158 EnumValue 156 159 Enum(sparc_processor_type) String(sparclite) Value(PROCESSOR_SPARCLITE) 157 160 158 161 EnumValue -
gcc/doc/invoke.texi
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index bea8be2..7bb83ed 100644
a b the rules of the ABI@. 21099 21099 Set the instruction set, register set, and instruction scheduling parameters 21100 21100 for machine type @var{cpu_type}. Supported values for @var{cpu_type} are 21101 21101 @samp{v7}, @samp{cypress}, @samp{v8}, @samp{supersparc}, @samp{hypersparc}, 21102 @samp{leon}, @samp{leon3}, @samp{ sparclite}, @samp{f930}, @samp{f934},21103 @samp{ sparclite86x}, @samp{sparclet}, @samp{tsc701}, @samp{v9},21102 @samp{leon}, @samp{leon3}, @samp{leon3v7}, @samp{sparclite}, @samp{f930}, 21103 @samp{f934}, @samp{sparclite86x}, @samp{sparclet}, @samp{tsc701}, @samp{v9}, 21104 21104 @samp{ultrasparc}, @samp{ultrasparc3}, @samp{niagara}, @samp{niagara2}, 21105 21105 @samp{niagara3} and @samp{niagara4}. 21106 21106 … … implementations. 21118 21118 21119 21119 @table @asis 21120 21120 @item v7 21121 cypress 21121 cypress, leon3v7 21122 21122 21123 21123 @item v8 21124 21124 supersparc, hypersparc, leon, leon3 … … option @option{-mcpu=@var{cpu_type}} does. 21183 21183 The same values for @option{-mcpu=@var{cpu_type}} can be used for 21184 21184 @option{-mtune=@var{cpu_type}}, but the only useful values are those 21185 21185 that select a particular CPU implementation. Those are @samp{cypress}, 21186 @samp{supersparc}, @samp{hypersparc}, @samp{leon}, @samp{leon3}, @samp{f930},21187 @samp{ f934}, @samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc},21188 @samp{ultrasparc 3}, @samp{niagara}, @samp{niagara2}, @samp{niagara3} and21189 @samp{niagara 4}. With native Solaris and GNU/Linux toolchains, @samp{native}21190 can also be used.21186 @samp{supersparc}, @samp{hypersparc}, @samp{leon}, @samp{leon3}, 21187 @samp{leon3v7}, @samp{f930}, @samp{f934}, @samp{sparclite86x}, @samp{tsc701}, 21188 @samp{ultrasparc}, @samp{ultrasparc3}, @samp{niagara}, @samp{niagara2}, 21189 @samp{niagara3} and @samp{niagara4}. With native Solaris and GNU/Linux 21190 toolchains, @samp{native} can also be used. 21191 21191 21192 21192 @item -mv8plus 21193 21193 @itemx -mno-v8plus
Note: See TracBrowser
for help on using the repository browser.