[PATCH] Fix -march=barcelona and -mtune=barcelona

Jakub Jelinek jakub@redhat.com
Sat Dec 6 10:28:00 GMT 2008


Hi!

Unlike amdfam10, barcelona uses PROCESSOR_AMDFAM10 (14) instead
of CPU_AMDFAM10 (9) for schedule field.  That is larger than
any CPU_* value defined, not sure what scheduling barcelona uses
then.

Ok for trunk?

2008-12-06  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/i386.c (override_options): Use CPU_AMDFAM10
	instead of PROCESSOR_AMDFAM10 for barcelona's schedule.

--- gcc/config/i386/i386.c.jj	2008-12-04 14:18:57.000000000 +0100
+++ gcc/config/i386/i386.c	2008-12-06 10:49:22.000000000 +0100
@@ -2571,7 +2571,7 @@ override_options (bool main_args_p)
       {"amdfam10", PROCESSOR_AMDFAM10, CPU_AMDFAM10,
 	PTA_64BIT | PTA_MMX | PTA_3DNOW | PTA_3DNOW_A | PTA_SSE
 	| PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_ABM},
-      {"barcelona", PROCESSOR_AMDFAM10, PROCESSOR_AMDFAM10,
+      {"barcelona", PROCESSOR_AMDFAM10, CPU_AMDFAM10,
 	PTA_64BIT | PTA_MMX | PTA_3DNOW | PTA_3DNOW_A | PTA_SSE
 	| PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_ABM},
       {"generic32", PROCESSOR_GENERIC32, CPU_PENTIUMPRO,

	Jakub



More information about the Gcc-patches mailing list