compproc.inc 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Run time library.
  4. Copyright (c) 1999-2000 by the Free Pascal development team
  5. This file contains the declarations of internal compiler helper
  6. routines. That means you can *NOT* call these directly, as they may
  7. be changed or even removed at any time. The only reason they are
  8. included in the interface of the system unit, is so that the
  9. compiler doesn't need special code to access their parameter
  10. list information etc.
  11. Note that due to the "compilerproc" directive, it isn't even possible
  12. to use these routines in your programs.
  13. See the File COPYING.FPC, included in this distribution,
  14. for details about the copyright.
  15. This program is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  18. **********************************************************************}
  19. { some dummy types necessary to have generic resulttypes for certain compilerprocs }
  20. type
  21. { normally the array shall be maxlongint big, but that will confuse
  22. the debugger }
  23. fpc_big_chararray = array[0..1023] of char;
  24. fpc_small_set = longint;
  25. fpc_normal_set = array[0..7] of longint;
  26. {$ifdef hascompilerproc}
  27. { Needed to solve overloading problem with call from assembler (PFV) }
  28. {$ifdef valuegetmem}
  29. Function fpc_getmem(size:ptrint):pointer;compilerproc;
  30. {$endif}
  31. {$ifdef valuefreemem}
  32. Procedure fpc_freemem(p:pointer);compilerproc;
  33. {$endif valuefreemem}
  34. procedure fpc_Shortstr_SetLength(var s:shortstring;len:SizeInt); compilerproc;
  35. function fpc_shortstr_to_shortstr(len:longint; const sstr: shortstring): shortstring; compilerproc;
  36. function fpc_shortstr_concat(const s1,s2:shortstring): shortstring; compilerproc;
  37. procedure fpc_shortstr_append_shortstr(var s1:shortstring;const s2:shortstring); compilerproc;
  38. function fpc_shortstr_compare(const left,right:shortstring) : longint; compilerproc;
  39. function fpc_pchar_to_shortstr(p:pchar):shortstring; compilerproc;
  40. function fpc_pchar_length(p:pchar):longint; compilerproc;
  41. function fpc_pwidechar_length(p:pwidechar):longint; compilerproc;
  42. function fpc_chararray_to_shortstr(const arr: array of char):shortstring; compilerproc;
  43. function fpc_shortstr_to_chararray(arraysize: longint; const src: ShortString): fpc_big_chararray; compilerproc;
  44. Function fpc_shortstr_Copy(const s:shortstring;index:SizeInt;count:SizeInt):shortstring;compilerproc;
  45. Function fpc_ansistr_Copy (Const S : AnsiString; Index,Size : SizeInt) : AnsiString;compilerproc;
  46. Function fpc_widestr_Copy (Const S : WideString; Index,Size : SizeInt) : WideString;compilerproc;
  47. function fpc_char_copy(c:char;index : SizeInt;count : SizeInt): shortstring;compilerproc;
  48. procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;lowidx,count:tdynarrayindex);compilerproc;
  49. function fpc_dynarray_length(p : pointer) : tdynarrayindex; compilerproc;
  50. function fpc_dynarray_high(p : pointer) : tdynarrayindex; compilerproc;
  51. procedure fpc_dynarray_clear(var p : pointer;ti : pointer); compilerproc;
  52. procedure fpc_dynarray_decr_ref(var p : pointer;ti : pointer); compilerproc;
  53. procedure fpc_dynarray_incr_ref(p : pointer); compilerproc;
  54. procedure fpc_dynarray_setlength(var p : pointer;pti : pointer; dimcount : dword;dims : pdynarrayindex); compilerproc;
  55. { Str() support }
  56. {$ifdef STR_USES_VALINT}
  57. procedure fpc_ShortStr_sint(v : valsint;len : SizeInt;var s : shortstring); compilerproc;
  58. procedure fpc_shortstr_uint(v : valuint;len : SizeInt;var s : shortstring); compilerproc;
  59. procedure fpc_chararray_sint(v : valsint;len : SizeInt;var a : array of char); compilerproc;
  60. procedure fpc_chararray_uint(v : valuint;len : SizeInt;var a : array of char); compilerproc;
  61. procedure fpc_AnsiStr_sint(v : valsint; Len : SizeInt; Var S : AnsiString); compilerproc;
  62. procedure fpc_AnsiStr_uint(v : valuint;Len : SizeInt; Var S : AnsiString); compilerproc;
  63. procedure fpc_WideStr_sint(v : valsint; Len : SizeInt; Var S : WideString); compilerproc;
  64. procedure fpc_WideStr_uint(v : valuint;Len : SizeInt; Var S : WideString); compilerproc;
  65. {$else}
  66. procedure fpc_ShortStr_Longint(v : longint;len : longint;var s : shortstring); compilerproc;
  67. procedure fpc_shortstr_longword(v : longword;len : longint;var s : shortstring); compilerproc;
  68. procedure fpc_chararray_Longint(v : longint;len : longint;var a : array of char); compilerproc;
  69. procedure fpc_chararray_longword(v : longword;len : longint;var a : array of char); compilerproc;
  70. procedure fpc_AnsiStr_Longint(v : Longint; Len : Longint; Var S : AnsiString); compilerproc;
  71. procedure fpc_AnsiStr_Longword(v : Longword;Len : Longint; Var S : AnsiString); compilerproc;
  72. procedure fpc_WideStr_Longint(v : Longint; Len : Longint; Var S : WideString); compilerproc;
  73. procedure fpc_WideStr_Longword(v : Longword;Len : Longint; Var S : WideString); compilerproc;
  74. {$endif}
  75. {$ifndef CPU64}
  76. procedure fpc_shortstr_qword(v : qword;len : SizeInt;var s : shortstring); compilerproc;
  77. procedure fpc_shortstr_int64(v : int64;len : SizeInt;var s : shortstring); compilerproc;
  78. procedure fpc_chararray_qword(v : qword;len : SizeInt;var a : array of char); compilerproc;
  79. procedure fpc_chararray_int64(v : int64;len : SizeInt;var a : array of char); compilerproc;
  80. procedure fpc_ansistr_qword(v : qword;len : SizeInt;var s : ansistring); compilerproc;
  81. procedure fpc_ansistr_int64(v : int64;len : SizeInt;var s : ansistring); compilerproc;
  82. procedure fpc_widestr_qword(v : qword;len : SizeInt;var s : widestring); compilerproc;
  83. procedure fpc_widestr_int64(v : int64;len : SizeInt;var s : widestring); compilerproc;
  84. {$endif CPU64}
  85. procedure fpc_ShortStr_Float(d : ValReal;len,fr,rt : SizeInt;var s : shortstring); compilerproc;
  86. procedure fpc_chararray_Float(d : ValReal;len,fr,rt : SizeInt;var a : array of char); compilerproc;
  87. procedure fpc_AnsiStr_Float(d : ValReal;len,fr,rt : SizeInt;var s : ansistring); compilerproc;
  88. procedure fpc_WideStr_Float(d : ValReal;len,fr,rt : SizeInt;var s : WideString); compilerproc;
  89. { Val() support }
  90. Function fpc_Val_Real_ShortStr(const s : shortstring; var code : ValSInt): ValReal; compilerproc;
  91. Function fpc_Val_Real_AnsiStr(Const S : AnsiString; Var Code : ValSInt): ValReal; compilerproc;
  92. Function fpc_Val_Real_WideStr(Const S : WideString; Var Code : ValSInt): ValReal; compilerproc;
  93. Function fpc_Val_SInt_ShortStr(DestSize: SizeInt; Const S: ShortString; var Code: ValSInt): ValSInt; compilerproc;
  94. Function fpc_Val_UInt_Shortstr(Const S: ShortString; var Code: ValSInt): ValUInt; compilerproc;
  95. Function fpc_Val_UInt_AnsiStr (Const S : AnsiString; Var Code : ValSInt): ValUInt; compilerproc;
  96. Function fpc_Val_SInt_AnsiStr (DestSize: SizeInt; Const S : AnsiString; Var Code : ValSInt): ValSInt; compilerproc;
  97. Function fpc_Val_UInt_WideStr (Const S : WideString; Var Code : ValSInt): ValUInt; compilerproc;
  98. Function fpc_Val_SInt_WideStr (DestSize: SizeInt; Const S : WideString; Var Code : ValSInt): ValSInt; compilerproc;
  99. {$ifndef CPU64}
  100. Function fpc_val_int64_shortstr(Const S: ShortString; var Code: ValSInt): Int64; compilerproc;
  101. Function fpc_val_qword_shortstr(Const S: ShortString; var Code: ValSInt): QWord; compilerproc;
  102. Function fpc_Val_qword_AnsiStr (Const S : AnsiString; Var Code : ValSInt): qword;compilerproc;
  103. Function fpc_Val_int64_AnsiStr (Const S : AnsiString; Var Code : ValSInt): Int64; compilerproc;
  104. Function fpc_Val_qword_WideStr (Const S : WideString; Var Code : ValSInt): qword; compilerproc;
  105. Function fpc_Val_int64_WideStr (Const S : WideString; Var Code : ValSInt): Int64; compilerproc;
  106. {$endif CPU64}
  107. Procedure fpc_AnsiStr_Decr_Ref (Var S : Pointer); compilerproc;
  108. Procedure fpc_AnsiStr_Incr_Ref (S : Pointer); compilerproc;
  109. Procedure fpc_AnsiStr_Assign (Var S1 : Pointer;S2 : Pointer); compilerproc;
  110. function fpc_AnsiStr_Concat (const S1,S2 : AnsiString): AnsiString; compilerproc;
  111. Procedure fpc_ansistr_append_char(Var S : AnsiString;c : char); compilerproc;
  112. Procedure fpc_ansistr_append_shortstring(Var S : AnsiString;Str : ShortString); compilerproc;
  113. Procedure fpc_ansistr_append_ansistring(Var S : AnsiString;Str : AnsiString); compilerproc;
  114. {$ifdef EXTRAANSISHORT}
  115. Procedure fpc_AnsiStr_ShortStr_Concat (Var S1: AnsiString; Var S2 : ShortString); compilerproc;
  116. {$endif EXTRAANSISHORT}
  117. function fpc_AnsiStr_To_ShortStr (high_of_res: SizeInt;const S2 : Ansistring): shortstring; compilerproc;
  118. Function fpc_ShortStr_To_AnsiStr (Const S2 : ShortString): ansistring; compilerproc;
  119. Function fpc_Char_To_AnsiStr(const c : Char): AnsiString; compilerproc;
  120. Function fpc_PChar_To_AnsiStr(const p : pchar): ansistring; compilerproc;
  121. Function fpc_CharArray_To_AnsiStr(const arr: array of char): ansistring; compilerproc;
  122. function fpc_ansistr_to_chararray(arraysize: SizeInt; const src: ansistring): fpc_big_chararray; compilerproc;
  123. Function fpc_AnsiStr_Compare(const S1,S2 : AnsiString): SizeInt; compilerproc;
  124. Procedure fpc_AnsiStr_CheckZero(p : pointer); compilerproc;
  125. Procedure fpc_AnsiStr_CheckRange(len,index : SizeInt); compilerproc;
  126. Procedure fpc_AnsiStr_SetLength (Var S : AnsiString; l : SizeInt); compilerproc;
  127. {$ifdef EXTRAANSISHORT}
  128. Function fpc_AnsiStr_ShortStr_Compare (Var S1 : Pointer; Var S2 : ShortString): SizeInt; compilerproc;
  129. {$endif EXTRAANSISHORT}
  130. { pointer argument because otherwise when calling this, we get }
  131. { an endless loop since a 'var s: ansistring' must be made }
  132. { unique as well }
  133. Function fpc_ansistr_Unique(Var S : Pointer): Pointer; compilerproc;
  134. Procedure fpc_WideStr_Decr_Ref (Var S : Pointer); compilerproc;
  135. Procedure fpc_WideStr_Incr_Ref (S : Pointer); compilerproc;
  136. function fpc_WideStr_To_ShortStr (high_of_res: SizeInt;const S2 : WideString): shortstring; compilerproc;
  137. Function fpc_ShortStr_To_WideStr (Const S2 : ShortString): WideString; compilerproc;
  138. Function fpc_WideStr_To_AnsiStr (const S2 : WideString): AnsiString; compilerproc;
  139. Function fpc_AnsiStr_To_WideStr (Const S2 : AnsiString): WideString; compilerproc;
  140. Procedure fpc_WideStr_Assign (Var S1 : Pointer;S2 : Pointer); compilerproc;
  141. Function fpc_WideStr_Concat (const S1,S2 : WideString) : WideString; compilerproc;
  142. Function fpc_Char_To_WideStr(const c : WideChar): WideString; compilerproc;
  143. Function fpc_PChar_To_WideStr(const p : pchar): WideString; compilerproc;
  144. Function fpc_CharArray_To_WideStr(const arr: array of char): WideString; compilerproc;
  145. function fpc_widestr_to_chararray(arraysize: SizeInt; const src: WideString): fpc_big_chararray; compilerproc;
  146. Function fpc_WideStr_Compare(const S1,S2 : WideString): SizeInt; compilerproc;
  147. Procedure fpc_WideStr_CheckZero(p : pointer); compilerproc;
  148. Procedure fpc_WideStr_CheckRange(len,index : SizeInt); compilerproc;
  149. Procedure fpc_WideStr_SetLength (Var S : WideString; l : SizeInt); compilerproc;
  150. function fpc_widestr_Unique(Var S : Pointer): Pointer; compilerproc;
  151. {$ifdef HASWIDECHAR}
  152. Function fpc_PWideChar_To_AnsiStr(const p : pwidechar): ansistring; compilerproc;
  153. Function fpc_PWideChar_To_WideStr(const p : pwidechar): widestring; compilerproc;
  154. Function fpc_PWideChar_To_ShortStr(const p : pwidechar): shortstring; compilerproc;
  155. {$endif HASWIDECHAR}
  156. { from text.inc }
  157. Procedure fpc_Write_End(var f:Text); compilerproc;
  158. Procedure fpc_Writeln_End(var f:Text); compilerproc;
  159. Procedure fpc_Write_Text_ShortStr(Len : Longint;var f : Text;const s : String); compilerproc;
  160. Procedure fpc_Write_Text_Pchar_as_Array(Len : Longint;var f : Text;const s : array of char); compilerproc;
  161. Procedure fpc_Write_Text_PChar_As_Pointer(Len : Longint;var f : Text;p : PChar); compilerproc;
  162. Procedure fpc_Write_Text_AnsiStr (Len : Longint; Var f : Text; S : AnsiString); compilerproc;
  163. {$ifdef HASWIDESTRING}
  164. Procedure fpc_Write_Text_WideStr (Len : Longint; Var f : Text; S : WideString); compilerproc;
  165. {$endif HASWIDESTRING}
  166. Procedure fpc_Write_Text_SInt(Len : Longint;var t : Text;l : ValSInt); compilerproc;
  167. Procedure fpc_Write_Text_UInt(Len : Longint;var t : Text;l : ValUInt); compilerproc;
  168. {$ifndef CPU64}
  169. procedure fpc_write_text_qword(len : longint;var t : text;q : qword); compilerproc;
  170. procedure fpc_write_text_int64(len : longint;var t : text;i : int64); compilerproc;
  171. {$endif CPU64}
  172. Procedure fpc_Write_Text_Float(rt,fixkomma,Len : Longint;var t : Text;r : ValReal); compilerproc;
  173. Procedure fpc_Write_Text_Boolean(Len : Longint;var t : Text;b : Boolean); compilerproc;
  174. Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); compilerproc;
  175. {$ifdef HASWIDECHAR}
  176. Procedure fpc_Write_Text_WideChar(Len : Longint;var t : Text;c : WideChar); compilerproc;
  177. {$endif HASWIDECHAR}
  178. {$ifdef HASVARIANT}
  179. // function fpc_variant_to_dynarray(const v : variant;typeinfo : pointer) : pointer;compilerproc;
  180. procedure fpc_write_text_variant(Len : Longint;var f : Text;const v : variant); compilerproc;
  181. {$endif HASVARIANT}
  182. Procedure fpc_Read_End(var f:Text); compilerproc;
  183. Procedure fpc_ReadLn_End(var f : Text); compilerproc;
  184. Procedure fpc_Read_Text_ShortStr(var f : Text;var s : String); compilerproc;
  185. Procedure fpc_Read_Text_PChar_As_Pointer(var f : Text;var s : PChar); compilerproc;
  186. Procedure fpc_Read_Text_PChar_As_Array(var f : Text;var s : array of char); compilerproc;
  187. Procedure fpc_Read_Text_AnsiStr(var f : Text;var s : AnsiString); compilerproc;
  188. Procedure fpc_Read_Text_Char(var f : Text; var c : char); compilerproc;
  189. Procedure fpc_Read_Text_SInt(var f : Text; var l :ValSInt); compilerproc;
  190. Procedure fpc_Read_Text_UInt(var f : Text; var u :ValUInt); compilerproc;
  191. Procedure fpc_Read_Text_Float(var f : Text; var v :ValReal); compilerproc;
  192. {$ifndef CPU64}
  193. Procedure fpc_Read_Text_QWord(var f : text; var q : qword); compilerproc;
  194. Procedure fpc_Read_Text_Int64(var f : text; var i : int64); compilerproc;
  195. {$endif CPU64}
  196. {$ifdef FPC_INCLUDE_SOFTWARE_MOD_DIV}
  197. function fpc_div_dword(n,z : dword) : dword; compilerproc;
  198. function fpc_mod_dword(n,z : dword) : dword; compilerproc;
  199. function fpc_div_longint(n,z : longint) : longint; compilerproc;
  200. function fpc_mod_longint(n,z : longint) : longint; compilerproc;
  201. {$endif FPC_INCLUDE_SOFTWARE_MOD_DIV}
  202. { from int64.inc }
  203. function fpc_div_qword(n,z : qword) : qword; compilerproc;
  204. function fpc_mod_qword(n,z : qword) : qword; compilerproc;
  205. function fpc_div_int64(n,z : int64) : int64; compilerproc;
  206. function fpc_mod_int64(n,z : int64) : int64; compilerproc;
  207. function fpc_mul_qword(f1,f2 : qword;checkoverflow : longbool) : qword; compilerproc;
  208. function fpc_mul_int64(f1,f2 : int64;checkoverflow : longbool) : int64; compilerproc;
  209. {$ifdef FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
  210. function fpc_shl_qword(value,shift : qword) : qword; compilerproc;
  211. function fpc_shr_qword(value,shift : qword) : qword; compilerproc;
  212. function fpc_shl_int64(value,shift : int64) : int64; compilerproc;
  213. function fpc_shr_int64(value,shift : int64) : int64; compilerproc;
  214. {$endif FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
  215. function fpc_round(d : Extended) : int64;compilerproc;
  216. function fpc_do_is(aclass : tclass;aobject : tobject) : boolean; compilerproc;
  217. function fpc_do_as(aclass : tclass;aobject : tobject): tobject; compilerproc;
  218. procedure fpc_intf_decr_ref(var i: pointer); compilerproc;
  219. procedure fpc_intf_incr_ref(i: pointer); compilerproc;
  220. procedure fpc_intf_assign(var D: pointer; const S: pointer); compilerproc;
  221. function fpc_intf_as(const S: pointer; const iid: TGUID): pointer; compilerproc;
  222. function fpc_class_as_intf(const S: pointer; const iid: TGUID): pointer; compilerproc;
  223. Function fpc_PushExceptAddr (Ft: Longint;_buf,_newaddr : pointer): PJmp_buf ; compilerproc;
  224. Procedure fpc_PushExceptObj (Obj : TObject; AnAddr,AFrame : Pointer); compilerproc;
  225. Function fpc_Raiseexception (Obj : TObject; AnAddr,AFrame : Pointer) : TObject; compilerproc;
  226. Procedure fpc_PopAddrStack; compilerproc;
  227. function fpc_PopObjectStack : TObject; compilerproc;
  228. function fpc_PopSecondObjectStack : TObject; compilerproc;
  229. Procedure fpc_ReRaise; compilerproc;
  230. Function fpc_Catches(Objtype : TClass) : TObject; compilerproc;
  231. function fpc_help_constructor(_self:pointer;var _vmt:pointer;_vmt_pos:cardinal):pointer;compilerproc;
  232. procedure fpc_help_destructor(_self,_vmt:pointer;vmt_pos:cardinal);compilerproc;
  233. procedure fpc_help_fail(_self:pointer;var _vmt:pointer;vmt_pos:cardinal);compilerproc;
  234. {$ifdef dummy}
  235. Procedure fpc_DestroyException(o : TObject); compilerproc;
  236. procedure fpc_check_object(obj:pointer); compilerproc;
  237. procedure fpc_check_object_ext(vmt,expvmt:pointer);compilerproc;
  238. {$endif dummy}
  239. Procedure fpc_Initialize (Data,TypeInfo : pointer); compilerproc;
  240. Procedure fpc_finalize (Data,TypeInfo: Pointer); compilerproc;
  241. Procedure fpc_Addref (Data,TypeInfo : Pointer); compilerproc;
  242. Procedure fpc_DecRef (Data,TypeInfo : Pointer); compilerproc;
  243. procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); compilerproc;
  244. function fpc_set_load_small(l: fpc_small_set): fpc_normal_set; compilerproc;
  245. function fpc_set_create_element(b : byte): fpc_normal_set; compilerproc;
  246. function fpc_set_set_byte(const source: fpc_normal_set; b : byte): fpc_normal_set; compilerproc;
  247. function fpc_set_unset_byte(const source: fpc_normal_set; b : byte): fpc_normal_set; compilerproc;
  248. function fpc_set_set_range(const orgset: fpc_normal_set; l,h : byte): fpc_normal_set; compilerproc;
  249. function fpc_set_in_byte(const p: fpc_normal_set; b: byte): boolean; compilerproc;
  250. function fpc_set_add_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
  251. function fpc_set_mul_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
  252. function fpc_set_sub_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
  253. function fpc_set_symdif_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
  254. function fpc_set_comp_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
  255. function fpc_set_contains_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
  256. {$ifdef LARGESETS}
  257. procedure fpc_largeset_set_word(p : pointer;b : word); compilerproc;
  258. procedure fpc_largeset_in_word(p : pointer;b : word); compilerproc;
  259. procedure fpc_largeset_add_sets(set1,set2,dest : pointer;size : longint); compilerproc;
  260. procedure fpc_largeset_sets(set1,set2,dest : pointer;size : longint); compilerproc;
  261. procedure fpc_largeset_sub_sets(set1,set2,dest : pointer;size : longint); compilerproc;
  262. procedure fpc_largeset_symdif_sets(set1,set2,dest : pointer;size : longint); compilerproc;
  263. procedure fpc_largeset_comp_sets(set1,set2 : pointer;size : longint); compilerproc;
  264. procedure fpc_largeset_contains_sets(set1,set2 : pointer; size: longint); compilerproc;
  265. {$endif LARGESETS}
  266. procedure fpc_rangeerror; compilerproc;
  267. procedure fpc_divbyzero; compilerproc;
  268. procedure fpc_overflow; compilerproc;
  269. //procedure fpc_iocheck(addr : longint); compilerproc;
  270. procedure fpc_iocheck; compilerproc;
  271. procedure fpc_InitializeUnits; compilerproc;
  272. // not generated by compiler, called directly in system unit
  273. // procedure fpc_FinalizeUnits; compilerproc;
  274. {
  275. Procedure fpc_do_exit; compilerproc;
  276. Procedure fpc_lib_exit; compilerproc;
  277. Procedure fpc_HandleErrorAddrFrame (Errno : longint;addr,frame : pointer); compilerproc;
  278. Procedure fpc_HandleError (Errno : longint); compilerproc;
  279. }
  280. procedure fpc_AbstractErrorIntern;compilerproc;
  281. procedure fpc_assert(Const Msg,FName:Shortstring;LineNo:Longint;ErrorAddr:Pointer); compilerproc;
  282. Procedure fpc_reset_typed(var f : TypedFile;Size : Longint); compilerproc;
  283. Procedure fpc_rewrite_typed(var f : TypedFile;Size : Longint); compilerproc;
  284. Procedure fpc_typed_write(TypeSize : Longint;var f : TypedFile;const Buf); compilerproc;
  285. Procedure fpc_typed_read(TypeSize : Longint;var f : TypedFile;var Buf); compilerproc;
  286. {$ifdef FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
  287. function fpc_int64_to_double(i: int64): double; compilerproc;
  288. function fpc_qword_to_double(q: qword): double; compilerproc;
  289. {$endif FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
  290. {$endif hascompilerproc}
  291. {
  292. $Log$
  293. Revision 1.58 2004-09-29 14:55:49 mazen
  294. * widestring conversion routines takes a widechar so no
  295. information is lost
  296. Revision 1.57 2004/05/31 14:31:57 peter
  297. * remove comment warnings
  298. Revision 1.56 2004/05/01 23:55:18 peter
  299. * replace strlenint with sizeint
  300. Revision 1.55 2004/05/01 20:52:50 peter
  301. * ValSInt fixed for 64 bit
  302. Revision 1.54 2004/04/29 19:50:13 peter
  303. * x86-64 fixes
  304. Revision 1.53 2004/04/29 18:59:43 peter
  305. * str() helpers now also use valint/valuint
  306. * int64/qword helpers disabled for cpu64
  307. Revision 1.52 2004/04/12 18:51:02 florian
  308. * fixed getmem prototype for 64 bit systems
  309. Revision 1.51 2004/01/01 17:58:16 jonas
  310. + integer division-by-zero detection support for ppc
  311. + compilerproc FPC_DIVBYZERO
  312. Revision 1.50 2003/10/25 22:52:07 florian
  313. * fixed copy(<dynarray>, ...)
  314. Revision 1.49 2003/10/04 23:40:42 florian
  315. * write helper comproc for variants fixed
  316. Revision 1.48 2003/09/02 13:04:08 florian
  317. * ifdef'd some helpers
  318. Revision 1.47 2003/09/01 20:47:23 peter
  319. * pcomp added for sparc
  320. Revision 1.46 2003/08/21 22:07:43 olle
  321. - removed parameter from fpc_iocheck
  322. Revision 1.45 2003/06/17 19:24:08 jonas
  323. * fixed conversion of fpc_*str_unique to compilerproc
  324. Revision 1.44 2003/06/17 16:38:53 jonas
  325. * fpc_ansistr|widestr_unique is now a function so it can be used as
  326. compilerproc
  327. Revision 1.43 2003/05/26 19:36:46 peter
  328. * fpc_shortstr_concat is now the same for all targets
  329. * fpc_shortstr_append_shortstr added for optimized code generation
  330. Revision 1.42 2003/05/16 22:40:11 florian
  331. * fixed generic shortstr_compare
  332. Revision 1.41 2003/05/13 19:18:08 peter
  333. * fpc_help_fail compilerproc
  334. * fpc_new_class, fpc_dispose_class not needed by latest compiler
  335. Revision 1.40 2003/05/11 21:39:14 peter
  336. * constructor helper added
  337. Revision 1.39 2003/04/25 21:15:20 peter
  338. * fpc_big_array changed to 1k only. using maxlongint will crash gdb
  339. Revision 1.38 2003/04/23 21:28:21 peter
  340. * fpc_round added, needed for int64 currency
  341. Revision 1.37 2003/04/02 14:07:30 peter
  342. * class helpers compilerprocs are not needed yet, changed
  343. ifndef i386 to ifdef dummy
  344. Revision 1.36 2003/03/17 14:30:11 peter
  345. * changed address parameter/return values to pointer instead
  346. of longint
  347. Revision 1.35 2003/01/11 00:17:29 florian
  348. * uncommented the variant<->dyn. array stuff
  349. Revision 1.34 2003/01/09 20:14:20 florian
  350. * fixed helper declarations
  351. Revision 1.33 2003/01/06 23:04:21 mazen
  352. * functions headers modified in generic.inc to make it possible compiling sparc
  353. RTL based on generic code
  354. Revision 1.32 2003/01/06 08:25:47 michael
  355. + PAtch from peter fixing daily build
  356. Revision 1.31 2003/01/05 21:32:35 mazen
  357. * fixing several bugs compiling the RTL
  358. Revision 1.30 2002/12/29 16:59:17 peter
  359. * implemented some more conversions
  360. Revision 1.29 2002/11/26 23:02:07 peter
  361. * fixed dynarray copy
  362. Revision 1.28 2002/10/17 12:43:00 florian
  363. + ansistring_append* implemented
  364. Revision 1.27 2002/10/10 19:24:28 florian
  365. + write(ln) support for variants added
  366. Revision 1.26 2002/10/10 16:08:50 florian
  367. + several widestring/pwidechar related helpers added
  368. Revision 1.25 2002/10/05 14:20:16 peter
  369. * fpc_pchar_length compilerproc and strlen alias
  370. Revision 1.24 2002/10/02 18:21:51 peter
  371. * Copy() changed to internal function calling compilerprocs
  372. * FPC_SHORTSTR_COPY renamed to FPC_SHORTSTR_ASSIGN because of the
  373. new copy functions
  374. Revision 1.23 2002/09/27 21:10:40 carl
  375. * fix 2GB limit problem
  376. Revision 1.22 2002/09/07 21:12:04 carl
  377. * cardinal -> longword
  378. - remove some unused routines
  379. Revision 1.21 2002/09/07 15:07:45 peter
  380. * old logs removed and tabs fixed
  381. Revision 1.20 2002/09/02 19:24:41 peter
  382. * array of char support for Str()
  383. Revision 1.19 2002/08/20 18:24:05 jonas
  384. * interface "as" helpers converted from procedures to functions
  385. Revision 1.18 2002/07/31 16:58:12 jonas
  386. * fixed conversion from int64/qword to double errors
  387. Revision 1.17 2002/07/28 20:43:47 florian
  388. * several fixes for linux/powerpc
  389. * several fixes to MT
  390. Revision 1.16 2002/04/25 20:14:56 peter
  391. * updated compilerprocs
  392. * incr ref count has now a value argument instead of var
  393. Revision 1.15 2002/04/24 16:15:35 peter
  394. * fpc_finalize_array renamed
  395. Revision 1.14 2002/04/21 18:56:59 peter
  396. * fpc_freemem and fpc_getmem compilerproc
  397. Revision 1.13 2002/01/21 20:16:08 peter
  398. * updated for dynarr:=nil
  399. }