mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	"open list:BAREBOX" <barebox@lists.infradead.org>
Subject: Re: [PATCH 02/10] ARM: rename logical shift macros push pull into lspush lspull
Date: Wed, 25 Sep 2024 17:52:05 +0200	[thread overview]
Message-ID: <8424d0f3-20de-45df-8734-91b027d47469@pengutronix.de> (raw)
In-Reply-To: <20240925-arm-assembly-memmove-v1-2-0d92103658a0@pengutronix.de>

On 25.09.24 15:55, Sascha Hauer wrote:
> Adoption of Linux commit:
> 
> | commit d98b90ea22b0a28d9d787769704a9cf1ea5a513a
> | Author: Victor Kamensky <victor.kamensky@linaro.org>
> | Date:   Tue Feb 25 08:41:09 2014 +0100
> |
> |     ARM: 7990/1: asm: rename logical shift macros push pull into lspush lspull
> |
> |     Renames logical shift macros, 'push' and 'pull', defined in
> |     arch/arm/include/asm/assembler.h, into 'lspush' and 'lspull'.
> |     That eliminates name conflict between 'push' logical shift macro
> |     and 'push' instruction mnemonic. That allows assembler.h to be
> |     included in .S files that use 'push' instruction.
> |
> |     Suggested-by: Will Deacon <will.deacon@arm.com>
> |     Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
> |     Acked-by: Nicolas Pitre <nico@linaro.org>
> |     Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

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

