From a8bc2085e8ad86d5b2fa50b725d51abf39b54248 Mon Sep 17 00:00:00 2001 From: sergei Date: Sat, 31 May 2014 00:49:40 +0000 Subject: [PATCH] - Delete strpas.inc files, no longer used, their contents has been merged into corresponding $(CPU).inc. git-svn-id: trunk@27833 - --- .gitattributes | 3 -- rtl/fpmake.pp | 1 - rtl/i386/strpas.inc | 109 --------------------------------------- rtl/powerpc/strpas.inc | 65 ----------------------- rtl/powerpc64/strpas.inc | 65 ----------------------- 5 files changed, 243 deletions(-) delete mode 100644 rtl/i386/strpas.inc delete mode 100644 rtl/powerpc/strpas.inc delete mode 100644 rtl/powerpc64/strpas.inc diff --git a/.gitattributes b/.gitattributes index e340ce16c4..32b8412752 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8171,7 +8171,6 @@ rtl/i386/setjump.inc svneol=native#text/plain rtl/i386/setjumph.inc svneol=native#text/plain rtl/i386/strings.inc svneol=native#text/plain rtl/i386/stringss.inc svneol=native#text/plain -rtl/i386/strpas.inc svneol=native#text/plain rtl/i8086/i8086.inc svneol=native#text/plain rtl/i8086/int32p.inc svneol=native#text/plain rtl/i8086/int64p.inc svneol=native#text/plain @@ -8977,7 +8976,6 @@ rtl/powerpc/setjumph.inc svneol=native#text/plain rtl/powerpc/strings.inc svneol=native#text/plain rtl/powerpc/stringss.inc svneol=native#text/plain rtl/powerpc/strlen.inc svneol=native#text/plain -rtl/powerpc/strpas.inc svneol=native#text/plain rtl/powerpc64/int64p.inc svneol=native#text/plain rtl/powerpc64/makefile.cpu svneol=native#text/plain rtl/powerpc64/math.inc svneol=native#text/plain @@ -8989,7 +8987,6 @@ rtl/powerpc64/setjumph.inc svneol=native#text/plain rtl/powerpc64/strings.inc svneol=native#text/plain rtl/powerpc64/stringss.inc svneol=native#text/plain rtl/powerpc64/strlen.inc svneol=native#text/plain -rtl/powerpc64/strpas.inc svneol=native#text/plain rtl/qnx/Makefile svneol=native#text/plain rtl/qnx/Makefile.fpc svneol=native#text/plain rtl/qnx/dos.inc svneol=native#text/plain diff --git a/rtl/fpmake.pp b/rtl/fpmake.pp index c6fa52bd16..8f604f24d6 100644 --- a/rtl/fpmake.pp +++ b/rtl/fpmake.pp @@ -90,7 +90,6 @@ begin AddInclude('innr.inc'); AddInclude('$(CPU).inc'); AddInclude('fastmove.inc',[i386],AllOSes); - AddInclude('strpas.inc',[i386,powerpc,powerpc64],AllOSes); AddInclude('math.inc'); AddInclude('real2str.inc'); AddInclude('systhrd.inc',AllWindowsOSes+[Netware,Netwlibc,EMX,OS2]); diff --git a/rtl/i386/strpas.inc b/rtl/i386/strpas.inc deleted file mode 100644 index a8065a96d4..0000000000 --- a/rtl/i386/strpas.inc +++ /dev/null @@ -1,109 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 1999-2000 by the Free Pascal development team - - Processor specific implementation of strpas - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -var - saveres,saveebx,saveesi,saveedi : longint; -asm - movl %ebx,saveebx - movl %esi,saveesi - movl %edi,saveedi -{$ifdef regcall} - movl p,%esi - movl __RESULT,%edi - movl %edi,saveres -{$else} - movl p,%esi -{$endif} - movl $1,%ecx - testl %esi,%esi - movl %esi,%eax - jz .LStrPasDone -{$ifndef REGCALL} - movl __RESULT,%edi -{$endif} - leal 3(%esi),%edx - andl $-4,%edx - // skip length byte - incl %edi - subl %esi,%edx - jz .LStrPasAligned - // align source to multiple of 4 (not dest, because we can't read past - // the end of the source, since that may be past the end of the heap - // -> sigsegv!!) -.LStrPasAlignLoop: - movb (%esi),%al - incl %esi - testb %al,%al - jz .LStrPasDone - incl %edi - incb %cl - decb %dl - movb %al,-1(%edi) - jne .LStrPasAlignLoop - .balign 16 -.LStrPasAligned: - movl (%esi),%ebx - addl $4,%edi - leal 0x0fefefeff(%ebx),%eax - movl %ebx,%edx - addl $4,%esi - notl %edx - andl %edx,%eax - addl $4,%ecx - andl $0x080808080,%eax - movl %ebx,-4(%edi) - jnz .LStrPasEndFound - cmpl $252,%ecx - ja .LStrPasPreEndLoop - jmp .LStrPasAligned -.LStrPasEndFound: - subl $4,%ecx - // this won't overwrite data since the result = 255 char string - // and we never process more than the first 255 chars of p - shrl $8,%eax - jc .LStrPasDone - incl %ecx - shrl $8,%eax - jc .LStrPasDone - incl %ecx - shrl $8,%eax - jc .LStrPasDone - incl %ecx - jmp .LStrPasDone -.LStrPasPreEndLoop: - testb %cl,%cl - jz .LStrPasDone - movl (%esi),%eax -.LStrPasEndLoop: - testb %al,%al - jz .LStrPasDone - movb %al,(%edi) - shrl $8,%eax - incl %edi - incb %cl - jnz .LStrPasEndLoop -.LStrPasDone: -{$ifdef REGCALL} - movl saveres,%edi -{$else} - movl __RESULT,%edi -{$endif} - addb $255,%cl - movb %cl,(%edi) - movl saveesi,%esi - movl saveedi,%edi - movl saveebx,%ebx -end; - - diff --git a/rtl/powerpc/strpas.inc b/rtl/powerpc/strpas.inc deleted file mode 100644 index 2444359d11..0000000000 --- a/rtl/powerpc/strpas.inc +++ /dev/null @@ -1,65 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 1999-2000 by the Free Pascal development team - - Processor specific implementation of strpas - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -{ - ifndef FPC_STRPASPROC - r3: result address - r4: p (source) - else - r3: result address - r4: high(result) - r5: p (source) - endif -} -asm - { nil? } - mr r8, p - cmplwi p, 0 - { load the begin of the string in the data cache } - dcbt 0, p - { maxlength } -{$ifdef FPC_STRPASPROC} - mr r10,r4 -{$else FPC_STRPASPROC} - li r10,255 -{$endif FPC_STRPASPROC} - mtctr r10 - { at LStrPasDone, we set the length of the result to 255 - r10 - r4 } - { = 255 - 255 - 0 if the soure = nil -> perfect :) } - beq .LStrPasDone - { save address for at the end and use r7 in loop } - mr r7,r3 - { no "subi r7,r7,1" because the first byte = length byte } - subi r8,r8,1 -.LStrPasLoop: - lbzu r10,1(r8) - cmplwi cr0,r10,0 - stbu r10,1(r7) - bdnzf cr0*4+eq, .LStrPasLoop - - { if we stopped because of a terminating #0, decrease the length by 1 } - cntlzw r4,r10 - { get remaining count for length } - mfctr r10 - { if r10 was zero (-> stopped because of zero byte), then r4 will be 32 } - { (32 leading zero bits) -> shr 5 = 1, otherwise this will be zero } - srwi r4,r4,5 -.LStrPasDone: - subfic r10,r10,255 - sub r10,r10,r4 - - { store length } - stb r10,0(r3) -end; - diff --git a/rtl/powerpc64/strpas.inc b/rtl/powerpc64/strpas.inc deleted file mode 100644 index 53d3364e6d..0000000000 --- a/rtl/powerpc64/strpas.inc +++ /dev/null @@ -1,65 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 1999-2000 by the Free Pascal development team - - Processor specific implementation of strpas - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -{ - ifndef FPC_STRPASPROC - r3: result address - r4: p (source) - else - r3: result address - r4: high(result) - r5: p (source) - endif -} -asm - { nil? } - mr r8, p - cmpldi p, 0 - { load the begin of the string in the data cache } - dcbt 0, p - { maxlength } -{$ifdef FPC_STRPASPROC} - mr r10,r4 -{$else FPC_STRPASPROC} - li r10,255 -{$endif FPC_STRPASPROC} - mtctr r10 - { at LStrPasDone, we set the length of the result to 255 - r10 - r4 } - { = 255 - 255 - 0 if the soure = nil -> perfect :) } - beq .LStrPasDone - { save address for at the end and use r7 in loop } - mr r7,r3 - { no "subi r7,r7,1" because the first byte = length byte } - subi r8,r8,1 -.LStrPasLoop: - lbzu r10,1(r8) - cmplwi cr0,r10,0 - stbu r10,1(r7) - bdnzf cr0*4+eq, .LStrPasLoop - - { if we stopped because of a terminating #0, decrease the length by 1 } - cntlzd r4,r10 - { get remaining count for length } - mfctr r10 - { if r10 was zero (-> stopped because of zero byte), then r4 will be 64 } - { (64 leading zero bits) -> shr 6 = 1, otherwise this will be zero } - srdi r4,r4,6 -.LStrPasDone: - subfic r10,r10,255 - sub r10,r10,r4 - - { store length } - stb r10,0(r3) -end; -