diff mbox

[1/1] Made regs from comma-separated to dashed range

Message ID 1503409149-20399-1-git-send-email-akhilesh.k@samsung.com
State New
Headers show

Commit Message

Akhilesh Kumar Aug. 22, 2017, 1:39 p.m. UTC
The <regs> can be a comma-separated list, or a dashed range, or a
mixture.
	R0, R1, R2, R3, R4, R7, R8
	R0-R4, R7, R8

[BZ #21989]
	*sysdeps/arm/memcpy.S  :- change ldmia/stmia comma-separated to dashed range
	*sysdeps/arm/memmove.S :- change stmdb/stmdb comma-separated to dashed range
---
 sysdeps/arm/memcpy.S  |    8 ++++----
 sysdeps/arm/memmove.S |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

Comments

Joseph Myers Aug. 22, 2017, 3:14 p.m. UTC | #1
On Tue, 22 Aug 2017, Akhilesh Kumar wrote:

> The <regs> can be a comma-separated list, or a dashed range, or a
> mixture.

The fact that there are two different ways of writing some code is not a 
justification for changing from one to the other.  You need to explain 
why your change is an improvement.  For example, is there some external 
coding standard for ARM assembly code that you wish to propose glibc 
follows, which recommends one alternative over the other in this case?  
And, given that there are many uses of both syntaxes in glibc, not just in 
those two files, are you proposing to change all such uses to the 
preferred syntax if we reach consensus on the preferred syntax?

In such a case, where it's necessary first to reach consensus on the 
preferred option before making things consistent, and there is no 
user-visible bug, I don't think filing bugs in Bugzilla is appropriate.  
Rather, you should start with an analysis of the issue and a recommended 
approach, seeking a discussion leading to consensus.

You also need to describe how a patch was tested (e.g. by verifying that 
binaries of glibc built before and after the patch were identical).  And 
note the standard syntax for ChangeLog entries, as used in existing 
examples.
diff mbox

Patch

diff --git a/sysdeps/arm/memcpy.S b/sysdeps/arm/memcpy.S
index 62e48c3..7ac956d 100644
--- a/sysdeps/arm/memcpy.S
+++ b/sysdeps/arm/memcpy.S
@@ -105,9 +105,9 @@  ENTRY(memcpy)
 	PLD(	pld	[r1, #92]		)
 
 3:	PLD(	pld	[r1, #124]		)
-4:		ldmia	r1!, {r3, r4, r5, r6, r7, r8, ip, lr}
+4:		ldmia	r1!, {r3-r8, ip, lr}
 		subs	r2, r2, #32
-		stmia	r0!, {r3, r4, r5, r6, r7, r8, ip, lr}
+		stmia	r0!, {r3-r8, ip, lr}
 		bge	3b
 	PLD(	cmn	r2, #96			)
 	PLD(	bge	4b			)
@@ -260,7 +260,7 @@  ENTRY(memcpy)
 	PLD(	pld	[r1, #92]		)
 
 12:	PLD(	pld	[r1, #124]		)
-13:		ldmia	r1!, {r4, r5, r6, r7}
+13:		ldmia	r1!, {r4-r7}
 		mov	r3, lr, PULL #\pull
 		subs	r2, r2, #32
 		ldmia	r1!, {r8, r10, ip, lr}
@@ -279,7 +279,7 @@  ENTRY(memcpy)
 		orr	r10, r10, ip, PUSH #\push
 		mov	ip, ip, PULL #\pull
 		orr	ip, ip, lr, PUSH #\push
-		stmia	r0!, {r3, r4, r5, r6, r7, r8, r10, ip}
+		stmia	r0!, {r3-r8, r10, ip}
 		bge	12b
 	PLD(	cmn	r2, #96			)
 	PLD(	bge	13b			)
diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S
index b18aa32..5833fb5 100644
--- a/sysdeps/arm/memmove.S
+++ b/sysdeps/arm/memmove.S
@@ -121,9 +121,9 @@  ENTRY(memmove)
 	PLD(	pld	[r1, #-96]		)
 
 3:	PLD(	pld	[r1, #-128]		)
-4:		ldmdb	r1!, {r3, r4, r5, r6, r7, r8, ip, lr}
+4:		ldmdb	r1!, {r3-r8, ip, lr}
 		subs	r2, r2, #32
-		stmdb	r0!, {r3, r4, r5, r6, r7, r8, ip, lr}
+		stmdb	r0!, {r3-r8, ip, lr}
 		bge	3b
 	PLD(	cmn	r2, #96			)
 	PLD(	bge	4b			)
@@ -278,7 +278,7 @@  ENTRY(memmove)
 13:		ldmdb   r1!, {r7, r8, r10, ip}
 		mov     lr, r3, PUSH #\push
 		subs    r2, r2, #32
-		ldmdb   r1!, {r3, r4, r5, r6}
+		ldmdb   r1!, {r3-r6}
 		orr     lr, lr, ip, PULL #\pull
 		mov     ip, ip, PUSH #\push
 		orr     ip, ip, r10, PULL #\pull