mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Denis Orlov <denorl2009@gmail.com>
To: barebox@lists.infradead.org
Cc: Denis Orlov <denorl2009@gmail.com>
Subject: [PATCH 05/17] MIPS: pbl: use o32/n64 compatible register definitions
Date: Mon,  5 Jun 2023 23:10:36 +0300	[thread overview]
Message-ID: <20230605202634.42175-6-denorl2009@gmail.com> (raw)
In-Reply-To: <20230605202634.42175-1-denorl2009@gmail.com>

This allows to compile PBL code with n64 ABI, which we use when
CONFIG_64BIT is set.

Signed-off-by: Denis Orlov <denorl2009@gmail.com>
---
 arch/mips/include/asm/pbl_macros.h | 28 ++++++++++++++--------------
 arch/mips/include/asm/pbl_nmon.h   | 10 +++++-----
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/mips/include/asm/pbl_macros.h b/arch/mips/include/asm/pbl_macros.h
index c62910ff60..e60af38442 100644
--- a/arch/mips/include/asm/pbl_macros.h
+++ b/arch/mips/include/asm/pbl_macros.h
@@ -30,9 +30,9 @@
 	.set noreorder
 	li	t9, \addr
 	li	t8, \val
-	lw	t7, 0(t9)
-	or	t7, t8
-	sw	t7, 0(t9)
+	lw	ta3, 0(t9)
+	or	ta3, t8
+	sw	ta3, 0(t9)
 	.set	pop
 	.endm
 
@@ -41,10 +41,10 @@
 	.set noreorder
 	li	t9, \addr
 	li	t8, \clr
-	lw	t7, 0(t9)
+	lw	ta3, 0(t9)
 	not	t8, t8
-	and	t7, t8
-	sw	t7, 0(t9)
+	and	ta3, t8
+	sw	ta3, 0(t9)
 	.set	pop
 	.endm
 
@@ -123,15 +123,15 @@
 #define WSIZE	4
 copy_loop:
 	/* copy from source address [a0] */
-	lw	t4, WSIZE * 0(a0)
-	lw	t5, WSIZE * 1(a0)
-	lw	t6, WSIZE * 2(a0)
-	lw	t7, WSIZE * 3(a0)
+	lw	ta0, WSIZE * 0(a0)
+	lw	ta1, WSIZE * 1(a0)
+	lw	ta2, WSIZE * 2(a0)
+	lw	ta3, WSIZE * 3(a0)
 	/* copy to target address [a1] */
-	sw	t4, WSIZE * 0(a1)
-	sw	t5, WSIZE * 1(a1)
-	sw	t6, WSIZE * 2(a1)
-	sw	t7, WSIZE * 3(a1)
+	sw	ta0, WSIZE * 0(a1)
+	sw	ta1, WSIZE * 1(a1)
+	sw	ta2, WSIZE * 2(a1)
+	sw	ta3, WSIZE * 3(a1)
 	addi	a0, WSIZE * 4
 	subu	t3, a0, a2
 	blez	t3, copy_loop
diff --git a/arch/mips/include/asm/pbl_nmon.h b/arch/mips/include/asm/pbl_nmon.h
index 0e4ec39967..7c8ec9d204 100644
--- a/arch/mips/include/asm/pbl_nmon.h
+++ b/arch/mips/include/asm/pbl_nmon.h
@@ -39,12 +39,12 @@
 	.set	push
 	.set	reorder
 
-	move	t6, a0
-	li	t5, 32
+	move	ta2, a0
+	li	ta1, 32
 
 202:
-	addi	t5, t5, -4
-	srlv	a0, t6, t5
+	addi	ta1, ta1, -4
+	srlv	a0, ta2, ta1
 
 	/* output one hex digit */
 	andi	a0, a0, 15
@@ -57,7 +57,7 @@
 
 	debug_ll_outc_a0
 
-	bgtz	t5, 202b
+	bgtz	ta1, 202b
 
 	.set	pop
 #endif /* CONFIG_DEBUG_LL */
-- 
2.41.0




  parent reply	other threads:[~2023-06-05 20:28 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 20:10 [PATCH 00/17] MIPS: fix and improve 64BIT support Denis Orlov
2023-06-05 20:10 ` [PATCH 01/17] MIPS: malta: allow to choose MIPS64 target CPU in config Denis Orlov
2023-06-06  8:06   ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 02/17] MIPS: malta: use CKSEG instead of KSEG macros Denis Orlov
2023-06-06  8:03   ` Ahmad Fatoum
2023-06-06  9:14     ` Denis Orlov
2023-06-05 20:10 ` [PATCH 03/17] MIPS: reloc: fix relocation with CONFIG_64BIT enabled Denis Orlov
2023-06-06  8:08   ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 04/17] MIPS: o32: provide ta0..ta3 register definitions Denis Orlov
2023-06-06  8:13   ` Ahmad Fatoum
2023-06-06  9:38     ` Denis Orlov
2023-06-05 20:10 ` Denis Orlov [this message]
2023-06-06  8:20   ` [PATCH 05/17] MIPS: pbl: use o32/n64 compatible " Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 06/17] MIPS: pbl: fix linking errors with CONFIG_64BIT Denis Orlov
2023-06-05 20:10 ` [PATCH 07/17] MIPS: use MIPS32/MIPS64 generic instruction macros Denis Orlov
2023-06-06  8:23   ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 08/17] MIPS: malta: fix GT64120 base virtual address on 64BIT Denis Orlov
2023-06-06  8:35   ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 09/17] MIPS: fix addresses of exception vectors in 64-bit mode Denis Orlov
2023-06-06  8:36   ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 10/17] MIPS: fix *ADDR macro usage warnings on CONFIG_64BIT Denis Orlov
2023-06-05 20:10 ` [PATCH 11/17] MIPS: Makefile: sign-extend TEXT_BASE value " Denis Orlov
2023-06-06  9:04   ` Ahmad Fatoum
2023-06-06  9:23     ` Denis Orlov
2023-06-09  6:40       ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 12/17] MIPS: enable 64-bit kernel segment addressing " Denis Orlov
2023-06-06  9:06   ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 13/17] MIPS: traps: fix passing wrong sp when returning from exception Denis Orlov
2023-06-05 20:10 ` [PATCH 14/17] MIPS: pbl_macros: use generic load/store macros in copy_to_link_location Denis Orlov
2023-06-06  9:07   ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 15/17] MIPS: add 64-bit support for optimized string functions Denis Orlov
2023-06-05 20:10 ` [PATCH 16/17] MIPS: make setjmp/longjmp/initjmp available in 64BIT builds Denis Orlov
2023-06-05 20:10 ` [PATCH 17/17] MIPS: main_entry-pbl: fix conversion warnings on CONFIG_64BIT Denis Orlov
2023-06-06  8:02 ` [PATCH 00/17] MIPS: fix and improve 64BIT support Ahmad Fatoum
2023-06-06  8:43   ` Denis Orlov
2023-06-09  6:43 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230605202634.42175-6-denorl2009@gmail.com \
    --to=denorl2009@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox