Hi, I've committed the attached patch. With z10 introduction of ldgr and lgdr I've adjusted SECONDARY_MEMORY_NEEDED but forgot about the GPR-FPR reg move cost hook.
Comitted after testing on s390x and s390 (-march=zEC12). Bye, -Andreas- 2013-05-15 Andreas Krebbel <andreas.kreb...@de.ibm.com> * config/s390/s390.c (s390_register_move_cost): Don't impose the FPR<->GPR move cost penalty if ldgr/lgdr can be used. --- gcc/config/s390/s390.c | 12 !!!!!!!!!!!! 1 file changed, 12 modifications(!) Index: gcc/config/s390/s390.c =================================================================== *** gcc/config/s390/s390.c.orig --- gcc/config/s390/s390.c *************** static int *** 2432,2442 **** s390_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED, reg_class_t from, reg_class_t to) { ! /* On s390, copy between fprs and gprs is expensive. */ ! if ((reg_classes_intersect_p (from, GENERAL_REGS) ! && reg_classes_intersect_p (to, FP_REGS)) ! || (reg_classes_intersect_p (from, FP_REGS) ! && reg_classes_intersect_p (to, GENERAL_REGS))) return 10; return 1; --- 2432,2444 ---- s390_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED, reg_class_t from, reg_class_t to) { ! /* On s390, copy between fprs and gprs is expensive as long as no ! ldgr/lgdr can be used. */ ! if ((!TARGET_Z10 || GET_MODE_SIZE (mode) != 8) ! && ((reg_classes_intersect_p (from, GENERAL_REGS) ! && reg_classes_intersect_p (to, FP_REGS)) ! || (reg_classes_intersect_p (from, FP_REGS) ! && reg_classes_intersect_p (to, GENERAL_REGS)))) return 10; return 1;