This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [power7-meissner] Fix PR 39457
It turns out I need to disable float in LR/CTR on the power7, so this revised
patch makes the power7 default to disable float but other ports allow float in
LR/CTR. I need to spend some time reworking the reload stuff.
Index: gcc/config/rs6000/rs6000.opt
===================================================================
--- gcc/config/rs6000/rs6000.opt (revision 144846)
+++ gcc/config/rs6000/rs6000.opt (working copy)
@@ -140,7 +140,7 @@ Target Report Var(TARGET_VSX_SCALAR_MEMO
If -mvsx, use VSX scalar memory reference instructions for scalar double (off by default)
mdisallow-float-in-lr-ctr
-Target Undocumented Var(TARGET_DISALLOW_FLOAT_IN_LR_CTR)
+Target Undocumented Var(TARGET_DISALLOW_FLOAT_IN_LR_CTR) Init(-1)
mupdate
Target Report Var(TARGET_UPDATE) Init(1)
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 144846)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -1454,8 +1454,9 @@ rs6000_hard_regno_mode_ok (int regno, en
While this is desirable in theory, disabling float to go in LR/CTR does
cause some regressions, so until they are taken care of, revert to the old
- behavior by default. */
- if (TARGET_DISALLOW_FLOAT_IN_LR_CTR
+ behavior by default for most power systems, but enable it for power7. */
+ if ((TARGET_DISALLOW_FLOAT_IN_LR_CTR > 0
+ || (TARGET_DISALLOW_FLOAT_IN_LR_CTR < 0 && TARGET_VSX))
&& (regno == CTR_REGNO || regno == LR_REGNO || regno == MQ_REGNO))
return (GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_SIZE (mode) <= UNITS_PER_WORD);
--
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com