> ---
>  arch/arm/include/asm/assembler.h |  8 ++++----
>  arch/arm/lib32/copy_template.S   | 36 ++++++++++++++++++------------------
>  arch/arm/lib32/io-readsl.S       | 12 ++++++------
>  arch/arm/lib32/io-writesl.S      | 12 ++++++------
>  4 files changed, 34 insertions(+), 34 deletions(-)
> 
> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
> index 5db0f692ee..4e7ad57170 100644
> --- a/arch/arm/include/asm/assembler.h
> +++ b/arch/arm/include/asm/assembler.h
> @@ -20,8 +20,8 @@
>   * Endian independent macros for shifting bytes within registers.
>   */
>  #ifndef __ARMEB__
> -#define pull            lsr
> -#define push            lsl
> +#define lspull          lsr
> +#define lspush          lsl
>  #define get_byte_0      lsl #0
>  #define get_byte_1	lsr #8
>  #define get_byte_2	lsr #16
> @@ -31,8 +31,8 @@
>  #define put_byte_2	lsl #16
>  #define put_byte_3	lsl #24
>  #else
> -#define pull            lsl
> -#define push            lsr
> +#define lspull          lsl
> +#define lspush          lsr
>  #define get_byte_0	lsr #24
>  #define get_byte_1	lsr #16
>  #define get_byte_2	lsr #8
> diff --git a/arch/arm/lib32/copy_template.S b/arch/arm/lib32/copy_template.S
> index f66cd6e667..897e3db3ff 100644
> --- a/arch/arm/lib32/copy_template.S
> +++ b/arch/arm/lib32/copy_template.S
> @@ -192,24 +192,24 @@
>  
>  12:	PLD(	pld	[r1, #124]		)
>  13:		ldr4w	r1, r4, r5, r6, r7, abort=19f
> -		mov	r3, lr, pull #\pull
> +		mov	r3, lr, lspull #\pull
>  		subs	r2, r2, #32
>  		ldr4w	r1, r8, r9, ip, lr, abort=19f
> -		orr	r3, r3, r4, push #\push
> -		mov	r4, r4, pull #\pull
> -		orr	r4, r4, r5, push #\push
> -		mov	r5, r5, pull #\pull
> -		orr	r5, r5, r6, push #\push
> -		mov	r6, r6, pull #\pull
> -		orr	r6, r6, r7, push #\push
> -		mov	r7, r7, pull #\pull
> -		orr	r7, r7, r8, push #\push
> -		mov	r8, r8, pull #\pull
> -		orr	r8, r8, r9, push #\push
> -		mov	r9, r9, pull #\pull
> -		orr	r9, r9, ip, push #\push
> -		mov	ip, ip, pull #\pull
> -		orr	ip, ip, lr, push #\push
> +		orr	r3, r3, r4, lspush #\push
> +		mov	r4, r4, lspull #\pull
> +		orr	r4, r4, r5, lspush #\push
> +		mov	r5, r5, lspull #\pull
> +		orr	r5, r5, r6, lspush #\push
> +		mov	r6, r6, lspull #\pull
> +		orr	r6, r6, r7, lspush #\push
> +		mov	r7, r7, lspull #\pull
> +		orr	r7, r7, r8, lspush #\push
> +		mov	r8, r8, lspull #\pull
> +		orr	r8, r8, r9, lspush #\push
> +		mov	r9, r9, lspull #\pull
> +		orr	r9, r9, ip, lspush #\push
> +		mov	ip, ip, lspull #\pull
> +		orr	ip, ip, lr, lspush #\push
>  		str8w	r0, r3, r4, r5, r6, r7, r8, r9, ip, , abort=19f
>  		bge	12b
>  	PLD(	cmn	r2, #96			)
> @@ -220,10 +220,10 @@
>  14:		ands	ip, r2, #28
>  		beq	16f
>  
> -15:		mov	r3, lr, pull #\pull
> +15:		mov	r3, lr, lspull #\pull
>  		ldr1w	r1, lr, abort=21f
>  		subs	ip, ip, #4
> -		orr	r3, r3, lr, push #\push
> +		orr	r3, r3, lr, lspush #\push
>  		str1w	r0, r3, abort=21f
>  		bgt	15b
>  	CALGN(	cmp	r2, #0			)
> diff --git a/arch/arm/lib32/io-readsl.S b/arch/arm/lib32/io-readsl.S
> index e1855fd636..7bcd0d45bc 100644
> --- a/arch/arm/lib32/io-readsl.S
> +++ b/arch/arm/lib32/io-readsl.S
> @@ -46,25 +46,25 @@ ENTRY(__raw_readsl)
>  		strb	ip, [r1], #1
>  
>  4:		subs	r2, r2, #1
> -		mov	ip, r3, pull #24
> +		mov	ip, r3, lspull #24
>  		ldrne	r3, [r0]
> -		orrne	ip, ip, r3, push #8
> +		orrne	ip, ip, r3, lspush #8
>  		strne	ip, [r1], #4
>  		bne	4b
>  		b	8f
>  
>  5:		subs	r2, r2, #1
> -		mov	ip, r3, pull #16
> +		mov	ip, r3, lspull #16
>  		ldrne	r3, [r0]
> -		orrne	ip, ip, r3, push #16
> +		orrne	ip, ip, r3, lspush #16
>  		strne	ip, [r1], #4
>  		bne	5b
>  		b	7f
>  
>  6:		subs	r2, r2, #1
> -		mov	ip, r3, pull #8
> +		mov	ip, r3, lspull #8
>  		ldrne	r3, [r0]
> -		orrne	ip, ip, r3, push #24
> +		orrne	ip, ip, r3, lspush #24
>  		strne	ip, [r1], #4
>  		bne	6b
>  
> diff --git a/arch/arm/lib32/io-writesl.S b/arch/arm/lib32/io-writesl.S
> index ed91ae19b7..61164234de 100644
> --- a/arch/arm/lib32/io-writesl.S
> +++ b/arch/arm/lib32/io-writesl.S
> @@ -40,26 +40,26 @@ ENTRY(__raw_writesl)
>  		blt	5f
>  		bgt	6f
>  
> -4:		mov	ip, r3, pull #16
> +4:		mov	ip, r3, lspull #16
>  		ldr	r3, [r1], #4
>  		subs	r2, r2, #1
> -		orr	ip, ip, r3, push #16
> +		orr	ip, ip, r3, lspush #16
>  		str	ip, [r0]
>  		bne	4b
>  		mov	pc, lr
>  
> -5:		mov	ip, r3, pull #8
> +5:		mov	ip, r3, lspull #8
>  		ldr	r3, [r1], #4
>  		subs	r2, r2, #1
> -		orr	ip, ip, r3, push #24
> +		orr	ip, ip, r3, lspush #24
>  		str	ip, [r0]
>  		bne	5b
>  		mov	pc, lr
>  
> -6:		mov	ip, r3, pull #24
> +6:		mov	ip, r3, lspull #24
>  		ldr	r3, [r1], #4
>  		subs	r2, r2, #1
> -		orr	ip, ip, r3, push #8
> +		orr	ip, ip, r3, lspush #8
>  		str	ip, [r0]
>  		bne	6b
>  		mov	pc, lr
> 


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



  reply	other threads:[~2024-09-25 15:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25 13:55 [PATCH 00/10] ARM: add assembler optimized memmove Sascha Hauer
2024-09-25 13:55 ` [PATCH 01/10] ARM: Use optimized reads[bwl] and writes[bwl] functions Sascha Hauer
2024-09-25 15:45   ` Ahmad Fatoum
2024-09-25 13:55 ` [PATCH 02/10] ARM: rename logical shift macros push pull into lspush lspull Sascha Hauer
2024-09-25 15:52   ` Ahmad Fatoum [this message]
2024-09-25 13:55 ` [PATCH 03/10] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ Sascha Hauer
2024-09-25 15:56   ` Ahmad Fatoum
2024-09-25 13:55 ` [PATCH 04/10] ARM: update lib1funcs.S from Linux Sascha Hauer
2024-09-25 16:02   ` Ahmad Fatoum
2024-09-26  8:22     ` Sascha Hauer
2024-09-26 11:09       ` Ahmad Fatoum
2024-09-25 13:55 ` [PATCH 05/10] ARM: update findbit.S " Sascha Hauer
2024-09-25 16:03   ` Ahmad Fatoum
2024-09-25 13:55 ` [PATCH 06/10] ARM: update io-* " Sascha Hauer
2024-09-25 16:04   ` Ahmad Fatoum
2024-09-25 13:55 ` [PATCH 07/10] ARM: always assume the unified syntax for assembly code Sascha Hauer
2024-09-25 16:09   ` Ahmad Fatoum
2024-09-25 13:55 ` [PATCH 08/10] ARM: update memcpy.S and memset.S from Linux Sascha Hauer
2024-09-26  5:51   ` Ahmad Fatoum
2024-09-25 13:55 ` [PATCH 09/10] lib/string.c: export non optimized memmove as __default_memmove Sascha Hauer
2024-09-25 16:10   ` Ahmad Fatoum
2024-09-25 13:55 ` [PATCH 10/10] ARM: add optimized memmove Sascha Hauer
2024-09-26  5:48   ` Ahmad Fatoum
2024-09-26 11:12     ` 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=8424d0f3-20de-45df-8734-91b027d47469@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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