Yes, I know :(

Thank you for your help. All four patches pushed.
Claudiu

On Wed, Jan 22, 2020 at 10:31 PM Jeff Law <l...@redhat.com> wrote:
>
> On Wed, 2020-01-22 at 10:14 +0200, Claudiu Zissulescu wrote:
> > ARC600 when configured with mul64 instructions uses mlo and mhi
> > registers to store the 64 result of the multiplication. In the ARC600
> > ISA documentation we have the next register configuration when ARC600
> > is configured only with mul64 extension:
> >
> > Register | Name | Use
> > ---------+------+------------------------------------
> > r57      | mlo  | Multiply low 32 bits, read only
> > r58      | mmid | Multiply middle 32 bits, read only
> > r59      | mhi  | Multiply high 32 bits, read only
> > -----------------------------------------------------
> >
> > When used for Co-existence configurations we have for mul64 the next
> > registers used:
> >
> > Register | Name | Use
> > ---------+------+------------------------------------
> > r58      | mlo  | Multiply low 32 bits, read only
> > r59      | mhi  | Multiply high 32 bits, read only
> > -----------------------------------------------------
> >
> > Note that mlo/mhi assignment doesn't swap when bigendian CPU
> > configuration is used.
> >
> > The compiler will always use r58 for mlo, regardless of the
> > configuration choosen to ensure mlo/mhi correct splitting. Fixing mlo
> > to the right register number is done at assembly time. The dwarf info
> > is also notified via DBX_... macro. Both mlo/mhi registers needs to
> > saved when ISR happens using a custom sequence.
> >
> > gcc/
> > xxxx-xx-xx  Claudiu Zissulescu  <claz...@synopsys.com>
> >
> >       * config/arc/arc-protos.h (gen_mlo): Remove.
> >       (gen_mhi): Likewise.
> >       * config/arc/arc.c (AUX_MULHI): Define.
> >       (arc_must_save_reister): Special handling for r58/59.
> >       (arc_compute_frame_size): Consider mlo/mhi registers.
> >       (arc_save_callee_saves): Emit fp/sp move only when emit_move
> >       paramter is true.
> >       (arc_conditional_register_usage): Remove TARGET_BIG_ENDIAN from
> >       mlo/mhi name selection.
> >       (arc_restore_callee_saves): Don't early restore blink when ISR.
> >       (arc_expand_prologue): Add mlo/mhi saving.
> >       (arc_expand_epilogue): Add mlo/mhi restoring.
> >       (gen_mlo): Remove.
> >       (gen_mhi): Remove.
> >       * config/arc/arc.h (DBX_REGISTER_NUMBER): Correct register
> >       numbering when MUL64 option is used.
> >       (DWARF2_FRAME_REG_OUT): Define.
> >       * config/arc/arc.md (arc600_stall): New pattern.
> >       (VUNSPEC_ARC_ARC600_STALL): Define.
> >       (mulsi64): Use correct mlo/mhi registers.
> >       (mulsi_600): Clean it up.
> >       * config/arc/predicates.md (mlo_operand): Remove any dependency on
> >       TARGET_BIG_ENDIAN.
> >       (mhi_operand): Likewise.
> >
> > testsuite/
> > xxxx-xx-xx  Claudiu Zissulescu  <claz...@synopsys.com>
> >       * gcc.target/arc/code-density-flag.c: Update test.
> >       * gcc.target/arc/interrupt-6.c: Likewise.
> Ugh.  But OK.
>
> jeff
> >
>

Reply via email to