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

Denis Orlov denorl2009 at gmail.com
Mon Jun 5 13:10:35 PDT 2023


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>
---
 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
-- 
2.41.0




More information about the barebox mailing list