psystem.pas 21 KB

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