From: David Holsgrove Date: Sun, 3 Mar 2013 17:34:50 +0000 (+0000) Subject: Support -mxl-reorder and swap instructions. X-Git-Tag: upstream/12.2.0~71031 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb8a1637a9914fb25bfbc9604fc20ca5e6c0601e;p=platform%2Fupstream%2Fgcc.git Support -mxl-reorder and swap instructions. * config/microblaze/microblaze.c: Check mcpu, pcmp requirement and set TARGET_REORDER to 0 if not met. * config/microblaze/microblaze.h: Add -mxl-reorder to DRIVER_SELF_SPECS * config/microblaze/microblaze.md: New bswapsi2 and bswaphi2 instructions emitted if TARGET_REORDER * config/microblaze/microblaze.opt: New option -mxl-reorder set to 1 or 0 for -m/-mno case, but initialises as 2 to detect default use case separately From-SVN: r196415 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32f6e4b..dabc79a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2013-03-02 David Holsgrove + + * config/microblaze/microblaze.c: + Check mcpu, pcmp requirement and set TARGET_REORDER to 0 if not met. + * config/microblaze/microblaze.h: Add -mxl-reorder to DRIVER_SELF_SPECS + * config/microblaze/microblaze.md: New bswapsi2 and bswaphi2 + instructions emitted if TARGET_REORDER + * config/microblaze/microblaze.opt: New option -mxl-reorder set to 1 + or 0 for -m/-mno case, but initialises as 2 to detect default use case + separately + 2013-03-01 Xinliang David Li * tree-ssa-uninit.c (compute_control_dep_chain): Limit post-dom diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index f45d30c..8458253 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -1380,6 +1380,21 @@ microblaze_option_override (void) microblaze_has_clz = 0; } + /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified. */ + ver = MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v8.30.a"); + if (ver < 0) + { + if (TARGET_REORDER == 1) + warning (0, "-mxl-reorder can be used only with -mcpu=v8.30.a or greater"); + TARGET_REORDER = 0; + } + else if ((ver == 0) && !TARGET_PATTERN_COMPARE) + { + if (TARGET_REORDER == 1) + warning (0, "-mxl-reorder requires -mxl-pattern-compare for -mcpu=v8.30.a"); + TARGET_REORDER = 0; + } + if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) error ("-mxl-multiply-high requires -mno-xl-soft-mul"); diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h index a188a2e..23ed16e 100644 --- a/gcc/config/microblaze/microblaze.h +++ b/gcc/config/microblaze/microblaze.h @@ -78,6 +78,7 @@ extern enum pipeline_type microblaze_pipe; "%{mno-xl-barrel-shift:%