* fixed compilation problems (removed unnecessary modified registers

lists from procedures)
This commit is contained in:
Jonas Maebe 2003-06-14 12:41:08 +00:00
parent 0dceec9a64
commit a4db446a95
7 changed files with 88 additions and 60 deletions

View File

@ -153,7 +153,7 @@ LTruncNoAdd:
subfic r4,r4,0
subfze r3,r3
LTruncPositive:
end ['R3','R4','F1','F2','F3','F4'];
end;
{$define FPC_SYSTEM_HAS_ROUND}
@ -249,7 +249,7 @@ LRoundNoAdd:
subfic r4,r4,0
subfze r3,r3
LRoundPositive:
end ['R3','R4','F1','F2','F3','F4'];
end;
{$define FPC_SYSTEM_HAS_POWER}
@ -382,7 +382,7 @@ asm
{$endif}
fsub f3,f3,f1
fmadd f1,f0,f2,f3
end ['R0','R3','R4','F0','F1','F2','F3'];
end;
function fpc_qword_to_double(q: qword): double; compilerproc;
@ -419,12 +419,16 @@ asm
{$endif}
fsub f3,f3,f1
fmadd f1,f0,f2,f3
end ['R0','R3','R4','F0','F1','F2','F3'];
end;
{
$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
Revision 1.24 2003/05/30 23:56:41 florian

View File

@ -341,7 +341,7 @@ LMoveBytesLoop:
stbux r0,r4,r10
bdnz LMoveBytesLoop
LMoveDone:
end ['R0','R3','R4','R5','R10','F0','F11','F12','F13','CTR','CR0','CR1','CR7'];
end;
{$define FPC_SYSTEM_HAS_FILLCHAR}
@ -497,7 +497,7 @@ LFillDWordLoop:
stwu r5,4(r3)
bdnz LFillDWordLoop
LFillDWordEnd:
end ['R3','R4','R5','CTR'];
end;
{$define FPC_SYSTEM_HAS_INDEXBYTE}
@ -522,7 +522,7 @@ LIndexByteLoop:
bne LIndexByteDone
sub r3,r10,r0
LIndexByteDone:
end ['R0','R3','R9','R10','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_INDEXWORD}
@ -547,7 +547,7 @@ LIndexWordLoop:
bne LIndexWordDone
sub r3,r10,r0
LIndexWordDone:
end ['R0','R3','R9','R10','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_INDEXDWORD}
@ -572,7 +572,7 @@ LIndexDWordLoop:
bne LIndexDWordDone
sub r3,r10,r0
LIndexDWordDone:
end ['R0','R3','R9','R10','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_COMPAREBYTE}
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 }
bdnzt cr0*4+eq, LCompByteLoop
LCompByteDone:
end ['R0','R3','R4','R9','R10','R11','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_COMPAREWORD}
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 }
bdnzt cr0*4+eq, LCompWordLoop
LCompWordDone:
end ['R0','R3','R4','R9','R10','R11','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_COMPAREDWORD}
@ -651,7 +651,7 @@ LCompDWordLoop:
{ if chars not equal or at the end, we're ready }
bdnzt cr0*4+eq, LCompDWordLoop
LCompDWordDone:
end ['R0','R3','R4','R9','R10','R11','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_INDEXCHAR0}
function IndexChar0(const buf;len:longint;b:Char):longint; assembler;
@ -678,7 +678,7 @@ LIndexChar0Loop:
bne LIndexChar0Done
sub r3,r9,r0
LIndexChar0Done:
end ['R0','R3','R4','R9','R10','CR0','CTR'];
end;
{****************************************************************************
@ -711,7 +711,7 @@ LShortStrCopyLoop:
stbu r0,1(r3)
bdnz LShortStrCopyLoop
LShortStrCopyDone:
end ['R0','R3','R4','R5','R6','R7','R10','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_FPC_SHORTSTR_ASSIGN}
@ -744,7 +744,7 @@ LShortStrCopyLoop2:
stbu r0,1(r5)
bdnz LShortStrCopyLoop2
LShortStrCopyDone2:
end ['R0','R3','R4','R5','R10','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_FPC_SHORTSTR_APPEND_SHORTSTR}
@ -785,7 +785,7 @@ LShortStrAppendLoop:
stbu r10,1(r3)
bdnz LShortStrAppendLoop
LShortStrAppendDone:
end ['R3','R4','R8','R9','R10','CTR'];
end;
(*
{$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 }
mr. r3,r3
LShortStrCompareDone:
end ['R0','R3','R4','R5','R6','R7','R8','R9','R10','CR0','CR1','CTR'];
end;
*)
{$define FPC_SYSTEM_HAS_FPC_PCHAR_TO_SHORTSTR}
@ -863,7 +863,7 @@ function get_frame:pointer;assembler;
asm
{ all abi's I know use r1 as stack pointer }
mr r3, r1
end ['R3'];
end;
{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
@ -877,7 +877,7 @@ asm
lwz r3,4(r3)
Lcaller_addr_frame_null:
// !!!!!!! depends on ABI !!!!!!!!
end ['R3'];
end;
{$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
@ -887,7 +887,7 @@ asm
beq Lcaller_frame_null
lwz r3,0(r3)
Lcaller_frame_null:
end ['R3'];
end;
{$define FPC_SYSTEM_HAS_ABS_LONGINT}
function abs(l:longint):longint; assembler;[internconst:in_const_abs];
@ -895,7 +895,7 @@ asm
srawi r0,r3,31
add r3,r0,r3
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];
asm
rlwinm r3,r3,0,31,31
end ['R3'];
end;
{$define FPC_SYSTEM_HAS_SQR_LONGINT}
function sqr(l:longint):longint;assembler;[internconst:in_const_sqr];
asm
mullw r3,r3,r3
end ['R3'];
end;
{$define FPC_SYSTEM_HAS_SPTR}
Function Sptr : Longint;assembler;
asm
mr r3,r1
end ['R3'];
end;
{****************************************************************************
@ -948,7 +948,7 @@ LDecLockedLoop:
bne- LDecLockedLoop
cntlzw r3,r10
srwi r3,r3,5
end ['R3','R10'];
end;
{$define FPC_SYSTEM_HAS_INCLOCKED}
procedure inclocked(var l : longint);assembler;
@ -958,12 +958,16 @@ LIncLockedLoop:
addi r10,r10,1
stwcx. r10,0,r3
bne- LIncLockedLoop
end ['R3','R10'];
end;
{
$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
maxlen
+ ppc version of fpc_shortstr_append_shortstr

View File

@ -32,7 +32,7 @@ asm
stw r0,20(r3)
stw r0,24(r3)
stw r0,28(r3)
end ['R0'];
end;
{$define FPC_SYSTEM_HAS_FPC_SET_CREATE_ELEMENT}
@ -66,7 +66,7 @@ asm
// store the result
stwx r0,r3,r4
end ['R0','R4','R10'];
end;
{$define FPC_SYSTEM_HAS_FPC_SET_SET_BYTE}
@ -100,7 +100,7 @@ asm
or r5,r4,r5
// store result
stw r5,0(r3)
end ['R0','R3','R4','R5','CTR'];
end;
{$define FPC_SYSTEM_HAS_FPC_SET_UNSET_BYTE}
@ -133,7 +133,7 @@ asm
andc r5,r4,r5
// store result
stw r4,0(r3)
end ['R0','R3','R4','R5','CTR'];
end;
{$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
stw r5,0(r3) // store to set
Lset_range_exit:
end ['R0','R3','R4','R5','R6','R9','R10','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_FPC_SET_IN_BYTE}
@ -218,7 +218,7 @@ asm
subfic r4,r4,32
// r3 := (r3 shr (r4 mod 32)) and 1
rlwnm r3,r3,r4,31,31
end ['R0','R3','R4','CR0'];
end;
@ -242,7 +242,7 @@ asm
or r0,r0,r10
stwu r0,4(r3)
bdnz LMADDSETS1
end ['R0','R3','R4','R5','R10','CTR'];
end;
{$define FPC_SYSTEM_HAS_FPC_SET_MUL_SETS}
@ -265,7 +265,7 @@ asm
and r0,r0,r10
stwu r0,4(r3)
bdnz LMMULSETS1
end ['R0','R3','R4','R5','R10','CTR'];
end;
{$define FPC_SYSTEM_HAS_FPC_SET_SUB_SETS}
@ -288,7 +288,7 @@ asm
andc r0,r0,r10
stwu r0,4(r3)
bdnz LMSUBSETS1
end ['R0','R3','R4','R5','R10','CTR'];
end;
{$define FPC_SYSTEM_HAS_FPC_SET_SYMDIF_SETS}
@ -311,7 +311,7 @@ asm
xor r0,r0,r10
stwu r0,4(r3)
bdnz LMSYMDIFSETS1
end ['R0','R3','R4','R5','R10','CTR'];
end;
{$define FPC_SYSTEM_HAS_FPC_SET_COMP_SETS}
@ -332,7 +332,7 @@ asm
bdnzt cr0*4+eq,LMCOMPSETS1
cntlzw r3,r0
srwi. r3,r3,5
end ['R0','R3','R4','R10','CR0','CTR'];
end;
{$define FPC_SYSTEM_HAS_FPC_SET_CONTAINS_SET}
@ -354,7 +354,7 @@ asm
bdnzt cr0*4+eq,LMCONTAINSSETS1
cntlzw r3,r0
srwi. r3,r3,5
end ['R0','R3','R4','R10','CR0','CTR'];
end;
@ -523,7 +523,11 @@ end;
{
$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,
the latter means "I will soon store something to that cache block")

View File

@ -81,7 +81,7 @@ LStrCopyWrapUpLoop:
bge LStrCopyWrapUpLoop
LStrCopyDone:
{ r3 still contains dest here }
end ['R4','R7','R8','R0','R9','R10','CR0','CTR'];
end;
function strecopy(dest,source : pchar) : pchar;assembler;
@ -147,7 +147,7 @@ LStrECopyWrapUpLoop:
bge LStrECopyWrapUpLoop
LStrECopyDone:
{ 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;
@ -170,7 +170,7 @@ LStrlCopyLoop:
li r0,0
stb r0,1(r10)
LStrlCopyDone:
end ['R0','R4','R10','CR0'];
end;
function strlen(p : pchar) : longint;assembler;
@ -192,7 +192,7 @@ LStrEndLoop:
cmplwi r0,0
bne LStrEndLoop
LStrEndDone:
end ['R0','R3','R4','CR0'];
end;
function strcomp(str1,str2 : pchar) : longint;assembler;
@ -218,7 +218,7 @@ LStrCompLoop:
{ otherwise loop }
bne cr1,LStrCompLoop
LStrCompDone:
end ['R0','R3','R4','R9','R10','CR0','CR1'];
end;
function strlcomp(str1,str2 : pchar;l : longint) : longint;assembler;
@ -251,7 +251,7 @@ LStrlCompLoop:
{ otherwise loop (if ctr <> 0) }
bdnzf cr1*4+eq,LStrlCompLoop
LStrlCompDone:
end ['R0','R3','R4','R9','R10','CR0','CR1','CTR'];
end;
function stricomp(str1,str2 : pchar) : longint;assembler;
@ -314,7 +314,7 @@ LStriCompEqual:
{ otherwise loop }
bne cr1,LStriCompLoop
LStriCompDone:
end ['R3','R4','R26','R27','R28','R29','R30','CR0','CR1'];
end;
function strlicomp(str1,str2 : pchar;l : longint) : longint;assembler;
@ -372,7 +372,7 @@ LStrliCompEqual:
{ otherwise loop (if ctr <> 0) }
bdnzf cr1*4+eq,LStrliCompLoop
LStrliCompDone:
end ['R0','R3','R4','R5','R7','R8','R9','R10','CR0','CR1','CTR'];
end;
function strscan(p : pchar;c : char) : pchar;assembler;
@ -390,7 +390,7 @@ LStrScanLoop:
beq cr1,LStrScanDone
li r3, 0
LStrScanDone:
end ['R0','R3','R4','CR0','CR1'];
end;
function strrscan(p : pchar;c : char) : pchar;assembler;
@ -413,7 +413,7 @@ LStrrScanLoop:
LStrrScanNotFound:
bne LStrrScanLoop
LStrrScanDone:
end ['R0','R3','R4','R10','CR0','CR1'];
end;
function strupper(p : pchar) : pchar;assembler;
@ -433,7 +433,7 @@ LStrUpperLoop:
LStrUpper1:
bne cr1,LStrUpperLoop
LStrUpperNil:
end ['R0','R9','R10','CR0','CR1'];
end;
function strlower(p : pchar) : pchar;assembler;
@ -453,12 +453,16 @@ LStrLowerLoop:
LStrLower1:
bne cr1,LStrLowerLoop
LStrLowerNil:
end ['R0','R9','R10','CR0','CR1'];
end;
{
$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
of the string to copied

View File

@ -37,11 +37,15 @@ LStrPCopyLoop:
li r0,0
LStrPCopyEmpty:
stb r0,1(r10)
end ['R0','R4','R10','CR0','CTR'];
end;
{
$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
Revision 1.7 2002/09/07 16:01:26 peter

View File

@ -30,11 +30,15 @@ LStrLenLoop:
bne LStrLenLoop
sub r3,r29,r3
LStrLenDone:
end ['R3','R4','R29','R30','CR0'];
end;
{
$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
Revision 1.4 2002/09/07 16:01:26 peter

View File

@ -51,11 +51,15 @@ LStrPasDone:
{ store length }
stb r10,0(r3)
end ['R0','R3','R4','R10','R11','CR0','CTR'];
end;
{
$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
Revision 1.8 2002/10/17 10:14:46 jonas