psystem.pas 21 KB

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