Hello Eric, On 2013-09-19 09:23, Eric Botcazou wrote: >> I don't expect that this will be back ported to GCC 4.8. You also need >> >Binutils 2.24 for this. >From a SPARC maintainership viewpoint, I'd think that this is backportable for > the upcoming 4.8.2 release, and the patches are essentially SPARC-specific, > but perhaps the RMs are of a different opinion here. 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 * 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 * 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. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.