diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5123092688a..55f0d4f58ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2002-02-19 David Edelsohn + + * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Set + really_call_used[VRSAVE_REGNO] if not Altivec. + +2002-02-19 Alan Modra + + * config/rs6000/rs6000.c (u_short_cint_operand): Mask op with + MODE_MASK. + (constant_pool_expr_1): Fix formatting. + (rs6000_legitimize_reload_address): Likewise. + Tue Feb 19 20:13:57 2002 Richard Kenner * config/sparc/sparc.md (nonlocal_goto): Use hard_frame_pointer_rtx diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 5e3a7353c33..1b180201802 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -769,7 +769,7 @@ u_short_cint_operand (op, mode) enum machine_mode mode ATTRIBUTE_UNUSED; { return (GET_CODE (op) == CONST_INT - && CONST_OK_FOR_LETTER_P (INTVAL (op), 'K')); + && CONST_OK_FOR_LETTER_P (INTVAL (op) & GET_MODE_MASK (mode), 'K')); } /* Return 1 if OP is a CONST_INT that cannot fit in a signed D field. */ @@ -1711,8 +1711,8 @@ constant_pool_expr_1 (op, have_sym, have_toc) return 0; case PLUS: case MINUS: - return constant_pool_expr_1 (XEXP (op, 0), have_sym, have_toc) && - constant_pool_expr_1 (XEXP (op, 1), have_sym, have_toc); + return (constant_pool_expr_1 (XEXP (op, 0), have_sym, have_toc) + && constant_pool_expr_1 (XEXP (op, 1), have_sym, have_toc)); case CONST: return constant_pool_expr_1 (XEXP (op, 0), have_sym, have_toc); case CONST_INT: @@ -1960,8 +1960,8 @@ rs6000_legitimize_reload_address (x, mode, opnum, type, ind_levels, win) } #endif if (TARGET_TOC - && CONSTANT_POOL_EXPR_P (x) - && ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (get_pool_constant (x), mode)) + && CONSTANT_POOL_EXPR_P (x) + && ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (get_pool_constant (x), mode)) { (x) = create_TOC_reference (x); *win = 1; diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index cdbe3361a91..b00e549961e 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -970,8 +970,11 @@ extern int rs6000_altivec_abi; = call_used_regs[PIC_OFFSET_TABLE_REGNUM] \ = call_really_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ if (! TARGET_ALTIVEC) \ - for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i) \ - fixed_regs[i] = call_used_regs[i] = call_really_used_regs[i] = 1; \ + { \ + for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i) \ + fixed_regs[i] = call_used_regs[i] = call_really_used_regs[i] = 1; \ + call_really_used_regs[VRSAVE_REGNO] = 1; \ + } \ if (TARGET_ALTIVEC_ABI) \ for (i = FIRST_ALTIVEC_REGNO; i < FIRST_ALTIVEC_REGNO + 20; ++i) \ call_used_regs[i] = call_really_used_regs[i] = 1; \