psystem.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  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. ptruinttype:=u64inttype;
  173. ptrsinttype:=s64inttype;
  174. {$else cpu64bit}
  175. uinttype:=u32inttype;
  176. sinttype:=s32inttype;
  177. ptruinttype:=u32inttype;
  178. ptrsinttype:=s32inttype;
  179. {$endif cpu64bit}
  180. { some other definitions }
  181. voidpointertype:=tpointerdef.create(voidtype);
  182. charpointertype:=tpointerdef.create(cchartype);
  183. widecharpointertype:=tpointerdef.create(cwidechartype);
  184. voidfarpointertype:=tpointerdef.createfar(voidtype);
  185. cfiletype:=tfiledef.createuntyped;
  186. cvarianttype:=tvariantdef.create(vt_normalvariant);
  187. colevarianttype:=tvariantdef.create(vt_olevariant);
  188. {$ifdef cpufpemu}
  189. { Normal types }
  190. (* we use the same types as without emulator, the only
  191. difference is that direct calls to the emulator are generated
  192. if (cs_fp_emulation in current_settings.moduleswitches) then
  193. begin
  194. addtype('Single',s32floattype);
  195. { extended size is the best real type for the target }
  196. addtype('Real',s32floattype);
  197. pbestrealtype:=@s32floattype;
  198. { extended size is the best real type for the target }
  199. addtype('Extended',pbestrealtype^);
  200. end
  201. else
  202. *)
  203. {$endif cpufpemu}
  204. begin
  205. addtype('Single',s32floattype);
  206. addtype('Double',s64floattype);
  207. { extended size is the best real type for the target }
  208. addtype('Extended',pbestrealtype^);
  209. end;
  210. {$ifdef x86}
  211. if target_info.system<>system_x86_64_win64 then
  212. addtype('Comp',tfloatdef.create(s64comp));
  213. {$endif x86}
  214. addtype('Currency',s64currencytype);
  215. addtype('Pointer',voidpointertype);
  216. {$ifdef x86}
  217. addtype('FarPointer',voidfarpointertype);
  218. {$endif x86}
  219. addtype('ShortString',cshortstringtype);
  220. {$ifdef support_longstring}
  221. addtype('LongString',clongstringtype);
  222. {$endif support_longstring}
  223. addtype('AnsiString',cansistringtype);
  224. addtype('WideString',cwidestringtype);
  225. addtype('OpenString',openshortstringtype);
  226. addtype('Boolean',booltype);
  227. addtype('ByteBool',booltype);
  228. addtype('WordBool',bool16type);
  229. addtype('LongBool',bool32type);
  230. addtype('QWordBool',bool64type);
  231. addtype('Byte',u8inttype);
  232. addtype('ShortInt',s8inttype);
  233. addtype('Word',u16inttype);
  234. addtype('SmallInt',s16inttype);
  235. addtype('LongWord',u32inttype);
  236. addtype('LongInt',s32inttype);
  237. addtype('QWord',u64inttype);
  238. addtype('Int64',s64inttype);
  239. addtype('Char',cchartype);
  240. addtype('WideChar',cwidechartype);
  241. addtype('Text',tfiledef.createtext);
  242. addtype('TypedFile',tfiledef.createtyped(voidtype));
  243. addtype('Variant',cvarianttype);
  244. addtype('OleVariant',colevarianttype);
  245. { Internal types }
  246. addtype('$undefined',cundefinedtype);
  247. addtype('$formal',cformaltype);
  248. addtype('$void',voidtype);
  249. addtype('$byte',u8inttype);
  250. addtype('$shortint',s8inttype);
  251. addtype('$word',u16inttype);
  252. addtype('$smallint',s16inttype);
  253. addtype('$ulong',u32inttype);
  254. addtype('$longint',s32inttype);
  255. addtype('$qword',u64inttype);
  256. addtype('$int64',s64inttype);
  257. addtype('$char',cchartype);
  258. addtype('$widechar',cwidechartype);
  259. addtype('$shortstring',cshortstringtype);
  260. addtype('$longstring',clongstringtype);
  261. addtype('$ansistring',cansistringtype);
  262. addtype('$widestring',cwidestringtype);
  263. addtype('$openshortstring',openshortstringtype);
  264. addtype('$boolean',booltype);
  265. addtype('$boolean16',bool16type);
  266. addtype('$boolean32',bool32type);
  267. addtype('$boolean64',bool64type);
  268. addtype('$void_pointer',voidpointertype);
  269. addtype('$char_pointer',charpointertype);
  270. addtype('$widechar_pointer',widecharpointertype);
  271. addtype('$void_farpointer',voidfarpointertype);
  272. addtype('$openchararray',openchararraytype);
  273. addtype('$file',cfiletype);
  274. addtype('$variant',cvarianttype);
  275. addtype('$olevariant',cvarianttype);
  276. addtype('$s32real',s32floattype);
  277. addtype('$s64real',s64floattype);
  278. addtype('$s80real',s80floattype);
  279. addtype('$s64currency',s64currencytype);
  280. { Add a type for virtual method tables }
  281. hrecst:=trecordsymtable.create(current_settings.packrecords);
  282. vmttype:=trecorddef.create(hrecst);
  283. pvmttype:=tpointerdef.create(vmttype);
  284. { can't use addtype for pvmt because the rtti of the pointed
  285. type is not available. The rtti for pvmt will be written implicitly
  286. by thev tblarray below }
  287. systemunit.insert(ttypesym.create('$pvmt',pvmttype));
  288. hrecst.insertfield(tfieldvarsym.create('$parent',vs_value,pvmttype,[]));
  289. hrecst.insertfield(tfieldvarsym.create('$length',vs_value,s32inttype,[]));
  290. hrecst.insertfield(tfieldvarsym.create('$mlength',vs_value,s32inttype,[]));
  291. vmtarraytype:=tarraydef.create(0,1,s32inttype);
  292. tarraydef(vmtarraytype).elementdef:=voidpointertype;
  293. hrecst.insertfield(tfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[]));
  294. addtype('$__vtbl_ptr_type',vmttype);
  295. vmtarraytype:=tarraydef.create(0,1,s32inttype);
  296. tarraydef(vmtarraytype).elementdef:=pvmttype;
  297. addtype('$vtblarray',vmtarraytype);
  298. { Add a type for methodpointers }
  299. hrecst:=trecordsymtable.create(1);
  300. hrecst.insertfield(tfieldvarsym.create('$proc',vs_value,voidpointertype,[]));
  301. hrecst.insertfield(tfieldvarsym.create('$self',vs_value,voidpointertype,[]));
  302. methodpointertype:=trecorddef.create(hrecst);
  303. addtype('$methodpointer',methodpointertype);
  304. symtablestack.pop(systemunit);
  305. end;
  306. procedure load_intern_types;
  307. {
  308. Load all default definitions for consts from the system unit
  309. }
  310. procedure loadtype(const s:string;var def:tdef);
  311. var
  312. srsym : ttypesym;
  313. begin
  314. srsym:=search_system_type(s);
  315. def:=srsym.typedef;
  316. end;
  317. var
  318. oldcurrentmodule : tmodule;
  319. begin
  320. if target_info.system=system_x86_64_win64 then
  321. pbestrealtype:=@s64floattype;
  322. oldcurrentmodule:=current_module;
  323. current_module:=nil;
  324. loadtype('byte',u8inttype);
  325. loadtype('shortint',s8inttype);
  326. loadtype('word',u16inttype);
  327. loadtype('smallint',s16inttype);
  328. loadtype('ulong',u32inttype);
  329. loadtype('longint',s32inttype);
  330. loadtype('qword',u64inttype);
  331. loadtype('int64',s64inttype);
  332. loadtype('undefined',cundefinedtype);
  333. loadtype('formal',cformaltype);
  334. loadtype('void',voidtype);
  335. loadtype('char',cchartype);
  336. loadtype('widechar',cwidechartype);
  337. loadtype('shortstring',cshortstringtype);
  338. loadtype('longstring',clongstringtype);
  339. loadtype('ansistring',cansistringtype);
  340. loadtype('widestring',cwidestringtype);
  341. loadtype('openshortstring',openshortstringtype);
  342. loadtype('openchararray',openchararraytype);
  343. loadtype('s32real',s32floattype);
  344. loadtype('s64real',s64floattype);
  345. loadtype('s80real',s80floattype);
  346. loadtype('s64currency',s64currencytype);
  347. loadtype('boolean',booltype);
  348. loadtype('boolean16',bool16type);
  349. loadtype('boolean32',bool32type);
  350. loadtype('boolean64',bool64type);
  351. loadtype('void_pointer',voidpointertype);
  352. loadtype('char_pointer',charpointertype);
  353. loadtype('widechar_pointer',widecharpointertype);
  354. loadtype('void_farpointer',voidfarpointertype);
  355. loadtype('file',cfiletype);
  356. loadtype('pvmt',pvmttype);
  357. loadtype('vtblarray',vmtarraytype);
  358. loadtype('__vtbl_ptr_type',vmttype);
  359. loadtype('variant',cvarianttype);
  360. loadtype('olevariant',colevarianttype);
  361. loadtype('methodpointer',methodpointertype);
  362. loadtype('HRESULT',hresultdef);
  363. {$ifdef cpu64bit}
  364. uinttype:=u64inttype;
  365. sinttype:=s64inttype;
  366. ptruinttype:=u64inttype;
  367. ptrsinttype:=s64inttype;
  368. {$else cpu64bit}
  369. uinttype:=u32inttype;
  370. sinttype:=s32inttype;
  371. ptruinttype:=u32inttype;
  372. ptrsinttype:=s32inttype;
  373. {$endif cpu64bit}
  374. current_module:=oldcurrentmodule;
  375. end;
  376. procedure registernodes;
  377. {
  378. Register all possible nodes in the nodeclass array that
  379. will be used for loading the nodes from a ppu
  380. }
  381. begin
  382. nodeclass[addn]:=caddnode;
  383. nodeclass[muln]:=caddnode;
  384. nodeclass[subn]:=caddnode;
  385. nodeclass[divn]:=cmoddivnode;
  386. nodeclass[symdifn]:=caddnode;
  387. nodeclass[modn]:=cmoddivnode;
  388. nodeclass[assignn]:=cassignmentnode;
  389. nodeclass[loadn]:=cloadnode;
  390. nodeclass[rangen]:=crangenode;
  391. nodeclass[ltn]:=caddnode;
  392. nodeclass[lten]:=caddnode;
  393. nodeclass[gtn]:=caddnode;
  394. nodeclass[gten]:=caddnode;
  395. nodeclass[equaln]:=caddnode;
  396. nodeclass[unequaln]:=caddnode;
  397. nodeclass[inn]:=cinnode;
  398. nodeclass[orn]:=caddnode;
  399. nodeclass[xorn]:=caddnode;
  400. nodeclass[shrn]:=cshlshrnode;
  401. nodeclass[shln]:=cshlshrnode;
  402. nodeclass[slashn]:=caddnode;
  403. nodeclass[andn]:=caddnode;
  404. nodeclass[subscriptn]:=csubscriptnode;
  405. nodeclass[derefn]:=cderefnode;
  406. nodeclass[addrn]:=caddrnode;
  407. nodeclass[ordconstn]:=cordconstnode;
  408. nodeclass[typeconvn]:=ctypeconvnode;
  409. nodeclass[calln]:=ccallnode;
  410. nodeclass[callparan]:=ccallparanode;
  411. nodeclass[realconstn]:=crealconstnode;
  412. nodeclass[unaryminusn]:=cunaryminusnode;
  413. nodeclass[asmn]:=casmnode;
  414. nodeclass[vecn]:=cvecnode;
  415. nodeclass[pointerconstn]:=cpointerconstnode;
  416. nodeclass[stringconstn]:=cstringconstnode;
  417. nodeclass[notn]:=cnotnode;
  418. nodeclass[inlinen]:=cinlinenode;
  419. nodeclass[niln]:=cnilnode;
  420. nodeclass[errorn]:=cerrornode;
  421. nodeclass[typen]:=ctypenode;
  422. nodeclass[setelementn]:=csetelementnode;
  423. nodeclass[setconstn]:=csetconstnode;
  424. nodeclass[blockn]:=cblocknode;
  425. nodeclass[statementn]:=cstatementnode;
  426. nodeclass[ifn]:=cifnode;
  427. nodeclass[breakn]:=cbreaknode;
  428. nodeclass[continuen]:=ccontinuenode;
  429. nodeclass[whilerepeatn]:=cwhilerepeatnode;
  430. nodeclass[forn]:=cfornode;
  431. nodeclass[exitn]:=cexitnode;
  432. nodeclass[withn]:=cwithnode;
  433. nodeclass[casen]:=ccasenode;
  434. nodeclass[labeln]:=clabelnode;
  435. nodeclass[goton]:=cgotonode;
  436. nodeclass[tryexceptn]:=ctryexceptnode;
  437. nodeclass[raisen]:=craisenode;
  438. nodeclass[tryfinallyn]:=ctryfinallynode;
  439. nodeclass[onn]:=connode;
  440. nodeclass[isn]:=cisnode;
  441. nodeclass[asn]:=casnode;
  442. nodeclass[starstarn]:=caddnode;
  443. nodeclass[arrayconstructorn]:=carrayconstructornode;
  444. nodeclass[arrayconstructorrangen]:=carrayconstructorrangenode;
  445. nodeclass[tempcreaten]:=ctempcreatenode;
  446. nodeclass[temprefn]:=ctemprefnode;
  447. nodeclass[tempdeleten]:=ctempdeletenode;
  448. nodeclass[addoptn]:=caddnode;
  449. nodeclass[nothingn]:=cnothingnode;
  450. nodeclass[loadvmtaddrn]:=cloadvmtaddrnode;
  451. nodeclass[guidconstn]:=cguidconstnode;
  452. nodeclass[rttin]:=crttinode;
  453. nodeclass[loadparentfpn]:=cloadparentfpnode;
  454. end;
  455. procedure registertais;
  456. {
  457. Register all possible tais in the taiclass array that
  458. will be used for loading the tais from a ppu
  459. }
  460. begin
  461. aiclass[ait_none]:=nil;
  462. aiclass[ait_align]:=tai_align;
  463. aiclass[ait_section]:=tai_section;
  464. aiclass[ait_comment]:=tai_comment;
  465. aiclass[ait_string]:=tai_string;
  466. aiclass[ait_instruction]:=taicpu;
  467. aiclass[ait_datablock]:=tai_datablock;
  468. aiclass[ait_symbol]:=tai_symbol;
  469. aiclass[ait_symbol_end]:=tai_symbol_end;
  470. aiclass[ait_directive]:=tai_directive;
  471. aiclass[ait_label]:=tai_label;
  472. aiclass[ait_const]:=tai_const;
  473. aiclass[ait_real_32bit]:=tai_real_32bit;
  474. aiclass[ait_real_64bit]:=tai_real_64bit;
  475. aiclass[ait_real_80bit]:=tai_real_80bit;
  476. aiclass[ait_comp_64bit]:=tai_comp_64bit;
  477. aiclass[ait_stab]:=tai_stab;
  478. aiclass[ait_force_line]:=tai_force_line;
  479. aiclass[ait_function_name]:=tai_function_name;
  480. {$ifdef alpha}
  481. { the follow is for the DEC Alpha }
  482. aiclass[ait_frame]:=tai_frame;
  483. aiclass[ait_ent]:=tai_ent;
  484. {$endif alpha}
  485. {$ifdef m68k}
  486. {$warning FIXME: tai_labeled_instruction doesn't exists}
  487. // aiclass[ait_labeled_instruction]:=tai_labeled_instruction;
  488. {$endif m68k}
  489. {$ifdef ia64}
  490. aiclass[ait_bundle]:=tai_bundle;
  491. aiclass[ait_stop]:=tai_stop;
  492. {$endif ia64}
  493. {$ifdef SPARC}
  494. // aiclass[ait_labeled_instruction]:=tai_labeled_instruction;
  495. {$endif SPARC}
  496. aiclass[ait_cutobject]:=tai_cutobject;
  497. aiclass[ait_regalloc]:=tai_regalloc;
  498. aiclass[ait_tempalloc]:=tai_tempalloc;
  499. aiclass[ait_marker]:=tai_marker;
  500. aiclass[ait_file]:=tai_file;
  501. aiclass[ait_loc]:=tai_loc;
  502. end;
  503. end.