1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gcc/4.3.1/340-make-mno-spe-work-as-expected.patch Thu Nov 17 01:14:12 2011 +0100
1.3 @@ -0,0 +1,90 @@
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 +Index: gcc/config/rs6000/rs6000.c
1.16 +===================================================================
1.17 +--- a/gcc/config/rs6000/rs6000.c (revision 134642)
1.18 ++++ b/gcc/config/rs6000/rs6000.c (working copy)
1.19 +@@ -174,9 +174,15 @@ int rs6000_ieeequad;
1.20 + /* Nonzero to use AltiVec ABI. */
1.21 + int rs6000_altivec_abi;
1.22 +
1.23 ++/* Nonzero if we want SPE SIMD instructions. */
1.24 ++int rs6000_spe;
1.25 ++
1.26 + /* Nonzero if we want SPE ABI extensions. */
1.27 + int rs6000_spe_abi;
1.28 +
1.29 ++/* Nonzero to use isel instructions. */
1.30 ++int rs6000_isel;
1.31 ++
1.32 + /* Nonzero if floating point operations are done in the GPRs. */
1.33 + int rs6000_float_gprs = 0;
1.34 +
1.35 +@@ -2177,11 +2183,21 @@ rs6000_handle_option (size_t code, const
1.36 + rs6000_parse_yes_no_option ("vrsave", arg, &(TARGET_ALTIVEC_VRSAVE));
1.37 + break;
1.38 +
1.39 ++ case OPT_misel:
1.40 ++ rs6000_explicit_options.isel = true;
1.41 ++ rs6000_isel = value;
1.42 ++ break;
1.43 ++
1.44 + case OPT_misel_:
1.45 + rs6000_explicit_options.isel = true;
1.46 + rs6000_parse_yes_no_option ("isel", arg, &(rs6000_isel));
1.47 + break;
1.48 +
1.49 ++ case OPT_mspe:
1.50 ++ rs6000_explicit_options.spe = true;
1.51 ++ rs6000_spe = value;
1.52 ++ break;
1.53 ++
1.54 + case OPT_mspe_:
1.55 + rs6000_explicit_options.spe = true;
1.56 + rs6000_parse_yes_no_option ("spe", arg, &(rs6000_spe));
1.57 +Index: gcc/config/rs6000/rs6000.opt
1.58 +===================================================================
1.59 +--- a/gcc/config/rs6000/rs6000.opt (revision 134642)
1.60 ++++ b/gcc/config/rs6000/rs6000.opt (working copy)
1.61 +@@ -190,7 +190,7 @@ Target RejectNegative Joined
1.62 + -mvrsave=yes/no Deprecated option. Use -mvrsave/-mno-vrsave instead
1.63 +
1.64 + misel
1.65 +-Target Var(rs6000_isel)
1.66 ++Target
1.67 + Generate isel instructions
1.68 +
1.69 + misel=
1.70 +@@ -198,7 +198,7 @@ Target RejectNegative Joined
1.71 + -misel=yes/no Deprecated option. Use -misel/-mno-isel instead
1.72 +
1.73 + mspe
1.74 +-Target Var(rs6000_spe)
1.75 ++Target
1.76 + Generate SPE SIMD instructions on E500
1.77 +
1.78 + mpaired
1.79 +Index: gcc/config/rs6000/rs6000.h
1.80 +===================================================================
1.81 +--- a/gcc/config/rs6000/rs6000.h (revision 134642)
1.82 ++++ b/gcc/config/rs6000/rs6000.h (working copy)
1.83 +@@ -367,6 +367,8 @@ extern int rs6000_long_double_type_size;
1.84 + extern int rs6000_ieeequad;
1.85 + extern int rs6000_altivec_abi;
1.86 + extern int rs6000_spe_abi;
1.87 ++extern int rs6000_spe;
1.88 ++extern int rs6000_isel;
1.89 + extern int rs6000_float_gprs;
1.90 + extern int rs6000_alignment_flags;
1.91 + extern const char *rs6000_sched_insert_nops_str;
1.92 +
1.93 +