remove TARGET_E500 and factorize SPE defaults computation in powerpc ports

Olivier Hainque hainque@adacore.com
Tue May 15 13:47:00 GMT 2012


Hello David,

Back on this one after Alan's correction and extra testing of the
patch on my side.

On May 7, 2012, at 18:59 , David Edelsohn wrote:

>>>   http://gcc.gnu.org/ml/gcc-patches/2010-08/msg01667.html
> 
> Yes, exactly.  If we can work through the fallout, this is exactly the
> type of cleanup I envisioned.

 Attached is a slightly modified version, with a bug fix regarding the
 ISEL deactivation. The original patch kept the logic of the test but
 mistakenly just extracted out of an outer "else" conditional branch, so
 doing it for e500 targets as well. In this version, the test is moved
 in the "default:" part of the case statement introduced to isolate e500
 specific operations, replacing the previous if/else construct.

 This version builds and regtests fine for default languages on
 powerpc-eabisim on an x86_64-linux host. It also bootstraps and regtests
 fine for languages=all,ada on powerpc-generic-linux-gnu.

 OK to commit ?

 With Kind Regards,

 Olivier

2012-05-15  Olivier Hainque  <hainque@adacore.com>

	config/rs6000:

	* rs6000-opts.h (enum processor_type): Add PROCESSOR_PPC8548.
	* rs6000-cpus.def: Reference it for cpu="8548".
	* rs6000.md (cpu attribute definition): Add ppc8548.
	* 8540.md: indicate that the units/patterns apply to ppc8548 as well.

	* rs6000.c (rs6000_option_override_internal): Rename default_cpu into
	implicit_cpu, conveying what --with-cpu was passed at configure time.
	Treat implicit_cpu as have_cpu. Pick defaults for SPE related flags,
	check that what is queried is supported by the selected configuration.
	Rework the single/double_float and MASK_STRING resets to hit for all
	the E500 cores (854x + E500MC variants). Select the ppc8540 costs for
	PROCESSOR_PPC8548 as well.
	(rs6000_issue_rate): case CPU_PPC8548 together with CPU_PPC8540.
	(rs6000_use_sched_lookahead): Likewise, rewriting function as a case
	statement instead of a sequence of ifs.

	* rs6000.h (TARGET_E500): Remove.
	(TARGET_NO_LWSYNC): Adjust accordingly.
	* e500.h (TARGET_E500): Remove.
	(CHECK_E500_OPTIONS): Adjust accordingly.
	* eabispe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Remove.
	(TARGET_DEFAULT): Reformat definition to match the one in linuxspe.h.
	* linuxspe.h: Likewise.
	* vxworks.h: Remove bogus TARGET_E500 overrides and superfluous comments.
	* e500-double.h: Remove.

	gcc:

	* config.gcc (pick a default with_cpu): For powerpc*-*-*spe*,
	default to with_cpu=8548 if --enable-e500-double, and to 8540
	otherwise.
	(set misc flags section): For powerpc*|rs6000*, remove inclusion
	of e500-double.h for --enable-e500-double.

 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: e500-2.diff
Type: application/octet-stream
Size: 25403 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120515/ab9ecbd2/attachment.obj>


More information about the Gcc-patches mailing list