u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] riscv: Optimize source end address calculation in start.S
@ 2023-03-30  4:20 Bin Meng
  2023-03-30  4:20 ` [PATCH 2/8] riscv: Optimize loading relocation type Bin Meng
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Bin Meng @ 2023-03-30  4:20 UTC (permalink / raw)
  To: u-boot; +Cc: Leo, Nikita Shubin, Rick Chen

The __bss_start is the source end address hence load its address
directly into register 't2' for optimization.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
---

 arch/riscv/cpu/start.S | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index 4687bca3c9..3c8344c345 100644
--- a/arch/riscv/cpu/start.S
+++ b/arch/riscv/cpu/start.S
@@ -283,9 +283,7 @@ stack_setup:
 	beq	t0, s4, clear_bss	/* skip relocation */
 
 	mv	t1, s4			/* t1 <- scratch for copy_loop */
-	la	t3, __bss_start
-	sub	t3, t3, t0		/* t3 <- __bss_start_ofs */
-	add	t2, t0, t3		/* t2 <- source end address */
+	la	t2, __bss_start		/* t2 <- source end address */
 
 copy_loop:
 	LREG	t5, 0(t0)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-04-11  1:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30  4:20 [PATCH 1/8] riscv: Optimize source end address calculation in start.S Bin Meng
2023-03-30  4:20 ` [PATCH 2/8] riscv: Optimize loading relocation type Bin Meng
     [not found]   ` <PU1PR03MB2997A990E8EFC3D1C25B114AC1969@PU1PR03MB2997.apcprd03.prod.outlook.com>
2023-04-07  6:15     ` Rick Chen
2023-03-30  4:20 ` [PATCH 3/8] tools: prelink-riscv: Cosmetic style fixes Bin Meng
     [not found]   ` <PU1PR03MB2997C810949A954C75A3EB41C1969@PU1PR03MB2997.apcprd03.prod.outlook.com>
2023-04-07  6:24     ` Rick Chen
2023-03-30  4:20 ` [PATCH 4/8] tools: prelink-riscv: Unmap the ELF image when done Bin Meng
2023-04-01  6:32   ` Simon Glass
     [not found]   ` <PU1PR03MB29974DC4DC611EB2A94C18F6C1969@PU1PR03MB2997.apcprd03.prod.outlook.com>
2023-04-07  6:29     ` Rick Chen
2023-03-30  4:20 ` [PATCH 5/8] makefile: riscv: Drop useless argument of prelink-riscv Bin Meng
     [not found]   ` <PU1PR03MB2997EFB99560BAE1AD1B62ABC1959@PU1PR03MB2997.apcprd03.prod.outlook.com>
2023-04-10  1:51     ` Rick Chen
2023-03-30  4:20 ` [PATCH 6/8] riscv: Change to use positive offset to access relocation entries Bin Meng
2023-03-30  4:20 ` [PATCH 7/8] riscv: spl: Remove relocation sections Bin Meng
     [not found]   ` <PU1PR03MB2997E9E4C455D9A325128B13C19A9@PU1PR03MB2997.apcprd03.prod.outlook.com>
2023-04-11  1:31     ` Rick Chen
2023-03-30  4:20 ` [PATCH 8/8] riscv: Update alignment for some sections in linker scripts Bin Meng
2023-04-07  3:00 ` [PATCH 1/8] riscv: Optimize source end address calculation in start.S Bin Meng
     [not found] ` <PU1PR03MB299725D3BB3E685D22313A4EC1969@PU1PR03MB2997.apcprd03.prod.outlook.com>
2023-04-07  5:37   ` Rick Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).