psystem.pas 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Load the system unit, create required defs for systemunit
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit psystem;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. symbase;
  23. procedure insertinternsyms(p : tsymtable);
  24. procedure insert_intern_types(p : tsymtable);
  25. procedure readconstdefs;
  26. procedure createconstdefs;
  27. procedure registernodes;
  28. procedure registertais;
  29. implementation
  30. uses
  31. globals,globtype,
  32. symconst,symtype,symsym,symdef,symtable,
  33. aasmtai,aasmcpu,
  34. {$ifdef GDB}
  35. gdb,
  36. {$endif GDB}
  37. node,nbas,nflw,nset,ncon,ncnv,nld,nmem,ncal,nmat,nadd,ninl,nopt
  38. {$ifdef Delphi}
  39. ,dmisc
  40. ,sysutils
  41. {$endif}
  42. ;
  43. procedure insertinternsyms(p : tsymtable);
  44. {
  45. all intern procedures for the system unit
  46. }
  47. begin
  48. p.insert(tsyssym.create('Concat',in_concat_x));
  49. p.insert(tsyssym.create('Write',in_write_x));
  50. p.insert(tsyssym.create('WriteLn',in_writeln_x));
  51. p.insert(tsyssym.create('Assigned',in_assigned_x));
  52. p.insert(tsyssym.create('Read',in_read_x));
  53. p.insert(tsyssym.create('ReadLn',in_readln_x));
  54. p.insert(tsyssym.create('Ofs',in_ofs_x));
  55. p.insert(tsyssym.create('SizeOf',in_sizeof_x));
  56. p.insert(tsyssym.create('TypeOf',in_typeof_x));
  57. p.insert(tsyssym.create('Low',in_low_x));
  58. p.insert(tsyssym.create('High',in_high_x));
  59. p.insert(tsyssym.create('Seg',in_seg_x));
  60. p.insert(tsyssym.create('Ord',in_ord_x));
  61. p.insert(tsyssym.create('Pred',in_pred_x));
  62. p.insert(tsyssym.create('Succ',in_succ_x));
  63. p.insert(tsyssym.create('Exclude',in_exclude_x_y));
  64. p.insert(tsyssym.create('Include',in_include_x_y));
  65. p.insert(tsyssym.create('Break',in_break));
  66. p.insert(tsyssym.create('Exit',in_exit));
  67. p.insert(tsyssym.create('Continue',in_continue));
  68. p.insert(tsyssym.create('Dec',in_dec_x));
  69. p.insert(tsyssym.create('Inc',in_inc_x));
  70. p.insert(tsyssym.create('Str',in_str_x_string));
  71. p.insert(tsyssym.create('Assert',in_assert_x_y));
  72. p.insert(tsyssym.create('Val',in_val_x));
  73. p.insert(tsyssym.create('Addr',in_addr_x));
  74. p.insert(tsyssym.create('TypeInfo',in_typeinfo_x));
  75. p.insert(tsyssym.create('SetLength',in_setlength_x));
  76. p.insert(tsyssym.create('Copy',in_copy_x));
  77. p.insert(tsyssym.create('Finalize',in_finalize_x));
  78. p.insert(tsyssym.create('Length',in_length_x));
  79. p.insert(tsyssym.create('New',in_new_x));
  80. p.insert(tsyssym.create('Dispose',in_dispose_x));
  81. end;
  82. procedure insert_intern_types(p : tsymtable);
  83. {
  84. all the types inserted into the system unit
  85. }
  86. function addtype(const s:string;const t:ttype):ttypesym;
  87. begin
  88. result:=ttypesym.create(s,t);
  89. p.insert(result);
  90. { add init/final table if required }
  91. if t.def.needs_inittable then
  92. generate_inittable(result);
  93. end;
  94. procedure adddef(const s:string;def:tdef);
  95. var
  96. t : ttype;
  97. begin
  98. t.setdef(def);
  99. p.insert(ttypesym.create(s,t));
  100. end;
  101. var
  102. { several defs to simulate more or less C++ objects for GDB }
  103. vmttype,
  104. vmtarraytype : ttype;
  105. hrecst : trecordsymtable;
  106. begin
  107. {$ifdef cpufpemu}
  108. { Normal types }
  109. if (cs_fp_emulation in aktmoduleswitches) then
  110. begin
  111. addtype('Single',s32floattype);
  112. { extended size is the best real type for the target }
  113. addtype('Real',s32floattype);
  114. pbestrealtype:=@s32floattype;
  115. { extended size is the best real type for the target }
  116. addtype('Extended',pbestrealtype^);
  117. end
  118. else
  119. {$endif cpufpemu}
  120. begin
  121. addtype('Single',s32floattype);
  122. addtype('Double',s64floattype);
  123. { extended size is the best real type for the target }
  124. addtype('Extended',pbestrealtype^);
  125. addtype('Real',s64floattype);
  126. end;
  127. {$ifdef x86}
  128. adddef('Comp',tfloatdef.create(s64comp));
  129. {$endif x86}
  130. addtype('Currency',s64currencytype);
  131. addtype('Pointer',voidpointertype);
  132. addtype('FarPointer',voidfarpointertype);
  133. addtype('ShortString',cshortstringtype);
  134. addtype('LongString',clongstringtype);
  135. addtype('AnsiString',cansistringtype);
  136. addtype('WideString',cwidestringtype);
  137. addtype('Boolean',booltype);
  138. addtype('ByteBool',booltype);
  139. adddef('WordBool',torddef.create(bool16bit,0,1));
  140. adddef('LongBool',torddef.create(bool32bit,0,1));
  141. addtype('Char',cchartype);
  142. addtype('WideChar',cwidechartype);
  143. adddef('Text',tfiledef.createtext);
  144. addtype('Longword',u32bittype);
  145. addtype('QWord',cu64bittype);
  146. addtype('Int64',cs64bittype);
  147. adddef('TypedFile',tfiledef.createtyped(voidtype));
  148. addtype('Variant',cvarianttype);
  149. addtype('OleVariant',colevarianttype);
  150. { Internal types }
  151. addtype('$formal',cformaltype);
  152. addtype('$void',voidtype);
  153. addtype('$byte',u8bittype);
  154. addtype('$word',u16bittype);
  155. addtype('$ulong',u32bittype);
  156. addtype('$longint',s32bittype);
  157. addtype('$qword',cu64bittype);
  158. addtype('$int64',cs64bittype);
  159. addtype('$char',cchartype);
  160. addtype('$widechar',cwidechartype);
  161. addtype('$shortstring',cshortstringtype);
  162. addtype('$longstring',clongstringtype);
  163. addtype('$ansistring',cansistringtype);
  164. addtype('$widestring',cwidestringtype);
  165. addtype('$openshortstring',openshortstringtype);
  166. addtype('$boolean',booltype);
  167. addtype('$void_pointer',voidpointertype);
  168. addtype('$char_pointer',charpointertype);
  169. addtype('$void_farpointer',voidfarpointertype);
  170. addtype('$openchararray',openchararraytype);
  171. addtype('$file',cfiletype);
  172. addtype('$variant',cvarianttype);
  173. addtype('$olevariant',cvarianttype);
  174. addtype('$s32real',s32floattype);
  175. addtype('$s64real',s64floattype);
  176. addtype('$s80real',s80floattype);
  177. addtype('$s64currency',s64currencytype);
  178. { Add a type for virtual method tables }
  179. hrecst:=trecordsymtable.create;
  180. vmttype.setdef(trecorddef.create(hrecst));
  181. pvmttype.setdef(tpointerdef.create(vmttype));
  182. hrecst.insertfield(tvarsym.create('$parent',vs_value,pvmttype),true);
  183. hrecst.insertfield(tvarsym.create('$length',vs_value,s32bittype),true);
  184. hrecst.insertfield(tvarsym.create('$mlength',vs_value,s32bittype),true);
  185. vmtarraytype.setdef(tarraydef.create(0,1,s32bittype));
  186. tarraydef(vmtarraytype.def).setelementtype(voidpointertype);
  187. hrecst.insertfield(tvarsym.create('$__pfn',vs_value,vmtarraytype),true);
  188. addtype('$__vtbl_ptr_type',vmttype);
  189. addtype('$pvmt',pvmttype);
  190. vmtarraytype.setdef(tarraydef.create(0,1,s32bittype));
  191. tarraydef(vmtarraytype.def).setelementtype(pvmttype);
  192. addtype('$vtblarray',vmtarraytype);
  193. { Add a type for methodpointers }
  194. hrecst:=trecordsymtable.create;
  195. hrecst.insertfield(tvarsym.create('$proc',vs_value,voidpointertype),true);
  196. hrecst.insertfield(tvarsym.create('$self',vs_value,voidpointertype),true);
  197. methodpointertype.setdef(trecorddef.create(hrecst));
  198. addtype('$methodpointer',methodpointertype);
  199. { Add functions that require compiler magic }
  200. insertinternsyms(p);
  201. end;
  202. procedure readconstdefs;
  203. {
  204. Load all default definitions for consts from the system unit
  205. }
  206. begin
  207. globaldef('byte',u8bittype);
  208. globaldef('word',u16bittype);
  209. globaldef('ulong',u32bittype);
  210. globaldef('longint',s32bittype);
  211. globaldef('qword',cu64bittype);
  212. globaldef('int64',cs64bittype);
  213. globaldef('formal',cformaltype);
  214. globaldef('void',voidtype);
  215. globaldef('char',cchartype);
  216. globaldef('widechar',cwidechartype);
  217. globaldef('shortstring',cshortstringtype);
  218. globaldef('longstring',clongstringtype);
  219. globaldef('ansistring',cansistringtype);
  220. globaldef('widestring',cwidestringtype);
  221. globaldef('openshortstring',openshortstringtype);
  222. globaldef('openchararray',openchararraytype);
  223. globaldef('s32real',s32floattype);
  224. globaldef('s64real',s64floattype);
  225. globaldef('s80real',s80floattype);
  226. globaldef('s64currency',s64currencytype);
  227. globaldef('boolean',booltype);
  228. globaldef('void_pointer',voidpointertype);
  229. globaldef('char_pointer',charpointertype);
  230. globaldef('void_farpointer',voidfarpointertype);
  231. globaldef('file',cfiletype);
  232. globaldef('pvmt',pvmttype);
  233. globaldef('variant',cvarianttype);
  234. globaldef('olevariant',colevarianttype);
  235. globaldef('methodpointer',methodpointertype);
  236. {$ifdef i386}
  237. ordpointertype:=u32bittype;
  238. defaultordconsttype:=s32bittype;
  239. {$endif i386}
  240. {$ifdef x86_64}
  241. ordpointertype:=cu64bittype;
  242. defaultordconsttype:=cs64bittype;
  243. {$endif x86_64}
  244. {$ifdef powerpc}
  245. ordpointertype:=u32bittype;
  246. defaultordconsttype:=s32bittype;
  247. {$endif powerpc}
  248. {$ifdef sparc}
  249. ordpointertype:=u32bittype;
  250. defaultordconsttype:=s32bittype;
  251. {$endif sparc}
  252. {$ifdef m68k}
  253. ordpointertype:=u32bittype;
  254. defaultordconsttype:=s32bittype;
  255. {$endif}
  256. {$ifdef arm}
  257. ordpointertype:=u32bittype;
  258. defaultordconsttype:=s32bittype;
  259. {$endif arm}
  260. end;
  261. procedure createconstdefs;
  262. {
  263. Create all default definitions for consts for the system unit
  264. }
  265. var
  266. oldregisterdef : boolean;
  267. begin
  268. { create definitions for constants }
  269. oldregisterdef:=registerdef;
  270. registerdef:=false;
  271. cformaltype.setdef(tformaldef.create);
  272. voidtype.setdef(torddef.create(uvoid,0,0));
  273. u8bittype.setdef(torddef.create(u8bit,0,255));
  274. u16bittype.setdef(torddef.create(u16bit,0,65535));
  275. u32bittype.setdef(torddef.create(u32bit,0,high(longword)));
  276. s32bittype.setdef(torddef.create(s32bit,low(longint),high(longint)));
  277. cu64bittype.setdef(torddef.create(u64bit,low(qword),TConstExprInt(high(qword))));
  278. cs64bittype.setdef(torddef.create(s64bit,low(int64),high(int64)));
  279. booltype.setdef(torddef.create(bool8bit,0,1));
  280. cchartype.setdef(torddef.create(uchar,0,255));
  281. cwidechartype.setdef(torddef.create(uwidechar,0,65535));
  282. cshortstringtype.setdef(tstringdef.createshort(255));
  283. { should we give a length to the default long and ansi string definition ?? }
  284. clongstringtype.setdef(tstringdef.createlong(-1));
  285. cansistringtype.setdef(tstringdef.createansi(-1));
  286. cwidestringtype.setdef(tstringdef.createwide(-1));
  287. { length=0 for shortstring is open string (needed for readln(string) }
  288. openshortstringtype.setdef(tstringdef.createshort(0));
  289. openchararraytype.setdef(tarraydef.create(0,-1,s32bittype));
  290. tarraydef(openchararraytype.def).setelementtype(cchartype);
  291. {$ifdef x86}
  292. {$ifdef i386}
  293. ordpointertype:=u32bittype;
  294. defaultordconsttype:=s32bittype;
  295. {$endif i386}
  296. {$ifdef x86_64}
  297. ordpointertype:=cu64bittype;
  298. defaultordconsttype:=cs64bittype;
  299. {$endif x86_64}
  300. s32floattype.setdef(tfloatdef.create(s32real));
  301. s64floattype.setdef(tfloatdef.create(s64real));
  302. s80floattype.setdef(tfloatdef.create(s80real));
  303. s64currencytype.setdef(tfloatdef.create(s64currency));
  304. {$endif x86}
  305. {$ifdef powerpc}
  306. ordpointertype:=u32bittype;
  307. defaultordconsttype:=s32bittype;
  308. s32floattype.setdef(tfloatdef.create(s32real));
  309. s64floattype.setdef(tfloatdef.create(s64real));
  310. s80floattype.setdef(tfloatdef.create(s80real));
  311. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  312. {$endif powerpc}
  313. {$ifdef sparc}
  314. ordpointertype:=u32bittype;
  315. defaultordconsttype:=s32bittype;
  316. s32floattype.setdef(tfloatdef.create(s32real));
  317. s64floattype.setdef(tfloatdef.create(s64real));
  318. s80floattype.setdef(tfloatdef.create(s80real));
  319. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  320. {$endif sparc}
  321. {$ifdef m68k}
  322. ordpointertype:=u32bittype;
  323. defaultordconsttype:=s32bittype;
  324. s32floattype.setdef(tfloatdef.create(s32real));
  325. s64floattype.setdef(tfloatdef.create(s64real));
  326. s80floattype.setdef(tfloatdef.create(s80real));
  327. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  328. {$endif}
  329. {$ifdef arm}
  330. ordpointertype:=u32bittype;
  331. defaultordconsttype:=s32bittype;
  332. s32floattype.setdef(tfloatdef.create(s32real));
  333. s64floattype.setdef(tfloatdef.create(s64real));
  334. s80floattype.setdef(tfloatdef.create(s80real));
  335. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  336. {$endif arm}
  337. { some other definitions }
  338. voidpointertype.setdef(tpointerdef.create(voidtype));
  339. charpointertype.setdef(tpointerdef.create(cchartype));
  340. voidfarpointertype.setdef(tpointerdef.createfar(voidtype));
  341. cfiletype.setdef(tfiledef.createuntyped);
  342. cvarianttype.setdef(tvariantdef.create(vt_normalvariant));
  343. colevarianttype.setdef(tvariantdef.create(vt_olevariant));
  344. registerdef:=oldregisterdef;
  345. end;
  346. procedure registernodes;
  347. {
  348. Register all possible nodes in the nodeclass array that
  349. will be used for loading the nodes from a ppu
  350. }
  351. begin
  352. nodeclass[addn]:=caddnode;
  353. nodeclass[muln]:=caddnode;
  354. nodeclass[subn]:=caddnode;
  355. nodeclass[divn]:=cmoddivnode;
  356. nodeclass[symdifn]:=caddnode;
  357. nodeclass[modn]:=cmoddivnode;
  358. nodeclass[assignn]:=cassignmentnode;
  359. nodeclass[loadn]:=cloadnode;
  360. nodeclass[rangen]:=crangenode;
  361. nodeclass[ltn]:=caddnode;
  362. nodeclass[lten]:=caddnode;
  363. nodeclass[gtn]:=caddnode;
  364. nodeclass[gten]:=caddnode;
  365. nodeclass[equaln]:=caddnode;
  366. nodeclass[unequaln]:=caddnode;
  367. nodeclass[inn]:=cinnode;
  368. nodeclass[orn]:=caddnode;
  369. nodeclass[xorn]:=caddnode;
  370. nodeclass[shrn]:=cshlshrnode;
  371. nodeclass[shln]:=cshlshrnode;
  372. nodeclass[slashn]:=caddnode;
  373. nodeclass[andn]:=caddnode;
  374. nodeclass[subscriptn]:=csubscriptnode;
  375. nodeclass[derefn]:=cderefnode;
  376. nodeclass[addrn]:=caddrnode;
  377. nodeclass[ordconstn]:=cordconstnode;
  378. nodeclass[typeconvn]:=ctypeconvnode;
  379. nodeclass[calln]:=ccallnode;
  380. nodeclass[callparan]:=ccallparanode;
  381. nodeclass[realconstn]:=crealconstnode;
  382. nodeclass[unaryminusn]:=cunaryminusnode;
  383. nodeclass[asmn]:=casmnode;
  384. nodeclass[vecn]:=cvecnode;
  385. nodeclass[pointerconstn]:=cpointerconstnode;
  386. nodeclass[stringconstn]:=cstringconstnode;
  387. nodeclass[notn]:=cnotnode;
  388. nodeclass[inlinen]:=cinlinenode;
  389. nodeclass[niln]:=cnilnode;
  390. nodeclass[errorn]:=cerrornode;
  391. nodeclass[typen]:=ctypenode;
  392. nodeclass[setelementn]:=csetelementnode;
  393. nodeclass[setconstn]:=csetconstnode;
  394. nodeclass[blockn]:=cblocknode;
  395. nodeclass[statementn]:=cstatementnode;
  396. nodeclass[ifn]:=cifnode;
  397. nodeclass[breakn]:=cbreaknode;
  398. nodeclass[continuen]:=ccontinuenode;
  399. nodeclass[whilerepeatn]:=cwhilerepeatnode;
  400. nodeclass[forn]:=cfornode;
  401. nodeclass[exitn]:=cexitnode;
  402. nodeclass[withn]:=cwithnode;
  403. nodeclass[casen]:=ccasenode;
  404. nodeclass[labeln]:=clabelnode;
  405. nodeclass[goton]:=cgotonode;
  406. nodeclass[tryexceptn]:=ctryexceptnode;
  407. nodeclass[raisen]:=craisenode;
  408. nodeclass[tryfinallyn]:=ctryfinallynode;
  409. nodeclass[onn]:=connode;
  410. nodeclass[isn]:=cisnode;
  411. nodeclass[asn]:=casnode;
  412. nodeclass[caretn]:=caddnode;
  413. nodeclass[starstarn]:=caddnode;
  414. nodeclass[arrayconstructorn]:=carrayconstructornode;
  415. nodeclass[arrayconstructorrangen]:=carrayconstructorrangenode;
  416. nodeclass[tempcreaten]:=ctempcreatenode;
  417. nodeclass[temprefn]:=ctemprefnode;
  418. nodeclass[tempdeleten]:=ctempdeletenode;
  419. nodeclass[addoptn]:=caddnode;
  420. nodeclass[nothingn]:=cnothingnode;
  421. nodeclass[loadvmtaddrn]:=cloadvmtaddrnode;
  422. nodeclass[guidconstn]:=cguidconstnode;
  423. nodeclass[rttin]:=crttinode;
  424. nodeclass[loadparentfpn]:=cloadparentfpnode;
  425. end;
  426. procedure registertais;
  427. {
  428. Register all possible tais in the taiclass array that
  429. will be used for loading the tais from a ppu
  430. }
  431. begin
  432. aiclass[ait_none]:=nil;
  433. aiclass[ait_align]:=tai_align;
  434. aiclass[ait_section]:=tai_section;
  435. aiclass[ait_comment]:=tai_comment;
  436. aiclass[ait_direct]:=tai_direct;
  437. aiclass[ait_string]:=tai_string;
  438. aiclass[ait_instruction]:=taicpu;
  439. aiclass[ait_datablock]:=tai_datablock;
  440. aiclass[ait_symbol]:=tai_symbol;
  441. aiclass[ait_symbol_end]:=tai_symbol_end;
  442. aiclass[ait_label]:=tai_label;
  443. aiclass[ait_const_32bit]:=tai_const;
  444. aiclass[ait_const_16bit]:=tai_const;
  445. aiclass[ait_const_8bit]:=tai_const;
  446. aiclass[ait_const_symbol]:=tai_const_symbol;
  447. aiclass[ait_const_rva]:=tai_const_symbol;
  448. aiclass[ait_real_32bit]:=tai_real_32bit;
  449. aiclass[ait_real_64bit]:=tai_real_64bit;
  450. aiclass[ait_real_80bit]:=tai_real_80bit;
  451. aiclass[ait_comp_64bit]:=tai_comp_64bit;
  452. {$ifdef GDB}
  453. aiclass[ait_stabn]:=tai_stabn;
  454. aiclass[ait_stabs]:=tai_stabs;
  455. aiclass[ait_force_line]:=tai_force_line;
  456. aiclass[ait_stab_function_name]:=tai_stab_function_name;
  457. {$endif GDB}
  458. {$ifdef alpha}
  459. { the follow is for the DEC Alpha }
  460. aiclass[ait_frame]:=tai_frame;
  461. aiclass[ait_ent]:=tai_ent;
  462. {$endif alpha}
  463. {$ifdef m68k}
  464. {$warning FIXME: tai_labeled_instruction doesn't exists}
  465. // aiclass[ait_labeled_instruction]:=tai_labeled_instruction;
  466. {$endif m68k}
  467. {$ifdef ia64}
  468. aiclass[ait_bundle]:=tai_bundle;
  469. aiclass[ait_stop]:=tai_stop;
  470. {$endif ia64}
  471. {$ifdef SPARC}
  472. // aiclass[ait_labeled_instruction]:=tai_labeled_instruction;
  473. {$endif SPARC}
  474. aiclass[ait_cut]:=tai_cut;
  475. aiclass[ait_regalloc]:=tai_regalloc;
  476. aiclass[ait_tempalloc]:=tai_tempalloc;
  477. aiclass[ait_marker]:=tai_marker;
  478. end;
  479. end.
  480. {
  481. $Log$
  482. Revision 1.57 2003-10-06 22:23:41 florian
  483. + added basic olevariant support
  484. Revision 1.56 2003/09/28 17:55:04 peter
  485. * parent framepointer changed to hidden parameter
  486. * tloadparentfpnode added
  487. Revision 1.55 2003/09/23 17:56:06 peter
  488. * locals and paras are allocated in the code generation
  489. * tvarsym.localloc contains the location of para/local when
  490. generating code for the current procedure
  491. Revision 1.54 2003/09/03 11:18:37 florian
  492. * fixed arm concatcopy
  493. + arm support in the common compiler sources added
  494. * moved some generic cg code around
  495. + tfputype added
  496. * ...
  497. Revision 1.53 2003/08/10 17:25:23 peter
  498. * fixed some reported bugs
  499. Revision 1.52 2003/05/26 21:17:18 peter
  500. * procinlinenode removed
  501. * aktexit2label removed, fast exit removed
  502. + tcallnode.inlined_pass_2 added
  503. Revision 1.51 2003/05/25 11:34:17 peter
  504. * methodpointer self pushing fixed
  505. Revision 1.50 2003/05/13 19:14:41 peter
  506. * failn removed
  507. * inherited result code check moven to pexpr
  508. Revision 1.49 2003/05/09 17:47:03 peter
  509. * self moved to hidden parameter
  510. * removed hdisposen,hnewn,selfn
  511. Revision 1.48 2003/05/01 07:59:42 florian
  512. * introduced defaultordconsttype to decribe the default size of ordinal constants
  513. on 64 bit CPUs it's equal to cs64bitdef while on 32 bit CPUs it's equal to s32bitdef
  514. + added defines CPU32 and CPU64 for 32 bit and 64 bit CPUs
  515. * int64s/qwords are allowed as for loop counter on 64 bit CPUs
  516. Revision 1.47 2003/04/25 20:59:34 peter
  517. * removed funcretn,funcretsym, function result is now in varsym
  518. and aliases for result and function name are added using absolutesym
  519. * vs_hidden parameter for funcret passed in parameter
  520. * vs_hidden fixes
  521. * writenode changed to printnode and released from extdebug
  522. * -vp option added to generate a tree.log with the nodetree
  523. * nicer printnode for statements, callnode
  524. Revision 1.46 2003/04/23 21:10:54 peter
  525. * fix compile for ppc,sparc,m68k
  526. Revision 1.45 2003/04/23 20:16:04 peter
  527. + added currency support based on int64
  528. + is_64bit for use in cg units instead of is_64bitint
  529. * removed cgmessage from n386add, replace with internalerrors
  530. Revision 1.44 2002/12/06 16:56:59 peter
  531. * only compile cs_fp_emulation support when cpufpuemu is defined
  532. * define cpufpuemu for m68k only
  533. Revision 1.43 2002/11/30 21:32:26 carl
  534. + Add loading of softfpu in emulation mode
  535. + Correct routine call for softfpu
  536. * Extended type must also be defined even with softfpu
  537. Revision 1.42 2002/10/05 12:43:27 carl
  538. * fixes for Delphi 6 compilation
  539. (warning : Some features do not work under Delphi)
  540. Revision 1.41 2002/10/02 18:20:53 peter
  541. * Copy() is now internal syssym that calls compilerprocs
  542. Revision 1.40 2002/09/27 21:13:29 carl
  543. * low-highval always checked if limit ober 2GB is reached (to avoid overflow)
  544. Revision 1.39 2002/09/07 20:46:10 carl
  545. * cardinal -> longword
  546. Revision 1.38 2002/08/23 13:11:11 mazen
  547. fixed compilation problem related to tai_labeled_instruction
  548. Revision 1.37 2002/08/18 20:06:25 peter
  549. * inlining is now also allowed in interface
  550. * renamed write/load to ppuwrite/ppuload
  551. * tnode storing in ppu
  552. * nld,ncon,nbas are already updated for storing in ppu
  553. Revision 1.36 2002/08/15 19:10:35 peter
  554. * first things tai,tnode storing in ppu
  555. Revision 1.35 2002/08/14 19:14:39 carl
  556. + fpu emulation support (generic and untested)
  557. Revision 1.34 2002/08/13 18:01:52 carl
  558. * rename swatoperands to swapoperands
  559. + m68k first compilable version (still needs a lot of testing):
  560. assembler generator, system information , inline
  561. assembler reader.
  562. Revision 1.33 2002/08/11 15:28:00 florian
  563. + support of explicit type case <any ordinal type>->pointer
  564. (delphi mode only)
  565. Revision 1.32 2002/07/25 17:54:24 carl
  566. + Extended is now CPU dependant (equal to bestrealtype)
  567. Revision 1.30 2002/07/07 09:52:32 florian
  568. * powerpc target fixed, very simple units can be compiled
  569. * some basic stuff for better callparanode handling, far from being finished
  570. Revision 1.29 2002/07/06 20:18:47 carl
  571. + more SPARC patches from Mazen
  572. Revision 1.28 2002/07/04 20:43:02 florian
  573. * first x86-64 patches
  574. Revision 1.27 2002/07/01 16:23:54 peter
  575. * cg64 patch
  576. * basics for currency
  577. * asnode updates for class and interface (not finished)
  578. Revision 1.26 2002/05/18 13:34:16 peter
  579. * readded missing revisions
  580. Revision 1.25 2002/05/16 19:46:44 carl
  581. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  582. + try to fix temp allocation (still in ifdef)
  583. + generic constructor calls
  584. + start of tassembler / tmodulebase class cleanup
  585. Revision 1.23 2002/05/12 16:53:09 peter
  586. * moved entry and exitcode to ncgutil and cgobj
  587. * foreach gets extra argument for passing local data to the
  588. iterator function
  589. * -CR checks also class typecasts at runtime by changing them
  590. into as
  591. * fixed compiler to cycle with the -CR option
  592. * fixed stabs with elf writer, finally the global variables can
  593. be watched
  594. * removed a lot of routines from cga unit and replaced them by
  595. calls to cgobj
  596. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  597. u32bit then the other is typecasted also to u32bit without giving
  598. a rangecheck warning/error.
  599. * fixed pascal calling method with reversing also the high tree in
  600. the parast, detected by tcalcst3 test
  601. Revision 1.22 2002/01/24 12:33:53 jonas
  602. * adapted ranges of native types to int64 (e.g. high cardinal is no
  603. longer longint($ffffffff), but just $fffffff in psystem)
  604. * small additional fix in 64bit rangecheck code generation for 32 bit
  605. processors
  606. * adaption of ranges required the matching talgorithm used for selecting
  607. which overloaded procedure to call to be adapted. It should now always
  608. select the closest match for ordinal parameters.
  609. + inttostr(qword) in sysstr.inc/sysstrh.inc
  610. + abs(int64), sqr(int64), sqr(qword) in systemh.inc/generic.inc (previous
  611. fixes were required to be able to add them)
  612. * is_in_limit() moved from ncal to types unit, should always be used
  613. instead of direct comparisons of low/high values of orddefs because
  614. qword is a special case
  615. }