svn commit: r249790 - in head/sys/mips: include mips

Juli Mallett jmallett at FreeBSD.org
Tue Apr 23 21:25:42 UTC 2013


On Tue, Apr 23, 2013 at 2:38 AM, Warner Losh <imp at freebsd.org> wrote:
> Modified: head/sys/mips/include/frame.h
> ==============================================================================
> --- head/sys/mips/include/frame.h       Tue Apr 23 06:37:50 2013        (r249789)
> +++ head/sys/mips/include/frame.h       Tue Apr 23 09:38:18 2013        (r249790)
> @@ -37,6 +37,8 @@
>  #ifndef _MACHINE_FRAME_H_
>  #define        _MACHINE_FRAME_H_
>
> +/* Note: This must also match regnum.h and regdef.h */
> +
>  struct trapframe {
>         register_t      zero;
>         register_t      ast;
> @@ -46,6 +48,16 @@ struct trapframe {
>         register_t      a1;
>         register_t      a2;
>         register_t      a3;
> +#if defined(__mips_n32) || defined(__mips_n64)
> +       register_t      a4;
> +       register_t      a5;
> +       register_t      a6;
> +       register_t      a7;
> +       register_t      t0;
> +       register_t      t1;
> +       register_t      t2;
> +       register_t      t3;
> +#else
>         register_t      t0;
>         register_t      t1;
>         register_t      t2;
> @@ -54,6 +66,7 @@ struct trapframe {
>         register_t      t5;
>         register_t      t6;
>         register_t      t7;
> +#endif
>         register_t      s0;
>         register_t      s1;
>         register_t      s2;
>
> Modified: head/sys/mips/mips/trap.c
> ==============================================================================
> --- head/sys/mips/mips/trap.c   Tue Apr 23 06:37:50 2013        (r249789)
> +++ head/sys/mips/mips/trap.c   Tue Apr 23 09:38:18 2013        (r249790)
> @@ -363,10 +363,10 @@ cpu_fetch_syscall_args(struct thread *td
>                         /*
>                          * Non-o32 ABIs support more arguments in registers.
>                          */
> -                       sa->args[3] = locr0->t4;
> -                       sa->args[4] = locr0->t5;
> -                       sa->args[5] = locr0->t6;
> -                       sa->args[6] = locr0->t7;
> +                       sa->args[3] = locr0->t0;
> +                       sa->args[4] = locr0->t1;
> +                       sa->args[5] = locr0->t2;
> +                       sa->args[6] = locr0->t3;
>                         nsaved += 4;
>  #ifdef COMPAT_FREEBSD32
>                 }
> @@ -389,10 +389,10 @@ cpu_fetch_syscall_args(struct thread *td
>                         /*
>                          * Non-o32 ABIs support more arguments in registers.
>                          */
> -                       sa->args[4] = locr0->t4;
> -                       sa->args[5] = locr0->t5;
> -                       sa->args[6] = locr0->t6;
> -                       sa->args[7] = locr0->t7;
> +                       sa->args[4] = locr0->t0;
> +                       sa->args[5] = locr0->t1;
> +                       sa->args[6] = locr0->t2;
> +                       sa->args[7] = locr0->t3;
>                         nsaved += 4;
>  #ifdef COMPAT_FREEBSD32
>                 }

These should use a4, a5, a6, a7 now, not t0, t1, t2, t3.


More information about the svn-src-head mailing list