psystem.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. {
  2. Copyright (c) 1998-2002 by Florian Klaempfl
  3. Load the system unit, create required defs for systemunit
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. unit psystem;
  18. {$i fpcdefs.inc}
  19. interface
  20. uses
  21. symbase;
  22. procedure create_intern_symbols;
  23. procedure create_intern_types;
  24. procedure load_intern_types;
  25. procedure registernodes;
  26. procedure registertais;
  27. implementation
  28. uses
  29. globals,globtype,verbose,
  30. systems,
  31. symconst,symtype,symsym,symdef,symtable,
  32. aasmtai,aasmdata,aasmcpu,
  33. ncgutil,ncgrtti,fmodule,
  34. node,nbas,nflw,nset,ncon,ncnv,nld,nmem,ncal,nmat,nadd,ninl,nopt
  35. ;
  36. procedure create_intern_symbols;
  37. {
  38. all intern procedures for the system unit
  39. }
  40. begin
  41. systemunit.insert(tsyssym.create('Concat',in_concat_x));
  42. systemunit.insert(tsyssym.create('Write',in_write_x));
  43. systemunit.insert(tsyssym.create('WriteLn',in_writeln_x));
  44. systemunit.insert(tsyssym.create('Assigned',in_assigned_x));
  45. systemunit.insert(tsyssym.create('Read',in_read_x));
  46. systemunit.insert(tsyssym.create('ReadLn',in_readln_x));
  47. systemunit.insert(tsyssym.create('Ofs',in_ofs_x));
  48. systemunit.insert(tsyssym.create('SizeOf',in_sizeof_x));
  49. systemunit.insert(tsyssym.create('BitSizeOf',in_bitsizeof_x));
  50. systemunit.insert(tsyssym.create('TypeOf',in_typeof_x));
  51. systemunit.insert(tsyssym.create('Low',in_low_x));
  52. systemunit.insert(tsyssym.create('High',in_high_x));
  53. systemunit.insert(tsyssym.create('Slice',in_slice_x));
  54. systemunit.insert(tsyssym.create('Seg',in_seg_x));
  55. systemunit.insert(tsyssym.create('Ord',in_ord_x));
  56. systemunit.insert(tsyssym.create('Pred',in_pred_x));
  57. systemunit.insert(tsyssym.create('Succ',in_succ_x));
  58. systemunit.insert(tsyssym.create('Exclude',in_exclude_x_y));
  59. systemunit.insert(tsyssym.create('Include',in_include_x_y));
  60. systemunit.insert(tsyssym.create('Pack',in_pack_x_y_z));
  61. systemunit.insert(tsyssym.create('Unpack',in_unpack_x_y_z));
  62. systemunit.insert(tsyssym.create('Break',in_break));
  63. systemunit.insert(tsyssym.create('Exit',in_exit));
  64. systemunit.insert(tsyssym.create('Continue',in_continue));
  65. systemunit.insert(tsyssym.create('Leave',in_leave)); {macpas only}
  66. systemunit.insert(tsyssym.create('Cycle',in_cycle)); {macpas only}
  67. systemunit.insert(tsyssym.create('Dec',in_dec_x));
  68. systemunit.insert(tsyssym.create('Inc',in_inc_x));
  69. systemunit.insert(tsyssym.create('Str',in_str_x_string));
  70. systemunit.insert(tsyssym.create('Assert',in_assert_x_y));
  71. systemunit.insert(tsyssym.create('Val',in_val_x));
  72. systemunit.insert(tsyssym.create('Addr',in_addr_x));
  73. systemunit.insert(tsyssym.create('TypeInfo',in_typeinfo_x));
  74. systemunit.insert(tsyssym.create('SetLength',in_setlength_x));
  75. systemunit.insert(tsyssym.create('Copy',in_copy_x));
  76. systemunit.insert(tsyssym.create('Initialize',in_initialize_x));
  77. systemunit.insert(tsyssym.create('Finalize',in_finalize_x));
  78. systemunit.insert(tsyssym.create('Length',in_length_x));
  79. systemunit.insert(tsyssym.create('New',in_new_x));
  80. systemunit.insert(tsyssym.create('Dispose',in_dispose_x));
  81. {$if defined(x86) or defined(arm)}
  82. systemunit.insert(tsyssym.create('Get_Frame',in_get_frame));
  83. {$endif defined(x86) or defined(arm)}
  84. {$ifdef SUPPORT_UNALIGNED}
  85. systemunit.insert(tsyssym.create('Unaligned',in_unaligned_x));
  86. {$endif SUPPORT_UNALIGNED}
  87. end;
  88. procedure create_intern_types;
  89. {
  90. all the types inserted into the system unit
  91. }
  92. function addtype(const s:string;def:tdef):ttypesym;
  93. begin
  94. result:=ttypesym.create(s,def);
  95. systemunit.insert(result);
  96. end;
  97. var
  98. hrecst : trecordsymtable;
  99. begin
  100. symtablestack.push(systemunit);
  101. cundefinedtype:=tundefineddef.create;
  102. cformaltype:=tformaldef.create;
  103. voidtype:=torddef.create(uvoid,0,0);
  104. u8inttype:=torddef.create(u8bit,0,255);
  105. s8inttype:=torddef.create(s8bit,-128,127);
  106. u16inttype:=torddef.create(u16bit,0,65535);
  107. s16inttype:=torddef.create(s16bit,-32768,32767);
  108. u32inttype:=torddef.create(u32bit,0,high(longword));
  109. s32inttype:=torddef.create(s32bit,low(longint),high(longint));
  110. u64inttype:=torddef.create(u64bit,low(qword),TConstExprInt(high(qword)));
  111. s64inttype:=torddef.create(s64bit,low(int64),high(int64));
  112. booltype:=torddef.create(bool8bit,0,1);
  113. bool16type:=torddef.create(bool16bit,0,1);
  114. bool32type:=torddef.create(bool32bit,0,1);
  115. bool64type:=torddef.create(bool64bit,0,1);
  116. cchartype:=torddef.create(uchar,0,255);
  117. cwidechartype:=torddef.create(uwidechar,0,65535);
  118. cshortstringtype:=tstringdef.createshort(255);
  119. { should we give a length to the default long and ansi string definition ?? }
  120. clongstringtype:=tstringdef.createlong(-1);
  121. cansistringtype:=tstringdef.createansi(-1);
  122. cwidestringtype:=tstringdef.createwide(-1);
  123. { length=0 for shortstring is open string (needed for readln(string) }
  124. openshortstringtype:=tstringdef.createshort(0);
  125. openchararraytype:=tarraydef.create(0,-1,s32inttype);
  126. tarraydef(openchararraytype).elementdef:=cchartype;
  127. {$ifdef x86}
  128. s32floattype:=tfloatdef.create(s32real);
  129. s64floattype:=tfloatdef.create(s64real);
  130. s80floattype:=tfloatdef.create(s80real);
  131. if target_info.system<>system_x86_64_win64 then
  132. s64currencytype:=tfloatdef.create(s64currency)
  133. else
  134. begin
  135. s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
  136. pbestrealtype:=@s64floattype;
  137. end;
  138. {$endif x86}
  139. {$ifdef powerpc}
  140. s32floattype:=tfloatdef.create(s32real);
  141. s64floattype:=tfloatdef.create(s64real);
  142. s80floattype:=tfloatdef.create(s80real);
  143. s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
  144. {$endif powerpc}
  145. {$ifdef POWERPC64}
  146. s32floattype:=tfloatdef.create(s32real);
  147. s64floattype:=tfloatdef.create(s64real);
  148. s80floattype:=tfloatdef.create(s80real);
  149. s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
  150. {$endif POWERPC64}
  151. {$ifdef sparc}
  152. s32floattype:=tfloatdef.create(s32real);
  153. s64floattype:=tfloatdef.create(s64real);
  154. s80floattype:=tfloatdef.create(s80real);
  155. s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
  156. {$endif sparc}
  157. {$ifdef m68k}
  158. s32floattype:=tfloatdef.create(s32real);
  159. s64floattype:=tfloatdef.create(s64real);
  160. s80floattype:=tfloatdef.create(s80real);
  161. s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
  162. {$endif}
  163. {$ifdef arm}
  164. s32floattype:=tfloatdef.create(s32real);
  165. s64floattype:=tfloatdef.create(s64real);
  166. s80floattype:=tfloatdef.create(s80real);
  167. s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
  168. {$endif arm}
  169. {$ifdef cpu64bit}
  170. uinttype:=u64inttype;
  171. sinttype:=s64inttype;
  172. ptrinttype:=u64inttype;
  173. {$else cpu64bit}
  174. uinttype:=u32inttype;
  175. sinttype:=s32inttype;
  176. ptrinttype:=u32inttype;
  177. {$endif cpu64bit}
  178. { some other definitions }
  179. voidpointertype:=tpointerdef.create(voidtype);
  180. charpointertype:=tpointerdef.create(cchartype);
  181. widecharpointertype:=tpointerdef.create(cwidechartype);
  182. voidfarpointertype:=tpointerdef.createfar(voidtype);
  183. cfiletype:=tfiledef.createuntyped;
  184. cvarianttype:=tvariantdef.create(vt_normalvariant);
  185. colevarianttype:=tvariantdef.create(vt_olevariant);
  186. {$ifdef cpufpemu}
  187. { Normal types }
  188. (* we use the same types as without emulator, the only
  189. difference is that direct calls to the emulator are generated
  190. if (cs_fp_emulation in current_settings.moduleswitches) then
  191. begin
  192. addtype('Single',s32floattype);
  193. { extended size is the best real type for the target }
  194. addtype('Real',s32floattype);
  195. pbestrealtype:=@s32floattype;
  196. { extended size is the best real type for the target }
  197. addtype('Extended',pbestrealtype^);
  198. end
  199. else
  200. *)
  201. {$endif cpufpemu}
  202. begin
  203. addtype('Single',s32floattype);
  204. addtype('Double',s64floattype);
  205. { extended size is the best real type for the target }
  206. addtype('Extended',pbestrealtype^);
  207. end;
  208. {$ifdef x86}
  209. if target_info.system<>system_x86_64_win64 then
  210. addtype('Comp',tfloatdef.create(s64comp));
  211. {$endif x86}
  212. addtype('Currency',s64currencytype);
  213. addtype('Pointer',voidpointertype);
  214. {$ifdef x86}
  215. addtype('FarPointer',voidfarpointertype);
  216. {$endif x86}
  217. addtype('ShortString',cshortstringtype);
  218. {$ifdef support_longstring}
  219. addtype('LongString',clongstringtype);
  220. {$endif support_longstring}
  221. addtype('AnsiString',cansistringtype);
  222. addtype('WideString',cwidestringtype);
  223. addtype('OpenString',openshortstringtype);
  224. addtype('Boolean',booltype);
  225. addtype('ByteBool',booltype);
  226. addtype('WordBool',bool16type);
  227. addtype('LongBool',bool32type);
  228. addtype('QWordBool',bool64type);
  229. addtype('Byte',u8inttype);
  230. addtype('ShortInt',s8inttype);
  231. addtype('Word',u16inttype);
  232. addtype('SmallInt',s16inttype);
  233. addtype('LongWord',u32inttype);
  234. addtype('LongInt',s32inttype);
  235. addtype('QWord',u64inttype);
  236. addtype('Int64',s64inttype);
  237. addtype('Char',cchartype);
  238. addtype('WideChar',cwidechartype);
  239. addtype('Text',tfiledef.createtext);
  240. addtype('TypedFile',tfiledef.createtyped(voidtype));
  241. addtype('Variant',cvarianttype);
  242. addtype('OleVariant',colevarianttype);
  243. { Internal types }
  244. addtype('$undefined',cundefinedtype);
  245. addtype('$formal',cformaltype);
  246. addtype('$void',voidtype);
  247. addtype('$byte',u8inttype);
  248. addtype('$shortint',s8inttype);
  249. addtype('$word',u16inttype);
  250. addtype('$smallint',s16inttype);
  251. addtype('$ulong',u32inttype);
  252. addtype('$longint',s32inttype);
  253. addtype('$qword',u64inttype);
  254. addtype('$int64',s64inttype);
  255. addtype('$char',cchartype);
  256. addtype('$widechar',cwidechartype);
  257. addtype('$shortstring',cshortstringtype);
  258. addtype('$longstring',clongstringtype);
  259. addtype('$ansistring',cansistringtype);
  260. addtype('$widestring',cwidestringtype);
  261. addtype('$openshortstring',openshortstringtype);
  262. addtype('$boolean',booltype);
  263. addtype('$boolean16',bool16type);
  264. addtype('$boolean32',bool32type);
  265. addtype('$boolean64',bool64type);
  266. addtype('$void_pointer',voidpointertype);
  267. addtype('$char_pointer',charpointertype);
  268. addtype('$widechar_pointer',widecharpointertype);
  269. addtype('$void_farpointer',voidfarpointertype);
  270. addtype('$openchararray',openchararraytype);
  271. addtype('$file',cfiletype);
  272. addtype('$variant',cvarianttype);
  273. addtype('$olevariant',cvarianttype);
  274. addtype('$s32real',s32floattype);
  275. addtype('$s64real',s64floattype);
  276. addtype('$s80real',s80floattype);
  277. addtype('$s64currency',s64currencytype);
  278. { Add a type for virtual method tables }
  279. hrecst:=trecordsymtable.create(current_settings.packrecords);
  280. vmttype:=trecorddef.create(hrecst);
  281. pvmttype:=tpointerdef.create(vmttype);
  282. { can't use addtype for pvmt because the rtti of the pointed
  283. type is not available. The rtti for pvmt will be written implicitly
  284. by thev tblarray below }
  285. systemunit.insert(ttypesym.create('$pvmt',pvmttype));
  286. hrecst.insertfield(tfieldvarsym.create('$parent',vs_value,pvmttype,[]));
  287. hrecst.insertfield(tfieldvarsym.create('$length',vs_value,s32inttype,[]));
  288. hrecst.insertfield(tfieldvarsym.create('$mlength',vs_value,s32inttype,[]));
  289. vmtarraytype:=tarraydef.create(0,1,s32inttype);
  290. tarraydef(vmtarraytype).elementdef:=voidpointertype;
  291. hrecst.insertfield(tfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[]));
  292. addtype('$__vtbl_ptr_type',vmttype);
  293. vmtarraytype:=tarraydef.create(0,1,s32inttype);
  294. tarraydef(vmtarraytype).elementdef:=pvmttype;
  295. addtype('$vtblarray',vmtarraytype);
  296. { Add a type for methodpointers }
  297. hrecst:=trecordsymtable.create(1);
  298. hrecst.insertfield(tfieldvarsym.create('$proc',vs_value,voidpointertype,[]));
  299. hrecst.insertfield(tfieldvarsym.create('$self',vs_value,voidpointertype,[]));
  300. methodpointertype:=trecorddef.create(hrecst);
  301. addtype('$methodpointer',methodpointertype);
  302. symtablestack.pop(systemunit);
  303. end;
  304. procedure load_intern_types;
  305. {
  306. Load all default definitions for consts from the system unit
  307. }
  308. procedure loadtype(const s:string;var def:tdef);
  309. var
  310. srsym : ttypesym;
  311. begin
  312. srsym:=search_system_type(s);
  313. def:=srsym.typedef;
  314. end;
  315. var
  316. oldcurrentmodule : tmodule;
  317. begin
  318. if target_info.system=system_x86_64_win64 then
  319. pbestrealtype:=@s64floattype;
  320. oldcurrentmodule:=current_module;
  321. current_module:=nil;
  322. loadtype('byte',u8inttype);
  323. loadtype('shortint',s8inttype);
  324. loadtype('word',u16inttype);
  325. loadtype('smallint',s16inttype);
  326. loadtype('ulong',u32inttype);
  327. loadtype('longint',s32inttype);
  328. loadtype('qword',u64inttype);
  329. loadtype('int64',s64inttype);
  330. loadtype('undefined',cundefinedtype);
  331. loadtype('formal',cformaltype);
  332. loadtype('void',voidtype);
  333. loadtype('char',cchartype);
  334. loadtype('widechar',cwidechartype);
  335. loadtype('shortstring',cshortstringtype);
  336. loadtype('longstring',clongstringtype);
  337. loadtype('ansistring',cansistringtype);
  338. loadtype('widestring',cwidestringtype);
  339. loadtype('openshortstring',openshortstringtype);
  340. loadtype('openchararray',openchararraytype);
  341. loadtype('s32real',s32floattype);
  342. loadtype('s64real',s64floattype);
  343. loadtype('s80real',s80floattype);
  344. loadtype('s64currency',s64currencytype);
  345. loadtype('boolean',booltype);
  346. loadtype('boolean16',bool16type);
  347. loadtype('boolean32',bool32type);
  348. loadtype('boolean64',bool64type);
  349. loadtype('void_pointer',voidpointertype);
  350. loadtype('char_pointer',charpointertype);
  351. loadtype('widechar_pointer',widecharpointertype);
  352. loadtype('void_farpointer',voidfarpointertype);
  353. loadtype('file',cfiletype);
  354. loadtype('pvmt',pvmttype);
  355. loadtype('vtblarray',vmtarraytype);
  356. loadtype('__vtbl_ptr_type',vmttype);
  357. loadtype('variant',cvarianttype);
  358. loadtype('olevariant',colevarianttype);
  359. loadtype('methodpointer',methodpointertype);
  360. loadtype('HRESULT',hresultdef);
  361. {$ifdef cpu64bit}
  362. uinttype:=u64inttype;
  363. sinttype:=s64inttype;
  364. ptrinttype:=u64inttype;
  365. {$else cpu64bit}
  366. uinttype:=u32inttype;
  367. sinttype:=s32inttype;
  368. ptrinttype:=u32inttype;
  369. {$endif cpu64bit}
  370. current_module:=oldcurrentmodule;
  371. end;
  372. procedure registernodes;
  373. {
  374. Register all possible nodes in the nodeclass array that
  375. will be used for loading the nodes from a ppu
  376. }
  377. begin
  378. nodeclass[addn]:=caddnode;
  379. nodeclass[muln]:=caddnode;
  380. nodeclass[subn]:=caddnode;
  381. nodeclass[divn]:=cmoddivnode;
  382. nodeclass[symdifn]:=caddnode;
  383. nodeclass[modn]:=cmoddivnode;
  384. nodeclass[assignn]:=cassignmentnode;
  385. nodeclass[loadn]:=cloadnode;
  386. nodeclass[rangen]:=crangenode;
  387. nodeclass[ltn]:=caddnode;
  388. nodeclass[lten]:=caddnode;
  389. nodeclass[gtn]:=caddnode;
  390. nodeclass[gten]:=caddnode;
  391. nodeclass[equaln]:=caddnode;
  392. nodeclass[unequaln]:=caddnode;
  393. nodeclass[inn]:=cinnode;
  394. nodeclass[orn]:=caddnode;
  395. nodeclass[xorn]:=caddnode;
  396. nodeclass[shrn]:=cshlshrnode;
  397. nodeclass[shln]:=cshlshrnode;
  398. nodeclass[slashn]:=caddnode;
  399. nodeclass[andn]:=caddnode;
  400. nodeclass[subscriptn]:=csubscriptnode;
  401. nodeclass[derefn]:=cderefnode;
  402. nodeclass[addrn]:=caddrnode;
  403. nodeclass[ordconstn]:=cordconstnode;
  404. nodeclass[typeconvn]:=ctypeconvnode;
  405. nodeclass[calln]:=ccallnode;
  406. nodeclass[callparan]:=ccallparanode;
  407. nodeclass[realconstn]:=crealconstnode;
  408. nodeclass[unaryminusn]:=cunaryminusnode;
  409. nodeclass[asmn]:=casmnode;
  410. nodeclass[vecn]:=cvecnode;
  411. nodeclass[pointerconstn]:=cpointerconstnode;
  412. nodeclass[stringconstn]:=cstringconstnode;
  413. nodeclass[notn]:=cnotnode;
  414. nodeclass[inlinen]:=cinlinenode;
  415. nodeclass[niln]:=cnilnode;
  416. nodeclass[errorn]:=cerrornode;
  417. nodeclass[typen]:=ctypenode;
  418. nodeclass[setelementn]:=csetelementnode;
  419. nodeclass[setconstn]:=csetconstnode;
  420. nodeclass[blockn]:=cblocknode;
  421. nodeclass[statementn]:=cstatementnode;
  422. nodeclass[ifn]:=cifnode;
  423. nodeclass[breakn]:=cbreaknode;
  424. nodeclass[continuen]:=ccontinuenode;
  425. nodeclass[whilerepeatn]:=cwhilerepeatnode;
  426. nodeclass[forn]:=cfornode;
  427. nodeclass[exitn]:=cexitnode;
  428. nodeclass[withn]:=cwithnode;
  429. nodeclass[casen]:=ccasenode;
  430. nodeclass[labeln]:=clabelnode;
  431. nodeclass[goton]:=cgotonode;
  432. nodeclass[tryexceptn]:=ctryexceptnode;
  433. nodeclass[raisen]:=craisenode;
  434. nodeclass[tryfinallyn]:=ctryfinallynode;
  435. nodeclass[onn]:=connode;
  436. nodeclass[isn]:=cisnode;
  437. nodeclass[asn]:=casnode;
  438. nodeclass[caretn]:=caddnode;
  439. nodeclass[starstarn]:=caddnode;
  440. nodeclass[arrayconstructorn]:=carrayconstructornode;
  441. nodeclass[arrayconstructorrangen]:=carrayconstructorrangenode;
  442. nodeclass[tempcreaten]:=ctempcreatenode;
  443. nodeclass[temprefn]:=ctemprefnode;
  444. nodeclass[tempdeleten]:=ctempdeletenode;
  445. nodeclass[addoptn]:=caddnode;
  446. nodeclass[nothingn]:=cnothingnode;
  447. nodeclass[loadvmtaddrn]:=cloadvmtaddrnode;
  448. nodeclass[guidconstn]:=cguidconstnode;
  449. nodeclass[rttin]:=crttinode;
  450. nodeclass[loadparentfpn]:=cloadparentfpnode;
  451. end;
  452. procedure registertais;
  453. {
  454. Register all possible tais in the taiclass array that
  455. will be used for loading the tais from a ppu
  456. }
  457. begin
  458. aiclass[ait_none]:=nil;
  459. aiclass[ait_align]:=tai_align;
  460. aiclass[ait_section]:=tai_section;
  461. aiclass[ait_comment]:=tai_comment;
  462. aiclass[ait_string]:=tai_string;
  463. aiclass[ait_instruction]:=taicpu;
  464. aiclass[ait_datablock]:=tai_datablock;
  465. aiclass[ait_symbol]:=tai_symbol;
  466. aiclass[ait_symbol_end]:=tai_symbol_end;
  467. aiclass[ait_directive]:=tai_directive;
  468. aiclass[ait_label]:=tai_label;
  469. aiclass[ait_const]:=tai_const;
  470. aiclass[ait_real_32bit]:=tai_real_32bit;
  471. aiclass[ait_real_64bit]:=tai_real_64bit;
  472. aiclass[ait_real_80bit]:=tai_real_80bit;
  473. aiclass[ait_comp_64bit]:=tai_comp_64bit;
  474. aiclass[ait_stab]:=tai_stab;
  475. aiclass[ait_force_line]:=tai_force_line;
  476. aiclass[ait_function_name]:=tai_function_name;
  477. {$ifdef alpha}
  478. { the follow is for the DEC Alpha }
  479. aiclass[ait_frame]:=tai_frame;
  480. aiclass[ait_ent]:=tai_ent;
  481. {$endif alpha}
  482. {$ifdef m68k}
  483. {$warning FIXME: tai_labeled_instruction doesn't exists}
  484. // aiclass[ait_labeled_instruction]:=tai_labeled_instruction;
  485. {$endif m68k}
  486. {$ifdef ia64}
  487. aiclass[ait_bundle]:=tai_bundle;
  488. aiclass[ait_stop]:=tai_stop;
  489. {$endif ia64}
  490. {$ifdef SPARC}
  491. // aiclass[ait_labeled_instruction]:=tai_labeled_instruction;
  492. {$endif SPARC}
  493. aiclass[ait_cutobject]:=tai_cutobject;
  494. aiclass[ait_regalloc]:=tai_regalloc;
  495. aiclass[ait_tempalloc]:=tai_tempalloc;
  496. aiclass[ait_marker]:=tai_marker;
  497. aiclass[ait_file]:=tai_file;
  498. aiclass[ait_loc]:=tai_loc;
  499. end;
  500. end.