config.gcc (visium-*-*): Enable --with-cpu option, accept gr5 and gr6 as possible...
authorOlivier Hainque <hainque@adacore.com>
Sun, 13 Sep 2015 17:10:54 +0000 (17:10 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 13 Sep 2015 17:10:54 +0000 (17:10 +0000)
* config.gcc (visium-*-*): Enable --with-cpu option, accept gr5 and
gr6 as possible values, defaulting to gr5.  Set target_cpu_default2.
* config/visium/visium.h (OPTION_DEFAULT_SPECS): Define.
(TARGET_CPU_gr5): Likewise.
(TARGET_CPU_gr6): Likewise.
(MULTILIB_DEFAULTS): Likewise.
* config/visium/t-visium (MULTILIB_OPTIONS): Request distinct variants
for mcpu=gr5 and mcpu=gr6.
(MULTILIB_DIRNAMES): Adjust accordingly.

From-SVN: r227728

gcc/ChangeLog
gcc/config.gcc
gcc/config/visium/t-visium
gcc/config/visium/visium.h

index 587af497dd5b17edcb66f7afab472cdb476cc312..5a8fa311d8a7d16b15c56e8f12c30c3c5eb934f9 100644 (file)
@@ -1,3 +1,16 @@
+2015-09-13  Olivier Hainque  <hainque@adacore.com>
+           Eric Botcazou  <ebotcazou@adacore.com>
+
+       * config.gcc (visium-*-*): Enable --with-cpu option, accept gr5 and
+       gr6 as possible values, defaulting to gr5.  Set target_cpu_default2.
+       * config/visium/visium.h (OPTION_DEFAULT_SPECS): Define.
+       (TARGET_CPU_gr5): Likewise.
+       (TARGET_CPU_gr6): Likewise.
+       (MULTILIB_DEFAULTS): Likewise.
+       * config/visium/t-visium (MULTILIB_OPTIONS): Request distinct variants
+       for mcpu=gr5 and mcpu=gr6.
+       (MULTILIB_DIRNAMES): Adjust accordingly.
+
 2015-09-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
        * tree-ssa-loop-im.c (mem_ref_loc_p): Remove typedef.
        (get_addr_from_local_cache): Likewise.
        (drop_overlapping_mem_locs): Likewise.
        (val_reset): Likewise.
-                       (struct variable_union_info): Likewise.
-                                                               (variable_union): Likewise.
-                                                       (find_loc_in_1pdv): Likewise.
-               (insert_into_intersection): Likewise.
-                       (intersect_loc_chains): Likewise.
-                       (canonicalize_loc_order_check): Likewise.
+       (struct variable_union_info): Likewise.
+       (variable_union): Likewise.
+       (find_loc_in_1pdv): Likewise.
+       (insert_into_intersection): Likewise.
+       (intersect_loc_chains): Likewise.
+       (canonicalize_loc_order_check): Likewise.
        (canonicalize_values_mark): Likewise.
        (canonicalize_values_star): Likewise.
        (canonicalize_vars_star): Likewise.
index 5712547ed109585d1c64cb732418695f3daae01c..75807f59277462b8900845a57d9222b83481f905 100644 (file)
@@ -3346,6 +3346,9 @@ if test x$with_cpu = x ; then
          ;;
       esac
       ;;
+    visium-*-*)
+      with_cpu=gr5
+      ;;
   esac
 
   # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
@@ -4295,6 +4298,16 @@ case "${target}" in
                        ;;
                esac
                ;;
+       visium-*-*)
+               supported_defaults="cpu"
+               case $with_cpu in
+                 "" | gr5 | gr6)
+                       ;;
+                 *)    echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
+                       exit 1
+                       ;;
+               esac
+               ;;
 esac
 
 # Set some miscellaneous flags for particular targets.
@@ -4449,6 +4462,9 @@ case ${target} in
                        ;;
                esac
                ;;
+       visium-*-*)
+               target_cpu_default2="TARGET_CPU_$with_cpu"
+               ;;
 esac
 
 t=
index e06141c349bdf6866361b12a58738584fa033998..46234f05b78b06997e3104be216b946c903370a8 100644 (file)
@@ -17,5 +17,7 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-MULTILIB_OPTIONS = mcpu=gr6
-MULTILIB_DIRNAMES = gr6
+# The compiler defaults to -mcpu=gr5 but this may be overridden via --with-cpu
+# at configure time so the -mcpu setting must be symmetrical.
+MULTILIB_OPTIONS = mcpu=gr5/mcpu=gr6
+MULTILIB_DIRNAMES = gr5 gr6
index 71c960ed4fa65648708221fa54c646a14ce09ffe..c5b65b4be3470b7fe232c5f3a55916b036fd34e4 100644 (file)
@@ -1727,3 +1727,19 @@ extern int visium_indent_opcode;
        visium_indent_opcode = 0;       \
       }                                        \
   } while (0)
+
+/* Configure-time default values for common options.  */
+#define OPTION_DEFAULT_SPECS { "cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }
+
+/* Values of TARGET_CPU_DEFAULT specified via --with-cpu.  */
+#define TARGET_CPU_gr5 0
+#define TARGET_CPU_gr6 1
+
+/* Default -mcpu multilib for above values.  */
+#if TARGET_CPU_DEFAULT == TARGET_CPU_gr5
+#define MULTILIB_DEFAULTS { "mcpu=gr5" }
+#elif TARGET_CPU_DEFAULT == TARGET_CPU_gr6
+#define MULTILIB_DEFAULTS { "mcpu=gr6" }
+#else
+#error Unrecognized value in TARGET_CPU_DEFAULT
+#endif