|
|
147e83 |
commit d298c41635ce7f2dc7c3eccc842fe3aa754c0c8e
|
|
|
147e83 |
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
|
|
147e83 |
Date: Thu May 22 14:48:38 2014 -0500
|
|
|
147e83 |
|
|
|
147e83 |
PowerPC: Remove 64 bits instructions in PPC32 code
|
|
|
147e83 |
|
|
|
147e83 |
This patch replaces the insrdi by insrwi in powerpc32 assembly.
|
|
|
147e83 |
|
|
|
147e83 |
Index: glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/memset.S
|
|
|
147e83 |
===================================================================
|
|
|
147e83 |
--- glibc-2.17-c758a686.orig/sysdeps/powerpc/powerpc32/power4/memset.S
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/memset.S
|
|
|
147e83 |
@@ -52,7 +52,7 @@ L(_memset):
|
|
|
147e83 |
|
|
|
147e83 |
/* Align to word boundary. */
|
|
|
147e83 |
cmplwi cr5, rLEN, 31
|
|
|
147e83 |
- insrdi rCHR, rCHR, 8, 48 /* Replicate byte to halfword. */
|
|
|
147e83 |
+ insrwi rCHR, rCHR, 8, 16 /* Replicate byte to halfword. */
|
|
|
147e83 |
beq+ L(aligned)
|
|
|
147e83 |
mtcrf 0x01, rMEMP0
|
|
|
147e83 |
subfic rALIGN, rALIGN, 4
|
|
|
147e83 |
@@ -67,7 +67,7 @@ L(g0):
|
|
|
147e83 |
/* Handle the case of size < 31. */
|
|
|
147e83 |
L(aligned):
|
|
|
147e83 |
mtcrf 0x01, rLEN
|
|
|
147e83 |
- insrdi rCHR, rCHR, 16, 32 /* Replicate halfword to word. */
|
|
|
147e83 |
+ insrwi rCHR, rCHR, 16, 0 /* Replicate halfword to word. */
|
|
|
147e83 |
ble cr5, L(medium)
|
|
|
147e83 |
/* Align to 32-byte boundary. */
|
|
|
147e83 |
andi. rALIGN, rMEMP, 0x1C
|
|
|
147e83 |
Index: glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/memset.S
|
|
|
147e83 |
===================================================================
|
|
|
147e83 |
--- glibc-2.17-c758a686.orig/sysdeps/powerpc/powerpc32/power6/memset.S
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/memset.S
|
|
|
147e83 |
@@ -50,7 +50,7 @@ L(_memset):
|
|
|
147e83 |
ble- cr1, L(small)
|
|
|
147e83 |
/* Align to word boundary. */
|
|
|
147e83 |
cmplwi cr5, rLEN, 31
|
|
|
147e83 |
- insrdi rCHR, rCHR, 8, 48 /* Replicate byte to halfword. */
|
|
|
147e83 |
+ insrwi rCHR, rCHR, 8, 16 /* Replicate byte to halfword. */
|
|
|
147e83 |
beq+ L(aligned)
|
|
|
147e83 |
mtcrf 0x01, rMEMP0
|
|
|
147e83 |
subfic rALIGN, rALIGN, 4
|
|
|
147e83 |
@@ -66,7 +66,7 @@ L(g0):
|
|
|
147e83 |
/* Handle the case of size < 31. */
|
|
|
147e83 |
L(aligned):
|
|
|
147e83 |
mtcrf 0x01, rLEN
|
|
|
147e83 |
- insrdi rCHR, rCHR, 16, 32 /* Replicate halfword to word. */
|
|
|
147e83 |
+ insrwi rCHR, rCHR, 16, 0 /* Replicate halfword to word. */
|
|
|
147e83 |
ble cr5, L(medium)
|
|
|
147e83 |
/* Align to 32-byte boundary. */
|
|
|
147e83 |
andi. rALIGN, rMEMP, 0x1C
|
|
|
147e83 |
Index: glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/memset.S
|
|
|
147e83 |
===================================================================
|
|
|
147e83 |
--- glibc-2.17-c758a686.orig/sysdeps/powerpc/powerpc32/power7/memset.S
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/memset.S
|
|
|
147e83 |
@@ -37,8 +37,8 @@ L(_memset):
|
|
|
147e83 |
cfi_offset(31,-8)
|
|
|
147e83 |
|
|
|
147e83 |
/* Replicate byte to word. */
|
|
|
147e83 |
- insrdi 4,4,8,48
|
|
|
147e83 |
- insrdi 4,4,16,32
|
|
|
147e83 |
+ insrwi 4,4,8,16
|
|
|
147e83 |
+ insrwi 4,4,16,0
|
|
|
147e83 |
|
|
|
147e83 |
ble cr6,L(small) /* If length <= 8, use short copy code. */
|
|
|
147e83 |
|
|
|
147e83 |
Index: glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/rawmemchr.S
|
|
|
147e83 |
===================================================================
|
|
|
147e83 |
--- glibc-2.17-c758a686.orig/sysdeps/powerpc/powerpc32/power7/rawmemchr.S
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/rawmemchr.S
|
|
|
147e83 |
@@ -29,8 +29,8 @@ ENTRY (BP_SYM(__rawmemchr))
|
|
|
147e83 |
clrrwi r8,r3,2 /* Align the address to word boundary. */
|
|
|
147e83 |
|
|
|
147e83 |
/* Replicate byte to word. */
|
|
|
147e83 |
- rldimi r4,r4,8,48
|
|
|
147e83 |
- rldimi r4,r4,16,32
|
|
|
147e83 |
+ insrwi r4,r4,8,16
|
|
|
147e83 |
+ insrwi r4,r4,16,0
|
|
|
147e83 |
|
|
|
147e83 |
/* Now r4 has a word of c bytes. */
|
|
|
147e83 |
|
|
|
147e83 |
Index: glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/strchr.S
|
|
|
147e83 |
===================================================================
|
|
|
147e83 |
--- glibc-2.17-c758a686.orig/sysdeps/powerpc/powerpc32/power7/strchr.S
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/strchr.S
|
|
|
147e83 |
@@ -37,8 +37,8 @@ ENTRY (BP_SYM(strchr))
|
|
|
147e83 |
beq cr7,L(null_match)
|
|
|
147e83 |
|
|
|
147e83 |
/* Replicate byte to word. */
|
|
|
147e83 |
- insrdi r4,r4,8,48
|
|
|
147e83 |
- insrdi r4,r4,16,32
|
|
|
147e83 |
+ insrwi r4,r4,8,16
|
|
|
147e83 |
+ insrwi r4,r4,16,0
|
|
|
147e83 |
|
|
|
147e83 |
/* Now r4 has a word of c bytes and r0 has
|
|
|
147e83 |
a word of null bytes. */
|
|
|
147e83 |
Index: glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/strchrnul.S
|
|
|
147e83 |
===================================================================
|
|
|
147e83 |
--- glibc-2.17-c758a686.orig/sysdeps/powerpc/powerpc32/power7/strchrnul.S
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/strchrnul.S
|
|
|
147e83 |
@@ -29,8 +29,8 @@ ENTRY (BP_SYM(__strchrnul))
|
|
|
147e83 |
clrrwi r8,r3,2 /* Align the address to word boundary. */
|
|
|
147e83 |
|
|
|
147e83 |
/* Replicate byte to word. */
|
|
|
147e83 |
- insrdi r4,r4,8,48
|
|
|
147e83 |
- insrdi r4,r4,16,32
|
|
|
147e83 |
+ insrwi r4,r4,8,16
|
|
|
147e83 |
+ insrwi r4,r4,16,0
|
|
|
147e83 |
|
|
|
147e83 |
rlwinm r6,r3,3,27,28 /* Calculate padding. */
|
|
|
147e83 |
lwz r12,0(r8) /* Load word from memory. */
|