mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 21:09:07 +02:00
* fixed compilation problems (removed unnecessary modified registers
lists from procedures)
This commit is contained in:
parent
0dceec9a64
commit
a4db446a95
@ -153,7 +153,7 @@ LTruncNoAdd:
|
|||||||
subfic r4,r4,0
|
subfic r4,r4,0
|
||||||
subfze r3,r3
|
subfze r3,r3
|
||||||
LTruncPositive:
|
LTruncPositive:
|
||||||
end ['R3','R4','F1','F2','F3','F4'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_ROUND}
|
{$define FPC_SYSTEM_HAS_ROUND}
|
||||||
@ -249,7 +249,7 @@ LRoundNoAdd:
|
|||||||
subfic r4,r4,0
|
subfic r4,r4,0
|
||||||
subfze r3,r3
|
subfze r3,r3
|
||||||
LRoundPositive:
|
LRoundPositive:
|
||||||
end ['R3','R4','F1','F2','F3','F4'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_POWER}
|
{$define FPC_SYSTEM_HAS_POWER}
|
||||||
@ -382,7 +382,7 @@ asm
|
|||||||
{$endif}
|
{$endif}
|
||||||
fsub f3,f3,f1
|
fsub f3,f3,f1
|
||||||
fmadd f1,f0,f2,f3
|
fmadd f1,f0,f2,f3
|
||||||
end ['R0','R3','R4','F0','F1','F2','F3'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function fpc_qword_to_double(q: qword): double; compilerproc;
|
function fpc_qword_to_double(q: qword): double; compilerproc;
|
||||||
@ -419,12 +419,16 @@ asm
|
|||||||
{$endif}
|
{$endif}
|
||||||
fsub f3,f3,f1
|
fsub f3,f3,f1
|
||||||
fmadd f1,f0,f2,f3
|
fmadd f1,f0,f2,f3
|
||||||
end ['R0','R3','R4','F0','F1','F2','F3'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.25 2003-05-31 20:22:06 jonas
|
Revision 1.26 2003-06-14 12:41:08 jonas
|
||||||
|
* fixed compilation problems (removed unnecessary modified registers
|
||||||
|
lists from procedures)
|
||||||
|
|
||||||
|
Revision 1.25 2003/05/31 20:22:06 jonas
|
||||||
* fixed 64 bit results of trunc and round
|
* fixed 64 bit results of trunc and round
|
||||||
|
|
||||||
Revision 1.24 2003/05/30 23:56:41 florian
|
Revision 1.24 2003/05/30 23:56:41 florian
|
||||||
|
@ -341,7 +341,7 @@ LMoveBytesLoop:
|
|||||||
stbux r0,r4,r10
|
stbux r0,r4,r10
|
||||||
bdnz LMoveBytesLoop
|
bdnz LMoveBytesLoop
|
||||||
LMoveDone:
|
LMoveDone:
|
||||||
end ['R0','R3','R4','R5','R10','F0','F11','F12','F13','CTR','CR0','CR1','CR7'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FILLCHAR}
|
{$define FPC_SYSTEM_HAS_FILLCHAR}
|
||||||
@ -497,7 +497,7 @@ LFillDWordLoop:
|
|||||||
stwu r5,4(r3)
|
stwu r5,4(r3)
|
||||||
bdnz LFillDWordLoop
|
bdnz LFillDWordLoop
|
||||||
LFillDWordEnd:
|
LFillDWordEnd:
|
||||||
end ['R3','R4','R5','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_INDEXBYTE}
|
{$define FPC_SYSTEM_HAS_INDEXBYTE}
|
||||||
@ -522,7 +522,7 @@ LIndexByteLoop:
|
|||||||
bne LIndexByteDone
|
bne LIndexByteDone
|
||||||
sub r3,r10,r0
|
sub r3,r10,r0
|
||||||
LIndexByteDone:
|
LIndexByteDone:
|
||||||
end ['R0','R3','R9','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_INDEXWORD}
|
{$define FPC_SYSTEM_HAS_INDEXWORD}
|
||||||
@ -547,7 +547,7 @@ LIndexWordLoop:
|
|||||||
bne LIndexWordDone
|
bne LIndexWordDone
|
||||||
sub r3,r10,r0
|
sub r3,r10,r0
|
||||||
LIndexWordDone:
|
LIndexWordDone:
|
||||||
end ['R0','R3','R9','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_INDEXDWORD}
|
{$define FPC_SYSTEM_HAS_INDEXDWORD}
|
||||||
@ -572,7 +572,7 @@ LIndexDWordLoop:
|
|||||||
bne LIndexDWordDone
|
bne LIndexDWordDone
|
||||||
sub r3,r10,r0
|
sub r3,r10,r0
|
||||||
LIndexDWordDone:
|
LIndexDWordDone:
|
||||||
end ['R0','R3','R9','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_COMPAREBYTE}
|
{$define FPC_SYSTEM_HAS_COMPAREBYTE}
|
||||||
function CompareByte(const buf1,buf2;len:longint):longint; assembler;
|
function CompareByte(const buf1,buf2;len:longint):longint; assembler;
|
||||||
@ -598,7 +598,7 @@ LCompByteLoop:
|
|||||||
{ if chars not equal or at the end, we're ready }
|
{ if chars not equal or at the end, we're ready }
|
||||||
bdnzt cr0*4+eq, LCompByteLoop
|
bdnzt cr0*4+eq, LCompByteLoop
|
||||||
LCompByteDone:
|
LCompByteDone:
|
||||||
end ['R0','R3','R4','R9','R10','R11','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_COMPAREWORD}
|
{$define FPC_SYSTEM_HAS_COMPAREWORD}
|
||||||
function CompareWord(const buf1,buf2;len:longint):longint; assembler;
|
function CompareWord(const buf1,buf2;len:longint):longint; assembler;
|
||||||
@ -624,7 +624,7 @@ LCompWordLoop:
|
|||||||
{ if chars not equal or at the end, we're ready }
|
{ if chars not equal or at the end, we're ready }
|
||||||
bdnzt cr0*4+eq, LCompWordLoop
|
bdnzt cr0*4+eq, LCompWordLoop
|
||||||
LCompWordDone:
|
LCompWordDone:
|
||||||
end ['R0','R3','R4','R9','R10','R11','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_COMPAREDWORD}
|
{$define FPC_SYSTEM_HAS_COMPAREDWORD}
|
||||||
@ -651,7 +651,7 @@ LCompDWordLoop:
|
|||||||
{ if chars not equal or at the end, we're ready }
|
{ if chars not equal or at the end, we're ready }
|
||||||
bdnzt cr0*4+eq, LCompDWordLoop
|
bdnzt cr0*4+eq, LCompDWordLoop
|
||||||
LCompDWordDone:
|
LCompDWordDone:
|
||||||
end ['R0','R3','R4','R9','R10','R11','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_INDEXCHAR0}
|
{$define FPC_SYSTEM_HAS_INDEXCHAR0}
|
||||||
function IndexChar0(const buf;len:longint;b:Char):longint; assembler;
|
function IndexChar0(const buf;len:longint;b:Char):longint; assembler;
|
||||||
@ -678,7 +678,7 @@ LIndexChar0Loop:
|
|||||||
bne LIndexChar0Done
|
bne LIndexChar0Done
|
||||||
sub r3,r9,r0
|
sub r3,r9,r0
|
||||||
LIndexChar0Done:
|
LIndexChar0Done:
|
||||||
end ['R0','R3','R4','R9','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
@ -711,7 +711,7 @@ LShortStrCopyLoop:
|
|||||||
stbu r0,1(r3)
|
stbu r0,1(r3)
|
||||||
bdnz LShortStrCopyLoop
|
bdnz LShortStrCopyLoop
|
||||||
LShortStrCopyDone:
|
LShortStrCopyDone:
|
||||||
end ['R0','R3','R4','R5','R6','R7','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SHORTSTR_ASSIGN}
|
{$define FPC_SYSTEM_HAS_FPC_SHORTSTR_ASSIGN}
|
||||||
@ -744,7 +744,7 @@ LShortStrCopyLoop2:
|
|||||||
stbu r0,1(r5)
|
stbu r0,1(r5)
|
||||||
bdnz LShortStrCopyLoop2
|
bdnz LShortStrCopyLoop2
|
||||||
LShortStrCopyDone2:
|
LShortStrCopyDone2:
|
||||||
end ['R0','R3','R4','R5','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SHORTSTR_APPEND_SHORTSTR}
|
{$define FPC_SYSTEM_HAS_FPC_SHORTSTR_APPEND_SHORTSTR}
|
||||||
@ -785,7 +785,7 @@ LShortStrAppendLoop:
|
|||||||
stbu r10,1(r3)
|
stbu r10,1(r3)
|
||||||
bdnz LShortStrAppendLoop
|
bdnz LShortStrAppendLoop
|
||||||
LShortStrAppendDone:
|
LShortStrAppendDone:
|
||||||
end ['R3','R4','R8','R9','R10','CTR'];
|
end;
|
||||||
|
|
||||||
(*
|
(*
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SHORTSTR_COMPARE}
|
{$define FPC_SYSTEM_HAS_FPC_SHORTSTR_COMPARE}
|
||||||
@ -844,7 +844,7 @@ LShortStrCompareLen:
|
|||||||
{ also return result in flags, maybe we can use this in the CG }
|
{ also return result in flags, maybe we can use this in the CG }
|
||||||
mr. r3,r3
|
mr. r3,r3
|
||||||
LShortStrCompareDone:
|
LShortStrCompareDone:
|
||||||
end ['R0','R3','R4','R5','R6','R7','R8','R9','R10','CR0','CR1','CTR'];
|
end;
|
||||||
*)
|
*)
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_PCHAR_TO_SHORTSTR}
|
{$define FPC_SYSTEM_HAS_FPC_PCHAR_TO_SHORTSTR}
|
||||||
@ -863,7 +863,7 @@ function get_frame:pointer;assembler;
|
|||||||
asm
|
asm
|
||||||
{ all abi's I know use r1 as stack pointer }
|
{ all abi's I know use r1 as stack pointer }
|
||||||
mr r3, r1
|
mr r3, r1
|
||||||
end ['R3'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
|
{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
|
||||||
@ -877,7 +877,7 @@ asm
|
|||||||
lwz r3,4(r3)
|
lwz r3,4(r3)
|
||||||
Lcaller_addr_frame_null:
|
Lcaller_addr_frame_null:
|
||||||
// !!!!!!! depends on ABI !!!!!!!!
|
// !!!!!!! depends on ABI !!!!!!!!
|
||||||
end ['R3'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
|
{$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
|
||||||
@ -887,7 +887,7 @@ asm
|
|||||||
beq Lcaller_frame_null
|
beq Lcaller_frame_null
|
||||||
lwz r3,0(r3)
|
lwz r3,0(r3)
|
||||||
Lcaller_frame_null:
|
Lcaller_frame_null:
|
||||||
end ['R3'];
|
end;
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_ABS_LONGINT}
|
{$define FPC_SYSTEM_HAS_ABS_LONGINT}
|
||||||
function abs(l:longint):longint; assembler;[internconst:in_const_abs];
|
function abs(l:longint):longint; assembler;[internconst:in_const_abs];
|
||||||
@ -895,7 +895,7 @@ asm
|
|||||||
srawi r0,r3,31
|
srawi r0,r3,31
|
||||||
add r3,r0,r3
|
add r3,r0,r3
|
||||||
xor r3,r3,r0
|
xor r3,r3,r0
|
||||||
end ['R0','R3'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
@ -906,21 +906,21 @@ end ['R0','R3'];
|
|||||||
function odd(l:longint):boolean;assembler;[internconst:in_const_odd];
|
function odd(l:longint):boolean;assembler;[internconst:in_const_odd];
|
||||||
asm
|
asm
|
||||||
rlwinm r3,r3,0,31,31
|
rlwinm r3,r3,0,31,31
|
||||||
end ['R3'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_SQR_LONGINT}
|
{$define FPC_SYSTEM_HAS_SQR_LONGINT}
|
||||||
function sqr(l:longint):longint;assembler;[internconst:in_const_sqr];
|
function sqr(l:longint):longint;assembler;[internconst:in_const_sqr];
|
||||||
asm
|
asm
|
||||||
mullw r3,r3,r3
|
mullw r3,r3,r3
|
||||||
end ['R3'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_SPTR}
|
{$define FPC_SYSTEM_HAS_SPTR}
|
||||||
Function Sptr : Longint;assembler;
|
Function Sptr : Longint;assembler;
|
||||||
asm
|
asm
|
||||||
mr r3,r1
|
mr r3,r1
|
||||||
end ['R3'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
@ -948,7 +948,7 @@ LDecLockedLoop:
|
|||||||
bne- LDecLockedLoop
|
bne- LDecLockedLoop
|
||||||
cntlzw r3,r10
|
cntlzw r3,r10
|
||||||
srwi r3,r3,5
|
srwi r3,r3,5
|
||||||
end ['R3','R10'];
|
end;
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_INCLOCKED}
|
{$define FPC_SYSTEM_HAS_INCLOCKED}
|
||||||
procedure inclocked(var l : longint);assembler;
|
procedure inclocked(var l : longint);assembler;
|
||||||
@ -958,12 +958,16 @@ LIncLockedLoop:
|
|||||||
addi r10,r10,1
|
addi r10,r10,1
|
||||||
stwcx. r10,0,r3
|
stwcx. r10,0,r3
|
||||||
bne- LIncLockedLoop
|
bne- LIncLockedLoop
|
||||||
end ['R3','R10'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.50 2003-06-01 14:50:17 jonas
|
Revision 1.51 2003-06-14 12:41:08 jonas
|
||||||
|
* fixed compilation problems (removed unnecessary modified registers
|
||||||
|
lists from procedures)
|
||||||
|
|
||||||
|
Revision 1.50 2003/06/01 14:50:17 jonas
|
||||||
* fpc_shortstr_append_shortstr has to use high(s1) instead of 255 as
|
* fpc_shortstr_append_shortstr has to use high(s1) instead of 255 as
|
||||||
maxlen
|
maxlen
|
||||||
+ ppc version of fpc_shortstr_append_shortstr
|
+ ppc version of fpc_shortstr_append_shortstr
|
||||||
|
@ -32,7 +32,7 @@ asm
|
|||||||
stw r0,20(r3)
|
stw r0,20(r3)
|
||||||
stw r0,24(r3)
|
stw r0,24(r3)
|
||||||
stw r0,28(r3)
|
stw r0,28(r3)
|
||||||
end ['R0'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_CREATE_ELEMENT}
|
{$define FPC_SYSTEM_HAS_FPC_SET_CREATE_ELEMENT}
|
||||||
@ -66,7 +66,7 @@ asm
|
|||||||
|
|
||||||
// store the result
|
// store the result
|
||||||
stwx r0,r3,r4
|
stwx r0,r3,r4
|
||||||
end ['R0','R4','R10'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_SET_BYTE}
|
{$define FPC_SYSTEM_HAS_FPC_SET_SET_BYTE}
|
||||||
@ -100,7 +100,7 @@ asm
|
|||||||
or r5,r4,r5
|
or r5,r4,r5
|
||||||
// store result
|
// store result
|
||||||
stw r5,0(r3)
|
stw r5,0(r3)
|
||||||
end ['R0','R3','R4','R5','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_UNSET_BYTE}
|
{$define FPC_SYSTEM_HAS_FPC_SET_UNSET_BYTE}
|
||||||
@ -133,7 +133,7 @@ asm
|
|||||||
andc r5,r4,r5
|
andc r5,r4,r5
|
||||||
// store result
|
// store result
|
||||||
stw r4,0(r3)
|
stw r4,0(r3)
|
||||||
end ['R0','R3','R4','R5','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_SET_RANGE}
|
{$define FPC_SYSTEM_HAS_FPC_SET_SET_RANGE}
|
||||||
@ -196,7 +196,7 @@ Lset_range_hi: // in all cases, r3 here contains the address of
|
|||||||
or r5,r5,r10 // and combine with existing set
|
or r5,r5,r10 // and combine with existing set
|
||||||
stw r5,0(r3) // store to set
|
stw r5,0(r3) // store to set
|
||||||
Lset_range_exit:
|
Lset_range_exit:
|
||||||
end ['R0','R3','R4','R5','R6','R9','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_IN_BYTE}
|
{$define FPC_SYSTEM_HAS_FPC_SET_IN_BYTE}
|
||||||
@ -218,7 +218,7 @@ asm
|
|||||||
subfic r4,r4,32
|
subfic r4,r4,32
|
||||||
// r3 := (r3 shr (r4 mod 32)) and 1
|
// r3 := (r3 shr (r4 mod 32)) and 1
|
||||||
rlwnm r3,r3,r4,31,31
|
rlwnm r3,r3,r4,31,31
|
||||||
end ['R0','R3','R4','CR0'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ asm
|
|||||||
or r0,r0,r10
|
or r0,r0,r10
|
||||||
stwu r0,4(r3)
|
stwu r0,4(r3)
|
||||||
bdnz LMADDSETS1
|
bdnz LMADDSETS1
|
||||||
end ['R0','R3','R4','R5','R10','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_MUL_SETS}
|
{$define FPC_SYSTEM_HAS_FPC_SET_MUL_SETS}
|
||||||
@ -265,7 +265,7 @@ asm
|
|||||||
and r0,r0,r10
|
and r0,r0,r10
|
||||||
stwu r0,4(r3)
|
stwu r0,4(r3)
|
||||||
bdnz LMMULSETS1
|
bdnz LMMULSETS1
|
||||||
end ['R0','R3','R4','R5','R10','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_SUB_SETS}
|
{$define FPC_SYSTEM_HAS_FPC_SET_SUB_SETS}
|
||||||
@ -288,7 +288,7 @@ asm
|
|||||||
andc r0,r0,r10
|
andc r0,r0,r10
|
||||||
stwu r0,4(r3)
|
stwu r0,4(r3)
|
||||||
bdnz LMSUBSETS1
|
bdnz LMSUBSETS1
|
||||||
end ['R0','R3','R4','R5','R10','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_SYMDIF_SETS}
|
{$define FPC_SYSTEM_HAS_FPC_SET_SYMDIF_SETS}
|
||||||
@ -311,7 +311,7 @@ asm
|
|||||||
xor r0,r0,r10
|
xor r0,r0,r10
|
||||||
stwu r0,4(r3)
|
stwu r0,4(r3)
|
||||||
bdnz LMSYMDIFSETS1
|
bdnz LMSYMDIFSETS1
|
||||||
end ['R0','R3','R4','R5','R10','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_COMP_SETS}
|
{$define FPC_SYSTEM_HAS_FPC_SET_COMP_SETS}
|
||||||
@ -332,7 +332,7 @@ asm
|
|||||||
bdnzt cr0*4+eq,LMCOMPSETS1
|
bdnzt cr0*4+eq,LMCOMPSETS1
|
||||||
cntlzw r3,r0
|
cntlzw r3,r0
|
||||||
srwi. r3,r3,5
|
srwi. r3,r3,5
|
||||||
end ['R0','R3','R4','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_CONTAINS_SET}
|
{$define FPC_SYSTEM_HAS_FPC_SET_CONTAINS_SET}
|
||||||
@ -354,7 +354,7 @@ asm
|
|||||||
bdnzt cr0*4+eq,LMCONTAINSSETS1
|
bdnzt cr0*4+eq,LMCONTAINSSETS1
|
||||||
cntlzw r3,r0
|
cntlzw r3,r0
|
||||||
srwi. r3,r3,5
|
srwi. r3,r3,5
|
||||||
end ['R0','R3','R4','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -523,7 +523,11 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.21 2003-05-29 14:32:54 jonas
|
Revision 1.22 2003-06-14 12:41:08 jonas
|
||||||
|
* fixed compilation problems (removed unnecessary modified registers
|
||||||
|
lists from procedures)
|
||||||
|
|
||||||
|
Revision 1.21 2003/05/29 14:32:54 jonas
|
||||||
* changed dcbst to dcbtst (former means "flush cache block to memory,
|
* changed dcbst to dcbtst (former means "flush cache block to memory,
|
||||||
the latter means "I will soon store something to that cache block")
|
the latter means "I will soon store something to that cache block")
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ LStrCopyWrapUpLoop:
|
|||||||
bge LStrCopyWrapUpLoop
|
bge LStrCopyWrapUpLoop
|
||||||
LStrCopyDone:
|
LStrCopyDone:
|
||||||
{ r3 still contains dest here }
|
{ r3 still contains dest here }
|
||||||
end ['R4','R7','R8','R0','R9','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strecopy(dest,source : pchar) : pchar;assembler;
|
function strecopy(dest,source : pchar) : pchar;assembler;
|
||||||
@ -147,7 +147,7 @@ LStrECopyWrapUpLoop:
|
|||||||
bge LStrECopyWrapUpLoop
|
bge LStrECopyWrapUpLoop
|
||||||
LStrECopyDone:
|
LStrECopyDone:
|
||||||
{ r3 contains new dest here }
|
{ r3 contains new dest here }
|
||||||
end ['R3','R4','R8','R0','R3','R9','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strlcopy(dest,source : pchar;maxlen : longint) : pchar;assembler;
|
function strlcopy(dest,source : pchar;maxlen : longint) : pchar;assembler;
|
||||||
@ -170,7 +170,7 @@ LStrlCopyLoop:
|
|||||||
li r0,0
|
li r0,0
|
||||||
stb r0,1(r10)
|
stb r0,1(r10)
|
||||||
LStrlCopyDone:
|
LStrlCopyDone:
|
||||||
end ['R0','R4','R10','CR0'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strlen(p : pchar) : longint;assembler;
|
function strlen(p : pchar) : longint;assembler;
|
||||||
@ -192,7 +192,7 @@ LStrEndLoop:
|
|||||||
cmplwi r0,0
|
cmplwi r0,0
|
||||||
bne LStrEndLoop
|
bne LStrEndLoop
|
||||||
LStrEndDone:
|
LStrEndDone:
|
||||||
end ['R0','R3','R4','CR0'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strcomp(str1,str2 : pchar) : longint;assembler;
|
function strcomp(str1,str2 : pchar) : longint;assembler;
|
||||||
@ -218,7 +218,7 @@ LStrCompLoop:
|
|||||||
{ otherwise loop }
|
{ otherwise loop }
|
||||||
bne cr1,LStrCompLoop
|
bne cr1,LStrCompLoop
|
||||||
LStrCompDone:
|
LStrCompDone:
|
||||||
end ['R0','R3','R4','R9','R10','CR0','CR1'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strlcomp(str1,str2 : pchar;l : longint) : longint;assembler;
|
function strlcomp(str1,str2 : pchar;l : longint) : longint;assembler;
|
||||||
@ -251,7 +251,7 @@ LStrlCompLoop:
|
|||||||
{ otherwise loop (if ctr <> 0) }
|
{ otherwise loop (if ctr <> 0) }
|
||||||
bdnzf cr1*4+eq,LStrlCompLoop
|
bdnzf cr1*4+eq,LStrlCompLoop
|
||||||
LStrlCompDone:
|
LStrlCompDone:
|
||||||
end ['R0','R3','R4','R9','R10','CR0','CR1','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function stricomp(str1,str2 : pchar) : longint;assembler;
|
function stricomp(str1,str2 : pchar) : longint;assembler;
|
||||||
@ -314,7 +314,7 @@ LStriCompEqual:
|
|||||||
{ otherwise loop }
|
{ otherwise loop }
|
||||||
bne cr1,LStriCompLoop
|
bne cr1,LStriCompLoop
|
||||||
LStriCompDone:
|
LStriCompDone:
|
||||||
end ['R3','R4','R26','R27','R28','R29','R30','CR0','CR1'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strlicomp(str1,str2 : pchar;l : longint) : longint;assembler;
|
function strlicomp(str1,str2 : pchar;l : longint) : longint;assembler;
|
||||||
@ -372,7 +372,7 @@ LStrliCompEqual:
|
|||||||
{ otherwise loop (if ctr <> 0) }
|
{ otherwise loop (if ctr <> 0) }
|
||||||
bdnzf cr1*4+eq,LStrliCompLoop
|
bdnzf cr1*4+eq,LStrliCompLoop
|
||||||
LStrliCompDone:
|
LStrliCompDone:
|
||||||
end ['R0','R3','R4','R5','R7','R8','R9','R10','CR0','CR1','CTR'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strscan(p : pchar;c : char) : pchar;assembler;
|
function strscan(p : pchar;c : char) : pchar;assembler;
|
||||||
@ -390,7 +390,7 @@ LStrScanLoop:
|
|||||||
beq cr1,LStrScanDone
|
beq cr1,LStrScanDone
|
||||||
li r3, 0
|
li r3, 0
|
||||||
LStrScanDone:
|
LStrScanDone:
|
||||||
end ['R0','R3','R4','CR0','CR1'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strrscan(p : pchar;c : char) : pchar;assembler;
|
function strrscan(p : pchar;c : char) : pchar;assembler;
|
||||||
@ -413,7 +413,7 @@ LStrrScanLoop:
|
|||||||
LStrrScanNotFound:
|
LStrrScanNotFound:
|
||||||
bne LStrrScanLoop
|
bne LStrrScanLoop
|
||||||
LStrrScanDone:
|
LStrrScanDone:
|
||||||
end ['R0','R3','R4','R10','CR0','CR1'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strupper(p : pchar) : pchar;assembler;
|
function strupper(p : pchar) : pchar;assembler;
|
||||||
@ -433,7 +433,7 @@ LStrUpperLoop:
|
|||||||
LStrUpper1:
|
LStrUpper1:
|
||||||
bne cr1,LStrUpperLoop
|
bne cr1,LStrUpperLoop
|
||||||
LStrUpperNil:
|
LStrUpperNil:
|
||||||
end ['R0','R9','R10','CR0','CR1'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
function strlower(p : pchar) : pchar;assembler;
|
function strlower(p : pchar) : pchar;assembler;
|
||||||
@ -453,12 +453,16 @@ LStrLowerLoop:
|
|||||||
LStrLower1:
|
LStrLower1:
|
||||||
bne cr1,LStrLowerLoop
|
bne cr1,LStrLowerLoop
|
||||||
LStrLowerNil:
|
LStrLowerNil:
|
||||||
end ['R0','R9','R10','CR0','CR1'];
|
end;
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.18 2003-05-28 19:18:10 jonas
|
Revision 1.19 2003-06-14 12:41:08 jonas
|
||||||
|
* fixed compilation problems (removed unnecessary modified registers
|
||||||
|
lists from procedures)
|
||||||
|
|
||||||
|
Revision 1.18 2003/05/28 19:18:10 jonas
|
||||||
* fixed strcopy and strecopy if there are #1 chars right before the end
|
* fixed strcopy and strecopy if there are #1 chars right before the end
|
||||||
of the string to copied
|
of the string to copied
|
||||||
|
|
||||||
|
@ -37,11 +37,15 @@ LStrPCopyLoop:
|
|||||||
li r0,0
|
li r0,0
|
||||||
LStrPCopyEmpty:
|
LStrPCopyEmpty:
|
||||||
stb r0,1(r10)
|
stb r0,1(r10)
|
||||||
end ['R0','R4','R10','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2002-09-11 07:49:40 jonas
|
Revision 1.9 2003-06-14 12:41:09 jonas
|
||||||
|
* fixed compilation problems (removed unnecessary modified registers
|
||||||
|
lists from procedures)
|
||||||
|
|
||||||
|
Revision 1.8 2002/09/11 07:49:40 jonas
|
||||||
* fixed assembler errors
|
* fixed assembler errors
|
||||||
|
|
||||||
Revision 1.7 2002/09/07 16:01:26 peter
|
Revision 1.7 2002/09/07 16:01:26 peter
|
||||||
|
@ -30,11 +30,15 @@ LStrLenLoop:
|
|||||||
bne LStrLenLoop
|
bne LStrLenLoop
|
||||||
sub r3,r29,r3
|
sub r3,r29,r3
|
||||||
LStrLenDone:
|
LStrLenDone:
|
||||||
end ['R3','R4','R29','R30','CR0'];
|
end;
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 2002-09-11 07:49:40 jonas
|
Revision 1.6 2003-06-14 12:41:09 jonas
|
||||||
|
* fixed compilation problems (removed unnecessary modified registers
|
||||||
|
lists from procedures)
|
||||||
|
|
||||||
|
Revision 1.5 2002/09/11 07:49:40 jonas
|
||||||
* fixed assembler errors
|
* fixed assembler errors
|
||||||
|
|
||||||
Revision 1.4 2002/09/07 16:01:26 peter
|
Revision 1.4 2002/09/07 16:01:26 peter
|
||||||
|
@ -51,11 +51,15 @@ LStrPasDone:
|
|||||||
|
|
||||||
{ store length }
|
{ store length }
|
||||||
stb r10,0(r3)
|
stb r10,0(r3)
|
||||||
end ['R0','R3','R4','R10','R11','CR0','CTR'];
|
end;
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.9 2003-04-27 16:25:08 jonas
|
Revision 1.10 2003-06-14 12:41:09 jonas
|
||||||
|
* fixed compilation problems (removed unnecessary modified registers
|
||||||
|
lists from procedures)
|
||||||
|
|
||||||
|
Revision 1.9 2003/04/27 16:25:08 jonas
|
||||||
* support nil as parameter and some other fixes
|
* support nil as parameter and some other fixes
|
||||||
|
|
||||||
Revision 1.8 2002/10/17 10:14:46 jonas
|
Revision 1.8 2002/10/17 10:14:46 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user