[ARC] Refurb eliminate regs.
authorClaudiu Zissulescu <claziss@synopsys.com>
Tue, 16 Apr 2019 10:20:52 +0000 (12:20 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Tue, 16 Apr 2019 10:20:52 +0000 (12:20 +0200)
commit47d8cb2384790968a680935485a188e2ba7b33d2
tree6e4f62ffa3e870966c1117cbb0f0624264cfa9ea
parent1ec86e1eaa90fb5cbce6a658ebd797f73b4cab6d
[ARC] Refurb eliminate regs.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

        * config/arc/arc.c (arc_hard_regno_modes): Add two missing modes
        for last two fake registers.
        (arc_conditional_register_usage): Make sure fake frame and arg
        pointer regs are in general regs class.
        (FRAME_POINTER_MASK): Remove.
        (RETURN_ADDR_MASK): Remove.
        (arc_must_save_register): Use hard frame regnum.
        (frame_restore_reg): Use hard_frame_pointer_rtx.
        (arc_save_callee_saves): Likewise.
        (arc_restore_callee_saves): Likewise.
        (arc_save_callee_enter): Likewise.
        (arc_restore_callee_leave): Likewise.
        (arc_save_callee_milli): Likewise.
        (arc_eh_return_address_location): Likewise.
        (arc_check_multi): Use hard frame regnum.
        (arc_can_eliminate): Likewise.
        * config/arc/arc.h (FIXED_REGISTERS): Make FP register available
        for register allocator.
        (REG_CLASS_CONTENTS): Update GENERAL_REGS.
        (REGNO_OK_FOR_BASE_P): Consider FRAME_POINTER_REGNUM.
        (FRAME_POINTER_REGNUM): Change it to a fake register.
        (HARD_FRAME_POINTER_REGNUM): Defined.
        (ARG_POINTER_REGNUM): Change it to a new fake register.
        (ELIMINABLE_REGS): Update.
        (REGISTER_NAMES): Update names.
        * config/arc/arc.md (LP_START): Remove.
        (LP_END): Likewise.
        (shift_si3_loop): Update pattern.

From-SVN: r270385
gcc/ChangeLog
gcc/config/arc/arc.c
gcc/config/arc/arc.h
gcc/config/arc/arc.md