From 997d68fef349f244932d14a82f06cbfe26e344f6 Mon Sep 17 00:00:00 2001 From: law Date: Sat, 4 Apr 1998 13:32:39 +0000 Subject: * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12 for details. * haifa-sched.c: Mirror recent changes from gcc2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18984 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/final.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'gcc/final.c') diff --git a/gcc/final.c b/gcc/final.c index 6b851f20be7..12e39830784 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1,5 +1,5 @@ /* Convert RTL to assembler code and output it, for GNU compiler. - Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc. This file is part of GNU CC. @@ -3825,11 +3825,16 @@ only_leaf_regs_used () int i; for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - { - if ((regs_ever_live[i] || global_regs[i]) - && ! permitted_reg_in_leaf_functions[i]) - return 0; - } + if ((regs_ever_live[i] || global_regs[i]) + && ! permitted_reg_in_leaf_functions[i]) + return 0; + + if (current_function_uses_pic_offset_table + && pic_offset_table_rtx != 0 + && GET_CODE (pic_offset_table_rtx) == REG + && ! permitted_reg_in_leaf_functions[REGNO (pic_offset_table_rtx)]) + return 0; + return 1; } -- cgit v1.2.1