mirror of git://sourceware.org/git/glibc.git
PowerPC: Remove 64 bits instructions in PPC32 code
This patch replaces the insrdi by insrwi in powerpc32 assembly.
This commit is contained in:
parent
b60ea6fff5
commit
d298c41635
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2014-05-26 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||||
|
|
||||||
|
* sysdeps/powerpc/powerpc32/power4/memset.S (memset): Replace insrdi
|
||||||
|
by insrwi.
|
||||||
|
* sysdeps/powerpc/powerpc32/power6/memset.S (memset): Likewise.
|
||||||
|
* sysdeps/powerpc/powerpc32/power7/memset.S (memset): Likewise.
|
||||||
|
* sysdeps/powerpc/powerpc32/power7/memchr.S (memchr): Likewise.
|
||||||
|
* sysdeps/powerpc/powerpc32/power7/memrchr.S (memrchr): Likewise.
|
||||||
|
* sysdeps/powerpc/powerpc32/power7/rawmemchr.S (rawmemchr): Likewise.
|
||||||
|
* sysdeps/powerpc/powerpc32/power7/strchr.S (strchr): Likewise.
|
||||||
|
* sysdeps/powerpc/powerpc32/power7/strchrnul.S (strchrnul): Likewise.
|
||||||
|
|
||||||
2014-05-26 Andreas Schwab <schwab@suse.de>
|
2014-05-26 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
[BZ #16984]
|
[BZ #16984]
|
||||||
|
|
|
@ -50,7 +50,7 @@ L(_memset):
|
||||||
|
|
||||||
/* Align to word boundary. */
|
/* Align to word boundary. */
|
||||||
cmplwi cr5, rLEN, 31
|
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)
|
beq+ L(aligned)
|
||||||
mtcrf 0x01, rMEMP0
|
mtcrf 0x01, rMEMP0
|
||||||
subfic rALIGN, rALIGN, 4
|
subfic rALIGN, rALIGN, 4
|
||||||
|
@ -65,7 +65,7 @@ L(g0):
|
||||||
/* Handle the case of size < 31. */
|
/* Handle the case of size < 31. */
|
||||||
L(aligned):
|
L(aligned):
|
||||||
mtcrf 0x01, rLEN
|
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)
|
ble cr5, L(medium)
|
||||||
/* Align to 32-byte boundary. */
|
/* Align to 32-byte boundary. */
|
||||||
andi. rALIGN, rMEMP, 0x1C
|
andi. rALIGN, rMEMP, 0x1C
|
||||||
|
|
|
@ -48,7 +48,7 @@ L(_memset):
|
||||||
ble- cr1, L(small)
|
ble- cr1, L(small)
|
||||||
/* Align to word boundary. */
|
/* Align to word boundary. */
|
||||||
cmplwi cr5, rLEN, 31
|
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)
|
beq+ L(aligned)
|
||||||
mtcrf 0x01, rMEMP0
|
mtcrf 0x01, rMEMP0
|
||||||
subfic rALIGN, rALIGN, 4
|
subfic rALIGN, rALIGN, 4
|
||||||
|
@ -64,7 +64,7 @@ L(g0):
|
||||||
/* Handle the case of size < 31. */
|
/* Handle the case of size < 31. */
|
||||||
L(aligned):
|
L(aligned):
|
||||||
mtcrf 0x01, rLEN
|
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)
|
ble cr5, L(medium)
|
||||||
/* Align to 32-byte boundary. */
|
/* Align to 32-byte boundary. */
|
||||||
andi. rALIGN, rMEMP, 0x1C
|
andi. rALIGN, rMEMP, 0x1C
|
||||||
|
|
|
@ -25,9 +25,9 @@ ENTRY (__memchr)
|
||||||
CALL_MCOUNT
|
CALL_MCOUNT
|
||||||
dcbt 0,r3
|
dcbt 0,r3
|
||||||
clrrwi r8,r3,2
|
clrrwi r8,r3,2
|
||||||
insrdi r4,r4,8,48
|
insrwi r4,r4,8,16 /* Replicate byte to word. */
|
||||||
add r7,r3,r5 /* Calculate the last acceptable address. */
|
add r7,r3,r5 /* Calculate the last acceptable address. */
|
||||||
insrdi r4,r4,16,32
|
insrwi r4,r4,16,0
|
||||||
cmplwi r5,16
|
cmplwi r5,16
|
||||||
li r9, -1
|
li r9, -1
|
||||||
rlwinm r6,r3,3,27,28 /* Calculate padding. */
|
rlwinm r6,r3,3,27,28 /* Calculate padding. */
|
||||||
|
|
|
@ -32,8 +32,8 @@ ENTRY (__memrchr)
|
||||||
dcbt r9,r6,16 /* Stream hint, decreasing addresses. */
|
dcbt r9,r6,16 /* Stream hint, decreasing addresses. */
|
||||||
|
|
||||||
/* Replicate BYTE to word. */
|
/* Replicate BYTE to word. */
|
||||||
rldimi r4,r4,8,48
|
insrwi r4,r4,8,16
|
||||||
rldimi r4,r4,16,32
|
insrwi r4,r4,16,0
|
||||||
li r6,-4
|
li r6,-4
|
||||||
li r9,-1
|
li r9,-1
|
||||||
rlwinm r0,r0,3,27,28 /* Calculate padding. */
|
rlwinm r0,r0,3,27,28 /* Calculate padding. */
|
||||||
|
|
|
@ -35,8 +35,8 @@ L(_memset):
|
||||||
cfi_offset(31,-8)
|
cfi_offset(31,-8)
|
||||||
|
|
||||||
/* Replicate byte to word. */
|
/* Replicate byte to word. */
|
||||||
insrdi 4,4,8,48
|
insrwi 4,4,8,16
|
||||||
insrdi 4,4,16,32
|
insrwi 4,4,16,0
|
||||||
|
|
||||||
ble cr6,L(small) /* If length <= 8, use short copy code. */
|
ble cr6,L(small) /* If length <= 8, use short copy code. */
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ ENTRY (__rawmemchr)
|
||||||
clrrwi r8,r3,2 /* Align the address to word boundary. */
|
clrrwi r8,r3,2 /* Align the address to word boundary. */
|
||||||
|
|
||||||
/* Replicate byte to word. */
|
/* Replicate byte to word. */
|
||||||
rldimi r4,r4,8,48
|
insrwi r4,r4,8,16
|
||||||
rldimi r4,r4,16,32
|
insrwi r4,r4,16,0
|
||||||
|
|
||||||
/* Now r4 has a word of c bytes. */
|
/* Now r4 has a word of c bytes. */
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ ENTRY (strchr)
|
||||||
beq cr7,L(null_match)
|
beq cr7,L(null_match)
|
||||||
|
|
||||||
/* Replicate byte to word. */
|
/* Replicate byte to word. */
|
||||||
insrdi r4,r4,8,48
|
insrwi r4,r4,8,16
|
||||||
insrdi r4,r4,16,32
|
insrwi r4,r4,16,0
|
||||||
|
|
||||||
/* Now r4 has a word of c bytes and r0 has
|
/* Now r4 has a word of c bytes and r0 has
|
||||||
a word of null bytes. */
|
a word of null bytes. */
|
||||||
|
|
|
@ -27,8 +27,8 @@ ENTRY (__strchrnul)
|
||||||
clrrwi r8,r3,2 /* Align the address to word boundary. */
|
clrrwi r8,r3,2 /* Align the address to word boundary. */
|
||||||
|
|
||||||
/* Replicate byte to word. */
|
/* Replicate byte to word. */
|
||||||
insrdi r4,r4,8,48
|
insrwi r4,r4,8,16
|
||||||
insrdi r4,r4,16,32
|
insrwi r4,r4,16,0
|
||||||
|
|
||||||
rlwinm r6,r3,3,27,28 /* Calculate padding. */
|
rlwinm r6,r3,3,27,28 /* Calculate padding. */
|
||||||
lwz r12,0(r8) /* Load word from memory. */
|
lwz r12,0(r8) /* Load word from memory. */
|
||||||
|
|
Loading…
Reference in New Issue