patches/gcc/4.3.5/340-make-mno-spe-work-as-expected.patch
changeset 2124 5dd0b83ae528
parent 1461 35b30f8fb307
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gcc/4.3.5/340-make-mno-spe-work-as-expected.patch	Sun Sep 19 18:37:18 2010 +0200
     1.3 @@ -0,0 +1,90 @@
     1.4 +Original patch from: ../4.3.2/340-make-mno-spe-work-as-expected.patch
     1.5 +
     1.6 +-= BEGIN original header =-
     1.7 +2008-04-03  Nathan Froyd  <froydnj@codesourcery.com>
     1.8 +            Nathan Sidwell  <nathan@codesourcery.com>
     1.9 +
    1.10 +        * config/rs6000/rs6000.opt (mspe): Remove Var property.
    1.11 +        (misel): Likewise.
    1.12 +        * config/rs6000/rs6000.h (rs6000_spe): Declare.
    1.13 +        (rs6000_isel): Likewise.
    1.14 +        * config/rs6000/rs6000.c (rs6000_spe): New variable.
    1.15 +        (rs6000_isel): New variable.
    1.16 +        (rs6000_handle_option): Handle OPT_mspe and OPT_misel.                                                                                         
    1.17 +
    1.18 +-= END original header =-
    1.19 +
    1.20 +diff -durN gcc-4.3.3.orig/gcc/config/rs6000/rs6000.c gcc-4.3.3/gcc/config/rs6000/rs6000.c
    1.21 +--- gcc-4.3.3.orig/gcc/config/rs6000/rs6000.c	2008-11-18 23:07:58.000000000 +0100
    1.22 ++++ gcc-4.3.3/gcc/config/rs6000/rs6000.c	2009-01-27 22:28:55.000000000 +0100
    1.23 +@@ -174,9 +174,15 @@
    1.24 + /* Nonzero to use AltiVec ABI.  */
    1.25 + int rs6000_altivec_abi;
    1.26 + 
    1.27 ++/* Nonzero if we want SPE SIMD instructions.  */
    1.28 ++int rs6000_spe;
    1.29 ++
    1.30 + /* Nonzero if we want SPE ABI extensions.  */
    1.31 + int rs6000_spe_abi;
    1.32 + 
    1.33 ++/* Nonzero to use isel instructions.  */
    1.34 ++int rs6000_isel;
    1.35 ++
    1.36 + /* Nonzero if floating point operations are done in the GPRs.  */
    1.37 + int rs6000_float_gprs = 0;
    1.38 + 
    1.39 +@@ -2144,11 +2150,21 @@
    1.40 +       rs6000_parse_yes_no_option ("vrsave", arg, &(TARGET_ALTIVEC_VRSAVE));
    1.41 +       break;
    1.42 + 
    1.43 ++    case OPT_misel:
    1.44 ++      rs6000_explicit_options.isel = true;
    1.45 ++      rs6000_isel = value;
    1.46 ++      break;
    1.47 ++
    1.48 +     case OPT_misel_:
    1.49 +       rs6000_explicit_options.isel = true;
    1.50 +       rs6000_parse_yes_no_option ("isel", arg, &(rs6000_isel));
    1.51 +       break;
    1.52 + 
    1.53 ++    case OPT_mspe:
    1.54 ++      rs6000_explicit_options.spe = true;
    1.55 ++      rs6000_spe = value;
    1.56 ++      break;
    1.57 ++
    1.58 +     case OPT_mspe_:
    1.59 +       rs6000_explicit_options.spe = true;
    1.60 +       rs6000_parse_yes_no_option ("spe", arg, &(rs6000_spe));
    1.61 +diff -durN gcc-4.3.3.orig/gcc/config/rs6000/rs6000.h gcc-4.3.3/gcc/config/rs6000/rs6000.h
    1.62 +--- gcc-4.3.3.orig/gcc/config/rs6000/rs6000.h	2008-01-26 18:18:35.000000000 +0100
    1.63 ++++ gcc-4.3.3/gcc/config/rs6000/rs6000.h	2009-01-27 22:28:55.000000000 +0100
    1.64 +@@ -349,6 +349,8 @@
    1.65 + extern int rs6000_ieeequad;
    1.66 + extern int rs6000_altivec_abi;
    1.67 + extern int rs6000_spe_abi;
    1.68 ++extern int rs6000_spe;
    1.69 ++extern int rs6000_isel;
    1.70 + extern int rs6000_float_gprs;
    1.71 + extern int rs6000_alignment_flags;
    1.72 + extern const char *rs6000_sched_insert_nops_str;
    1.73 +diff -durN gcc-4.3.3.orig/gcc/config/rs6000/rs6000.opt gcc-4.3.3/gcc/config/rs6000/rs6000.opt
    1.74 +--- gcc-4.3.3.orig/gcc/config/rs6000/rs6000.opt	2007-10-31 08:56:01.000000000 +0100
    1.75 ++++ gcc-4.3.3/gcc/config/rs6000/rs6000.opt	2009-01-27 22:28:55.000000000 +0100
    1.76 +@@ -190,7 +190,7 @@
    1.77 + -mvrsave=yes/no	Deprecated option.  Use -mvrsave/-mno-vrsave instead
    1.78 + 
    1.79 + misel
    1.80 +-Target Var(rs6000_isel)
    1.81 ++Target
    1.82 + Generate isel instructions
    1.83 + 
    1.84 + misel=
    1.85 +@@ -198,7 +198,7 @@
    1.86 + -misel=yes/no	Deprecated option.  Use -misel/-mno-isel instead
    1.87 + 
    1.88 + mspe
    1.89 +-Target Var(rs6000_spe)
    1.90 ++Target
    1.91 + Generate SPE SIMD instructions on E500
    1.92 + 
    1.93 + mpaired