compproc.inc 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  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:StrLenInt); 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:StrLenInt;count:StrLenInt):shortstring;compilerproc;
  45. Function fpc_ansistr_Copy (Const S : AnsiString; Index,Size : StrLenInt) : AnsiString;compilerproc;
  46. Function fpc_widestr_Copy (Const S : WideString; Index,Size : StrLenInt) : WideString;compilerproc;
  47. function fpc_char_copy(c:char;index : StrLenInt;count : StrLenInt): 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 : strlenint;var s : shortstring); compilerproc;
  58. procedure fpc_shortstr_uint(v : valuint;len : strlenint;var s : shortstring); compilerproc;
  59. procedure fpc_chararray_sint(v : valsint;len : strlenint;var a : array of char); compilerproc;
  60. procedure fpc_chararray_uint(v : valuint;len : strlenint;var a : array of char); compilerproc;
  61. procedure fpc_AnsiStr_sint(v : valsint; Len : strlenint; Var S : AnsiString); compilerproc;
  62. procedure fpc_AnsiStr_uint(v : valuint;Len : strlenint; Var S : AnsiString); compilerproc;
  63. procedure fpc_WideStr_sint(v : valsint; Len : strlenint; Var S : WideString); compilerproc;
  64. procedure fpc_WideStr_uint(v : valuint;Len : strlenint; 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 : strlenint;var s : shortstring); compilerproc;
  77. procedure fpc_shortstr_int64(v : int64;len : strlenint;var s : shortstring); compilerproc;
  78. procedure fpc_chararray_qword(v : qword;len : strlenint;var a : array of char); compilerproc;
  79. procedure fpc_chararray_int64(v : int64;len : strlenint;var a : array of char); compilerproc;
  80. procedure fpc_ansistr_qword(v : qword;len : strlenint;var s : ansistring); compilerproc;
  81. procedure fpc_ansistr_int64(v : int64;len : strlenint;var s : ansistring); compilerproc;
  82. procedure fpc_widestr_qword(v : qword;len : strlenint;var s : widestring); compilerproc;
  83. procedure fpc_widestr_int64(v : int64;len : strlenint;var s : widestring); compilerproc;
  84. {$endif CPU64}
  85. procedure fpc_ShortStr_Float(d : ValReal;len,fr,rt : strlenint;var s : shortstring); compilerproc;
  86. procedure fpc_chararray_Float(d : ValReal;len,fr,rt : strlenint;var a : array of char); compilerproc;
  87. procedure fpc_AnsiStr_Float(d : ValReal;len,fr,rt : strlenint;var s : ansistring); compilerproc;
  88. procedure fpc_WideStr_Float(d : ValReal;len,fr,rt : strlenint;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: StrLenInt; 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: StrLenInt; 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: StrLenInt; 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: StrLenInt;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: StrLenInt; const src: ansistring): fpc_big_chararray; compilerproc;
  123. Function fpc_AnsiStr_Compare(const S1,S2 : AnsiString): StrLenInt; compilerproc;
  124. Procedure fpc_AnsiStr_CheckZero(p : pointer); compilerproc;
  125. Procedure fpc_AnsiStr_CheckRange(len,index : StrLenInt); compilerproc;
  126. Procedure fpc_AnsiStr_SetLength (Var S : AnsiString; l : StrLenInt); compilerproc;
  127. {$ifdef EXTRAANSISHORT}
  128. Function fpc_AnsiStr_ShortStr_Compare (Var S1 : Pointer; Var S2 : ShortString): StrLenInt; 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: StrLenInt;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 : Char): 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: StrLenInt; const src: WideString): fpc_big_chararray; compilerproc;
  146. Function fpc_WideStr_Compare(const S1,S2 : WideString): StrLenInt; compilerproc;
  147. Procedure fpc_WideStr_CheckZero(p : pointer); compilerproc;
  148. Procedure fpc_WideStr_CheckRange(len,index : StrLenInt); compilerproc;
  149. Procedure fpc_WideStr_SetLength (Var S : WideString; l : StrLenInt); 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. Procedure fpc_Read_Text_QWord(var f : text; var q : qword); compilerproc;
  193. Procedure fpc_Read_Text_Int64(var f : text; var i : int64); compilerproc;
  194. {$ifdef FPC_INCLUDE_SOFTWARE_MOD_DIV}
  195. function fpc_div_dword(n,z : dword) : dword; compilerproc;
  196. function fpc_mod_dword(n,z : dword) : dword; compilerproc;
  197. function fpc_div_longint(n,z : longint) : longint; compilerproc;
  198. function fpc_mod_longint(n,z : longint) : longint; compilerproc;
  199. {$endif FPC_INCLUDE_SOFTWARE_MOD_DIV}
  200. { from int64.inc }
  201. function fpc_div_qword(n,z : qword) : qword; compilerproc;
  202. function fpc_mod_qword(n,z : qword) : qword; compilerproc;
  203. function fpc_div_int64(n,z : int64) : int64; compilerproc;
  204. function fpc_mod_int64(n,z : int64) : int64; compilerproc;
  205. function fpc_mul_qword(f1,f2 : qword;checkoverflow : longbool) : qword; compilerproc;
  206. function fpc_mul_int64(f1,f2 : int64;checkoverflow : longbool) : int64; compilerproc;
  207. {$ifdef FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
  208. function fpc_shl_qword(value,shift : qword) : qword; compilerproc;
  209. function fpc_shr_qword(value,shift : qword) : qword; compilerproc;
  210. function fpc_shl_int64(value,shift : int64) : int64; compilerproc;
  211. function fpc_shr_int64(value,shift : int64) : int64; compilerproc;
  212. {$endif FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
  213. function fpc_round(d : Extended) : int64;compilerproc;
  214. function fpc_do_is(aclass : tclass;aobject : tobject) : boolean; compilerproc;
  215. function fpc_do_as(aclass : tclass;aobject : tobject): tobject; compilerproc;
  216. procedure fpc_intf_decr_ref(var i: pointer); compilerproc;
  217. procedure fpc_intf_incr_ref(i: pointer); compilerproc;
  218. procedure fpc_intf_assign(var D: pointer; const S: pointer); compilerproc;
  219. function fpc_intf_as(const S: pointer; const iid: TGUID): pointer; compilerproc;
  220. function fpc_class_as_intf(const S: pointer; const iid: TGUID): pointer; compilerproc;
  221. Function fpc_PushExceptAddr (Ft: Longint;_buf,_newaddr : pointer): PJmp_buf ; compilerproc;
  222. Procedure fpc_PushExceptObj (Obj : TObject; AnAddr,AFrame : Pointer); compilerproc;
  223. Function fpc_Raiseexception (Obj : TObject; AnAddr,AFrame : Pointer) : TObject; compilerproc;
  224. Procedure fpc_PopAddrStack; compilerproc;
  225. function fpc_PopObjectStack : TObject; compilerproc;
  226. function fpc_PopSecondObjectStack : TObject; compilerproc;
  227. Procedure fpc_ReRaise; compilerproc;
  228. Function fpc_Catches(Objtype : TClass) : TObject; compilerproc;
  229. function fpc_help_constructor(_self:pointer;var _vmt:pointer;_vmt_pos:cardinal):pointer;compilerproc;
  230. procedure fpc_help_destructor(_self,_vmt:pointer;vmt_pos:cardinal);compilerproc;
  231. procedure fpc_help_fail(_self:pointer;var _vmt:pointer;vmt_pos:cardinal);compilerproc;
  232. {$ifdef dummy}
  233. Procedure fpc_DestroyException(o : TObject); compilerproc;
  234. procedure fpc_check_object(obj:pointer); compilerproc;
  235. procedure fpc_check_object_ext(vmt,expvmt:pointer);compilerproc;
  236. {$endif dummy}
  237. Procedure fpc_Initialize (Data,TypeInfo : pointer); compilerproc;
  238. Procedure fpc_finalize (Data,TypeInfo: Pointer); compilerproc;
  239. Procedure fpc_Addref (Data,TypeInfo : Pointer); compilerproc;
  240. Procedure fpc_DecRef (Data,TypeInfo : Pointer); compilerproc;
  241. procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); compilerproc;
  242. function fpc_set_load_small(l: fpc_small_set): fpc_normal_set; compilerproc;
  243. function fpc_set_create_element(b : byte): fpc_normal_set; compilerproc;
  244. function fpc_set_set_byte(const source: fpc_normal_set; b : byte): fpc_normal_set; compilerproc;
  245. function fpc_set_unset_byte(const source: fpc_normal_set; b : byte): fpc_normal_set; compilerproc;
  246. function fpc_set_set_range(const orgset: fpc_normal_set; l,h : byte): fpc_normal_set; compilerproc;
  247. function fpc_set_in_byte(const p: fpc_normal_set; b: byte): boolean; compilerproc;
  248. function fpc_set_add_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
  249. function fpc_set_mul_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
  250. function fpc_set_sub_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
  251. function fpc_set_symdif_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
  252. function fpc_set_comp_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
  253. function fpc_set_contains_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
  254. {$ifdef LARGESETS}
  255. procedure fpc_largeset_set_word(p : pointer;b : word); compilerproc;
  256. procedure fpc_largeset_in_word(p : pointer;b : word); compilerproc;
  257. procedure fpc_largeset_add_sets(set1,set2,dest : pointer;size : longint); compilerproc;
  258. procedure fpc_largeset_sets(set1,set2,dest : pointer;size : longint); compilerproc;
  259. procedure fpc_largeset_sub_sets(set1,set2,dest : pointer;size : longint); compilerproc;
  260. procedure fpc_largeset_symdif_sets(set1,set2,dest : pointer;size : longint); compilerproc;
  261. procedure fpc_largeset_comp_sets(set1,set2 : pointer;size : longint); compilerproc;
  262. procedure fpc_largeset_contains_sets(set1,set2 : pointer; size: longint); compilerproc;
  263. {$endif LARGESETS}
  264. procedure fpc_rangeerror; compilerproc;
  265. procedure fpc_divbyzero; compilerproc;
  266. procedure fpc_overflow; compilerproc;
  267. //procedure fpc_iocheck(addr : longint); compilerproc;
  268. procedure fpc_iocheck; compilerproc;
  269. procedure fpc_InitializeUnits; compilerproc;
  270. // not generated by compiler, called directly in system unit
  271. // procedure fpc_FinalizeUnits; compilerproc;
  272. {
  273. Procedure fpc_do_exit; compilerproc;
  274. Procedure fpc_lib_exit; compilerproc;
  275. Procedure fpc_HandleErrorAddrFrame (Errno : longint;addr,frame : pointer); compilerproc;
  276. Procedure fpc_HandleError (Errno : longint); compilerproc;
  277. }
  278. procedure fpc_AbstractErrorIntern;compilerproc;
  279. procedure fpc_assert(Const Msg,FName:Shortstring;LineNo:Longint;ErrorAddr:Pointer); compilerproc;
  280. Procedure fpc_reset_typed(var f : TypedFile;Size : Longint); compilerproc;
  281. Procedure fpc_rewrite_typed(var f : TypedFile;Size : Longint); compilerproc;
  282. Procedure fpc_typed_write(TypeSize : Longint;var f : TypedFile;const Buf); compilerproc;
  283. Procedure fpc_typed_read(TypeSize : Longint;var f : TypedFile;var Buf); compilerproc;
  284. {$ifdef FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
  285. function fpc_int64_to_double(i: int64): double; compilerproc;
  286. function fpc_qword_to_double(q: qword): double; compilerproc;
  287. {$endif FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
  288. {$endif hascompilerproc}
  289. {
  290. $Log$
  291. Revision 1.54 2004-04-29 19:50:13 peter
  292. * x86-64 fixes
  293. Revision 1.53 2004/04/29 18:59:43 peter
  294. * str() helpers now also use valint/valuint
  295. * int64/qword helpers disabled for cpu64
  296. Revision 1.52 2004/04/12 18:51:02 florian
  297. * fixed getmem prototype for 64 bit systems
  298. Revision 1.51 2004/01/01 17:58:16 jonas
  299. + integer division-by-zero detection support for ppc
  300. + compilerproc FPC_DIVBYZERO
  301. Revision 1.50 2003/10/25 22:52:07 florian
  302. * fixed copy(<dynarray>, ...)
  303. Revision 1.49 2003/10/04 23:40:42 florian
  304. * write helper comproc for variants fixed
  305. Revision 1.48 2003/09/02 13:04:08 florian
  306. * ifdef'd some helpers
  307. Revision 1.47 2003/09/01 20:47:23 peter
  308. * pcomp added for sparc
  309. Revision 1.46 2003/08/21 22:07:43 olle
  310. - removed parameter from fpc_iocheck
  311. Revision 1.45 2003/06/17 19:24:08 jonas
  312. * fixed conversion of fpc_*str_unique to compilerproc
  313. Revision 1.44 2003/06/17 16:38:53 jonas
  314. * fpc_{ansistr|widestr}_unique is now a function so it can be used as
  315. compilerproc
  316. Revision 1.43 2003/05/26 19:36:46 peter
  317. * fpc_shortstr_concat is now the same for all targets
  318. * fpc_shortstr_append_shortstr added for optimized code generation
  319. Revision 1.42 2003/05/16 22:40:11 florian
  320. * fixed generic shortstr_compare
  321. Revision 1.41 2003/05/13 19:18:08 peter
  322. * fpc_help_fail compilerproc
  323. * fpc_new_class, fpc_dispose_class not needed by latest compiler
  324. Revision 1.40 2003/05/11 21:39:14 peter
  325. * constructor helper added
  326. Revision 1.39 2003/04/25 21:15:20 peter
  327. * fpc_big_array changed to 1k only. using maxlongint will crash gdb
  328. Revision 1.38 2003/04/23 21:28:21 peter
  329. * fpc_round added, needed for int64 currency
  330. Revision 1.37 2003/04/02 14:07:30 peter
  331. * class helpers compilerprocs are not needed yet, changed
  332. ifndef i386 to ifdef dummy
  333. Revision 1.36 2003/03/17 14:30:11 peter
  334. * changed address parameter/return values to pointer instead
  335. of longint
  336. Revision 1.35 2003/01/11 00:17:29 florian
  337. * uncommented the variant<->dyn. array stuff
  338. Revision 1.34 2003/01/09 20:14:20 florian
  339. * fixed helper declarations
  340. Revision 1.33 2003/01/06 23:04:21 mazen
  341. * functions headers modified in generic.inc to make it possible compiling sparc
  342. RTL based on generic code
  343. Revision 1.32 2003/01/06 08:25:47 michael
  344. + PAtch from peter fixing daily build
  345. Revision 1.31 2003/01/05 21:32:35 mazen
  346. * fixing several bugs compiling the RTL
  347. Revision 1.30 2002/12/29 16:59:17 peter
  348. * implemented some more conversions
  349. Revision 1.29 2002/11/26 23:02:07 peter
  350. * fixed dynarray copy
  351. Revision 1.28 2002/10/17 12:43:00 florian
  352. + ansistring_append* implemented
  353. Revision 1.27 2002/10/10 19:24:28 florian
  354. + write(ln) support for variants added
  355. Revision 1.26 2002/10/10 16:08:50 florian
  356. + several widestring/pwidechar related helpers added
  357. Revision 1.25 2002/10/05 14:20:16 peter
  358. * fpc_pchar_length compilerproc and strlen alias
  359. Revision 1.24 2002/10/02 18:21:51 peter
  360. * Copy() changed to internal function calling compilerprocs
  361. * FPC_SHORTSTR_COPY renamed to FPC_SHORTSTR_ASSIGN because of the
  362. new copy functions
  363. Revision 1.23 2002/09/27 21:10:40 carl
  364. * fix 2GB limit problem
  365. Revision 1.22 2002/09/07 21:12:04 carl
  366. * cardinal -> longword
  367. - remove some unused routines
  368. Revision 1.21 2002/09/07 15:07:45 peter
  369. * old logs removed and tabs fixed
  370. Revision 1.20 2002/09/02 19:24:41 peter
  371. * array of char support for Str()
  372. Revision 1.19 2002/08/20 18:24:05 jonas
  373. * interface "as" helpers converted from procedures to functions
  374. Revision 1.18 2002/07/31 16:58:12 jonas
  375. * fixed conversion from int64/qword to double errors
  376. Revision 1.17 2002/07/28 20:43:47 florian
  377. * several fixes for linux/powerpc
  378. * several fixes to MT
  379. Revision 1.16 2002/04/25 20:14:56 peter
  380. * updated compilerprocs
  381. * incr ref count has now a value argument instead of var
  382. Revision 1.15 2002/04/24 16:15:35 peter
  383. * fpc_finalize_array renamed
  384. Revision 1.14 2002/04/21 18:56:59 peter
  385. * fpc_freemem and fpc_getmem compilerproc
  386. Revision 1.13 2002/01/21 20:16:08 peter
  387. * updated for dynarr:=nil
  388. }