psystem.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  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. { we use the same types as without emulator, the only
  108. difference is that direct calls to the emulator are generated
  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. }
  120. {$endif cpufpemu}
  121. begin
  122. addtype('Single',s32floattype);
  123. addtype('Double',s64floattype);
  124. { extended size is the best real type for the target }
  125. addtype('Extended',pbestrealtype^);
  126. addtype('Real',s64floattype);
  127. end;
  128. {$ifdef x86}
  129. if target_info.system<>system_x86_64_win64 then
  130. adddef('Comp',tfloatdef.create(s64comp));
  131. {$endif x86}
  132. addtype('Currency',s64currencytype);
  133. addtype('Pointer',voidpointertype);
  134. {$ifdef x86}
  135. addtype('FarPointer',voidfarpointertype);
  136. {$endif x86}
  137. addtype('ShortString',cshortstringtype);
  138. {$ifdef support_longstring}
  139. addtype('LongString',clongstringtype);
  140. {$endif support_longstring}
  141. {$ifdef ansistring_bits}
  142. addtype('AnsiString',cansistringtype16);
  143. addtype('AnsiString',cansistringtype32);
  144. addtype('AnsiString',cansistringtype64);
  145. {$else}
  146. addtype('AnsiString',cansistringtype);
  147. {$endif}
  148. addtype('WideString',cwidestringtype);
  149. addtype('Boolean',booltype);
  150. addtype('ByteBool',booltype);
  151. adddef('WordBool',torddef.create(bool16bit,0,1));
  152. adddef('LongBool',torddef.create(bool32bit,0,1));
  153. addtype('Byte',u8inttype);
  154. addtype('ShortInt',s8inttype);
  155. addtype('Word',u16inttype);
  156. addtype('SmallInt',s16inttype);
  157. addtype('LongWord',u32inttype);
  158. addtype('LongInt',s32inttype);
  159. addtype('QWord',u64inttype);
  160. addtype('Int64',s64inttype);
  161. addtype('Char',cchartype);
  162. addtype('WideChar',cwidechartype);
  163. adddef('Text',tfiledef.createtext);
  164. adddef('TypedFile',tfiledef.createtyped(voidtype));
  165. addtype('Variant',cvarianttype);
  166. addtype('OleVariant',colevarianttype);
  167. { Internal types }
  168. addtype('$formal',cformaltype);
  169. addtype('$void',voidtype);
  170. addtype('$byte',u8inttype);
  171. addtype('$shortint',s8inttype);
  172. addtype('$word',u16inttype);
  173. addtype('$smallint',s16inttype);
  174. addtype('$ulong',u32inttype);
  175. addtype('$longint',s32inttype);
  176. addtype('$qword',u64inttype);
  177. addtype('$int64',s64inttype);
  178. addtype('$char',cchartype);
  179. addtype('$widechar',cwidechartype);
  180. addtype('$shortstring',cshortstringtype);
  181. addtype('$longstring',clongstringtype);
  182. {$ifdef ansistring_bits}
  183. addtype('$ansistring16',cansistringtype16);
  184. addtype('$ansistring32',cansistringtype32);
  185. addtype('$ansistring64',cansistringtype64);
  186. {$else}
  187. addtype('$ansistring',cansistringtype);
  188. {$endif}
  189. addtype('$widestring',cwidestringtype);
  190. addtype('$openshortstring',openshortstringtype);
  191. addtype('$boolean',booltype);
  192. addtype('$void_pointer',voidpointertype);
  193. addtype('$char_pointer',charpointertype);
  194. addtype('$widechar_pointer',widecharpointertype);
  195. addtype('$void_farpointer',voidfarpointertype);
  196. addtype('$openchararray',openchararraytype);
  197. addtype('$file',cfiletype);
  198. addtype('$variant',cvarianttype);
  199. addtype('$olevariant',cvarianttype);
  200. addtype('$s32real',s32floattype);
  201. addtype('$s64real',s64floattype);
  202. addtype('$s80real',s80floattype);
  203. addtype('$s64currency',s64currencytype);
  204. { Add a type for virtual method tables }
  205. hrecst:=trecordsymtable.create(aktpackrecords);
  206. vmttype.setdef(trecorddef.create(hrecst));
  207. pvmttype.setdef(tpointerdef.create(vmttype));
  208. hrecst.insertfield(tfieldvarsym.create('$parent',vs_value,pvmttype,[]),true);
  209. hrecst.insertfield(tfieldvarsym.create('$length',vs_value,s32inttype,[]),true);
  210. hrecst.insertfield(tfieldvarsym.create('$mlength',vs_value,s32inttype,[]),true);
  211. vmtarraytype.setdef(tarraydef.create(0,1,s32inttype));
  212. tarraydef(vmtarraytype.def).setelementtype(voidpointertype);
  213. hrecst.insertfield(tfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[]),true);
  214. addtype('$__vtbl_ptr_type',vmttype);
  215. addtype('$pvmt',pvmttype);
  216. vmtarraytype.setdef(tarraydef.create(0,1,s32inttype));
  217. tarraydef(vmtarraytype.def).setelementtype(pvmttype);
  218. addtype('$vtblarray',vmtarraytype);
  219. { Add a type for methodpointers }
  220. hrecst:=trecordsymtable.create(1);
  221. hrecst.insertfield(tfieldvarsym.create('$proc',vs_value,voidpointertype,[]),true);
  222. hrecst.insertfield(tfieldvarsym.create('$self',vs_value,voidpointertype,[]),true);
  223. methodpointertype.setdef(trecorddef.create(hrecst));
  224. addtype('$methodpointer',methodpointertype);
  225. { Add functions that require compiler magic }
  226. insertinternsyms(p);
  227. end;
  228. procedure readconstdefs;
  229. {
  230. Load all default definitions for consts from the system unit
  231. }
  232. procedure loadtype(const s:string;var t:ttype);
  233. var
  234. srsym : tsym;
  235. begin
  236. srsym:=searchsymonlyin(systemunit,s);
  237. if not(assigned(srsym) and
  238. (srsym.typ=typesym)) then
  239. internalerror(200403231);
  240. t:=ttypesym(srsym).restype;
  241. end;
  242. var
  243. oldcurrentmodule : tmodule;
  244. begin
  245. oldcurrentmodule:=current_module;
  246. current_module:=nil;
  247. loadtype('byte',u8inttype);
  248. loadtype('shortint',s8inttype);
  249. loadtype('word',u16inttype);
  250. loadtype('smallint',s16inttype);
  251. loadtype('ulong',u32inttype);
  252. loadtype('longint',s32inttype);
  253. loadtype('qword',u64inttype);
  254. loadtype('int64',s64inttype);
  255. loadtype('formal',cformaltype);
  256. loadtype('void',voidtype);
  257. loadtype('char',cchartype);
  258. loadtype('widechar',cwidechartype);
  259. loadtype('shortstring',cshortstringtype);
  260. loadtype('longstring',clongstringtype);
  261. {$ifdef ansistring_bits}
  262. loadtype('ansistring16',cansistringtype16);
  263. loadtype('ansistring32',cansistringtype32);
  264. loadtype('ansistring64',cansistringtype64);
  265. {$else}
  266. loadtype('ansistring',cansistringtype);
  267. {$endif}
  268. loadtype('widestring',cwidestringtype);
  269. loadtype('openshortstring',openshortstringtype);
  270. loadtype('openchararray',openchararraytype);
  271. loadtype('s32real',s32floattype);
  272. loadtype('s64real',s64floattype);
  273. loadtype('s80real',s80floattype);
  274. loadtype('s64currency',s64currencytype);
  275. loadtype('boolean',booltype);
  276. loadtype('void_pointer',voidpointertype);
  277. loadtype('char_pointer',charpointertype);
  278. loadtype('widechar_pointer',widecharpointertype);
  279. loadtype('void_farpointer',voidfarpointertype);
  280. loadtype('file',cfiletype);
  281. loadtype('pvmt',pvmttype);
  282. loadtype('vtblarray',vmtarraytype);
  283. loadtype('__vtbl_ptr_type',vmttype);
  284. loadtype('variant',cvarianttype);
  285. loadtype('olevariant',colevarianttype);
  286. loadtype('methodpointer',methodpointertype);
  287. {$ifdef cpu64bit}
  288. uinttype:=u64inttype;
  289. sinttype:=s64inttype;
  290. ptrinttype:=u64inttype;
  291. {$else cpu64bit}
  292. uinttype:=u32inttype;
  293. sinttype:=s32inttype;
  294. ptrinttype:=u32inttype;
  295. {$endif cpu64bit}
  296. current_module:=oldcurrentmodule;
  297. end;
  298. procedure createconstdefs;
  299. {
  300. Create all default definitions for consts for the system unit
  301. }
  302. var
  303. oldregisterdef : boolean;
  304. begin
  305. { create definitions for constants }
  306. oldregisterdef:=registerdef;
  307. registerdef:=false;
  308. cformaltype.setdef(tformaldef.create);
  309. voidtype.setdef(torddef.create(uvoid,0,0));
  310. u8inttype.setdef(torddef.create(u8bit,0,255));
  311. s8inttype.setdef(torddef.create(s8bit,-128,127));
  312. u16inttype.setdef(torddef.create(u16bit,0,65535));
  313. s16inttype.setdef(torddef.create(s16bit,-32768,32767));
  314. u32inttype.setdef(torddef.create(u32bit,0,high(longword)));
  315. s32inttype.setdef(torddef.create(s32bit,low(longint),high(longint)));
  316. u64inttype.setdef(torddef.create(u64bit,low(qword),TConstExprInt(high(qword))));
  317. s64inttype.setdef(torddef.create(s64bit,low(int64),high(int64)));
  318. booltype.setdef(torddef.create(bool8bit,0,1));
  319. cchartype.setdef(torddef.create(uchar,0,255));
  320. cwidechartype.setdef(torddef.create(uwidechar,0,65535));
  321. cshortstringtype.setdef(tstringdef.createshort(255));
  322. { should we give a length to the default long and ansi string definition ?? }
  323. clongstringtype.setdef(tstringdef.createlong(-1));
  324. {$ifdef ansistring_bits}
  325. cansistringtype16.setdef(tstringdef.createansi(-1,sb_16));
  326. cansistringtype32.setdef(tstringdef.createansi(-1,sb_32));
  327. cansistringtype64.setdef(tstringdef.createansi(-1,sb_64));
  328. {$else}
  329. cansistringtype.setdef(tstringdef.createansi(-1));
  330. {$endif}
  331. cwidestringtype.setdef(tstringdef.createwide(-1));
  332. { length=0 for shortstring is open string (needed for readln(string) }
  333. openshortstringtype.setdef(tstringdef.createshort(0));
  334. openchararraytype.setdef(tarraydef.create(0,-1,s32inttype));
  335. tarraydef(openchararraytype.def).setelementtype(cchartype);
  336. {$ifdef x86}
  337. s32floattype.setdef(tfloatdef.create(s32real));
  338. s64floattype.setdef(tfloatdef.create(s64real));
  339. s80floattype.setdef(tfloatdef.create(s80real));
  340. if target_info.system<>system_x86_64_win64 then
  341. s64currencytype.setdef(tfloatdef.create(s64currency))
  342. else
  343. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  344. {$endif x86}
  345. {$ifdef powerpc}
  346. s32floattype.setdef(tfloatdef.create(s32real));
  347. s64floattype.setdef(tfloatdef.create(s64real));
  348. s80floattype.setdef(tfloatdef.create(s80real));
  349. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  350. {$endif powerpc}
  351. {$ifdef sparc}
  352. s32floattype.setdef(tfloatdef.create(s32real));
  353. s64floattype.setdef(tfloatdef.create(s64real));
  354. s80floattype.setdef(tfloatdef.create(s80real));
  355. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  356. {$endif sparc}
  357. {$ifdef m68k}
  358. s32floattype.setdef(tfloatdef.create(s32real));
  359. s64floattype.setdef(tfloatdef.create(s64real));
  360. s80floattype.setdef(tfloatdef.create(s80real));
  361. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  362. {$endif}
  363. {$ifdef arm}
  364. s32floattype.setdef(tfloatdef.create(s32real));
  365. s64floattype.setdef(tfloatdef.create(s64real));
  366. s80floattype.setdef(tfloatdef.create(s80real));
  367. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  368. {$endif arm}
  369. {$ifdef cpu64bit}
  370. uinttype:=u64inttype;
  371. sinttype:=s64inttype;
  372. ptrinttype:=u64inttype;
  373. {$else cpu64bit}
  374. uinttype:=u32inttype;
  375. sinttype:=s32inttype;
  376. ptrinttype:=u32inttype;
  377. {$endif cpu64bit}
  378. { some other definitions }
  379. voidpointertype.setdef(tpointerdef.create(voidtype));
  380. charpointertype.setdef(tpointerdef.create(cchartype));
  381. widecharpointertype.setdef(tpointerdef.create(cwidechartype));
  382. voidfarpointertype.setdef(tpointerdef.createfar(voidtype));
  383. cfiletype.setdef(tfiledef.createuntyped);
  384. cvarianttype.setdef(tvariantdef.create(vt_normalvariant));
  385. colevarianttype.setdef(tvariantdef.create(vt_olevariant));
  386. registerdef:=oldregisterdef;
  387. end;
  388. procedure registernodes;
  389. {
  390. Register all possible nodes in the nodeclass array that
  391. will be used for loading the nodes from a ppu
  392. }
  393. begin
  394. nodeclass[addn]:=caddnode;
  395. nodeclass[muln]:=caddnode;
  396. nodeclass[subn]:=caddnode;
  397. nodeclass[divn]:=cmoddivnode;
  398. nodeclass[symdifn]:=caddnode;
  399. nodeclass[modn]:=cmoddivnode;
  400. nodeclass[assignn]:=cassignmentnode;
  401. nodeclass[loadn]:=cloadnode;
  402. nodeclass[rangen]:=crangenode;
  403. nodeclass[ltn]:=caddnode;
  404. nodeclass[lten]:=caddnode;
  405. nodeclass[gtn]:=caddnode;
  406. nodeclass[gten]:=caddnode;
  407. nodeclass[equaln]:=caddnode;
  408. nodeclass[unequaln]:=caddnode;
  409. nodeclass[inn]:=cinnode;
  410. nodeclass[orn]:=caddnode;
  411. nodeclass[xorn]:=caddnode;
  412. nodeclass[shrn]:=cshlshrnode;
  413. nodeclass[shln]:=cshlshrnode;
  414. nodeclass[slashn]:=caddnode;
  415. nodeclass[andn]:=caddnode;
  416. nodeclass[subscriptn]:=csubscriptnode;
  417. nodeclass[derefn]:=cderefnode;
  418. nodeclass[addrn]:=caddrnode;
  419. nodeclass[ordconstn]:=cordconstnode;
  420. nodeclass[typeconvn]:=ctypeconvnode;
  421. nodeclass[calln]:=ccallnode;
  422. nodeclass[callparan]:=ccallparanode;
  423. nodeclass[realconstn]:=crealconstnode;
  424. nodeclass[unaryminusn]:=cunaryminusnode;
  425. nodeclass[asmn]:=casmnode;
  426. nodeclass[vecn]:=cvecnode;
  427. nodeclass[pointerconstn]:=cpointerconstnode;
  428. nodeclass[stringconstn]:=cstringconstnode;
  429. nodeclass[notn]:=cnotnode;
  430. nodeclass[inlinen]:=cinlinenode;
  431. nodeclass[niln]:=cnilnode;
  432. nodeclass[errorn]:=cerrornode;
  433. nodeclass[typen]:=ctypenode;
  434. nodeclass[setelementn]:=csetelementnode;
  435. nodeclass[setconstn]:=csetconstnode;
  436. nodeclass[blockn]:=cblocknode;
  437. nodeclass[statementn]:=cstatementnode;
  438. nodeclass[ifn]:=cifnode;
  439. nodeclass[breakn]:=cbreaknode;
  440. nodeclass[continuen]:=ccontinuenode;
  441. nodeclass[whilerepeatn]:=cwhilerepeatnode;
  442. nodeclass[forn]:=cfornode;
  443. nodeclass[exitn]:=cexitnode;
  444. nodeclass[withn]:=cwithnode;
  445. nodeclass[casen]:=ccasenode;
  446. nodeclass[labeln]:=clabelnode;
  447. nodeclass[goton]:=cgotonode;
  448. nodeclass[tryexceptn]:=ctryexceptnode;
  449. nodeclass[raisen]:=craisenode;
  450. nodeclass[tryfinallyn]:=ctryfinallynode;
  451. nodeclass[onn]:=connode;
  452. nodeclass[isn]:=cisnode;
  453. nodeclass[asn]:=casnode;
  454. nodeclass[caretn]:=caddnode;
  455. nodeclass[starstarn]:=caddnode;
  456. nodeclass[arrayconstructorn]:=carrayconstructornode;
  457. nodeclass[arrayconstructorrangen]:=carrayconstructorrangenode;
  458. nodeclass[tempcreaten]:=ctempcreatenode;
  459. nodeclass[temprefn]:=ctemprefnode;
  460. nodeclass[tempdeleten]:=ctempdeletenode;
  461. nodeclass[addoptn]:=caddnode;
  462. nodeclass[nothingn]:=cnothingnode;
  463. nodeclass[loadvmtaddrn]:=cloadvmtaddrnode;
  464. nodeclass[guidconstn]:=cguidconstnode;
  465. nodeclass[rttin]:=crttinode;
  466. nodeclass[loadparentfpn]:=cloadparentfpnode;
  467. end;
  468. procedure registertais;
  469. {
  470. Register all possible tais in the taiclass array that
  471. will be used for loading the tais from a ppu
  472. }
  473. begin
  474. aiclass[ait_none]:=nil;
  475. aiclass[ait_align]:=tai_align;
  476. aiclass[ait_section]:=tai_section;
  477. aiclass[ait_comment]:=tai_comment;
  478. aiclass[ait_direct]:=tai_direct;
  479. aiclass[ait_string]:=tai_string;
  480. aiclass[ait_instruction]:=taicpu;
  481. aiclass[ait_datablock]:=tai_datablock;
  482. aiclass[ait_symbol]:=tai_symbol;
  483. aiclass[ait_symbol_end]:=tai_symbol_end;
  484. aiclass[ait_label]:=tai_label;
  485. aiclass[ait_const_64bit]:=tai_const;
  486. aiclass[ait_const_32bit]:=tai_const;
  487. aiclass[ait_const_16bit]:=tai_const;
  488. aiclass[ait_const_8bit]:=tai_const;
  489. aiclass[ait_const_indirect_symbol]:=tai_const;
  490. aiclass[ait_const_rva_symbol]:=tai_const;
  491. aiclass[ait_real_32bit]:=tai_real_32bit;
  492. aiclass[ait_real_64bit]:=tai_real_64bit;
  493. aiclass[ait_real_80bit]:=tai_real_80bit;
  494. aiclass[ait_comp_64bit]:=tai_comp_64bit;
  495. {$ifdef GDB}
  496. aiclass[ait_stabn]:=tai_stabn;
  497. aiclass[ait_stabs]:=tai_stabs;
  498. aiclass[ait_force_line]:=tai_force_line;
  499. aiclass[ait_stab_function_name]:=tai_stab_function_name;
  500. {$endif GDB}
  501. {$ifdef alpha}
  502. { the follow is for the DEC Alpha }
  503. aiclass[ait_frame]:=tai_frame;
  504. aiclass[ait_ent]:=tai_ent;
  505. {$endif alpha}
  506. {$ifdef m68k}
  507. {$warning FIXME: tai_labeled_instruction doesn't exists}
  508. // aiclass[ait_labeled_instruction]:=tai_labeled_instruction;
  509. {$endif m68k}
  510. {$ifdef ia64}
  511. aiclass[ait_bundle]:=tai_bundle;
  512. aiclass[ait_stop]:=tai_stop;
  513. {$endif ia64}
  514. {$ifdef SPARC}
  515. // aiclass[ait_labeled_instruction]:=tai_labeled_instruction;
  516. {$endif SPARC}
  517. aiclass[ait_cutobject]:=tai_cutobject;
  518. aiclass[ait_regalloc]:=tai_regalloc;
  519. aiclass[ait_tempalloc]:=tai_tempalloc;
  520. aiclass[ait_marker]:=tai_marker;
  521. end;
  522. end.