diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2002-01-08 21:00:02 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2002-01-08 21:00:02 +0000 |
commit | 14b3e8ef09b6b6f04a5e5f76d8d4276d0cf53380 (patch) | |
tree | 3c32139c2cbf02a17b530bf419a6f5424a584fc5 | |
parent | bd917d3a24b22a18501dc5f9c32b54aa32ab3c32 (diff) | |
download | gcc-14b3e8ef09b6b6f04a5e5f76d8d4276d0cf53380.zip gcc-14b3e8ef09b6b6f04a5e5f76d8d4276d0cf53380.tar.gz gcc-14b3e8ef09b6b6f04a5e5f76d8d4276d0cf53380.tar.bz2 |
s390.c (s390_preferred_reload_class): Never return ADDR_REGS if it isn't a subset of the given class.
* config/s390/s390.c (s390_preferred_reload_class): Never
return ADDR_REGS if it isn't a subset of the given class.
* config/s390/s390.h (REGISTER_MOVE_COST): Penalize not just
FP_REGS, but all superclasses as well.
* config/s390/s390.c (s390_function_profiler): Fix thinko.
* config/s390/s390.md (cmpdi_ccu_mem, cmpsi_ccu_mem,
cmphi_ccu_mem, cmpqi_ccu_mem): First operand of compare
must not be a const_int.
From-SVN: r48661
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 13 | ||||
-rw-r--r-- | gcc/config/s390/s390.h | 6 | ||||
-rw-r--r-- | gcc/config/s390/s390.md | 8 |
4 files changed, 30 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 03f1643..99c9c0b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2002-01-08 Ulrich Weigand <uweigand@de.ibm.com> + + * config/s390/s390.c (s390_preferred_reload_class): Never + return ADDR_REGS if it isn't a subset of the given class. + * config/s390/s390.h (REGISTER_MOVE_COST): Penalize not just + FP_REGS, but all superclasses as well. + + * config/s390/s390.c (s390_function_profiler): Fix thinko. + + * config/s390/s390.md (cmpdi_ccu_mem, cmpsi_ccu_mem, + cmphi_ccu_mem, cmpqi_ccu_mem): First operand of compare + must not be a const_int. + 2002-01-08 Richard Henderson <rth@redhat.com> * Makefile.in (toplev.o): Depend on options.h. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 83de4da..f1f45cc 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -1106,12 +1106,17 @@ s390_preferred_reload_class (op, class) return NO_REGS; /* If a symbolic constant or a PLUS is reloaded, - it is most likely being used as an address. */ + it is most likely being used as an address, so + prefer ADDR_REGS. If 'class' is not a superset + of ADDR_REGS, e.g. FP_REGS, reject this reload. */ case PLUS: case LABEL_REF: case SYMBOL_REF: case CONST: - return ADDR_REGS; + if (reg_class_subset_p (ADDR_REGS, class)) + return ADDR_REGS; + else + return NO_REGS; default: break; @@ -3730,8 +3735,8 @@ s390_function_profiler (file, labelno) output_asm_insn ("st\t%0,%1", op); output_asm_insn ("bras\t%2,%l6", op); - output_asm_insn (".long\t%3", op); output_asm_insn (".long\t%4", op); + output_asm_insn (".long\t%3", op); ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[6])); output_asm_insn ("l\t%0,0(%2)", op); output_asm_insn ("l\t%2,4(%2)", op); @@ -3746,8 +3751,8 @@ s390_function_profiler (file, labelno) output_asm_insn ("st\t%0,%1", op); output_asm_insn ("bras\t%2,%l6", op); ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[5])); - output_asm_insn (".long\t%3-%l5", op); output_asm_insn (".long\t%4-%l5", op); + output_asm_insn (".long\t%3-%l5", op); ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[6])); output_asm_insn ("lr\t%0,%2", op); output_asm_insn ("a\t%0,0(%2)", op); diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index b158339..99a4318 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -1228,8 +1228,10 @@ CUMULATIVE_ARGS; /* On s390, copy between fprs and gprs is expensive. */ #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ - (((CLASS1 != CLASS2) && \ - (CLASS1 == FP_REGS || CLASS2 == FP_REGS)) ? 10 : 1) + (( ( reg_classes_intersect_p ((CLASS1), GENERAL_REGS) \ + && reg_classes_intersect_p ((CLASS2), FP_REGS)) \ + || ( reg_classes_intersect_p ((CLASS1), FP_REGS) \ + && reg_classes_intersect_p ((CLASS2), GENERAL_REGS))) ? 10 : 1) /* A C expression for the cost of moving data of mode M between a diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 31822c9..68fe9e7 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -365,7 +365,7 @@ (define_insn "*cmpdi_ccu_mem" [(set (reg 33) - (compare (match_operand:DI 0 "s_imm_operand" "oQ") + (compare (match_operand:DI 0 "s_operand" "oQ") (match_operand:DI 1 "s_imm_operand" "oQ")))] "s390_match_ccmode(insn, CCUmode)" "clc\\t%O0(8,%R0),%1" @@ -515,7 +515,7 @@ (define_insn "*cmpsi_ccu_mem" [(set (reg 33) - (compare (match_operand:SI 0 "s_imm_operand" "oQ") + (compare (match_operand:SI 0 "s_operand" "oQ") (match_operand:SI 1 "s_imm_operand" "oQ")))] "s390_match_ccmode(insn, CCUmode)" "clc\\t%O0(4,%R0),%1" @@ -584,7 +584,7 @@ (define_insn "*cmphi_ccu_mem" [(set (reg 33) - (compare (match_operand:HI 0 "s_imm_operand" "oQ") + (compare (match_operand:HI 0 "s_operand" "oQ") (match_operand:HI 1 "s_imm_operand" "oQ")))] "s390_match_ccmode(insn, CCUmode)" "clc\\t%O0(2,%R0),%1" @@ -706,7 +706,7 @@ (define_insn "*cmpqi_ccu_mem" [(set (reg 33) - (compare (match_operand:QI 0 "s_imm_operand" "oQ") + (compare (match_operand:QI 0 "s_operand" "oQ") (match_operand:QI 1 "s_imm_operand" "oQ")))] "s390_match_ccmode(insn, CCUmode)" "clc\\t%O0(1,%R0),%1" |