You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

112 lines
4.1 KiB

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