mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 09:09:09 +02:00
- Delete strpas.inc files, no longer used, their contents has been merged into corresponding $(CPU).inc.
git-svn-id: trunk@27833 -
This commit is contained in:
parent
e5f6f9c3a1
commit
a8bc2085e8
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -8171,7 +8171,6 @@ rtl/i386/setjump.inc svneol=native#text/plain
|
|||||||
rtl/i386/setjumph.inc svneol=native#text/plain
|
rtl/i386/setjumph.inc svneol=native#text/plain
|
||||||
rtl/i386/strings.inc svneol=native#text/plain
|
rtl/i386/strings.inc svneol=native#text/plain
|
||||||
rtl/i386/stringss.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/i8086.inc svneol=native#text/plain
|
||||||
rtl/i8086/int32p.inc svneol=native#text/plain
|
rtl/i8086/int32p.inc svneol=native#text/plain
|
||||||
rtl/i8086/int64p.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/strings.inc svneol=native#text/plain
|
||||||
rtl/powerpc/stringss.inc svneol=native#text/plain
|
rtl/powerpc/stringss.inc svneol=native#text/plain
|
||||||
rtl/powerpc/strlen.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/int64p.inc svneol=native#text/plain
|
||||||
rtl/powerpc64/makefile.cpu svneol=native#text/plain
|
rtl/powerpc64/makefile.cpu svneol=native#text/plain
|
||||||
rtl/powerpc64/math.inc 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/strings.inc svneol=native#text/plain
|
||||||
rtl/powerpc64/stringss.inc svneol=native#text/plain
|
rtl/powerpc64/stringss.inc svneol=native#text/plain
|
||||||
rtl/powerpc64/strlen.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 svneol=native#text/plain
|
||||||
rtl/qnx/Makefile.fpc svneol=native#text/plain
|
rtl/qnx/Makefile.fpc svneol=native#text/plain
|
||||||
rtl/qnx/dos.inc svneol=native#text/plain
|
rtl/qnx/dos.inc svneol=native#text/plain
|
||||||
|
@ -90,7 +90,6 @@ begin
|
|||||||
AddInclude('innr.inc');
|
AddInclude('innr.inc');
|
||||||
AddInclude('$(CPU).inc');
|
AddInclude('$(CPU).inc');
|
||||||
AddInclude('fastmove.inc',[i386],AllOSes);
|
AddInclude('fastmove.inc',[i386],AllOSes);
|
||||||
AddInclude('strpas.inc',[i386,powerpc,powerpc64],AllOSes);
|
|
||||||
AddInclude('math.inc');
|
AddInclude('math.inc');
|
||||||
AddInclude('real2str.inc');
|
AddInclude('real2str.inc');
|
||||||
AddInclude('systhrd.inc',AllWindowsOSes+[Netware,Netwlibc,EMX,OS2]);
|
AddInclude('systhrd.inc',AllWindowsOSes+[Netware,Netwlibc,EMX,OS2]);
|
||||||
|
@ -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;
|
|
||||||
|
|
||||||
|
|
@ -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;
|
|
||||||
|
|
@ -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;
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user