psystem.pas 21 KB

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