diff mbox series

[MIPS] Prevent allocation of a GPR for a floating mode pseudo

Message ID 1581335220-18501-1-git-send-email-mihailo.stojanovic@rt-rk.com
State New
Headers show
Series [MIPS] Prevent allocation of a GPR for a floating mode pseudo | expand

Commit Message

Mihailo Stojanovic Feb. 10, 2020, 11:47 a.m. UTC
Similar to the mirror case of allocating an FPR for an integer mode
pseudo, prevent GPRs from being allocated for a floating mode pseudo.
---
 gcc/config/mips/mips.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Mihailo Stojanovic Feb. 10, 2020, 1:29 p.m. UTC | #1
Please disregard this.

Forgot to add the ChangeLog entry.

Mihailo
diff mbox series

Patch

diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 513fc5f..ffcb14d 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -22492,6 +22492,12 @@  mips_ira_change_pseudo_allocno_class (int regno, reg_class_t allocno_class,
      instructions that say integer mode values must be placed in FPRs.  */
   if (INTEGRAL_MODE_P (PSEUDO_REGNO_MODE (regno)) && allocno_class == ALL_REGS)
     return GR_REGS;
+
+  /* Likewise for the mirror case of floating mode pseudos being allocated in
+     a GPR.  */
+  if (FLOAT_MODE_P (PSEUDO_REGNO_MODE (regno)) && allocno_class == ALL_REGS)
+    return FP_REGS;
+
   return allocno_class;
 }