[PATCH 04/17] MIPS: o32: provide ta0..ta3 register definitions

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Jun 6 01:13:35 PDT 2023


On 05.06.23 22:10, Denis Orlov wrote:
> This allows to write generic assembly code that will compile under both
> o32 and n64 ABIs, as otherwise the register definitions would conflict.
> 
> Taken from Linux kernel sources, commit 'MIPS: O32: Provide definition
> of registers ta0 .. ta3.' (3ba1e543ab4b02640d396098f2f6a199560d5f2d).
> 
> Signed-off-by: Denis Orlov <denorl2009 at gmail.com>

Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>

I must say, this file looks odd though. _MIPS_SIM is apparently
defined by the compiler and it's compared against _MIPS_SIM_ABI32,
which barebox defines...

> ---
>  arch/mips/include/asm/regdef.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/mips/include/asm/regdef.h b/arch/mips/include/asm/regdef.h
> index 1300251661..df87582e8e 100644
> --- a/arch/mips/include/asm/regdef.h
> +++ b/arch/mips/include/asm/regdef.h
> @@ -3,6 +3,8 @@
>   * Copyright (C) 1985 MIPS Computer Systems, Inc.
>   * Copyright (C) 1994, 95, 99, 2003 by Ralf Baechle
>   * Copyright (C) 1990 - 1992, 1999 Silicon Graphics, Inc.
> + * Copyright (C) 2011 Wind River Systems,
> + *   written by Ralf Baechle <ralf at linux-mips.org>
>   */
>  #ifndef _ASM_REGDEF_H
>  #define _ASM_REGDEF_H
> @@ -27,9 +29,13 @@
>  #define t2      $10
>  #define t3      $11
>  #define t4      $12
> +#define ta0     $12
>  #define t5      $13
> +#define ta1     $13
>  #define t6      $14
> +#define ta2     $14
>  #define t7      $15
> +#define ta3     $15
>  #define s0      $16     /* callee saved */
>  #define s1      $17
>  #define s2      $18

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list