> I back ported your list of changes from mainline to GCC 4.8.  See the
> attached patches.  In addition to your proposed changes I had to add
> 
> 2013-04-10  Steven Bosscher  <ste...@gcc.gnu.org>
> 
>         * config/sparc/sparc.c: Include tree-pass.h.
>         (TARGET_MACHINE_DEPENDENT_REORG): Do not redefine.
>         (sparc_reorg): Rename to sparc_do_work_around_errata.  Move to
>         head of file.  Change return type.  Split off gate function.
>         (sparc_gate_work_around_errata): New function.
>         (pass_work_around_errata): New pass definition.
>         (insert_pass_work_around_errata) New pass insert definition to
>         insert pass_work_around_errata just after delayed-branch scheduling.
> (sparc_option_override): Insert the pass.
>         * config/sparc/t-sparc (sparc.o): Add TREE_PASS_H dependence.
> 
> This was necessary for
> 
> 2013-07-22  Eric Botcazou  <ebotca...@adacore.com>
> 
>       * config.gcc (sparc*-*-*): Accept leon3 processor.
>       (sparc-leon*-*): Merge with sparc*-*-* and add leon3 support.
>       * doc/invoke.texi (SPARC Options): Adjust -mfix-ut699 entry.
>       * config/sparc/sparc-opts.h (enum processor_type): Add PROCESSOR_LEON3.
>       * config/sparc/sparc.opt (enum processor_type): Add leon3.
>       (mfix-ut699): Adjust comment.
>       * config/sparc/sparc.h (TARGET_CPU_leon3): New define.
>       (CPP_CPU32_DEFAULT_SPEC): Add leon3 support.
>       (CPP_CPU_SPEC): Likewise.
>       (ASM_CPU_SPEC): Likewise.
>       * config/sparc/sparc.c (leon3_cost): New constant.
>       (sparc_option_override): Add leon3 support.
>       (mem_ref): New function.
>       (sparc_gate_work_around_errata): Return true if -mfix-ut699 is enabled.
>       (sparc_do_work_around_errata): Look into the instruction in the delay
>       slot and adjust accordingly.  Add fix for the data cache nullify issues
>       of the UT699.  Change insertion position for the NOP.
>       * config/sparc/leon.md (leon_fpalu, leon_fpmds, write_buf): Delete.
>       (leon3_load): New reservation.
>       (leon_store): Bump latency to 2.
>       (grfpu): New automaton.
>       (grfpu_alu): New unit.
>       (grfpu_ds): Likewise.
>       (leon_fp_alu): Adjust.
>       (leon_fp_mult): Delete.
>       (leon_fp_div): Split into leon_fp_divs and leon_fp_divd.
>       (leon_fp_sqrt): Split into leon_fp_sqrts and leon_fp_sqrtd.
>       * config/sparc/sparc.md (cpu): Add leon3.
>       * config/sparc/sync.md (atomic_exchangesi): Disable if -mfix-ut699.
>       (swapsi): Likewise.
>       (atomic_test_and_set): Likewise.
>       (ldstub): Likewise.
> 
> I cannot judge if this was good or bad.  I can only perform mechanical
> changes since I don't know how the compiler works.
> 
> I run the GCC test suite on the GDB SIS with RTEMS, but its hard for me to
> interpret the results.  I think there are no new test failures due to the
> back ports.

Everything is clean on SPARC/Solaris and SPARC64/Solaris as well so I have no 
objections to backporting the whole set from a SPARC maintainership viewpoint
(and we have been using something equivalent at AdaCore for some time without 
any problems so far).  But we need the blessing of the RMs I guess here.

-- 
Eric Botcazou

Reply via email to