summaryrefslogtreecommitdiff
path: root/gcc/regclass.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-08 09:18:47 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-08 09:18:47 +0000
commit595d8922bac1a80410c835a5de54e1451fb03375 (patch)
treece7863996435c28cbfbe8f3f461504effdca6367 /gcc/regclass.c
parent70009d12bcfeaf2f2e2a61e66aaa31dd575b4d30 (diff)
downloadgcc-595d8922bac1a80410c835a5de54e1451fb03375.tar.gz
* regclass.c (choose_hard_reg_mode): Iterate over all CC modes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35566 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 4439857a403..90c59b2b37e 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -618,9 +618,11 @@ choose_hard_reg_mode (regno, nregs)
if (found_mode != VOIDmode)
return found_mode;
- if (HARD_REGNO_NREGS (regno, CCmode) == nregs
- && HARD_REGNO_MODE_OK (regno, CCmode))
- return CCmode;
+ /* Iterate over all of the CCmodes. */
+ for (mode = CCmode; mode < NUM_MACHINE_MODES; ++mode)
+ if (HARD_REGNO_NREGS (regno, mode) == nregs
+ && HARD_REGNO_MODE_OK (regno, mode))
+ return mode;
/* We can't find a mode valid for this register. */
return VOIDmode;