diff options
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -8451,18 +8451,11 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, gcc_assert (decl_rtl); decl_rtl = copy_rtx (decl_rtl); /* Record writes to register variables. */ - if (modifier == EXPAND_WRITE && REG_P (decl_rtl) - && REGNO (decl_rtl) < FIRST_PSEUDO_REGISTER) - { - int i = REGNO (decl_rtl); - int nregs = hard_regno_nregs[i][GET_MODE (decl_rtl)]; - while (nregs) - { - SET_HARD_REG_BIT (crtl->asm_clobbers, i); - i++; - nregs--; - } - } + if (modifier == EXPAND_WRITE + && REG_P (decl_rtl) + && HARD_REGISTER_P (decl_rtl)) + add_to_hard_reg_set (&crtl->asm_clobbers, + GET_MODE (decl_rtl), REGNO (decl_rtl)); /* Ensure variable marked as used even if it doesn't go through a parser. If it hasn't be used yet, write out an external |