mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 14:10:57 +01:00
* all internal RTL functions start with FPC_
This commit is contained in:
parent
c23f66b8be
commit
181d4769a2
@ -139,7 +139,7 @@ implementation
|
||||
secondpass(p^.right);
|
||||
del_reference(p^.right^.location.reference);
|
||||
emitpushreferenceaddr(exprasmlist,p^.right^.location.reference);
|
||||
emitcall('ANSISTRCMP',true);
|
||||
emitcall('FPC_ANSISTRCMP',true);
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushedregs);
|
||||
end;
|
||||
@ -216,7 +216,7 @@ implementation
|
||||
pushusedregisters(pushedregs,$ff);
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
emitpushreferenceaddr(exprasmlist,p^.right^.location.reference);
|
||||
emitcall('STRCONCAT',true);
|
||||
emitcall('FPC_STRCONCAT',true);
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushedregs);
|
||||
end;
|
||||
@ -259,7 +259,7 @@ implementation
|
||||
secondpass(p^.right);
|
||||
del_reference(p^.right^.location.reference);
|
||||
emitpushreferenceaddr(exprasmlist,p^.right^.location.reference);
|
||||
emitcall('STRCMP',true);
|
||||
emitcall('FPC_STRCMP',true);
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushedregs);
|
||||
end;
|
||||
@ -310,7 +310,7 @@ implementation
|
||||
pushusedregisters(pushedregs,$ff);
|
||||
emitpushreferenceaddr(exprasmlist,p^.right^.location.reference);
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
emitcall('SET_COMP_SETS',true);
|
||||
emitcall('FPC_SET_COMP_SETS',true);
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushedregs);
|
||||
ungetiftemp(p^.left^.location.reference);
|
||||
@ -332,13 +332,13 @@ implementation
|
||||
pushsetelement(p^.right^.right);
|
||||
pushsetelement(p^.right^.left);
|
||||
emitpushreferenceaddr(exprasmlist,href);
|
||||
emitcall('SET_SET_RANGE',true);
|
||||
emitcall('FPC_SET_SET_RANGE',true);
|
||||
end
|
||||
else
|
||||
begin
|
||||
pushsetelement(p^.right^.left);
|
||||
emitpushreferenceaddr(exprasmlist,href);
|
||||
emitcall('SET_SET_BYTE',true);
|
||||
emitcall('FPC_SET_SET_BYTE',true);
|
||||
end;
|
||||
end
|
||||
else
|
||||
@ -347,7 +347,7 @@ implementation
|
||||
emitpushreferenceaddr(exprasmlist,href);
|
||||
emitpushreferenceaddr(exprasmlist,p^.right^.location.reference);
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
emitcall('SET_ADD_SETS',true);
|
||||
emitcall('FPC_SET_ADD_SETS',true);
|
||||
end;
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushedregs);
|
||||
@ -369,9 +369,9 @@ implementation
|
||||
emitpushreferenceaddr(exprasmlist,p^.right^.location.reference);
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
case p^.treetype of
|
||||
subn : emitcall('SET_SUB_SETS',true);
|
||||
symdifn : emitcall('SET_SYMDIF_SETS',true);
|
||||
muln : emitcall('SET_MUL_SETS',true);
|
||||
subn : emitcall('FPC_SET_SUB_SETS',true);
|
||||
symdifn : emitcall('FPC_SET_SYMDIF_SETS',true);
|
||||
muln : emitcall('FPC_SET_MUL_SETS',true);
|
||||
end;
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushedregs);
|
||||
@ -889,7 +889,7 @@ implementation
|
||||
emitl(A_JNB,hl4)
|
||||
else
|
||||
emitl(A_JNO,hl4);
|
||||
emitcall('RE_OVERFLOW',true);
|
||||
emitcall('FPC_OVERFLOW',true);
|
||||
emitl(A_LABEL,hl4);
|
||||
end;
|
||||
end;
|
||||
@ -1277,7 +1277,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.11 1998-09-07 18:45:52 peter
|
||||
Revision 1.12 1998-09-14 10:43:44 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.11 1998/09/07 18:45:52 peter
|
||||
* update smartlinking, uses getdatalabel
|
||||
* renamed ptree.value vars to value_str,value_real,value_set
|
||||
|
||||
|
||||
@ -1053,7 +1053,7 @@ implementation
|
||||
if (cs_check_range in aktlocalswitches) then
|
||||
begin
|
||||
exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,r^.base)));
|
||||
emitcall('CHECK_OBJECT',true);
|
||||
emitcall('FPC_CHECK_OBJECT',true);
|
||||
end;
|
||||
exprasmlist^.concat(new(pai386,op_ref(A_CALL,S_NO,r)));
|
||||
end
|
||||
@ -1268,9 +1268,7 @@ implementation
|
||||
if iolabel<>nil then
|
||||
begin
|
||||
exprasmlist^.concat(new(pai386,op_csymbol(A_PUSH,S_L,newcsymbol(lab2str(iolabel),0))));
|
||||
{ this was wrong, probably an error due to diff3
|
||||
emitcall(p^.procdefinition^.mangledname);}
|
||||
emitcall('IOCHECK',true);
|
||||
emitcall('FPC_IOCHECK',true);
|
||||
end;
|
||||
if must_pop then
|
||||
exprasmlist^.concat(new(pai386,op_const_reg(A_ADD,S_L,pop_size,R_ESP)));
|
||||
@ -1408,7 +1406,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.22 1998-09-04 08:41:37 peter
|
||||
Revision 1.23 1998-09-14 10:43:45 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.22 1998/09/04 08:41:37 peter
|
||||
* updated some error messages
|
||||
|
||||
Revision 1.21 1998/09/01 12:47:57 peter
|
||||
|
||||
@ -1032,7 +1032,7 @@ implementation
|
||||
gettempofsizereference(32,href);
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
emitpushreferenceaddr(exprasmlist,href);
|
||||
emitcall('SET_LOAD_SMALL',true);
|
||||
emitcall('FPC_SET_LOAD_SMALL',true);
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushedregs);
|
||||
p^.location.loc:=LOC_MEM;
|
||||
@ -1193,7 +1193,7 @@ implementation
|
||||
end;
|
||||
else internalerror(100);
|
||||
end;
|
||||
emitcall('DO_IS',true);
|
||||
emitcall('FPC_DO_IS',true);
|
||||
exprasmlist^.concat(new(pai386,op_reg_reg(A_OR,S_B,R_AL,R_AL)));
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
@ -1242,7 +1242,7 @@ implementation
|
||||
end;
|
||||
else internalerror(100);
|
||||
end;
|
||||
emitcall('DO_AS',true);
|
||||
emitcall('FPC_DO_AS',true);
|
||||
{ restore register, this restores automatically the }
|
||||
{ result }
|
||||
popusedregisters(pushed);
|
||||
@ -1252,7 +1252,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.18 1998-09-11 12:29:40 pierre
|
||||
Revision 1.19 1998-09-14 10:43:46 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.18 1998/09/11 12:29:40 pierre
|
||||
* removed explicit range_checking as it is buggy
|
||||
|
||||
Revision 1.17.2.1 1998/09/11 12:08:54 pierre
|
||||
|
||||
@ -719,13 +719,6 @@ do_jmp:
|
||||
var
|
||||
hp : preference;
|
||||
begin
|
||||
{if procinfo.exceptions then
|
||||
aktproccode.concat(gennasmrec(CALL,S_NO,'HELP_DESTRUCTOR_E'))
|
||||
else }
|
||||
{ we should know if the constructor is called with a new or not,
|
||||
how can we do that ???
|
||||
exprasmlist^.concat(new(pai386,op_csymbol(A_CALL,S_NO,newcsymbol('HELP_DESTRUCTOR',0))));
|
||||
}
|
||||
exprasmlist^.concat(new(pai386,op_reg_reg(A_XOR,S_L,R_ESI,R_ESI)));
|
||||
{ also reset to zero in the stack }
|
||||
new(hp);
|
||||
@ -740,7 +733,10 @@ do_jmp:
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.15 1998-09-04 08:41:39 peter
|
||||
Revision 1.16 1998-09-14 10:43:48 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.15 1998/09/04 08:41:39 peter
|
||||
* updated some error messages
|
||||
|
||||
Revision 1.14 1998/09/03 17:08:39 pierre
|
||||
@ -758,7 +754,10 @@ end.
|
||||
Revision 1.11 1998/08/05 16:00:10 florian
|
||||
* some fixes for ansi strings
|
||||
* $log$ to $Log$
|
||||
* $log$ to Revision 1.15 1998-09-04 08:41:39 peter
|
||||
* $log$ to Revision 1.16 1998-09-14 10:43:48 peter
|
||||
* $log$ to * all internal RTL functions start with FPC_
|
||||
* $log$ to
|
||||
* $log$ to Revision 1.15 1998/09/04 08:41:39 peter
|
||||
* $log$ to * updated some error messages
|
||||
* $log$ to
|
||||
* $log$ to Revision 1.14 1998/09/03 17:08:39 pierre
|
||||
|
||||
@ -225,9 +225,9 @@ implementation
|
||||
{ allways read only one record by element }
|
||||
push_int(typedtyp^.size);
|
||||
if doread then
|
||||
emitcall('TYPED_READ',true)
|
||||
emitcall('FPC_TYPED_READ',true)
|
||||
else
|
||||
emitcall('TYPED_WRITE',true);
|
||||
emitcall('FPC_TYPED_WRITE',true);
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -281,34 +281,34 @@ implementation
|
||||
push_int(pstringdef(pararesult)^.len);
|
||||
case pstringdef(pararesult)^.string_typ of
|
||||
st_shortstring:
|
||||
emitcall ('READ_TEXT_STRING',true);
|
||||
emitcall ('FPC_READ_TEXT_STRING',true);
|
||||
st_ansistring:
|
||||
emitcall ('READ_TEXT_ANSISTRING',true);
|
||||
emitcall ('FPC_READ_TEXT_ANSISTRING',true);
|
||||
st_longstring:
|
||||
emitcall ('READ_TEXT_LONGSTRING',true);
|
||||
emitcall ('FPC_READ_TEXT_LONGSTRING',true);
|
||||
st_widestring:
|
||||
emitcall ('READ_TEXT_ANSISTRING',true);
|
||||
emitcall ('FPC_READ_TEXT_ANSISTRING',true);
|
||||
end
|
||||
end
|
||||
else
|
||||
Case pstringdef(Pararesult)^.string_typ of
|
||||
st_shortstring:
|
||||
emitcall ('WRITE_TEXT_STRING',true);
|
||||
emitcall ('FPC_WRITE_TEXT_STRING',true);
|
||||
st_ansistring:
|
||||
emitcall ('WRITE_TEXT_ANSISTRING',true);
|
||||
emitcall ('FPC_WRITE_TEXT_ANSISTRING',true);
|
||||
st_longstring:
|
||||
emitcall ('WRITE_TEXT_LONGSTRING',true);
|
||||
emitcall ('FPC_WRITE_TEXT_LONGSTRING',true);
|
||||
st_widestring:
|
||||
emitcall ('WRITE_TEXT_ANSISTRING',true);
|
||||
emitcall ('FPC_WRITE_TEXT_ANSISTRING',true);
|
||||
end;
|
||||
end;
|
||||
pointerdef : begin
|
||||
if is_equal(ppointerdef(pararesult)^.definition,cchardef) then
|
||||
begin
|
||||
if doread then
|
||||
emitcall('READ_TEXT_PCHAR_AS_POINTER',true)
|
||||
emitcall('FPC_READ_TEXT_PCHAR_AS_POINTER',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_PCHAR_AS_POINTER',true);
|
||||
emitcall('FPC_WRITE_TEXT_PCHAR_AS_POINTER',true);
|
||||
end;
|
||||
end;
|
||||
arraydef : begin
|
||||
@ -316,46 +316,45 @@ implementation
|
||||
is_equal(parraydef(pararesult)^.definition,cchardef) then
|
||||
begin
|
||||
if doread then
|
||||
emitcall('READ_TEXT_PCHAR_AS_ARRAY',true)
|
||||
emitcall('FPC_READ_TEXT_PCHAR_AS_ARRAY',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_PCHAR_AS_ARRAY',true);
|
||||
emitcall('FPC_WRITE_TEXT_PCHAR_AS_ARRAY',true);
|
||||
end;
|
||||
end;
|
||||
floatdef : begin
|
||||
if doread then
|
||||
emitcall('READ_TEXT_'+float_name[pfloatdef(pararesult)^.typ],true)
|
||||
emitcall('FPC_READ_TEXT_'+float_name[pfloatdef(pararesult)^.typ],true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_'+float_name[pfloatdef(pararesult)^.typ],true);
|
||||
emitcall('FPC_WRITE_TEXT_'+float_name[pfloatdef(pararesult)^.typ],true);
|
||||
end;
|
||||
orddef : begin
|
||||
case porddef(pararesult)^.typ of
|
||||
u8bit : if doread then
|
||||
emitcall('READ_TEXT_BYTE',true);
|
||||
emitcall('FPC_READ_TEXT_BYTE',true);
|
||||
s8bit : if doread then
|
||||
emitcall('READ_TEXT_SHORTINT',true);
|
||||
emitcall('FPC_READ_TEXT_SHORTINT',true);
|
||||
u16bit : if doread then
|
||||
emitcall('READ_TEXT_WORD',true);
|
||||
emitcall('FPC_READ_TEXT_WORD',true);
|
||||
s16bit : if doread then
|
||||
emitcall('READ_TEXT_INTEGER',true);
|
||||
emitcall('FPC_READ_TEXT_INTEGER',true);
|
||||
s32bit : if doread then
|
||||
emitcall('READ_TEXT_LONGINT',true)
|
||||
emitcall('FPC_READ_TEXT_LONGINT',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_LONGINT',true);
|
||||
emitcall('FPC_WRITE_TEXT_LONGINT',true);
|
||||
u32bit : if doread then
|
||||
emitcall('READ_TEXT_CARDINAL',true)
|
||||
emitcall('FPC_READ_TEXT_CARDINAL',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_CARDINAL',true);
|
||||
emitcall('FPC_WRITE_TEXT_CARDINAL',true);
|
||||
uchar : if doread then
|
||||
emitcall('READ_TEXT_CHAR',true)
|
||||
emitcall('FPC_READ_TEXT_CHAR',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_CHAR',true);
|
||||
emitcall('FPC_WRITE_TEXT_CHAR',true);
|
||||
bool8bit,
|
||||
bool16bit,
|
||||
bool32bit : if doread then
|
||||
{ emitcall('READ_TEXT_BOOLEAN',true) }
|
||||
Message(parser_e_illegal_parameter_list)
|
||||
else
|
||||
emitcall('WRITE_TEXT_BOOLEAN',true);
|
||||
emitcall('FPC_WRITE_TEXT_BOOLEAN',true);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -373,16 +372,16 @@ implementation
|
||||
if doread then
|
||||
begin
|
||||
if doln then
|
||||
emitcall('READLN_END',true)
|
||||
emitcall('FPC_READLN_END',true)
|
||||
else
|
||||
emitcall('READ_END',true);
|
||||
emitcall('FPC_READ_END',true);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if doln then
|
||||
emitcall('WRITELN_END',true)
|
||||
emitcall('FPC_WRITELN_END',true)
|
||||
else
|
||||
emitcall('WRITE_END',true);
|
||||
emitcall('FPC_WRITE_END',true);
|
||||
end;
|
||||
popusedregisters(pushed);
|
||||
maybe_loadesi;
|
||||
@ -392,7 +391,7 @@ implementation
|
||||
begin
|
||||
{ registers are saved in the procedure }
|
||||
exprasmlist^.concat(new(pai386,op_csymbol(A_PUSH,S_L,newcsymbol(lab2str(iolabel),0))));
|
||||
emitcall('IOCHECK',true);
|
||||
emitcall('FPC_IOCHECK',true);
|
||||
end;
|
||||
{ Freeup all used temps }
|
||||
ungetiftemp(aktfile);
|
||||
@ -498,11 +497,11 @@ implementation
|
||||
exit;
|
||||
|
||||
if is_real then
|
||||
emitcall('STR_'+float_name[pfloatdef(hp^.resulttype)^.typ],true)
|
||||
emitcall('FPC_STR_'+float_name[pfloatdef(hp^.resulttype)^.typ],true)
|
||||
else if porddef(hp^.resulttype)^.typ=u32bit then
|
||||
emitcall('STR_CARDINAL',true)
|
||||
emitcall('FPC_STR_CARDINAL',true)
|
||||
else
|
||||
emitcall('STR_LONGINT',true);
|
||||
emitcall('FPC_STR_LONGINT',true);
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
|
||||
@ -842,9 +841,9 @@ implementation
|
||||
secondload(p^.left);
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
if p^.inlinenumber=in_reset_typedfile then
|
||||
emitcall('RESET_TYPED',true)
|
||||
emitcall('FPC_RESET_TYPED',true)
|
||||
else
|
||||
emitcall('REWRITE_TYPED',true);
|
||||
emitcall('FPC_REWRITE_TYPED',true);
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
in_write_x :
|
||||
@ -930,7 +929,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-09-05 23:03:57 florian
|
||||
Revision 1.4 1998-09-14 10:43:49 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.3 1998/09/05 23:03:57 florian
|
||||
* some fixes to get -Or work:
|
||||
- inc/dec didn't take care of CREGISTER
|
||||
- register calculcation of inc/dec was wrong
|
||||
|
||||
@ -403,10 +403,10 @@ implementation
|
||||
|
||||
emitpushreferenceaddr(exprasmlist,p^.right^.location.reference);
|
||||
exprasmlist^.concat(new(pai386,
|
||||
op_csymbol(A_CALL,S_NO,newcsymbol('ADDREF',0))));
|
||||
op_csymbol(A_CALL,S_NO,newcsymbol('FPC_ADDREF',0))));
|
||||
|
||||
if not (cs_compilesystem in aktmoduleswitches) then
|
||||
concat_external('ADDREF',EXT_NEAR);
|
||||
concat_external('FPC_ADDREF',EXT_NEAR);
|
||||
|
||||
{ decrement destination reference counter }
|
||||
new(r);
|
||||
@ -416,10 +416,10 @@ implementation
|
||||
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
exprasmlist^.concat(new(pai386,
|
||||
op_csymbol(A_CALL,S_NO,newcsymbol('DECREF',0))));
|
||||
op_csymbol(A_CALL,S_NO,newcsymbol('FPC_DECREF',0))));
|
||||
|
||||
if not(cs_compilesystem in aktmoduleswitches) then
|
||||
concat_external('DECREF',EXT_NEAR);
|
||||
concat_external('FPC_DECREF',EXT_NEAR);
|
||||
|
||||
end;
|
||||
concatcopy(p^.right^.location.reference,
|
||||
@ -551,7 +551,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.13 1998-09-04 12:24:24 florian
|
||||
Revision 1.14 1998-09-14 10:43:50 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.13 1998/09/04 12:24:24 florian
|
||||
* bug0159 fixed
|
||||
|
||||
Revision 1.12 1998/09/04 11:55:17 florian
|
||||
|
||||
@ -156,13 +156,13 @@ implementation
|
||||
LOC_REFERENCE:
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
end;
|
||||
emitcall('FINALIZE',true);
|
||||
emitcall('FPC_FINALIZE',true);
|
||||
end;
|
||||
emitcall('FREEMEM',true);
|
||||
emitcall('FPC_FREEMEM',true);
|
||||
end;
|
||||
simplenewn:
|
||||
begin
|
||||
emitcall('GETMEM',true);
|
||||
emitcall('FPC_GETMEM',true);
|
||||
if ppointerdef(p^.left^.resulttype)^.definition^.needs_inittable then
|
||||
begin
|
||||
new(r);
|
||||
@ -176,7 +176,7 @@ implementation
|
||||
LOC_REFERENCE:
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
end;
|
||||
emitcall('INITIALIZE',true);
|
||||
emitcall('FPC_INITIALIZE',true);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -643,7 +643,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.9 1998-09-03 16:03:15 florian
|
||||
Revision 1.10 1998-09-14 10:43:52 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.9 1998/09/03 16:03:15 florian
|
||||
+ rtti generation
|
||||
* init table generation changed
|
||||
|
||||
|
||||
@ -413,7 +413,7 @@ implementation
|
||||
del_reference(p^.right^.location.reference);
|
||||
{ registers need not be save. that happens in SET_IN_BYTE }
|
||||
{ (EDI is changed) }
|
||||
emitcall('SET_IN_BYTE',true);
|
||||
emitcall('FPC_SET_IN_BYTE',true);
|
||||
{ ungetiftemp(p^.right^.location.reference); }
|
||||
p^.location.loc:=LOC_FLAGS;
|
||||
p^.location.resflags:=F_C;
|
||||
@ -783,7 +783,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.15 1998-09-09 17:51:59 florian
|
||||
Revision 1.16 1998-09-14 10:43:53 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.15 1998/09/09 17:51:59 florian
|
||||
* the next try to fix the case problem ...
|
||||
|
||||
Revision 1.14 1998/09/09 16:44:21 florian
|
||||
|
||||
@ -239,7 +239,7 @@ implementation
|
||||
secondpass(p^.right);
|
||||
del_reference(p^.right^.location.reference);
|
||||
emitpushreferenceaddr(exprasmlist,p^.right^.location.reference);
|
||||
emitcall('ANSISTRCMP',true);
|
||||
emitcall('FPC_ANSISTRCMP',true);
|
||||
maybe_loada5;
|
||||
popusedregisters(pushedregs);
|
||||
end;
|
||||
@ -278,7 +278,7 @@ implementation
|
||||
{ Because parameters are inversed in the rtl }
|
||||
emitpushreferenceaddr(p^.right^.location.reference);
|
||||
emitpushreferenceaddr(p^.left^.location.reference);
|
||||
emitcall('STRCONCAT',true);
|
||||
emitcall('FPC_STRCONCAT',true);
|
||||
maybe_loadA5;
|
||||
popusedregisters(pushedregs);
|
||||
set_location(p^.location,p^.left^.location);
|
||||
@ -334,7 +334,7 @@ implementation
|
||||
{
|
||||
emitpushreferenceaddr(p^.left^.location.reference);
|
||||
emitpushreferenceaddr(p^.right^.location.reference); }
|
||||
emitcall('STRCMP',true);
|
||||
emitcall('FPC_STRCMP',true);
|
||||
maybe_loada5;
|
||||
popusedregisters(pushedregs);
|
||||
end;
|
||||
@ -386,7 +386,7 @@ implementation
|
||||
pushusedregisters(pushedregs,$ff);
|
||||
emitpushreferenceaddr(p^.right^.location.reference);
|
||||
emitpushreferenceaddr(p^.left^.location.reference);
|
||||
emitcall('SET_COMP_SETS',true);
|
||||
emitcall('FPC_SET_COMP_SETS',true);
|
||||
maybe_loada5;
|
||||
popusedregisters(pushedregs);
|
||||
ungetiftemp(p^.left^.location.reference);
|
||||
@ -408,13 +408,13 @@ implementation
|
||||
loadsetelement(p^.right^.right);
|
||||
loadsetelement(p^.right^.left);
|
||||
emitpushreferenceaddr(href);
|
||||
emitcall('SET_SET_RANGE',true);
|
||||
emitcall('FPC_SET_SET_RANGE',true);
|
||||
end
|
||||
else
|
||||
begin
|
||||
loadsetelement(p^.right^.left);
|
||||
emitpushreferenceaddr(href);
|
||||
emitcall('SET_SET_BYTE',true);
|
||||
emitcall('FPC_SET_SET_BYTE',true);
|
||||
end;
|
||||
end
|
||||
else
|
||||
@ -423,7 +423,7 @@ implementation
|
||||
emitpushreferenceaddr(href);
|
||||
emitpushreferenceaddr(p^.right^.location.reference);
|
||||
emitpushreferenceaddr(p^.left^.location.reference);
|
||||
emitcall('SET_ADD_SETS',true);
|
||||
emitcall('FPC_SET_ADD_SETS',true);
|
||||
end;
|
||||
maybe_loada5;
|
||||
popusedregisters(pushedregs);
|
||||
@ -445,9 +445,9 @@ implementation
|
||||
emitpushreferenceaddr(p^.right^.location.reference);
|
||||
emitpushreferenceaddr(p^.left^.location.reference);
|
||||
case p^.treetype of
|
||||
subn : emitcall('SET_SUB_SETS',true);
|
||||
symdifn : emitcall('SET_SYMDIF_SETS',true);
|
||||
muln : emitcall('SET_MUL_SETS',true);
|
||||
subn : emitcall('FPC_SET_SUB_SETS',true);
|
||||
symdifn : emitcall('FPC_SET_SYMDIF_SETS',true);
|
||||
muln : emitcall('FPC_SET_MUL_SETS',true);
|
||||
end;
|
||||
maybe_loada5;
|
||||
popusedregisters(pushedregs);
|
||||
@ -858,7 +858,7 @@ implementation
|
||||
emit_reg_reg(A_MOVE,opsize,p^.right^.location.register,
|
||||
R_D0);
|
||||
emit_reg_reg(A_MOVE,opsize,p^.location.register,R_D1);
|
||||
emitcall('LONGMUL',true);
|
||||
emitcall('FPC_LONGMUL',true);
|
||||
emit_reg_reg(A_MOVE,opsize,R_D0,p^.location.register);
|
||||
end
|
||||
else
|
||||
@ -887,7 +887,7 @@ implementation
|
||||
exprasmlist^.concat(new(pai68k,op_ref_reg(A_MOVE, opsize,
|
||||
newreference(p^.right^.location.reference),R_D1)));
|
||||
emit_reg_reg(A_MOVE,opsize,p^.location.register,R_D0);
|
||||
emitcall('LONGMUL',true);
|
||||
emitcall('FPC_LONGMUL',true);
|
||||
emit_reg_reg(A_MOVE,opsize,R_D0,p^.location.register);
|
||||
end
|
||||
else
|
||||
@ -941,7 +941,7 @@ implementation
|
||||
emit_reg_reg(A_MOVE,opsize,p^.right^.location.register,
|
||||
R_D0);
|
||||
emit_reg_reg(A_MOVE,opsize,p^.location.register,R_D1);
|
||||
emitcall('LONGMUL',true);
|
||||
emitcall('FPC_LONGMUL',true);
|
||||
emit_reg_reg(A_MOVE,opsize,R_D0,p^.location.register);
|
||||
end
|
||||
else
|
||||
@ -1112,11 +1112,11 @@ implementation
|
||||
|
||||
{ probably a faster way to do this but... }
|
||||
case op of
|
||||
A_FADD: emitcall('SINGLE_ADD',true);
|
||||
A_FMUL: emitcall('SINGLE_MUL',true);
|
||||
A_FSUB: emitcall('SINGLE_SUB',true);
|
||||
A_FDIV: emitcall('SINGLE_DIV',true);
|
||||
A_FCMP: emitcall('SINGLE_CMP',true);
|
||||
A_FADD: emitcall('FPC_SINGLE_ADD',true);
|
||||
A_FMUL: emitcall('FPC_SINGLE_MUL',true);
|
||||
A_FSUB: emitcall('FPC_SINGLE_SUB',true);
|
||||
A_FDIV: emitcall('FPC_SINGLE_DIV',true);
|
||||
A_FCMP: emitcall('FPC_SINGLE_CMP',true);
|
||||
end;
|
||||
if not cmpop then { only flags are affected with cmpop }
|
||||
exprasmlist^.concat(new(pai68k,op_reg_reg(A_MOVE,S_L,R_D0,
|
||||
@ -1177,11 +1177,11 @@ implementation
|
||||
emit_reg_reg(A_MOVE,S_L,p^.left^.location.fpureg,R_D1);
|
||||
{ probably a faster way to do this but... }
|
||||
case op of
|
||||
A_FADD: emitcall('SINGLE_ADD',true);
|
||||
A_FMUL: emitcall('SINGLE_MUL',true);
|
||||
A_FSUB: emitcall('SINGLE_SUB',true);
|
||||
A_FDIV: emitcall('SINGLE_DIV',true);
|
||||
A_FCMP: emitcall('SINGLE_CMP',true);
|
||||
A_FADD: emitcall('FPC_SINGLE_ADD',true);
|
||||
A_FMUL: emitcall('FPC_SINGLE_MUL',true);
|
||||
A_FSUB: emitcall('FPC_SINGLE_SUB',true);
|
||||
A_FDIV: emitcall('FPC_SINGLE_DIV',true);
|
||||
A_FCMP: emitcall('FPC_SINGLE_CMP',true);
|
||||
end;
|
||||
if not cmpop then { only flags are affected with cmpop }
|
||||
exprasmlist^.concat(new(pai68k,op_reg_reg(A_MOVE,S_L,R_D0,
|
||||
@ -1263,7 +1263,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-09-07 18:45:55 peter
|
||||
Revision 1.4 1998-09-14 10:43:54 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.3 1998/09/07 18:45:55 peter
|
||||
* update smartlinking, uses getdatalabel
|
||||
* renamed ptree.value vars to value_str,value_real,value_set
|
||||
|
||||
|
||||
@ -814,7 +814,7 @@ implementation
|
||||
{ If the base is already A0, the no instruction will }
|
||||
{ be emitted! }
|
||||
emit_reg_reg(A_MOVE,S_L,r^.base,R_A0);
|
||||
emitcall('CHECK_OBJECT',true);
|
||||
emitcall('FPC_CHECK_OBJECT',true);
|
||||
end;
|
||||
{ This was wrong we must then load the address into the }
|
||||
{ register a0 and/or a5 }
|
||||
@ -1008,9 +1008,7 @@ implementation
|
||||
if iolabel<>nil then
|
||||
begin
|
||||
exprasmlist^.concat(new(pai68k,op_csymbol(A_PEA,S_L,newcsymbol(lab2str(iolabel),0))));
|
||||
{ this was wrong, probably an error due to diff3
|
||||
emitcall(p^.procdefinition^.mangledname);}
|
||||
emitcall('IOCHECK',true);
|
||||
emitcall('FPC_IOCHECK',true);
|
||||
end;
|
||||
|
||||
{ restore registers }
|
||||
@ -1046,7 +1044,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-09-04 08:41:43 peter
|
||||
Revision 1.4 1998-09-14 10:43:55 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.3 1998/09/04 08:41:43 peter
|
||||
* updated some error messages
|
||||
|
||||
Revision 1.2 1998/09/01 12:47:59 peter
|
||||
|
||||
@ -736,7 +736,7 @@ implementation
|
||||
begin
|
||||
p^.location.fpureg := getregister32;
|
||||
exprasmlist^.concat(new(pai68k, op_ref_reg(A_MOVE, S_L, r, R_D0)));
|
||||
emitcall('LONG2SINGLE',true);
|
||||
emitcall('FPC_LONG2SINGLE',true);
|
||||
emit_reg_reg(A_MOVE,S_L,R_D0,p^.location.fpureg);
|
||||
end
|
||||
else
|
||||
@ -765,7 +765,7 @@ implementation
|
||||
begin
|
||||
exprasmlist^.concat(new(pai68k,op_ref_reg(A_MOVE,S_L,newreference(p^.left^.location.reference),R_D0)));
|
||||
exprasmlist^.concat(new(pai68k,op_const_reg(A_MOVE,S_L,65536,R_D1)));
|
||||
emitcall('LONGMUL',true);
|
||||
emitcall('FPC_LONGMUL',true);
|
||||
emit_reg_reg(A_MOVE,S_L,R_D0,rreg);
|
||||
end
|
||||
else
|
||||
@ -781,7 +781,7 @@ implementation
|
||||
begin
|
||||
exprasmlist^.concat(new(pai68k,op_reg_reg(A_MOVE,S_L,p^.left^.location.fpureg,R_D0)));
|
||||
exprasmlist^.concat(new(pai68k,op_const_reg(A_MOVE,S_L,65536,R_D1)));
|
||||
emitcall('LONGMUL',true);
|
||||
emitcall('FPC_LONGMUL',true);
|
||||
emit_reg_reg(A_MOVE,S_L,R_D0,rreg);
|
||||
end
|
||||
else
|
||||
@ -1179,7 +1179,7 @@ implementation
|
||||
gettempofsizereference(32,href);
|
||||
emitpushreferenceaddr(p^.left^.location.reference);
|
||||
emitpushreferenceaddr(href);
|
||||
emitcall('SET_LOAD_SMALL',true);
|
||||
emitcall('FPC_SET_LOAD_SMALL',true);
|
||||
maybe_loada5;
|
||||
popusedregisters(pushedregs);
|
||||
p^.location.loc:=LOC_MEM;
|
||||
@ -1344,7 +1344,7 @@ implementation
|
||||
end;
|
||||
else internalerror(100);
|
||||
end;
|
||||
emitcall('DO_IS',true);
|
||||
emitcall('FPC_DO_IS',true);
|
||||
exprasmlist^.concat(new(pai68k,op_reg(A_TST,S_B,R_D0)));
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
@ -1368,7 +1368,7 @@ implementation
|
||||
S_L,newcsymbol(pobjectdef(p^.right^.resulttype)^.vmt_mangledname,0),R_SPPUSH)));
|
||||
concat_external(pobjectdef(p^.right^.resulttype)^.vmt_mangledname,EXT_NEAR);
|
||||
emitpushreferenceaddr(p^.location.reference);
|
||||
emitcall('DO_AS',true);
|
||||
emitcall('FPC_DO_AS',true);
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
|
||||
@ -1376,7 +1376,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-09-11 12:29:43 pierre
|
||||
Revision 1.4 1998-09-14 10:43:56 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.3 1998/09/11 12:29:43 pierre
|
||||
* removed explicit range_checking as it is buggy
|
||||
|
||||
Revision 1.2.2.1 1998/09/11 12:08:57 pierre
|
||||
|
||||
@ -756,13 +756,6 @@ do_jmp:
|
||||
var
|
||||
hp : preference;
|
||||
begin
|
||||
{if procinfo.exceptions then
|
||||
aktproccode.concat(gennasmrec(CALL,S_NO,'HELP_DESTRUCTOR_E'))
|
||||
else }
|
||||
{ we should know if the constructor is called with a new or not,
|
||||
how can we do that ???
|
||||
exprasmlist^.concat(new(pai68k,op_csymbol(A_CALL,S_NO,newcsymbol('HELP_DESTRUCTOR',0))));
|
||||
}
|
||||
exprasmlist^.concat(new(pai68k,op_reg(A_CLR,S_L,R_A5)));
|
||||
{ also reset to zero in the stack }
|
||||
new(hp);
|
||||
@ -776,7 +769,10 @@ do_jmp:
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-09-04 08:41:47 peter
|
||||
Revision 1.4 1998-09-14 10:43:58 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.3 1998/09/04 08:41:47 peter
|
||||
* updated some error messages
|
||||
|
||||
Revision 1.2 1998/09/01 12:48:01 peter
|
||||
|
||||
@ -224,9 +224,9 @@ implementation
|
||||
{ allways read only one record by element }
|
||||
push_int(typedtyp^.size);
|
||||
if doread then
|
||||
emitcall('TYPED_READ',true)
|
||||
emitcall('FPC_TYPED_READ',true)
|
||||
else
|
||||
emitcall('TYPED_WRITE',true);
|
||||
emitcall('FPC_TYPED_WRITE',true);
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -280,34 +280,34 @@ implementation
|
||||
push_int(pstringdef(pararesult)^.len);
|
||||
case pstringdef(pararesult)^.string_typ of
|
||||
st_shortstring:
|
||||
emitcall ('READ_TEXT_STRING',true);
|
||||
emitcall ('FPC_READ_TEXT_STRING',true);
|
||||
st_ansistring:
|
||||
emitcall ('READ_TEXT_ANSISTRING',true);
|
||||
emitcall ('FPC_READ_TEXT_ANSISTRING',true);
|
||||
st_longstring:
|
||||
emitcall ('READ_TEXT_LONGSTRING',true);
|
||||
emitcall ('FPC_READ_TEXT_LONGSTRING',true);
|
||||
st_widestring:
|
||||
emitcall ('READ_TEXT_ANSISTRING',true);
|
||||
emitcall ('FPC_READ_TEXT_ANSISTRING',true);
|
||||
end
|
||||
end
|
||||
else
|
||||
Case pstringdef(Pararesult)^.string_typ of
|
||||
st_shortstring:
|
||||
emitcall ('WRITE_TEXT_STRING',true);
|
||||
emitcall ('FPC_WRITE_TEXT_STRING',true);
|
||||
st_ansistring:
|
||||
emitcall ('WRITE_TEXT_ANSISTRING',true);
|
||||
emitcall ('FPC_WRITE_TEXT_ANSISTRING',true);
|
||||
st_longstring:
|
||||
emitcall ('WRITE_TEXT_LONGSTRING',true);
|
||||
emitcall ('FPC_WRITE_TEXT_LONGSTRING',true);
|
||||
st_widestring:
|
||||
emitcall ('WRITE_TEXT_ANSISTRING',true);
|
||||
emitcall ('FPC_WRITE_TEXT_ANSISTRING',true);
|
||||
end;
|
||||
end;
|
||||
pointerdef : begin
|
||||
if is_equal(ppointerdef(pararesult)^.definition,cchardef) then
|
||||
begin
|
||||
if doread then
|
||||
emitcall('READ_TEXT_PCHAR_AS_POINTER',true)
|
||||
emitcall('FPC_READ_TEXT_PCHAR_AS_POINTER',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_PCHAR_AS_POINTER',true);
|
||||
emitcall('FPC_WRITE_TEXT_PCHAR_AS_POINTER',true);
|
||||
end;
|
||||
end;
|
||||
arraydef : begin
|
||||
@ -315,46 +315,45 @@ implementation
|
||||
is_equal(parraydef(pararesult)^.definition,cchardef) then
|
||||
begin
|
||||
if doread then
|
||||
emitcall('READ_TEXT_PCHAR_AS_ARRAY',true)
|
||||
emitcall('FPC_READ_TEXT_PCHAR_AS_ARRAY',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_PCHAR_AS_ARRAY',true);
|
||||
emitcall('FPC_WRITE_TEXT_PCHAR_AS_ARRAY',true);
|
||||
end;
|
||||
end;
|
||||
floatdef : begin
|
||||
if doread then
|
||||
emitcall('READ_TEXT_'+float_name[pfloatdef(pararesult)^.typ],true)
|
||||
emitcall('FPC_READ_TEXT_'+float_name[pfloatdef(pararesult)^.typ],true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_'+float_name[pfloatdef(pararesult)^.typ],true);
|
||||
emitcall('FPC_WRITE_TEXT_'+float_name[pfloatdef(pararesult)^.typ],true);
|
||||
end;
|
||||
orddef : begin
|
||||
case porddef(pararesult)^.typ of
|
||||
u8bit : if doread then
|
||||
emitcall('READ_TEXT_BYTE',true);
|
||||
emitcall('FPC_READ_TEXT_BYTE',true);
|
||||
s8bit : if doread then
|
||||
emitcall('READ_TEXT_SHORTINT',true);
|
||||
emitcall('FPC_READ_TEXT_SHORTINT',true);
|
||||
u16bit : if doread then
|
||||
emitcall('READ_TEXT_WORD',true);
|
||||
emitcall('FPC_READ_TEXT_WORD',true);
|
||||
s16bit : if doread then
|
||||
emitcall('READ_TEXT_INTEGER',true);
|
||||
emitcall('FPC_READ_TEXT_INTEGER',true);
|
||||
s32bit : if doread then
|
||||
emitcall('READ_TEXT_LONGINT',true)
|
||||
emitcall('FPC_READ_TEXT_LONGINT',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_LONGINT',true);
|
||||
emitcall('FPC_WRITE_TEXT_LONGINT',true);
|
||||
u32bit : if doread then
|
||||
emitcall('READ_TEXT_CARDINAL',true)
|
||||
emitcall('FPC_READ_TEXT_CARDINAL',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_CARDINAL',true);
|
||||
emitcall('FPC_WRITE_TEXT_CARDINAL',true);
|
||||
uchar : if doread then
|
||||
emitcall('READ_TEXT_CHAR',true)
|
||||
emitcall('FPC_READ_TEXT_CHAR',true)
|
||||
else
|
||||
emitcall('WRITE_TEXT_CHAR',true);
|
||||
emitcall('FPC_WRITE_TEXT_CHAR',true);
|
||||
bool8bit,
|
||||
bool16bit,
|
||||
bool32bit : if doread then
|
||||
{ emitcall('READ_TEXT_BOOLEAN',true) }
|
||||
Message(parser_e_illegal_parameter_list)
|
||||
else
|
||||
emitcall('WRITE_TEXT_BOOLEAN',true);
|
||||
emitcall('FPC_WRITE_TEXT_BOOLEAN',true);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -372,16 +371,16 @@ implementation
|
||||
if doread then
|
||||
begin
|
||||
if doln then
|
||||
emitcall('READLN_END',true)
|
||||
emitcall('FPC_READLN_END',true)
|
||||
else
|
||||
emitcall('READ_END',true);
|
||||
emitcall('FPC_READ_END',true);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if doln then
|
||||
emitcall('WRITELN_END',true)
|
||||
emitcall('FPC_WRITELN_END',true)
|
||||
else
|
||||
emitcall('WRITE_END',true);
|
||||
emitcall('FPC_WRITE_END',true);
|
||||
end;
|
||||
popusedregisters(pushed);
|
||||
maybe_loada5;
|
||||
@ -391,7 +390,7 @@ implementation
|
||||
begin
|
||||
{ registers are saved in the procedure }
|
||||
exprasmlist^.concat(new(pai68k,op_csymbol(A_PEA,S_L,newcsymbol(lab2str(iolabel),0))));
|
||||
emitcall('IOCHECK',true);
|
||||
emitcall('FPC_IOCHECK',true);
|
||||
end;
|
||||
{ Freeup all used temps }
|
||||
ungetiftemp(aktfile);
|
||||
@ -489,11 +488,11 @@ implementation
|
||||
exit;
|
||||
|
||||
if is_real then
|
||||
emitcall('STR_'+float_name[pfloatdef(hp^.resulttype)^.typ],true)
|
||||
emitcall('FPC_STR_'+float_name[pfloatdef(hp^.resulttype)^.typ],true)
|
||||
else if porddef(hp^.resulttype)^.typ=u32bit then
|
||||
emitcall('STR_CARDINAL',true)
|
||||
emitcall('FPC_STR_CARDINAL',true)
|
||||
else
|
||||
emitcall('STR_LONGINT',true);
|
||||
emitcall('FPC_STR_LONGINT',true);
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
|
||||
@ -812,9 +811,9 @@ implementation
|
||||
secondload(p^.left);
|
||||
emitpushreferenceaddr(p^.left^.location.reference);
|
||||
if p^.inlinenumber=in_reset_typedfile then
|
||||
emitcall('RESET_TYPED',true)
|
||||
emitcall('FPC_RESET_TYPED',true)
|
||||
else
|
||||
emitcall('REWRITE_TYPED',true);
|
||||
emitcall('FPC_REWRITE_TYPED',true);
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
in_write_x :
|
||||
@ -904,7 +903,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 1998-09-04 08:41:48 peter
|
||||
Revision 1.3 1998-09-14 10:43:59 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.2 1998/09/04 08:41:48 peter
|
||||
* updated some error messages
|
||||
|
||||
Revision 1.1 1998/09/01 09:07:09 peter
|
||||
|
||||
@ -136,7 +136,7 @@ implementation
|
||||
{ if not zero then simply continue on }
|
||||
emitl(A_BNE,hl1);
|
||||
exprasmlist^.concat(new(pai68k,op_const_reg(A_MOVE,S_L,200,R_D0)));
|
||||
emitcall('HALT_ERROR',true);
|
||||
emitcall('FPC_HALT_ERROR',true);
|
||||
emitl(A_LABEL,hl1);
|
||||
if (p^.treetype = modn) then
|
||||
Begin
|
||||
@ -174,9 +174,9 @@ implementation
|
||||
{ routines... d0/d1 }
|
||||
{ return result in d0 }
|
||||
if p^.treetype = divn then
|
||||
emitcall('LONGDIV',true)
|
||||
emitcall('FPC_LONGDIV',true)
|
||||
else
|
||||
emitcall('LONGMOD',true);
|
||||
emitcall('FPC_LONGMOD',true);
|
||||
emit_reg_reg(A_MOVE,S_L,R_D0,hreg1);
|
||||
end; { endif }
|
||||
end;
|
||||
@ -446,7 +446,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 1998-09-01 09:07:09 peter
|
||||
Revision 1.2 1998-09-14 10:44:01 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.1 1998/09/01 09:07:09 peter
|
||||
* m68k fixes, splitted cg68k like cgi386
|
||||
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ implementation
|
||||
begin
|
||||
if ppointerdef(p^.left^.resulttype)^.definition^.needs_inittable then
|
||||
begin
|
||||
{!!!!!!!}
|
||||
{!!!!!!!}
|
||||
|
||||
(* new(r);
|
||||
reset_reference(r^);
|
||||
@ -161,16 +161,16 @@ implementation
|
||||
LOC_REFERENCE:
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
end;
|
||||
emitcall('FINALIZE',true); *)
|
||||
emitcall('FPC_FINALIZE',true); *)
|
||||
end;
|
||||
emitcall('FREEMEM',true);
|
||||
emitcall('FPC_FREEMEM',true);
|
||||
end;
|
||||
simplenewn:
|
||||
begin
|
||||
emitcall('GETMEM',true);
|
||||
emitcall('FPC_GETMEM',true);
|
||||
if ppointerdef(p^.left^.resulttype)^.definition^.needs_inittable then
|
||||
begin
|
||||
{!!!!!!!}
|
||||
{!!!!!!!}
|
||||
|
||||
(* new(r);
|
||||
reset_reference(r^);
|
||||
@ -183,7 +183,7 @@ implementation
|
||||
LOC_REFERENCE:
|
||||
emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
|
||||
end;
|
||||
emitcall('INITIALIZE',true); *)
|
||||
emitcall('FPC_INITIALIZE',true); *)
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -392,7 +392,7 @@ implementation
|
||||
begin
|
||||
exprasmlist^.concat(new(pai68k,op_const_reg(A_MOVE,S_L,l1,R_D0)));
|
||||
exprasmlist^.concat(new(pai68k,op_reg_reg(A_MOVE,S_L,ind,R_D1)));
|
||||
emitcall('LONGMUL',true);
|
||||
emitcall('FPC_LONGMUL',true);
|
||||
exprasmlist^.concat(new(pai68k,op_reg_reg(A_MOVE,S_L,R_D0,ind)));
|
||||
end;
|
||||
end;
|
||||
@ -691,7 +691,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-09-11 12:29:44 pierre
|
||||
Revision 1.4 1998-09-14 10:44:02 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.3 1998/09/11 12:29:44 pierre
|
||||
* removed explicit range_checking as it is buggy
|
||||
|
||||
Revision 1.2.2.1 1998/09/11 12:08:59 pierre
|
||||
|
||||
@ -473,7 +473,7 @@ implementation
|
||||
newreference(p^.right^.location.reference),R_A0)));;
|
||||
{ emitpushreferenceaddr(p^.right^.location.reference);}
|
||||
del_reference(p^.right^.location.reference);
|
||||
emitcall('SET_IN_BYTE',true);
|
||||
emitcall('FPC_SET_IN_BYTE',true);
|
||||
{ ungetiftemp(p^.right^.location.reference); }
|
||||
p^.location.loc:=LOC_FLAGS;
|
||||
p^.location.resflags:=F_C;
|
||||
@ -812,7 +812,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-09-07 18:45:59 peter
|
||||
Revision 1.4 1998-09-14 10:44:03 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.3 1998/09/07 18:45:59 peter
|
||||
* update smartlinking, uses getdatalabel
|
||||
* renamed ptree.value vars to value_str,value_real,value_set
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
exprasmlist^.concat(new(pai68k,op_ref_reg(A_LEA,S_L,newreference(dref),R_A1)));
|
||||
exprasmlist^.concat(new(pai68k,op_ref_reg(A_LEA,S_L,newreference(sref),R_A0)));
|
||||
exprasmlist^.concat(new(pai68k,op_const_reg(A_MOVE,S_L,len,R_D0)));
|
||||
emitcall('STRCOPY',true);
|
||||
emitcall('FPC_STRCOPY',true);
|
||||
maybe_loada5;
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
@ -266,14 +266,14 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
getlabel(hl);
|
||||
emitl(A_BCC, hl);
|
||||
exprasmlist^.concat(new(pai68k, op_const_reg(A_MOVE,S_L,201,R_D0)));
|
||||
emitcall('HALT_ERROR',true);
|
||||
emitcall('FPC_HALT_ERROR',true);
|
||||
emitl(A_LABEL, hl);
|
||||
end
|
||||
else
|
||||
begin
|
||||
exprasmlist^.concat(new(pai68k, op_ref_reg(A_LEA,S_L,newreference(hp), R_A1)));
|
||||
exprasmlist^.concat(new(pai68k, op_reg_reg(A_MOVE, S_L, index, R_D0)));
|
||||
emitcall('RE_BOUNDS_CHECK',true);
|
||||
emitcall('FPC_RE_BOUNDS_CHECK',true);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -395,7 +395,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
emitl(A_BVC,hl)
|
||||
else
|
||||
emitl(A_BCC,hl);
|
||||
emitcall('RE_OVERFLOW',true);
|
||||
emitcall('FPC_OVERFLOW',true);
|
||||
emitl(A_LABEL,hl);
|
||||
end;
|
||||
end;
|
||||
@ -539,7 +539,7 @@ begin
|
||||
(target_info.target=target_linux) then
|
||||
begin
|
||||
procinfo.aktentrycode^.insert(new(pai68k,
|
||||
op_csymbol(A_JSR,S_NO,newcsymbol('INIT_STACK_CHECK',0))));
|
||||
op_csymbol(A_JSR,S_NO,newcsymbol('FPC_INIT_STACK_CHECK',0))));
|
||||
end
|
||||
else
|
||||
{ The main program has already allocated its stack - so we simply compare }
|
||||
@ -547,10 +547,10 @@ begin
|
||||
if (cs_check_stack in aktlocalswitches) then
|
||||
begin
|
||||
procinfo.aktentrycode^.insert(new(pai68k,op_csymbol(A_JSR,S_NO,
|
||||
newcsymbol('STACKCHECK',0))));
|
||||
newcsymbol('FPC_STACKCHECK',0))));
|
||||
procinfo.aktentrycode^.insert(new(pai68k,op_const_reg(A_MOVE,S_L,
|
||||
0,R_D0)));
|
||||
concat_external('STACKCHECK',EXT_NEAR);
|
||||
concat_external('FPC_STACKCHECK',EXT_NEAR);
|
||||
end;
|
||||
|
||||
|
||||
@ -579,15 +579,15 @@ begin
|
||||
begin
|
||||
procinfo.aktentrycode^.insert(new(pai_labeled,init(A_BEQ,quickexitlabel)));
|
||||
procinfo.aktentrycode^.insert(new(pai68k,op_csymbol(A_JSR,S_NO,
|
||||
newcsymbol('NEW_CLASS',0))));
|
||||
concat_external('NEW_CLASS',EXT_NEAR);
|
||||
newcsymbol('FPC_NEW_CLASS',0))));
|
||||
concat_external('FPC_NEW_CLASS',EXT_NEAR);
|
||||
end
|
||||
else
|
||||
begin
|
||||
procinfo.aktentrycode^.insert(new(pai_labeled,init(A_BEQ,quickexitlabel)));
|
||||
procinfo.aktentrycode^.insert(new(pai68k,op_csymbol(A_JSR,S_NO,
|
||||
newcsymbol('HELP_CONSTRUCTOR',0))));
|
||||
concat_external('HELP_CONSTRUCTOR',EXT_NEAR);
|
||||
newcsymbol('FPC_HELP_CONSTRUCTOR',0))));
|
||||
concat_external('FPC_HELP_CONSTRUCTOR',EXT_NEAR);
|
||||
end;
|
||||
end;
|
||||
{ don't load ESI, does the caller }
|
||||
@ -620,9 +620,9 @@ begin
|
||||
if (aktprocsym^.definition^.options and poproginit=0) then
|
||||
Begin
|
||||
procinfo.aktentrycode^.insert(new(pai68k,
|
||||
op_csymbol(A_JSR,S_NO,newcsymbol('STACKCHECK',0))));
|
||||
op_csymbol(A_JSR,S_NO,newcsymbol('FPC_STACKCHECK',0))));
|
||||
procinfo.aktentrycode^.insert(new(pai68k,op_const_reg(A_MOVE,S_L,stackframe,R_D0)));
|
||||
concat_external('STACKCHECK',EXT_NEAR);
|
||||
concat_external('FPC_STACKCHECK',EXT_NEAR);
|
||||
end;
|
||||
end;
|
||||
{ to allocate stack space }
|
||||
@ -646,10 +646,10 @@ begin
|
||||
and (aktprocsym^.definition^.options and poproginit=0) then
|
||||
begin
|
||||
procinfo.aktentrycode^.insert(new(pai68k,
|
||||
op_csymbol(A_JSR,S_NO,newcsymbol('STACKCHECK',0))));
|
||||
op_csymbol(A_JSR,S_NO,newcsymbol('FPC_STACKCHECK',0))));
|
||||
procinfo.aktentrycode^.insert(new(pai68k,op_const_reg(A_MOVE,S_L,
|
||||
stackframe,R_D0)));
|
||||
concat_external('STACKCHECK',EXT_NEAR);
|
||||
concat_external('FPC_STACKCHECK',EXT_NEAR);
|
||||
end;
|
||||
procinfo.aktentrycode^.insert(new(pai68k,op_reg_reg(A_MOVE,S_L,R_SP,R_A6)));
|
||||
procinfo.aktentrycode^.insert(new(pai68k,op_reg_reg(A_MOVE,S_L,R_A6,R_SPPUSH)));
|
||||
@ -735,14 +735,14 @@ begin
|
||||
if procinfo._class^.isclass then
|
||||
begin
|
||||
procinfo.aktexitcode^.insert(new(pai68k,op_csymbol(A_JSR,S_NO,
|
||||
newcsymbol('DISPOSE_CLASS',0))));
|
||||
concat_external('DISPOSE_CLASS',EXT_NEAR);
|
||||
newcsymbol('FPC_DISPOSE_CLASS',0))));
|
||||
concat_external('FPC_DISPOSE_CLASS',EXT_NEAR);
|
||||
end
|
||||
else
|
||||
begin
|
||||
procinfo.aktexitcode^.insert(new(pai68k,op_csymbol(A_JSR,S_NO,
|
||||
newcsymbol('HELP_DESTRUCTOR',0))));
|
||||
concat_external('HELP_DESTRUCTOR',EXT_NEAR);
|
||||
newcsymbol('FPC_HELP_DESTRUCTOR',0))));
|
||||
concat_external('FPC_HELP_DESTRUCTOR',EXT_NEAR);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -751,8 +751,8 @@ begin
|
||||
if ((aktprocsym^.definition^.options and poproginit)<>0) and
|
||||
(target_info.target<>target_PalmOS) then
|
||||
begin
|
||||
procinfo.aktexitcode^.concat(new(pai68k,op_csymbol(A_JSR,S_NO,newcsymbol('__EXIT',0))));
|
||||
externals^.concat(new(pai_external,init('__EXIT',EXT_NEAR)));
|
||||
procinfo.aktexitcode^.concat(new(pai68k,op_csymbol(A_JSR,S_NO,newcsymbol('FPC_DO_EXIT',0))));
|
||||
externals^.concat(new(pai_external,init('FPC_DO_EXIT',EXT_NEAR)));
|
||||
end;
|
||||
|
||||
{ handle return value }
|
||||
@ -1345,7 +1345,10 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.15 1998-09-07 18:46:00 peter
|
||||
Revision 1.16 1998-09-14 10:44:04 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.15 1998/09/07 18:46:00 peter
|
||||
* update smartlinking, uses getdatalabel
|
||||
* renamed ptree.value vars to value_str,value_real,value_set
|
||||
|
||||
|
||||
@ -23,14 +23,6 @@ const
|
||||
in_ord_x = 5;
|
||||
in_length_string = 6;
|
||||
in_chr_byte = 7;
|
||||
{$ifdef VER0_99_5}
|
||||
in_inc_byte = 8;
|
||||
in_inc_word = 9;
|
||||
in_inc_dword = 10;
|
||||
in_dec_byte = 11;
|
||||
in_dec_word = 12;
|
||||
in_dec_dword = 13;
|
||||
{$endif}
|
||||
in_write_x = 14;
|
||||
in_writeln_x = 15;
|
||||
in_read_x = 16;
|
||||
@ -74,7 +66,10 @@ const
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 1998-09-01 17:39:46 peter
|
||||
Revision 1.8 1998-09-14 10:44:07 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.7 1998/09/01 17:39:46 peter
|
||||
+ internal constant functions
|
||||
|
||||
}
|
||||
|
||||
@ -103,8 +103,7 @@ begin
|
||||
while not eof(f) do
|
||||
begin
|
||||
readln(f,s);
|
||||
inc(line);
|
||||
if (s<>'') and not(s[1] in ['#',';']) then
|
||||
if (s<>'') and not(s[1] in ['#',';','%']) then
|
||||
begin
|
||||
i:=pos('=',s);
|
||||
if i>0 then
|
||||
@ -225,7 +224,10 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-08-29 13:52:31 peter
|
||||
Revision 1.4 1998-09-14 10:44:08 peter
|
||||
* all internal RTL functions start with FPC_
|
||||
|
||||
Revision 1.3 1998/08/29 13:52:31 peter
|
||||
+ new messagefile
|
||||
* merged optione.msg into errore.msg
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user