diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-09 21:40:48 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-09 21:40:48 +0000 |
commit | bccb54440a2db32b6bf7feaf695859a1f5062bed (patch) | |
tree | 0f4ba6c4f6978df7d77d7f9b7c320a76b3712099 /gcc/reginfo.c | |
parent | a8a0294d5520b2324fa601058689967464ff239e (diff) | |
download | gcc-bccb54440a2db32b6bf7feaf695859a1f5062bed.tar.gz |
* reload.c (find_reloads): Don't clear badop if we have a
winreg alternative, but not win, and the class only has fixed
regs.
* hard-reg-set.h (class_only_fixed_regs): Declare.
* reginfo.c (class_only_fixed_regs): New array.
(init_reg_sets_1): Initialize it.
* config/arm/arm.md (arm_addsi3, thumb1_addsi3, arm_subsi3_insn): Don't
discourage alternatives using the stack pointer.
testsuite/
* gcc.dg/pr32370.c: Allow another kind of error message.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162019 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reginfo.c')
-rw-r--r-- | gcc/reginfo.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/reginfo.c b/gcc/reginfo.c index 0db988fa5cb..40f21d131a1 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -141,6 +141,10 @@ int inv_reg_alloc_order[FIRST_PSEUDO_REGISTER]; /* For each reg class, a HARD_REG_SET saying which registers are in it. */ HARD_REG_SET reg_class_contents[N_REG_CLASSES]; +/* For each reg class, a boolean saying whether the class contains only + fixed registers. */ +bool class_only_fixed_regs[N_REG_CLASSES]; + /* The same information, but as an array of unsigned ints. We copy from these unsigned ints to the table above. We do this so the tm.h files do not have to be aware of the wordsize for machines with <= 64 regs. @@ -421,9 +425,17 @@ init_reg_sets_1 (void) memset (reg_class_size, 0, sizeof reg_class_size); for (i = 0; i < N_REG_CLASSES; i++) - for (j = 0; j < FIRST_PSEUDO_REGISTER; j++) - if (TEST_HARD_REG_BIT (reg_class_contents[i], j)) - reg_class_size[i]++; + { + bool any_nonfixed = false; + for (j = 0; j < FIRST_PSEUDO_REGISTER; j++) + if (TEST_HARD_REG_BIT (reg_class_contents[i], j)) + { + reg_class_size[i]++; + if (!fixed_regs[j]) + any_nonfixed = true; + } + class_only_fixed_regs[i] = !any_nonfixed; + } /* Initialize the table of subunions. reg_class_subunion[I][J] gets the largest-numbered reg-class |