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