thomas@1461: Original patch from: ../4.3.2/340-make-mno-spe-work-as-expected.patch thomas@1461: thomas@1461: -= BEGIN original header =- thomas@1461: 2008-04-03 Nathan Froyd thomas@1461: Nathan Sidwell thomas@1461: thomas@1461: * config/rs6000/rs6000.opt (mspe): Remove Var property. thomas@1461: (misel): Likewise. thomas@1461: * config/rs6000/rs6000.h (rs6000_spe): Declare. thomas@1461: (rs6000_isel): Likewise. thomas@1461: * config/rs6000/rs6000.c (rs6000_spe): New variable. thomas@1461: (rs6000_isel): New variable. thomas@1461: (rs6000_handle_option): Handle OPT_mspe and OPT_misel. thomas@1461: thomas@1461: -= END original header =- thomas@1461: thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/rs6000/rs6000.c gcc-4.3.3/gcc/config/rs6000/rs6000.c thomas@1461: --- gcc-4.3.3.orig/gcc/config/rs6000/rs6000.c 2008-11-18 23:07:58.000000000 +0100 thomas@1461: +++ gcc-4.3.3/gcc/config/rs6000/rs6000.c 2009-01-27 22:28:55.000000000 +0100 thomas@1461: @@ -174,9 +174,15 @@ thomas@1461: /* Nonzero to use AltiVec ABI. */ thomas@1461: int rs6000_altivec_abi; thomas@1461: thomas@1461: +/* Nonzero if we want SPE SIMD instructions. */ thomas@1461: +int rs6000_spe; thomas@1461: + thomas@1461: /* Nonzero if we want SPE ABI extensions. */ thomas@1461: int rs6000_spe_abi; thomas@1461: thomas@1461: +/* Nonzero to use isel instructions. */ thomas@1461: +int rs6000_isel; thomas@1461: + thomas@1461: /* Nonzero if floating point operations are done in the GPRs. */ thomas@1461: int rs6000_float_gprs = 0; thomas@1461: thomas@1461: @@ -2144,11 +2150,21 @@ thomas@1461: rs6000_parse_yes_no_option ("vrsave", arg, &(TARGET_ALTIVEC_VRSAVE)); thomas@1461: break; thomas@1461: thomas@1461: + case OPT_misel: thomas@1461: + rs6000_explicit_options.isel = true; thomas@1461: + rs6000_isel = value; thomas@1461: + break; thomas@1461: + thomas@1461: case OPT_misel_: thomas@1461: rs6000_explicit_options.isel = true; thomas@1461: rs6000_parse_yes_no_option ("isel", arg, &(rs6000_isel)); thomas@1461: break; thomas@1461: thomas@1461: + case OPT_mspe: thomas@1461: + rs6000_explicit_options.spe = true; thomas@1461: + rs6000_spe = value; thomas@1461: + break; thomas@1461: + thomas@1461: case OPT_mspe_: thomas@1461: rs6000_explicit_options.spe = true; thomas@1461: rs6000_parse_yes_no_option ("spe", arg, &(rs6000_spe)); thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/rs6000/rs6000.h gcc-4.3.3/gcc/config/rs6000/rs6000.h thomas@1461: --- gcc-4.3.3.orig/gcc/config/rs6000/rs6000.h 2008-01-26 18:18:35.000000000 +0100 thomas@1461: +++ gcc-4.3.3/gcc/config/rs6000/rs6000.h 2009-01-27 22:28:55.000000000 +0100 thomas@1461: @@ -349,6 +349,8 @@ thomas@1461: extern int rs6000_ieeequad; thomas@1461: extern int rs6000_altivec_abi; thomas@1461: extern int rs6000_spe_abi; thomas@1461: +extern int rs6000_spe; thomas@1461: +extern int rs6000_isel; thomas@1461: extern int rs6000_float_gprs; thomas@1461: extern int rs6000_alignment_flags; thomas@1461: extern const char *rs6000_sched_insert_nops_str; thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/rs6000/rs6000.opt gcc-4.3.3/gcc/config/rs6000/rs6000.opt thomas@1461: --- gcc-4.3.3.orig/gcc/config/rs6000/rs6000.opt 2007-10-31 08:56:01.000000000 +0100 thomas@1461: +++ gcc-4.3.3/gcc/config/rs6000/rs6000.opt 2009-01-27 22:28:55.000000000 +0100 thomas@1461: @@ -190,7 +190,7 @@ thomas@1461: -mvrsave=yes/no Deprecated option. Use -mvrsave/-mno-vrsave instead thomas@1461: thomas@1461: misel thomas@1461: -Target Var(rs6000_isel) thomas@1461: +Target thomas@1461: Generate isel instructions thomas@1461: thomas@1461: misel= thomas@1461: @@ -198,7 +198,7 @@ thomas@1461: -misel=yes/no Deprecated option. Use -misel/-mno-isel instead thomas@1461: thomas@1461: mspe thomas@1461: -Target Var(rs6000_spe) thomas@1461: +Target thomas@1461: Generate SPE SIMD instructions on E500 thomas@1461: thomas@1461: mpaired