types.pas 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299
  1. {
  2. $Id$
  3. Copyright (C) 1993-98 by Florian Klaempfl
  4. This unit provides some help routines for type handling
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit types;
  19. interface
  20. uses
  21. cobjects,symtable;
  22. type
  23. tmmxtype = (mmxno,mmxu8bit,mmxs8bit,mmxu16bit,mmxs16bit,
  24. mmxu32bit,mmxs32bit,mmxfixed16,mmxsingle);
  25. const
  26. { true if we must never copy this parameter }
  27. never_copy_const_param : boolean = false;
  28. {*****************************************************************************
  29. Basic type functions
  30. *****************************************************************************}
  31. { returns true, if def defines an ordinal type }
  32. function is_ordinal(def : pdef) : boolean;
  33. { returns the min. value of the type }
  34. function get_min_value(def : pdef) : longint;
  35. { returns true, if def defines an ordinal type }
  36. function is_integer(def : pdef) : boolean;
  37. { true if p is a boolean }
  38. function is_boolean(def : pdef) : boolean;
  39. { true if p is a char }
  40. function is_char(def : pdef) : boolean;
  41. { true if p is a smallset def }
  42. function is_smallset(p : pdef) : boolean;
  43. { returns true, if def defines a signed data type (only for ordinal types) }
  44. function is_signed(def : pdef) : boolean;
  45. {*****************************************************************************
  46. Array helper functions
  47. *****************************************************************************}
  48. { true, if p points to a zero based (non special like open or
  49. dynamic array def, mainly this is used to see if the array
  50. is convertable to a pointer }
  51. function is_zero_based_array(p : pdef) : boolean;
  52. { true if p points to an open array def }
  53. function is_open_array(p : pdef) : boolean;
  54. { true, if p points to an array of const def }
  55. function is_array_constructor(p : pdef) : boolean;
  56. { true, if p points to a variant array }
  57. function is_variant_array(p : pdef) : boolean;
  58. { true, if p points to an array of const }
  59. function is_array_of_const(p : pdef) : boolean;
  60. { true, if p points any kind of special array }
  61. function is_special_array(p : pdef) : boolean;
  62. { true if p is a char array def }
  63. function is_chararray(p : pdef) : boolean;
  64. {*****************************************************************************
  65. String helper functions
  66. *****************************************************************************}
  67. { true if p points to an open string def }
  68. function is_open_string(p : pdef) : boolean;
  69. { true if p is an ansi string def }
  70. function is_ansistring(p : pdef) : boolean;
  71. { true if p is a long string def }
  72. function is_longstring(p : pdef) : boolean;
  73. { true if p is a wide string def }
  74. function is_widestring(p : pdef) : boolean;
  75. { true if p is a short string def }
  76. function is_shortstring(p : pdef) : boolean;
  77. { true if p is a pchar def }
  78. function is_pchar(p : pdef) : boolean;
  79. { returns true, if def uses FPU }
  80. function is_fpu(def : pdef) : boolean;
  81. { true if the return value is in EAX }
  82. function ret_in_acc(def : pdef) : boolean;
  83. { true if uses a parameter as return value }
  84. function ret_in_param(def : pdef) : boolean;
  85. { true, if def is a 64 bit int type }
  86. function is_64bitint(def : pdef) : boolean;
  87. function push_high_param(def : pdef) : boolean;
  88. { true if a parameter is too large to copy and only the address is pushed }
  89. function push_addr_param(def : pdef) : boolean;
  90. { true, if def1 and def2 are semantical the same }
  91. function is_equal(def1,def2 : pdef) : boolean;
  92. { checks for type compatibility (subgroups of type) }
  93. { used for case statements... probably missing stuff }
  94. { to use on other types }
  95. function is_subequal(def1, def2: pdef): boolean;
  96. { same as is_equal, but with error message if failed }
  97. function CheckTypes(def1,def2 : pdef) : boolean;
  98. { true, if two parameter lists are equal }
  99. { if value_equal_const is true, call by value }
  100. { and call by const parameter are assumed as }
  101. { equal }
  102. function equal_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
  103. { true if a type can be allowed for another one
  104. in a func var }
  105. function convertable_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
  106. { true if a function can be assigned to a procvar }
  107. function proc_to_procvar_equal(def1:pprocdef;def2:pprocvardef) : boolean;
  108. { if l isn't in the range of def a range check error is generated and
  109. the value is placed within the range }
  110. procedure testrange(def : pdef;var l : longint);
  111. { returns the range of def }
  112. procedure getrange(def : pdef;var l : longint;var h : longint);
  113. { some type helper routines for MMX support }
  114. function is_mmx_able_array(p : pdef) : boolean;
  115. { returns the mmx type }
  116. function mmx_type(p : pdef) : tmmxtype;
  117. implementation
  118. uses
  119. strings,globtype,globals,htypechk,
  120. tree,verbose,symconst;
  121. function equal_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
  122. begin
  123. while (assigned(def1)) and (assigned(def2)) do
  124. begin
  125. if value_equal_const then
  126. begin
  127. if not(is_equal(def1^.data,def2^.data)) or
  128. ((def1^.paratyp<>def2^.paratyp) and
  129. ((def1^.paratyp=vs_var) or
  130. (def1^.paratyp=vs_var)
  131. )
  132. ) then
  133. begin
  134. equal_paras:=false;
  135. exit;
  136. end;
  137. end
  138. else
  139. begin
  140. if not(is_equal(def1^.data,def2^.data)) or
  141. (def1^.paratyp<>def2^.paratyp) then
  142. begin
  143. equal_paras:=false;
  144. exit;
  145. end;
  146. end;
  147. def1:=def1^.next;
  148. def2:=def2^.next;
  149. end;
  150. if (def1=nil) and (def2=nil) then
  151. equal_paras:=true
  152. else
  153. equal_paras:=false;
  154. end;
  155. function convertable_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
  156. var doconv : tconverttype;
  157. begin
  158. while (assigned(def1)) and (assigned(def2)) do
  159. begin
  160. if value_equal_const then
  161. begin
  162. if (isconvertable(def1^.data,def2^.data,doconv,callparan,false)=0) or
  163. ((def1^.paratyp<>def2^.paratyp) and
  164. ((def1^.paratyp=vs_var) or
  165. (def1^.paratyp=vs_var)
  166. )
  167. ) then
  168. begin
  169. convertable_paras:=false;
  170. exit;
  171. end;
  172. end
  173. else
  174. begin
  175. if (isconvertable(def1^.data,def2^.data,doconv,callparan,false)=0) or
  176. (def1^.paratyp<>def2^.paratyp) then
  177. begin
  178. convertable_paras:=false;
  179. exit;
  180. end;
  181. end;
  182. def1:=def1^.next;
  183. def2:=def2^.next;
  184. end;
  185. if (def1=nil) and (def2=nil) then
  186. convertable_paras:=true
  187. else
  188. convertable_paras:=false;
  189. end;
  190. { true if a function can be assigned to a procvar }
  191. function proc_to_procvar_equal(def1:pprocdef;def2:pprocvardef) : boolean;
  192. const
  193. po_comp = po_compatibility_options-[po_methodpointer];
  194. var
  195. ismethod : boolean;
  196. begin
  197. proc_to_procvar_equal:=false;
  198. if not(assigned(def1)) or not(assigned(def2)) then
  199. exit;
  200. { check for method pointer }
  201. ismethod:=assigned(def1^.owner) and
  202. (def1^.owner^.symtabletype=objectsymtable) and
  203. assigned(def1^.owner^.defowner) and
  204. (pobjectdef(def1^.owner^.defowner)^.is_class);
  205. if (ismethod and not (po_methodpointer in def2^.procoptions)) or
  206. (not(ismethod) and (po_methodpointer in def2^.procoptions)) then
  207. begin
  208. Message(type_e_no_method_and_procedure_not_compatible);
  209. exit;
  210. end;
  211. { check return value and para's and options, methodpointer is already checked
  212. parameters may also be convertable }
  213. if is_equal(def1^.retdef,def2^.retdef) and
  214. (equal_paras(def1^.para1,def2^.para1,false) or
  215. convertable_paras(def1^.para1,def2^.para1,false)) and
  216. ((po_comp * def1^.procoptions)= (po_comp * def2^.procoptions)) then
  217. proc_to_procvar_equal:=true
  218. else
  219. proc_to_procvar_equal:=false;
  220. end;
  221. { returns true, if def uses FPU }
  222. function is_fpu(def : pdef) : boolean;
  223. begin
  224. is_fpu:=(def^.deftype=floatdef) and (pfloatdef(def)^.typ<>f32bit);
  225. end;
  226. { true if p is an ordinal }
  227. function is_ordinal(def : pdef) : boolean;
  228. var
  229. dt : tbasetype;
  230. begin
  231. case def^.deftype of
  232. orddef :
  233. begin
  234. dt:=porddef(def)^.typ;
  235. is_ordinal:=dt in [uchar,
  236. u8bit,u16bit,u32bit,u64bit,
  237. s8bit,s16bit,s32bit,s64bit,
  238. bool8bit,bool16bit,bool32bit];
  239. end;
  240. enumdef :
  241. is_ordinal:=true;
  242. else
  243. is_ordinal:=false;
  244. end;
  245. end;
  246. { returns the min. value of the type }
  247. function get_min_value(def : pdef) : longint;
  248. begin
  249. case def^.deftype of
  250. orddef:
  251. get_min_value:=porddef(def)^.low;
  252. enumdef:
  253. get_min_value:=penumdef(def)^.min;
  254. else
  255. get_min_value:=0;
  256. end;
  257. end;
  258. { true if p is an integer }
  259. function is_integer(def : pdef) : boolean;
  260. begin
  261. is_integer:=(def^.deftype=orddef) and
  262. (porddef(def)^.typ in [uauto,u8bit,u16bit,u32bit,u64bit,
  263. s8bit,s16bit,s32bit,s64bit]);
  264. end;
  265. { true if p is a boolean }
  266. function is_boolean(def : pdef) : boolean;
  267. begin
  268. is_boolean:=(def^.deftype=orddef) and
  269. (porddef(def)^.typ in [bool8bit,bool16bit,bool32bit]);
  270. end;
  271. { true if p is a char }
  272. function is_char(def : pdef) : boolean;
  273. begin
  274. is_char:=(def^.deftype=orddef) and
  275. (porddef(def)^.typ=uchar);
  276. end;
  277. { true if p is signed (integer) }
  278. function is_signed(def : pdef) : boolean;
  279. var
  280. dt : tbasetype;
  281. begin
  282. case def^.deftype of
  283. orddef :
  284. begin
  285. dt:=porddef(def)^.typ;
  286. is_signed:=(dt in [s8bit,s16bit,s32bit,s64bit]);
  287. end;
  288. enumdef :
  289. is_signed:=false;
  290. else
  291. is_signed:=false;
  292. end;
  293. end;
  294. { true, if p points to an open array def }
  295. function is_open_string(p : pdef) : boolean;
  296. begin
  297. is_open_string:=(p^.deftype=stringdef) and
  298. (pstringdef(p)^.string_typ=st_shortstring) and
  299. (pstringdef(p)^.len=0);
  300. end;
  301. { true, if p points to a zero based array def }
  302. function is_zero_based_array(p : pdef) : boolean;
  303. begin
  304. is_zero_based_array:=(p^.deftype=arraydef) and
  305. (parraydef(p)^.lowrange=0) and
  306. not(is_special_array(p));
  307. end;
  308. { true, if p points to an open array def }
  309. function is_open_array(p : pdef) : boolean;
  310. begin
  311. { check for s32bitdef is needed, because for u32bit the high
  312. range is also -1 ! (PFV) }
  313. is_open_array:=(p^.deftype=arraydef) and
  314. (parraydef(p)^.rangedef=pdef(s32bitdef)) and
  315. (parraydef(p)^.lowrange=0) and
  316. (parraydef(p)^.highrange=-1) and
  317. not(parraydef(p)^.IsConstructor) and
  318. not(parraydef(p)^.IsVariant) and
  319. not(parraydef(p)^.IsArrayOfConst);
  320. end;
  321. { true, if p points to an array of const def }
  322. function is_array_constructor(p : pdef) : boolean;
  323. begin
  324. is_array_constructor:=(p^.deftype=arraydef) and
  325. (parraydef(p)^.IsConstructor);
  326. end;
  327. { true, if p points to a variant array }
  328. function is_variant_array(p : pdef) : boolean;
  329. begin
  330. is_variant_array:=(p^.deftype=arraydef) and
  331. (parraydef(p)^.IsVariant);
  332. end;
  333. { true, if p points to an array of const }
  334. function is_array_of_const(p : pdef) : boolean;
  335. begin
  336. is_array_of_const:=(p^.deftype=arraydef) and
  337. (parraydef(p)^.IsArrayOfConst);
  338. end;
  339. { true, if p points to a special array }
  340. function is_special_array(p : pdef) : boolean;
  341. begin
  342. is_special_array:=(p^.deftype=arraydef) and
  343. ((parraydef(p)^.IsVariant) or
  344. (parraydef(p)^.IsArrayOfConst) or
  345. (parraydef(p)^.IsConstructor) or
  346. is_open_array(p)
  347. );
  348. end;
  349. { true if p is an ansi string def }
  350. function is_ansistring(p : pdef) : boolean;
  351. begin
  352. is_ansistring:=(p^.deftype=stringdef) and
  353. (pstringdef(p)^.string_typ=st_ansistring);
  354. end;
  355. { true if p is an long string def }
  356. function is_longstring(p : pdef) : boolean;
  357. begin
  358. is_longstring:=(p^.deftype=stringdef) and
  359. (pstringdef(p)^.string_typ=st_longstring);
  360. end;
  361. { true if p is an wide string def }
  362. function is_widestring(p : pdef) : boolean;
  363. begin
  364. is_widestring:=(p^.deftype=stringdef) and
  365. (pstringdef(p)^.string_typ=st_widestring);
  366. end;
  367. { true if p is an short string def }
  368. function is_shortstring(p : pdef) : boolean;
  369. begin
  370. is_shortstring:=(p^.deftype=stringdef) and
  371. (pstringdef(p)^.string_typ=st_shortstring);
  372. end;
  373. { true if p is a char array def }
  374. function is_chararray(p : pdef) : boolean;
  375. begin
  376. is_chararray:=(p^.deftype=arraydef) and
  377. is_equal(parraydef(p)^.definition,cchardef) and
  378. not(is_special_array(p));
  379. end;
  380. { true if p is a pchar def }
  381. function is_pchar(p : pdef) : boolean;
  382. begin
  383. is_pchar:=(p^.deftype=pointerdef) and
  384. is_equal(Ppointerdef(p)^.definition,cchardef);
  385. end;
  386. { true if p is a smallset def }
  387. function is_smallset(p : pdef) : boolean;
  388. begin
  389. is_smallset:=(p^.deftype=setdef) and
  390. (psetdef(p)^.settype=smallset);
  391. end;
  392. { true if the return value is in accumulator (EAX for i386), D0 for 68k }
  393. function ret_in_acc(def : pdef) : boolean;
  394. begin
  395. ret_in_acc:=(def^.deftype in [orddef,pointerdef,enumdef,classrefdef]) or
  396. ((def^.deftype=stringdef) and (pstringdef(def)^.string_typ in [st_ansistring,st_widestring])) or
  397. ((def^.deftype=procvardef) and not(po_methodpointer in pprocvardef(def)^.procoptions)) or
  398. ((def^.deftype=objectdef) and pobjectdef(def)^.is_class) or
  399. ((def^.deftype=setdef) and (psetdef(def)^.settype=smallset)) or
  400. ((def^.deftype=floatdef) and (pfloatdef(def)^.typ=f32bit));
  401. end;
  402. { true, if def is a 64 bit int type }
  403. function is_64bitint(def : pdef) : boolean;
  404. begin
  405. is_64bitint:=(def^.deftype=orddef) and (porddef(def)^.typ in [u64bit,s64bit])
  406. end;
  407. { true if uses a parameter as return value }
  408. function ret_in_param(def : pdef) : boolean;
  409. begin
  410. ret_in_param:=(def^.deftype in [arraydef,recorddef]) or
  411. ((def^.deftype=stringdef) and (pstringdef(def)^.string_typ in [st_shortstring,st_longstring])) or
  412. ((def^.deftype=procvardef) and (po_methodpointer in pprocvardef(def)^.procoptions)) or
  413. ((def^.deftype=objectdef) and not(pobjectdef(def)^.is_class)) or
  414. ((def^.deftype=setdef) and (psetdef(def)^.settype<>smallset));
  415. end;
  416. function push_high_param(def : pdef) : boolean;
  417. begin
  418. push_high_param:=is_open_array(def) or
  419. is_open_string(def) or
  420. is_array_of_const(def);
  421. end;
  422. { true if a parameter is too large to copy and only the address is pushed }
  423. function push_addr_param(def : pdef) : boolean;
  424. begin
  425. push_addr_param:=never_copy_const_param or
  426. (def^.deftype = formaldef) or
  427. { copy directly small records or arrays unless array of const ! PM }
  428. ((def^.deftype in [arraydef,recorddef]) and
  429. ((Parraydef(def)^.highrange<Parraydef(def)^.lowrange)
  430. or (def^.size>4) or
  431. ((def^.deftype=arraydef) and
  432. (parraydef(def)^.IsConstructor or
  433. parraydef(def)^.isArrayOfConst or
  434. is_open_array(def)
  435. )
  436. )
  437. )
  438. ) or
  439. ((def^.deftype=objectdef) and not(pobjectdef(def)^.is_class)) or
  440. ((def^.deftype=stringdef) and (pstringdef(def)^.string_typ in [st_shortstring,st_longstring])) or
  441. ((def^.deftype=procvardef) and (po_methodpointer in pprocvardef(def)^.procoptions)) or
  442. ((def^.deftype=setdef) and (psetdef(def)^.settype<>smallset));
  443. end;
  444. { test if l is in the range of def, outputs error if out of range }
  445. procedure testrange(def : pdef;var l : longint);
  446. var
  447. lv,hv: longint;
  448. begin
  449. { for 64 bit types we need only to check if it is less than }
  450. { zero, if def is a qword node }
  451. if is_64bitint(def) then
  452. begin
  453. if (l<0) and (porddef(def)^.typ=u64bit) then
  454. begin
  455. l:=0;
  456. if (cs_check_range in aktlocalswitches) then
  457. Message(parser_e_range_check_error)
  458. else
  459. Message(parser_w_range_check_error);
  460. end;
  461. end
  462. else
  463. begin
  464. getrange(def,lv,hv);
  465. if (def^.deftype=orddef) and
  466. (porddef(def)^.typ=u32bit) then
  467. begin
  468. if lv<=hv then
  469. begin
  470. if (l<lv) or (l>hv) then
  471. begin
  472. if (cs_check_range in aktlocalswitches) then
  473. Message(parser_e_range_check_error)
  474. else
  475. Message(parser_w_range_check_error);
  476. end;
  477. end
  478. else
  479. { this happens with the wrap around problem }
  480. { if lv is positive and hv is over $7ffffff }
  481. { so it seems negative }
  482. begin
  483. if ((l>=0) and (l<lv)) or
  484. ((l<0) and (l>hv)) then
  485. begin
  486. if (cs_check_range in aktlocalswitches) then
  487. Message(parser_e_range_check_error)
  488. else
  489. Message(parser_w_range_check_error);
  490. end;
  491. end;
  492. end
  493. else if (l<lv) or (l>hv) then
  494. begin
  495. if (def^.deftype=enumdef) or
  496. (cs_check_range in aktlocalswitches) then
  497. Message(parser_e_range_check_error)
  498. else
  499. Message(parser_w_range_check_error);
  500. { Fix the value to be in range }
  501. l:=lv+(l mod (hv-lv+1));
  502. end;
  503. end;
  504. end;
  505. { return the range from def in l and h }
  506. procedure getrange(def : pdef;var l : longint;var h : longint);
  507. begin
  508. case def^.deftype of
  509. orddef :
  510. begin
  511. l:=porddef(def)^.low;
  512. h:=porddef(def)^.high;
  513. end;
  514. enumdef :
  515. begin
  516. l:=penumdef(def)^.min;
  517. h:=penumdef(def)^.max;
  518. end;
  519. arraydef :
  520. begin
  521. l:=parraydef(def)^.lowrange;
  522. h:=parraydef(def)^.highrange;
  523. end;
  524. else
  525. internalerror(987);
  526. end;
  527. end;
  528. function mmx_type(p : pdef) : tmmxtype;
  529. begin
  530. mmx_type:=mmxno;
  531. if is_mmx_able_array(p) then
  532. begin
  533. if parraydef(p)^.definition^.deftype=floatdef then
  534. case pfloatdef(parraydef(p)^.definition)^.typ of
  535. s32real:
  536. mmx_type:=mmxsingle;
  537. f16bit:
  538. mmx_type:=mmxfixed16
  539. end
  540. else
  541. case porddef(parraydef(p)^.definition)^.typ of
  542. u8bit:
  543. mmx_type:=mmxu8bit;
  544. s8bit:
  545. mmx_type:=mmxs8bit;
  546. u16bit:
  547. mmx_type:=mmxu16bit;
  548. s16bit:
  549. mmx_type:=mmxs16bit;
  550. u32bit:
  551. mmx_type:=mmxu32bit;
  552. s32bit:
  553. mmx_type:=mmxs32bit;
  554. end;
  555. end;
  556. end;
  557. function is_mmx_able_array(p : pdef) : boolean;
  558. begin
  559. {$ifdef SUPPORT_MMX}
  560. if (cs_mmx_saturation in aktlocalswitches) then
  561. begin
  562. is_mmx_able_array:=(p^.deftype=arraydef) and
  563. not(is_special_array(p)) and
  564. (
  565. (
  566. (parraydef(p)^.definition^.deftype=orddef) and
  567. (
  568. (
  569. (parraydef(p)^.lowrange=0) and
  570. (parraydef(p)^.highrange=1) and
  571. (porddef(parraydef(p)^.definition)^.typ in [u32bit,s32bit])
  572. )
  573. or
  574. (
  575. (parraydef(p)^.lowrange=0) and
  576. (parraydef(p)^.highrange=3) and
  577. (porddef(parraydef(p)^.definition)^.typ in [u16bit,s16bit])
  578. )
  579. )
  580. )
  581. or
  582. (
  583. (
  584. (parraydef(p)^.definition^.deftype=floatdef) and
  585. (
  586. (parraydef(p)^.lowrange=0) and
  587. (parraydef(p)^.highrange=3) and
  588. (pfloatdef(parraydef(p)^.definition)^.typ=f16bit)
  589. ) or
  590. (
  591. (parraydef(p)^.lowrange=0) and
  592. (parraydef(p)^.highrange=1) and
  593. (pfloatdef(parraydef(p)^.definition)^.typ=s32real)
  594. )
  595. )
  596. )
  597. );
  598. end
  599. else
  600. begin
  601. is_mmx_able_array:=(p^.deftype=arraydef) and
  602. (
  603. (
  604. (parraydef(p)^.definition^.deftype=orddef) and
  605. (
  606. (
  607. (parraydef(p)^.lowrange=0) and
  608. (parraydef(p)^.highrange=1) and
  609. (porddef(parraydef(p)^.definition)^.typ in [u32bit,s32bit])
  610. )
  611. or
  612. (
  613. (parraydef(p)^.lowrange=0) and
  614. (parraydef(p)^.highrange=3) and
  615. (porddef(parraydef(p)^.definition)^.typ in [u16bit,s16bit])
  616. )
  617. or
  618. (
  619. (parraydef(p)^.lowrange=0) and
  620. (parraydef(p)^.highrange=7) and
  621. (porddef(parraydef(p)^.definition)^.typ in [u8bit,s8bit])
  622. )
  623. )
  624. )
  625. or
  626. (
  627. (parraydef(p)^.definition^.deftype=floatdef) and
  628. (
  629. (
  630. (parraydef(p)^.lowrange=0) and
  631. (parraydef(p)^.highrange=3) and
  632. (pfloatdef(parraydef(p)^.definition)^.typ=f32bit)
  633. )
  634. or
  635. (
  636. (parraydef(p)^.lowrange=0) and
  637. (parraydef(p)^.highrange=1) and
  638. (pfloatdef(parraydef(p)^.definition)^.typ=s32real)
  639. )
  640. )
  641. )
  642. );
  643. end;
  644. {$else SUPPORT_MMX}
  645. is_mmx_able_array:=false;
  646. {$endif SUPPORT_MMX}
  647. end;
  648. function is_equal(def1,def2 : pdef) : boolean;
  649. var
  650. b : boolean;
  651. hd : pdef;
  652. hp1,hp2 : pdefcoll;
  653. begin
  654. { both types must exists }
  655. if not (assigned(def1) and assigned(def2)) then
  656. begin
  657. is_equal:=false;
  658. exit;
  659. end;
  660. { be sure, that if there is a stringdef, that this is def1 }
  661. if def2^.deftype=stringdef then
  662. begin
  663. hd:=def1;
  664. def1:=def2;
  665. def2:=hd;
  666. end;
  667. b:=false;
  668. { both point to the same definition ? }
  669. if def1=def2 then
  670. b:=true
  671. else
  672. { pointer with an equal definition are equal }
  673. if (def1^.deftype=pointerdef) and (def2^.deftype=pointerdef) then
  674. begin
  675. { here a problem detected in tabsolutesym }
  676. { the types can be forward type !! }
  677. if assigned(def1^.sym) and (sp_forwarddef in def1^.sym^.symoptions) then
  678. b:=(def1^.sym=def2^.sym)
  679. else
  680. b:=ppointerdef(def1)^.definition=ppointerdef(def2)^.definition;
  681. end
  682. else
  683. { ordinals are equal only when the ordinal type is equal }
  684. if (def1^.deftype=orddef) and (def2^.deftype=orddef) then
  685. begin
  686. case porddef(def1)^.typ of
  687. u8bit,u16bit,u32bit,
  688. s8bit,s16bit,s32bit:
  689. b:=((porddef(def1)^.typ=porddef(def2)^.typ) and
  690. (porddef(def1)^.low=porddef(def2)^.low) and
  691. (porddef(def1)^.high=porddef(def2)^.high));
  692. uvoid,uchar,
  693. bool8bit,bool16bit,bool32bit:
  694. b:=(porddef(def1)^.typ=porddef(def2)^.typ);
  695. end;
  696. end
  697. else
  698. if (def1^.deftype=floatdef) and (def2^.deftype=floatdef) then
  699. b:=pfloatdef(def1)^.typ=pfloatdef(def2)^.typ
  700. else
  701. { strings with the same length are equal }
  702. if (def1^.deftype=stringdef) and (def2^.deftype=stringdef) and
  703. (pstringdef(def1)^.string_typ=pstringdef(def2)^.string_typ) then
  704. begin
  705. b:=not(is_shortstring(def1)) or
  706. (pstringdef(def1)^.len=pstringdef(def2)^.len);
  707. end
  708. else
  709. if (def1^.deftype=formaldef) and (def2^.deftype=formaldef) then
  710. b:=true
  711. { file types with the same file element type are equal }
  712. { this is a problem for assign !! }
  713. { changed to allow if one is untyped }
  714. { all typed files are equal to the special }
  715. { typed file that has voiddef as elemnt type }
  716. { but must NOT match for text file !!! }
  717. else
  718. if (def1^.deftype=filedef) and (def2^.deftype=filedef) then
  719. b:=(pfiledef(def1)^.filetype=pfiledef(def2)^.filetype) and
  720. ((
  721. ((pfiledef(def1)^.typed_as=nil) and
  722. (pfiledef(def2)^.typed_as=nil)) or
  723. (
  724. (pfiledef(def1)^.typed_as<>nil) and
  725. (pfiledef(def2)^.typed_as<>nil) and
  726. is_equal(pfiledef(def1)^.typed_as,pfiledef(def2)^.typed_as)
  727. ) or
  728. ( (pfiledef(def1)^.typed_as=pdef(voiddef)) or
  729. (pfiledef(def2)^.typed_as=pdef(voiddef))
  730. )))
  731. { sets with the same element type are equal }
  732. else
  733. if (def1^.deftype=setdef) and (def2^.deftype=setdef) then
  734. begin
  735. if assigned(psetdef(def1)^.setof) and
  736. assigned(psetdef(def2)^.setof) then
  737. b:=(psetdef(def1)^.setof^.deftype=psetdef(def2)^.setof^.deftype)
  738. else
  739. b:=true;
  740. end
  741. else
  742. if (def1^.deftype=procvardef) and (def2^.deftype=procvardef) then
  743. begin
  744. { poassembler isn't important for compatibility }
  745. { if a method is assigned to a methodpointer }
  746. { is checked before }
  747. b:=((pprocvardef(def1)^.procoptions * po_compatibility_options)=
  748. (pprocvardef(def2)^.procoptions * po_compatibility_options)) and
  749. is_equal(pprocvardef(def1)^.retdef,pprocvardef(def2)^.retdef);
  750. { now evalute the parameters }
  751. if b then
  752. begin
  753. hp1:=pprocvardef(def1)^.para1;
  754. hp2:=pprocvardef(def1)^.para1;
  755. while assigned(hp1) and assigned(hp2) do
  756. begin
  757. if not(is_equal(hp1^.data,hp2^.data)) or
  758. not(hp1^.paratyp=hp2^.paratyp) then
  759. begin
  760. b:=false;
  761. break;
  762. end;
  763. hp1:=hp1^.next;
  764. hp2:=hp2^.next;
  765. end;
  766. b:=(hp1=nil) and (hp2=nil);
  767. end;
  768. end
  769. else
  770. if (def1^.deftype=arraydef) and (def2^.deftype=arraydef) then
  771. begin
  772. if is_open_array(def1) or is_open_array(def2) or
  773. is_array_of_const(def1) or is_array_of_const(def2) then
  774. begin
  775. if parraydef(def1)^.IsArrayOfConst or parraydef(def2)^.IsArrayOfConst then
  776. b:=true
  777. else
  778. b:=is_equal(parraydef(def1)^.definition,parraydef(def2)^.definition);
  779. end
  780. else
  781. begin
  782. b:=not(m_tp in aktmodeswitches) and
  783. not(m_delphi in aktmodeswitches) and
  784. (parraydef(def1)^.lowrange=parraydef(def2)^.lowrange) and
  785. (parraydef(def1)^.highrange=parraydef(def2)^.highrange) and
  786. is_equal(parraydef(def1)^.definition,parraydef(def2)^.definition) and
  787. is_equal(parraydef(def1)^.rangedef,parraydef(def2)^.rangedef);
  788. end;
  789. end
  790. else
  791. if (def1^.deftype=classrefdef) and (def2^.deftype=classrefdef) then
  792. begin
  793. { similar to pointerdef: }
  794. if assigned(def1^.sym) and (sp_forwarddef in def1^.sym^.symoptions) then
  795. b:=(def1^.sym=def2^.sym)
  796. else
  797. b:=is_equal(pclassrefdef(def1)^.definition,pclassrefdef(def2)^.definition);
  798. end;
  799. is_equal:=b;
  800. end;
  801. function is_subequal(def1, def2: pdef): boolean;
  802. Begin
  803. if assigned(def1) and assigned(def2) then
  804. Begin
  805. is_subequal := FALSE;
  806. if (def1^.deftype = orddef) and (def2^.deftype = orddef) then
  807. Begin
  808. { see p.47 of Turbo Pascal 7.01 manual for the separation of types }
  809. { range checking for case statements is done with testrange }
  810. case porddef(def1)^.typ of
  811. u8bit,u16bit,u32bit,
  812. s8bit,s16bit,s32bit :
  813. is_subequal:=(porddef(def2)^.typ in [s32bit,u32bit,u8bit,s8bit,s16bit,u16bit]);
  814. bool8bit,bool16bit,bool32bit :
  815. is_subequal:=(porddef(def2)^.typ in [bool8bit,bool16bit,bool32bit]);
  816. uchar :
  817. is_subequal:=(porddef(def2)^.typ=uchar);
  818. end;
  819. end
  820. else
  821. Begin
  822. { I assume that both enumerations are equal when the first }
  823. { pointers are equal. }
  824. if (def1^.deftype = enumdef) and (def2^.deftype =enumdef) then
  825. Begin
  826. if penumdef(def1)^.firstenum = penumdef(def2)^.firstenum then
  827. is_subequal := TRUE;
  828. end;
  829. end;
  830. end; { endif assigned ... }
  831. end;
  832. function CheckTypes(def1,def2 : pdef) : boolean;
  833. var
  834. s1,s2 : string;
  835. begin
  836. if not is_equal(def1,def2) then
  837. begin
  838. { Crash prevention }
  839. if (not assigned(def1)) or (not assigned(def2)) then
  840. Message(type_e_mismatch)
  841. else
  842. begin
  843. s1:=def1^.typename;
  844. s2:=def2^.typename;
  845. if (s1<>'<unknown type>') and (s2<>'<unknown type>') then
  846. Message2(type_e_not_equal_types,def1^.typename,def2^.typename)
  847. else
  848. Message(type_e_mismatch);
  849. end;
  850. CheckTypes:=false;
  851. end
  852. else
  853. CheckTypes:=true;
  854. end;
  855. end.
  856. {
  857. $Log$
  858. Revision 1.83 1999-08-07 14:21:06 florian
  859. * some small problems fixed
  860. Revision 1.82 1999/08/07 13:36:56 daniel
  861. * Recommitted the arraydef overflow bugfix.
  862. Revision 1.80 1999/08/05 22:42:49 daniel
  863. * Fixed potential bug for open arrays (Their size is not known at
  864. compilation time).
  865. Revision 1.79 1999/08/03 22:03:41 peter
  866. * moved bitmask constants to sets
  867. * some other type/const renamings
  868. Revision 1.78 1999/07/30 12:26:42 peter
  869. * array is_equal disabled for tp,delphi mode
  870. Revision 1.77 1999/07/29 11:41:51 peter
  871. * array is_equal extended
  872. Revision 1.76 1999/07/27 23:39:15 peter
  873. * open array checks also for s32bitdef, because u32bit also has a
  874. high range of -1
  875. Revision 1.75 1999/07/06 21:48:29 florian
  876. * a lot bug fixes:
  877. - po_external isn't any longer necessary for procedure compatibility
  878. - m_tp_procvar is in -Sd now available
  879. - error messages of procedure variables improved
  880. - return values with init./finalization fixed
  881. - data types with init./finalization aren't any longer allowed in variant
  882. record
  883. Revision 1.74 1999/07/01 15:49:24 florian
  884. * int64/qword type release
  885. + lo/hi for int64/qword
  886. Revision 1.73 1999/06/28 22:29:22 florian
  887. * qword division fixed
  888. + code for qword/int64 type casting added:
  889. range checking isn't implemented yet
  890. Revision 1.72 1999/06/13 22:41:08 peter
  891. * merged from fixes
  892. Revision 1.71.2.1 1999/06/13 22:37:17 peter
  893. * convertable para's doesn't check for equal, added equal para's to
  894. proc2procvar check
  895. Revision 1.71 1999/06/03 09:34:13 peter
  896. * better methodpointer check for proc->procvar
  897. Revision 1.70 1999/06/02 22:25:55 pierre
  898. types.pas
  899. Revision 1.69 1999/06/02 10:11:55 florian
  900. * make cycle fixed i.e. compilation with 0.99.10
  901. * some fixes for qword
  902. * start of register calling conventions
  903. Revision 1.68 1999/06/01 19:27:58 peter
  904. * better checks for procvar and methodpointer
  905. Revision 1.67 1999/05/31 22:54:19 peter
  906. * when range check error is found then fix the value to be within the
  907. range
  908. Revision 1.66 1999/05/28 11:00:51 peter
  909. * removed ungettempoftype
  910. Revision 1.65 1999/05/23 18:42:23 florian
  911. * better error recovering in typed constants
  912. * some problems with arrays of const fixed, some problems
  913. due my previous
  914. - the location type of array constructor is now LOC_MEM
  915. - the pushing of high fixed
  916. - parameter copying fixed
  917. - zero temp. allocation removed
  918. * small problem in the assembler writers fixed:
  919. ref to nil wasn't written correctly
  920. Revision 1.64 1999/05/19 20:55:08 florian
  921. * fix of my previous commit
  922. Revision 1.63 1999/05/19 20:40:15 florian
  923. * fixed a couple of array related bugs:
  924. - var a : array[0..1] of char; p : pchar; p:=a+123; works now
  925. - open arrays with an odd size doesn't work: movsb wasn't generated
  926. - introduced some new array type helper routines (is_special_array) etc.
  927. - made the array type checking in isconvertable more strict, often
  928. open array can be used where is wasn't allowed etc...
  929. Revision 1.62 1999/05/19 16:48:29 florian
  930. * tdef.typename: returns a now a proper type name for the most types
  931. Revision 1.61 1999/05/19 10:31:56 florian
  932. * two bugs reported by Romio (bugs 13) are fixed:
  933. - empty array constructors are now handled correctly (e.g. for sysutils.format)
  934. - comparsion of ansistrings was sometimes coded wrong
  935. Revision 1.60 1999/05/18 14:16:01 peter
  936. * containsself fixes
  937. * checktypes()
  938. Revision 1.59 1999/05/18 09:52:24 peter
  939. * procedure of object and addrn fixes
  940. Revision 1.58 1999/04/19 09:29:51 pierre
  941. + ungettempoftype(pdef) boolean function
  942. returns true (can call ungetiftemp )
  943. unless the temp should be "unget" with temptoremove
  944. (currently ansistring or widestring !)
  945. Revision 1.57 1999/04/14 09:15:08 peter
  946. * first things to store the symbol/def number in the ppu
  947. Revision 1.56 1999/03/24 23:17:42 peter
  948. * fixed bugs 212,222,225,227,229,231,233
  949. Revision 1.55 1999/03/09 11:45:42 pierre
  950. * small arrays and records (size <=4) are copied directly
  951. Revision 1.54 1999/03/02 22:52:20 peter
  952. * fixed char array, which can start with all possible values
  953. Revision 1.53 1999/02/25 21:02:57 peter
  954. * ag386bin updates
  955. + coff writer
  956. Revision 1.52 1999/02/24 09:51:44 florian
  957. * wrong warning fixed, if a non-virtual method was hidden by a virtual
  958. method (repoerted by Matthias Koeppe)
  959. Revision 1.51 1999/02/22 23:33:31 florian
  960. + message directive for integers added
  961. Revision 1.50 1999/02/22 20:13:42 florian
  962. + first implementation of message keyword
  963. Revision 1.49 1999/02/16 00:45:30 peter
  964. * fixed crashes by forgotten strpnew() for init_symbol
  965. Revision 1.48 1999/02/09 23:03:08 florian
  966. * check for duplicate field names in inherited classes/objects
  967. * bug with self from the mailing list solved (the problem
  968. was that classes were sometimes pushed wrong)
  969. Revision 1.47 1999/01/27 00:14:01 florian
  970. * "procedure of object"-stuff fixed
  971. Revision 1.46 1999/01/21 22:10:54 peter
  972. * fixed array of const
  973. * generic platform independent high() support
  974. Revision 1.45 1999/01/20 12:34:22 peter
  975. * fixed typed file read/write
  976. Revision 1.44 1999/01/15 11:33:03 pierre
  977. * bug in mmx code removed
  978. Revision 1.43 1998/12/30 13:41:20 peter
  979. * released valuepara
  980. Revision 1.42 1998/12/11 00:04:03 peter
  981. + globtype,tokens,version unit splitted from globals
  982. Revision 1.41 1998/12/10 09:47:33 florian
  983. + basic operations with int64/qord (compiler with -dint64)
  984. + rtti of enumerations extended: names are now written
  985. Revision 1.40 1998/12/04 10:18:14 florian
  986. * some stuff for procedures of object added
  987. * bug with overridden virtual constructors fixed (reported by Italo Gomes)
  988. Revision 1.39 1998/11/27 14:50:55 peter
  989. + open strings, $P switch support
  990. Revision 1.38 1998/11/18 15:44:24 peter
  991. * VALUEPARA for tp7 compatible value parameters
  992. Revision 1.37 1998/11/13 10:15:50 peter
  993. * fixed ptr() with constants
  994. Revision 1.36 1998/11/10 10:09:21 peter
  995. * va_list -> array of const
  996. Revision 1.35 1998/10/19 08:55:13 pierre
  997. * wrong stabs info corrected once again !!
  998. + variable vmt offset with vmt field only if required
  999. implemented now !!!
  1000. Revision 1.34 1998/10/12 09:50:06 florian
  1001. + support of <procedure var type>:=<pointer> in delphi mode added
  1002. Revision 1.33 1998/10/06 20:43:30 peter
  1003. * fixed set of bugs. like set of false..true set of #1..#255 and
  1004. set of #1..true which was allowed
  1005. Revision 1.32 1998/10/05 21:33:35 peter
  1006. * fixed 161,165,166,167,168
  1007. Revision 1.31 1998/09/23 09:58:56 peter
  1008. * first working array of const things
  1009. Revision 1.30 1998/09/22 15:40:58 peter
  1010. * some extra ifdef GDB
  1011. Revision 1.29 1998/09/16 12:37:31 michael
  1012. Added FPC_ prefix to abstracterror
  1013. Revision 1.28 1998/09/09 16:44:23 florian
  1014. * I hope, the case bug is fixed now
  1015. Revision 1.27 1998/09/07 17:37:07 florian
  1016. * first fixes for published properties
  1017. Revision 1.26 1998/09/04 12:24:31 florian
  1018. * bug0159 fixed
  1019. Revision 1.25 1998/09/04 09:06:36 florian
  1020. * bug0132 fixed
  1021. Revision 1.24 1998/09/04 08:36:49 peter
  1022. * fixed boolean:=integer which is not explicit
  1023. Revision 1.23 1998/09/01 17:39:55 peter
  1024. + internal constant functions
  1025. Revision 1.22 1998/09/01 12:53:28 peter
  1026. + aktpackenum
  1027. Revision 1.21 1998/08/19 00:42:45 peter
  1028. + subrange types for enums
  1029. + checking for bounds type with ranges
  1030. Revision 1.20 1998/08/18 14:17:14 pierre
  1031. * bug about assigning the return value of a function to
  1032. a procvar fixed : warning
  1033. assigning a proc to a procvar need @ in FPC mode !!
  1034. * missing file/line info restored
  1035. Revision 1.19 1998/08/18 09:24:48 pierre
  1036. * small warning position bug fixed
  1037. * support_mmx switches splitting was missing
  1038. * rhide error and warning output corrected
  1039. Revision 1.18 1998/08/14 18:18:49 peter
  1040. + dynamic set contruction
  1041. * smallsets are now working (always longint size)
  1042. Revision 1.17 1998/08/05 16:00:17 florian
  1043. * some fixes for ansi strings
  1044. Revision 1.16 1998/07/20 23:35:50 michael
  1045. Const ansistrings are not copied.
  1046. Revision 1.15 1998/07/18 22:54:32 florian
  1047. * some ansi/wide/longstring support fixed:
  1048. o parameter passing
  1049. o returning as result from functions
  1050. Revision 1.14 1998/06/12 14:50:50 peter
  1051. * removed the tree dependency to types.pas
  1052. * long_fil.pas support (not fully tested yet)
  1053. Revision 1.13 1998/06/03 22:49:07 peter
  1054. + wordbool,longbool
  1055. * rename bis,von -> high,low
  1056. * moved some systemunit loading/creating to psystem.pas
  1057. Revision 1.12 1998/05/12 10:47:00 peter
  1058. * moved printstatus to verb_def
  1059. + V_Normal which is between V_Error and V_Warning and doesn't have a
  1060. prefix like error: warning: and is included in V_Default
  1061. * fixed some messages
  1062. * first time parameter scan is only for -v and -T
  1063. - removed old style messages
  1064. Revision 1.11 1998/05/01 16:38:46 florian
  1065. * handling of private and protected fixed
  1066. + change_keywords_to_tp implemented to remove
  1067. keywords which aren't supported by tp
  1068. * break and continue are now symbols of the system unit
  1069. + widestring, longstring and ansistring type released
  1070. Revision 1.10 1998/04/29 10:34:08 pierre
  1071. + added some code for ansistring (not complete nor working yet)
  1072. * corrected operator overloading
  1073. * corrected nasm output
  1074. + started inline procedures
  1075. + added starstarn : use ** for exponentiation (^ gave problems)
  1076. + started UseTokenInfo cond to get accurate positions
  1077. Revision 1.9 1998/04/21 10:16:49 peter
  1078. * patches from strasbourg
  1079. * objects is not used anymore in the fpc compiled version
  1080. Revision 1.8 1998/04/12 22:39:44 florian
  1081. * problem with read access to properties solved
  1082. * correct handling of hidding methods via virtual (COM)
  1083. * correct result type of constructor calls (COM), the resulttype
  1084. depends now on the type of the class reference
  1085. Revision 1.7 1998/04/10 21:36:56 florian
  1086. + some stuff to support method pointers (procedure of object) added
  1087. (declaration, parameter handling)
  1088. Revision 1.6 1998/04/10 15:39:49 florian
  1089. * more fixes to get classes.pas compiled
  1090. Revision 1.5 1998/04/09 23:02:16 florian
  1091. * small problems solved to get remake3 work
  1092. Revision 1.4 1998/04/08 16:58:09 pierre
  1093. * several bugfixes
  1094. ADD ADC and AND are also sign extended
  1095. nasm output OK (program still crashes at end
  1096. and creates wrong assembler files !!)
  1097. procsym types sym in tdef removed !!
  1098. Revision 1.3 1998/04/08 11:34:22 peter
  1099. * nasm works (linux only tested)
  1100. }