From patchwork Fri Jul 2 01:15:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [rs6000] Fix setting of target_flags when TARGET_{VSX, DFP, ALTIVEC} is enabled. Date: Thu, 01 Jul 2010 15:15:33 -0000 From: Peter Bergner X-Patchwork-Id: 57623 Message-Id: <1278033333.3681.11.camel@otta> To: gcc-patches Cc: David Edelsohn , Michael Meissner While looking through the powerpc64-linux testsuite failures, I noticed that Mike's reciprocal estimate patches caused the vsx-vector-{5,6}.c test cases to fail because of a typo in rs6000_override_options. After fixing that, I noticed the fixed code caused a couple of new testsuite failures that I tracked down to us now setting MASK_PPC_GFXOPT in the target_flags whenever TARGET_ALTIVEC is enabled. This causes us to start generating the two operand form of the mfcr instruction which gas only accepts with -mpower4 or later. I fixed that by passing -mpower4 to gas whenever we use gcc's -maltivec option, unless we've explicitly passed -mcpu=XXX. I also added similar support for -mvsx. Bootstrapped and regtested on powerpc64-linux with no new regressions and vsx-vector-{5,6}.c test cases now passing. Ok for mainline once the slush is over? Peter * config/rs6000/rs6000.c (rs6000_override_options): Fix setting of default ISA flags. * config/rs6000/rs6000.h (ASM_CPU_SPEC) <-maltivec>: Pass -mpower4 by default. <-mvsx>: Add. Index: config/rs6000/rs6000.c =================================================================== --- config/rs6000/rs6000.c (revision 161490) +++ config/rs6000/rs6000.c (working copy) @@ -2656,11 +2656,11 @@ rs6000_override_options (const char *def /* For the newer switches (vsx, dfp, etc.) set some of the older options, unless the user explicitly used the -mno-