rs6000.h (ASM_CPU_POWER5_SPEC): Define.
authorBen Elliston <bje@au.ibm.com>
Mon, 25 Feb 2008 18:32:52 +0000 (18:32 +0000)
committerBen Elliston <bje@gcc.gnu.org>
Mon, 25 Feb 2008 18:32:52 +0000 (05:32 +1100)
* config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC): Define.
(ASM_CPU_POWER6_SPEC): Likewise.
(ASM_CPU_SPEC): Pass %(asm_cpu_power5) for -mcpu=power5.
Likewise, pass %(asm_cpu_power6) for -mcpu=power6.
(EXTRA_SPECS): Add asm_cpu_power5, asm_cpu_power6 spec strings.

From-SVN: r132631

gcc/ChangeLog
gcc/config/rs6000/rs6000.h

index c19f508fc3d2fedfc8e272af82b5ceeda45ebbfe..ac0ddb73b18956df54923571514682486c2b652f 100644 (file)
@@ -1,3 +1,11 @@
+2008-02-26  Ben Elliston  <bje@au.ibm.com>
+
+       * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC): Define.
+       (ASM_CPU_POWER6_SPEC): Likewise.
+       (ASM_CPU_SPEC): Pass %(asm_cpu_power5) for -mcpu=power5.
+       Likewise, pass %(asm_cpu_power6) for -mcpu=power6.
+       (EXTRA_SPECS): Add asm_cpu_power5, asm_cpu_power6 spec strings.
+
 2008-02-25  Richard Guenther  <rguenther@suse.de>
 
        * tree-flow.h (uid_decl_map_hash, uid_decl_map_eq): Move ...
index f660112267e00c82c45a66c2856673abbd8e358d..7f7dd57e1e10328d71858643a9f719185e27a21a 100644 (file)
 #define TARGET_PAIRED_FLOAT 0
 #endif
 
+#ifdef HAVE_AS_POPCNTB
+#define ASM_CPU_POWER5_SPEC "-mpower5"
+#else
+#define ASM_CPU_POWER5_SPEC "-mpower4"
+#endif
+
+#ifdef HAVE_AS_DFP
+#define ASM_CPU_POWER6_SPEC "-mpower6 -maltivec"
+#else
+#define ASM_CPU_POWER6_SPEC "-mpower4 -maltivec"
+#endif
+
 /* Common ASM definitions used by ASM_SPEC among the various targets
    for handling -mcpu=xxx switches.  */
 #define ASM_CPU_SPEC \
 %{mcpu=power2: -mpwrx} \
 %{mcpu=power3: -mppc64} \
 %{mcpu=power4: -mpower4} \
-%{mcpu=power5: -mpower4} \
-%{mcpu=power5+: -mpower4} \
-%{mcpu=power6: -mpower4 -maltivec} \
-%{mcpu=power6x: -mpower4 -maltivec} \
+%{mcpu=power5: %(asm_cpu_power5)} \
+%{mcpu=power5+: %(asm_cpu_power5)} \
+%{mcpu=power6: %(asm_cpu_power6) -maltivec} \
+%{mcpu=power6x: %(asm_cpu_power6) -maltivec} \
 %{mcpu=powerpc: -mppc} \
 %{mcpu=rios: -mpwr} \
 %{mcpu=rios1: -mpwr} \
   { "asm_cpu",                 ASM_CPU_SPEC },                         \
   { "asm_default",             ASM_DEFAULT_SPEC },                     \
   { "cc1_cpu",                 CC1_CPU_SPEC },                         \
+  { "asm_cpu_power5",          ASM_CPU_POWER5_SPEC },                  \
+  { "asm_cpu_power6",          ASM_CPU_POWER6_SPEC },                  \
   SUBTARGET_EXTRA_SPECS
 
 /* -mcpu=native handling only makes sense with compiler running on