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,ncgutil,fmodule,
  33. node,nbas,nflw,nset,ncon,ncnv,nld,nmem,ncal,nmat,nadd,ninl,nopt
  34. ;
  35. procedure create_intern_symbols;
  36. {
  37. all intern procedures for the system unit
  38. }
  39. begin
  40. systemunit.insert(tsyssym.create('Concat',in_concat_x));
  41. systemunit.insert(tsyssym.create('Write',in_write_x));
  42. systemunit.insert(tsyssym.create('WriteLn',in_writeln_x));
  43. systemunit.insert(tsyssym.create('Assigned',in_assigned_x));
  44. systemunit.insert(tsyssym.create('Read',in_read_x));
  45. systemunit.insert(tsyssym.create('ReadLn',in_readln_x));
  46. systemunit.insert(tsyssym.create('Ofs',in_ofs_x));
  47. systemunit.insert(tsyssym.create('SizeOf',in_sizeof_x));
  48. systemunit.insert(tsyssym.create('BitSizeOf',in_bitsizeof_x));
  49. systemunit.insert(tsyssym.create('TypeOf',in_typeof_x));
  50. systemunit.insert(tsyssym.create('Low',in_low_x));
  51. systemunit.insert(tsyssym.create('High',in_high_x));
  52. systemunit.insert(tsyssym.create('Slice',in_slice_x));
  53. systemunit.insert(tsyssym.create('Seg',in_seg_x));
  54. systemunit.insert(tsyssym.create('Ord',in_ord_x));
  55. systemunit.insert(tsyssym.create('Pred',in_pred_x));
  56. systemunit.insert(tsyssym.create('Succ',in_succ_x));
  57. systemunit.insert(tsyssym.create('Exclude',in_exclude_x_y));
  58. systemunit.insert(tsyssym.create('Include',in_include_x_y));
  59. systemunit.insert(tsyssym.create('Pack',in_pack_x_y_z));
  60. systemunit.insert(tsyssym.create('Unpack',in_unpack_x_y_z));
  61. systemunit.insert(tsyssym.create('Break',in_break));
  62. systemunit.insert(tsyssym.create('Exit',in_exit));
  63. systemunit.insert(tsyssym.create('Continue',in_continue));
  64. systemunit.insert(tsyssym.create('Leave',in_leave)); {macpas only}
  65. systemunit.insert(tsyssym.create('Cycle',in_cycle)); {macpas only}
  66. systemunit.insert(tsyssym.create('Dec',in_dec_x));
  67. systemunit.insert(tsyssym.create('Inc',in_inc_x));
  68. systemunit.insert(tsyssym.create('Str',in_str_x_string));
  69. systemunit.insert(tsyssym.create('Assert',in_assert_x_y));
  70. systemunit.insert(tsyssym.create('Val',in_val_x));
  71. systemunit.insert(tsyssym.create('Addr',in_addr_x));
  72. systemunit.insert(tsyssym.create('TypeInfo',in_typeinfo_x));
  73. systemunit.insert(tsyssym.create('SetLength',in_setlength_x));
  74. systemunit.insert(tsyssym.create('Copy',in_copy_x));
  75. systemunit.insert(tsyssym.create('Initialize',in_initialize_x));
  76. systemunit.insert(tsyssym.create('Finalize',in_finalize_x));
  77. systemunit.insert(tsyssym.create('Length',in_length_x));
  78. systemunit.insert(tsyssym.create('New',in_new_x));
  79. systemunit.insert(tsyssym.create('Dispose',in_dispose_x));
  80. {$ifdef SUPPORT_UNALIGNED}
  81. systemunit.insert(tsyssym.create('Unaligned',in_unaligned_x));
  82. {$endif SUPPORT_UNALIGNED}
  83. end;
  84. procedure create_intern_types;
  85. {
  86. all the types inserted into the system unit
  87. }
  88. function addtype(const s:string;const t:ttype):ttypesym;
  89. begin
  90. result:=ttypesym.create(s,t);
  91. systemunit.insert(result);
  92. { add init/final table if required }
  93. if t.def.needs_inittable then
  94. generate_inittable(result);
  95. end;
  96. procedure adddef(const s:string;def:tdef);
  97. var
  98. t : ttype;
  99. begin
  100. t.setdef(def);
  101. systemunit.insert(ttypesym.create(s,t));
  102. end;
  103. var
  104. hrecst : trecordsymtable;
  105. begin
  106. symtablestack.push(systemunit);
  107. cundefinedtype.setdef(tundefineddef.create);
  108. cformaltype.setdef(tformaldef.create);
  109. voidtype.setdef(torddef.create(uvoid,0,0));
  110. u8inttype.setdef(torddef.create(u8bit,0,255));
  111. s8inttype.setdef(torddef.create(s8bit,-128,127));
  112. u16inttype.setdef(torddef.create(u16bit,0,65535));
  113. s16inttype.setdef(torddef.create(s16bit,-32768,32767));
  114. u32inttype.setdef(torddef.create(u32bit,0,high(longword)));
  115. s32inttype.setdef(torddef.create(s32bit,low(longint),high(longint)));
  116. u64inttype.setdef(torddef.create(u64bit,low(qword),TConstExprInt(high(qword))));
  117. s64inttype.setdef(torddef.create(s64bit,low(int64),high(int64)));
  118. booltype.setdef(torddef.create(bool8bit,0,1));
  119. bool16type.setdef(torddef.create(bool16bit,0,1));
  120. bool32type.setdef(torddef.create(bool32bit,0,1));
  121. bool64type.setdef(torddef.create(bool64bit,0,1));
  122. cchartype.setdef(torddef.create(uchar,0,255));
  123. cwidechartype.setdef(torddef.create(uwidechar,0,65535));
  124. cshortstringtype.setdef(tstringdef.createshort(255));
  125. { should we give a length to the default long and ansi string definition ?? }
  126. clongstringtype.setdef(tstringdef.createlong(-1));
  127. cansistringtype.setdef(tstringdef.createansi(-1));
  128. cwidestringtype.setdef(tstringdef.createwide(-1));
  129. { length=0 for shortstring is open string (needed for readln(string) }
  130. openshortstringtype.setdef(tstringdef.createshort(0));
  131. openchararraytype.setdef(tarraydef.create(0,-1,s32inttype));
  132. tarraydef(openchararraytype.def).setelementtype(cchartype);
  133. {$ifdef x86}
  134. s32floattype.setdef(tfloatdef.create(s32real));
  135. s64floattype.setdef(tfloatdef.create(s64real));
  136. s80floattype.setdef(tfloatdef.create(s80real));
  137. if target_info.system<>system_x86_64_win64 then
  138. s64currencytype.setdef(tfloatdef.create(s64currency))
  139. else
  140. begin
  141. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  142. pbestrealtype:=@s64floattype;
  143. end;
  144. {$endif x86}
  145. {$ifdef powerpc}
  146. s32floattype.setdef(tfloatdef.create(s32real));
  147. s64floattype.setdef(tfloatdef.create(s64real));
  148. s80floattype.setdef(tfloatdef.create(s80real));
  149. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  150. {$endif powerpc}
  151. {$ifdef POWERPC64}
  152. s32floattype.setdef(tfloatdef.create(s32real));
  153. s64floattype.setdef(tfloatdef.create(s64real));
  154. s80floattype.setdef(tfloatdef.create(s80real));
  155. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  156. {$endif POWERPC64}
  157. {$ifdef sparc}
  158. s32floattype.setdef(tfloatdef.create(s32real));
  159. s64floattype.setdef(tfloatdef.create(s64real));
  160. s80floattype.setdef(tfloatdef.create(s80real));
  161. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  162. {$endif sparc}
  163. {$ifdef m68k}
  164. s32floattype.setdef(tfloatdef.create(s32real));
  165. s64floattype.setdef(tfloatdef.create(s64real));
  166. s80floattype.setdef(tfloatdef.create(s80real));
  167. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  168. {$endif}
  169. {$ifdef arm}
  170. s32floattype.setdef(tfloatdef.create(s32real));
  171. s64floattype.setdef(tfloatdef.create(s64real));
  172. s80floattype.setdef(tfloatdef.create(s80real));
  173. s64currencytype.setdef(torddef.create(scurrency,low(int64),high(int64)));
  174. {$endif arm}
  175. {$ifdef cpu64bit}
  176. uinttype:=u64inttype;
  177. sinttype:=s64inttype;
  178. ptrinttype:=u64inttype;
  179. {$else cpu64bit}
  180. uinttype:=u32inttype;
  181. sinttype:=s32inttype;
  182. ptrinttype:=u32inttype;
  183. {$endif cpu64bit}
  184. { some other definitions }
  185. voidpointertype.setdef(tpointerdef.create(voidtype));
  186. charpointertype.setdef(tpointerdef.create(cchartype));
  187. widecharpointertype.setdef(tpointerdef.create(cwidechartype));
  188. voidfarpointertype.setdef(tpointerdef.createfar(voidtype));
  189. cfiletype.setdef(tfiledef.createuntyped);
  190. cvarianttype.setdef(tvariantdef.create(vt_normalvariant));
  191. colevarianttype.setdef(tvariantdef.create(vt_olevariant));
  192. {$ifdef cpufpemu}
  193. { Normal types }
  194. (* we use the same types as without emulator, the only
  195. difference is that direct calls to the emulator are generated
  196. if (cs_fp_emulation in aktmoduleswitches) then
  197. begin
  198. addtype('Single',s32floattype);
  199. { extended size is the best real type for the target }
  200. addtype('Real',s32floattype);
  201. pbestrealtype:=@s32floattype;
  202. { extended size is the best real type for the target }
  203. addtype('Extended',pbestrealtype^);
  204. end
  205. else
  206. *)
  207. {$endif cpufpemu}
  208. begin
  209. addtype('Single',s32floattype);
  210. addtype('Double',s64floattype);
  211. { extended size is the best real type for the target }
  212. addtype('Extended',pbestrealtype^);
  213. end;
  214. {$ifdef x86}
  215. if target_info.system<>system_x86_64_win64 then
  216. adddef('Comp',tfloatdef.create(s64comp));
  217. {$endif x86}
  218. addtype('Currency',s64currencytype);
  219. addtype('Pointer',voidpointertype);
  220. {$ifdef x86}
  221. addtype('FarPointer',voidfarpointertype);
  222. {$endif x86}
  223. addtype('ShortString',cshortstringtype);
  224. {$ifdef support_longstring}
  225. addtype('LongString',clongstringtype);
  226. {$endif support_longstring}
  227. addtype('AnsiString',cansistringtype);
  228. addtype('WideString',cwidestringtype);
  229. addtype('OpenString',openshortstringtype);
  230. addtype('Boolean',booltype);
  231. addtype('ByteBool',booltype);
  232. addtype('WordBool',bool16type);
  233. addtype('LongBool',bool32type);
  234. addtype('QWordBool',bool64type);
  235. addtype('Byte',u8inttype);
  236. addtype('ShortInt',s8inttype);
  237. addtype('Word',u16inttype);
  238. addtype('SmallInt',s16inttype);
  239. addtype('LongWord',u32inttype);
  240. addtype('LongInt',s32inttype);
  241. addtype('QWord',u64inttype);
  242. addtype('Int64',s64inttype);
  243. addtype('Char',cchartype);
  244. addtype('WideChar',cwidechartype);
  245. adddef('Text',tfiledef.createtext);
  246. adddef('TypedFile',tfiledef.createtyped(voidtype));
  247. addtype('Variant',cvarianttype);
  248. addtype('OleVariant',colevarianttype);
  249. { Internal types }
  250. addtype('$undefined',cundefinedtype);
  251. addtype('$formal',cformaltype);
  252. addtype('$void',voidtype);
  253. addtype('$byte',u8inttype);
  254. addtype('$shortint',s8inttype);
  255. addtype('$word',u16inttype);
  256. addtype('$smallint',s16inttype);
  257. addtype('$ulong',u32inttype);
  258. addtype('$longint',s32inttype);
  259. addtype('$qword',u64inttype);
  260. addtype('$int64',s64inttype);
  261. addtype('$char',cchartype);
  262. addtype('$widechar',cwidechartype);
  263. addtype('$shortstring',cshortstringtype);
  264. addtype('$longstring',clongstringtype);
  265. addtype('$ansistring',cansistringtype);
  266. addtype('$widestring',cwidestringtype);
  267. addtype('$openshortstring',openshortstringtype);
  268. addtype('$boolean',booltype);
  269. addtype('$boolean16',bool16type);
  270. addtype('$boolean32',bool32type);
  271. addtype('$boolean64',bool64type);
  272. addtype('$void_pointer',voidpointertype);
  273. addtype('$char_pointer',charpointertype);
  274. addtype('$widechar_pointer',widecharpointertype);
  275. addtype('$void_farpointer',voidfarpointertype);
  276. addtype('$openchararray',openchararraytype);
  277. addtype('$file',cfiletype);
  278. addtype('$variant',cvarianttype);
  279. addtype('$olevariant',cvarianttype);
  280. addtype('$s32real',s32floattype);
  281. addtype('$s64real',s64floattype);
  282. addtype('$s80real',s80floattype);
  283. addtype('$s64currency',s64currencytype);
  284. { Add a type for virtual method tables }
  285. hrecst:=trecordsymtable.create(aktpackrecords);
  286. vmttype.setdef(trecorddef.create(hrecst));
  287. pvmttype.setdef(tpointerdef.create(vmttype));
  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.setdef(tarraydef.create(0,1,s32inttype));
  292. tarraydef(vmtarraytype.def).setelementtype(voidpointertype);
  293. hrecst.insertfield(tfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[]));
  294. addtype('$__vtbl_ptr_type',vmttype);
  295. addtype('$pvmt',pvmttype);
  296. vmtarraytype.setdef(tarraydef.create(0,1,s32inttype));
  297. tarraydef(vmtarraytype.def).setelementtype(pvmttype);
  298. addtype('$vtblarray',vmtarraytype);
  299. { Add a type for methodpointers }
  300. hrecst:=trecordsymtable.create(1);
  301. hrecst.insertfield(tfieldvarsym.create('$proc',vs_value,voidpointertype,[]));
  302. hrecst.insertfield(tfieldvarsym.create('$self',vs_value,voidpointertype,[]));
  303. methodpointertype.setdef(trecorddef.create(hrecst));
  304. addtype('$methodpointer',methodpointertype);
  305. symtablestack.pop(systemunit);
  306. end;
  307. procedure load_intern_types;
  308. {
  309. Load all default definitions for consts from the system unit
  310. }
  311. procedure loadtype(const s:string;var t:ttype);
  312. var
  313. srsym : ttypesym;
  314. begin
  315. srsym:=search_system_type(s);
  316. t:=srsym.restype;
  317. end;
  318. var
  319. oldcurrentmodule : tmodule;
  320. begin
  321. if target_info.system=system_x86_64_win64 then
  322. pbestrealtype:=@s64floattype;
  323. oldcurrentmodule:=current_module;
  324. current_module:=nil;
  325. loadtype('byte',u8inttype);
  326. loadtype('shortint',s8inttype);
  327. loadtype('word',u16inttype);
  328. loadtype('smallint',s16inttype);
  329. loadtype('ulong',u32inttype);
  330. loadtype('longint',s32inttype);
  331. loadtype('qword',u64inttype);
  332. loadtype('int64',s64inttype);
  333. loadtype('undefined',cundefinedtype);
  334. loadtype('formal',cformaltype);
  335. loadtype('void',voidtype);
  336. loadtype('char',cchartype);
  337. loadtype('widechar',cwidechartype);
  338. loadtype('shortstring',cshortstringtype);
  339. loadtype('longstring',clongstringtype);
  340. loadtype('ansistring',cansistringtype);
  341. loadtype('widestring',cwidestringtype);
  342. loadtype('openshortstring',openshortstringtype);
  343. loadtype('openchararray',openchararraytype);
  344. loadtype('s32real',s32floattype);
  345. loadtype('s64real',s64floattype);
  346. loadtype('s80real',s80floattype);
  347. loadtype('s64currency',s64currencytype);
  348. loadtype('boolean',booltype);
  349. loadtype('boolean16',bool16type);
  350. loadtype('boolean32',bool32type);
  351. loadtype('boolean64',bool64type);
  352. loadtype('void_pointer',voidpointertype);
  353. loadtype('char_pointer',charpointertype);
  354. loadtype('widechar_pointer',widecharpointertype);
  355. loadtype('void_farpointer',voidfarpointertype);
  356. loadtype('file',cfiletype);
  357. loadtype('pvmt',pvmttype);
  358. loadtype('vtblarray',vmtarraytype);
  359. loadtype('__vtbl_ptr_type',vmttype);
  360. loadtype('variant',cvarianttype);
  361. loadtype('olevariant',colevarianttype);
  362. loadtype('methodpointer',methodpointertype);
  363. loadtype('HRESULT',hresulttype);
  364. {$ifdef cpu64bit}
  365. uinttype:=u64inttype;
  366. sinttype:=s64inttype;
  367. ptrinttype:=u64inttype;
  368. {$else cpu64bit}
  369. uinttype:=u32inttype;
  370. sinttype:=s32inttype;
  371. ptrinttype:=u32inttype;
  372. {$endif cpu64bit}
  373. current_module:=oldcurrentmodule;
  374. end;
  375. procedure registernodes;
  376. {
  377. Register all possible nodes in the nodeclass array that
  378. will be used for loading the nodes from a ppu
  379. }
  380. begin
  381. nodeclass[addn]:=caddnode;
  382. nodeclass[muln]:=caddnode;
  383. nodeclass[subn]:=caddnode;
  384. nodeclass[divn]:=cmoddivnode;
  385. nodeclass[symdifn]:=caddnode;
  386. nodeclass[modn]:=cmoddivnode;
  387. nodeclass[assignn]:=cassignmentnode;
  388. nodeclass[loadn]:=cloadnode;
  389. nodeclass[rangen]:=crangenode;
  390. nodeclass[ltn]:=caddnode;
  391. nodeclass[lten]:=caddnode;
  392. nodeclass[gtn]:=caddnode;
  393. nodeclass[gten]:=caddnode;
  394. nodeclass[equaln]:=caddnode;
  395. nodeclass[unequaln]:=caddnode;
  396. nodeclass[inn]:=cinnode;
  397. nodeclass[orn]:=caddnode;
  398. nodeclass[xorn]:=caddnode;
  399. nodeclass[shrn]:=cshlshrnode;
  400. nodeclass[shln]:=cshlshrnode;
  401. nodeclass[slashn]:=caddnode;
  402. nodeclass[andn]:=caddnode;
  403. nodeclass[subscriptn]:=csubscriptnode;
  404. nodeclass[derefn]:=cderefnode;
  405. nodeclass[addrn]:=caddrnode;
  406. nodeclass[ordconstn]:=cordconstnode;
  407. nodeclass[typeconvn]:=ctypeconvnode;
  408. nodeclass[calln]:=ccallnode;
  409. nodeclass[callparan]:=ccallparanode;
  410. nodeclass[realconstn]:=crealconstnode;
  411. nodeclass[unaryminusn]:=cunaryminusnode;
  412. nodeclass[asmn]:=casmnode;
  413. nodeclass[vecn]:=cvecnode;
  414. nodeclass[pointerconstn]:=cpointerconstnode;
  415. nodeclass[stringconstn]:=cstringconstnode;
  416. nodeclass[notn]:=cnotnode;
  417. nodeclass[inlinen]:=cinlinenode;
  418. nodeclass[niln]:=cnilnode;
  419. nodeclass[errorn]:=cerrornode;
  420. nodeclass[typen]:=ctypenode;
  421. nodeclass[setelementn]:=csetelementnode;
  422. nodeclass[setconstn]:=csetconstnode;
  423. nodeclass[blockn]:=cblocknode;
  424. nodeclass[statementn]:=cstatementnode;
  425. nodeclass[ifn]:=cifnode;
  426. nodeclass[breakn]:=cbreaknode;
  427. nodeclass[continuen]:=ccontinuenode;
  428. nodeclass[whilerepeatn]:=cwhilerepeatnode;
  429. nodeclass[forn]:=cfornode;
  430. nodeclass[exitn]:=cexitnode;
  431. nodeclass[withn]:=cwithnode;
  432. nodeclass[casen]:=ccasenode;
  433. nodeclass[labeln]:=clabelnode;
  434. nodeclass[goton]:=cgotonode;
  435. nodeclass[tryexceptn]:=ctryexceptnode;
  436. nodeclass[raisen]:=craisenode;
  437. nodeclass[tryfinallyn]:=ctryfinallynode;
  438. nodeclass[onn]:=connode;
  439. nodeclass[isn]:=cisnode;
  440. nodeclass[asn]:=casnode;
  441. nodeclass[caretn]:=caddnode;
  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.