Skip to contentSkip to conversation

arm: Update our 'ret' assembler macro slightly

PATCH In review Tom Rini 3 participants 4 messages Mar 2, 2017 – Mar 18, 2017 Arm (32-bit)

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 arm: Update our 'ret' assembler macro slightly

We only support cores that do Thumb-1 or later. So we add a comment to explain this and remove the architecture test.

Cc Albert ARIBAUD <[email protected]>
Cc Mans Rullgard <[email protected]>
---
 arch/arm/include/asm/assembler.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/include/asm/assembler.h +4 -4
index c56daf2a1f69..d24be2d484fe 100644
@@ -57,17 +57,17 @@
 #define PLD(code...)
 #endif
 
+/*
+ * We only support cores that support at least Thumb-1 and thus we use
+ * 'bx lr'
+ */
 	.irp	c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
 	.macro	ret\c, reg
-#if defined(__ARM_ARCH_5E__)
-	mov\c	pc, \reg
-#else
 	.ifeqs	"\reg", "lr"
 	bx\c	\reg
 	.else
 	mov\c	pc, \reg
 	.endif
-#endif
 	.endm
 	.endr
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 arm: Update our 'ret' assembler macro slightly

Hello Tom,

LGTM.

Quoted 39 lines · Tom Rini

We only support cores that do Thumb-1 or later. So we add a comment to explain this and remove the architecture test.

Cc Albert ARIBAUD <[email protected]>
Cc Mans Rullgard <[email protected]>
---
 arch/arm/include/asm/assembler.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/include/asm/assembler.h +4 -4
index c56daf2a1f69..d24be2d484fe 100644
@@ -57,17 +57,17 @@
 #define PLD(code...)
 #endif
 
+/*
+ * We only support cores that support at least Thumb-1 and thus we use
+ * 'bx lr'
+ */
 	.irp	c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
 	.macro	ret\c, reg
-#if defined(__ARM_ARCH_5E__)
-	mov\c	pc, \reg
-#else
 	.ifeqs	"\reg", "lr"
 	bx\c	\reg
 	.else
 	mov\c	pc, \reg
 	.endif
-#endif
 	.endm
 	.endr
 
Signature · 1 line
1.9.1

Amicalement,

Signature · 1 line
Albert.
#2 lore raw

PATCH 1/1 arm: Update our 'ret' assembler macro slightly

In reply to Tom Rini

Hi Tom,

Quoted 8 lines

-----Original Message-----
From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Tom Rini
Sent: Thursday, March 02, 2017 7:00 AM
To: u-boot at lists.denx.de
Cc: Mans Rullgard <[email protected]>
Subject: [U-Boot] [PATCH] arm: Update our 'ret' assembler macro slightly

We only support cores that do Thumb-1 or later. So we add a comment to explain this and remove the architecture test.

We can remove the same support for __ARM_ARCH_4__ from arch/arm/lib/relocate.S also. Also the __ARM_ARCH_5*__ usage for PLD define in same assembler.h.

Cheers,
Vikas

Quoted 41 lines
Cc Albert ARIBAUD <[email protected]>
Cc Mans Rullgard <[email protected]>
---
 arch/arm/include/asm/assembler.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/include/asm/assembler.h +4 -5
index c56daf2a1f69..d24be2d484fe 100644
@@ -57,17 +57,17 @@
 #define PLD(code...)
 #endif
 
+/*
+ * We only support cores that support at least Thumb-1 and thus we use
+ * 'bx lr'
+ */
 	.irp	c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
 	.macro	ret\c, reg
-#if defined(__ARM_ARCH_5E__)
-	mov\c	pc, \reg
-#else
 	.ifeqs	"\reg", "lr"
 	bx\c	\reg
 	.else
 	mov\c	pc, \reg
 	.endif
-#endif
 	.endm
 	.endr
 
--

1.9.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/listinfo/u-boot

author
#3 lore raw
In reply to Tom Rini
Quoted 6 lines · Tom Rini

We only support cores that do Thumb-1 or later. So we add a comment to explain this and remove the architecture test.

Cc Albert ARIBAUD <[email protected]>
Cc Mans Rullgard <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170317/bfba53a9/attachment.sig>