Re: [PATCH 1/8] riscv: Optimize source end address calculation in start.S

2023-04-06 Thread Rick Chen
> From: Bin Meng 
> Sent: Thursday, March 30, 2023 12:20 PM
> To: u-boot@lists.denx.de
> Cc: Leo Yu-Chi Liang(梁育齊) ; Nikita Shubin 
> ; Rick Jian-Zhi Chen(陳建志) 
> Subject: [PATCH 1/8] riscv: Optimize source end address calculation in start.S
>
> The __bss_start is the source end address hence load its address directly 
> into register 't2' for optimization.
>
> Signed-off-by: Bin Meng 
> ---
>
>  arch/riscv/cpu/start.S | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Rick Chen 


Re: [PATCH 1/8] riscv: Optimize source end address calculation in start.S

2023-04-06 Thread Bin Meng
On Thu, Mar 30, 2023 at 8:36 PM Bin Meng  wrote:
>
> The __bss_start is the source end address hence load its address
> directly into register 't2' for optimization.
>
> Signed-off-by: Bin Meng 
> ---
>
>  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:
> LREGt5, 0(t0)
> --

Ping for this series?


[PATCH 1/8] riscv: Optimize source end address calculation in start.S

2023-03-30 Thread Bin Meng
The __bss_start is the source end address hence load its address
directly into register 't2' for optimization.

Signed-off-by: Bin Meng 
---

 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:
LREGt5, 0(t0)
-- 
2.34.1