types.pas 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313
  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:=false;
  426. if never_copy_const_param then
  427. push_addr_param:=true
  428. else
  429. begin
  430. case def^.deftype of
  431. formaldef :
  432. push_addr_param:=true;
  433. recorddef :
  434. push_addr_param:=(def^.size>4);
  435. arraydef :
  436. push_addr_param:=((Parraydef(def)^.highrange>Parraydef(def)^.lowrange) and (def^.size>4)) or
  437. is_open_array(def) or
  438. is_array_of_const(def) or
  439. is_array_constructor(def);
  440. objectdef :
  441. push_addr_param:=not(pobjectdef(def)^.is_class);
  442. stringdef :
  443. push_addr_param:=pstringdef(def)^.string_typ in [st_shortstring,st_longstring];
  444. procvardef :
  445. push_addr_param:=(po_methodpointer in pprocvardef(def)^.procoptions);
  446. setdef :
  447. push_addr_param:=(psetdef(def)^.settype<>smallset);
  448. end;
  449. end;
  450. end;
  451. { test if l is in the range of def, outputs error if out of range }
  452. procedure testrange(def : pdef;var l : longint);
  453. var
  454. lv,hv: longint;
  455. begin
  456. { for 64 bit types we need only to check if it is less than }
  457. { zero, if def is a qword node }
  458. if is_64bitint(def) then
  459. begin
  460. if (l<0) and (porddef(def)^.typ=u64bit) then
  461. begin
  462. l:=0;
  463. if (cs_check_range in aktlocalswitches) then
  464. Message(parser_e_range_check_error)
  465. else
  466. Message(parser_w_range_check_error);
  467. end;
  468. end
  469. else
  470. begin
  471. getrange(def,lv,hv);
  472. if (def^.deftype=orddef) and
  473. (porddef(def)^.typ=u32bit) then
  474. begin
  475. if lv<=hv then
  476. begin
  477. if (l<lv) or (l>hv) then
  478. begin
  479. if (cs_check_range in aktlocalswitches) then
  480. Message(parser_e_range_check_error)
  481. else
  482. Message(parser_w_range_check_error);
  483. end;
  484. end
  485. else
  486. { this happens with the wrap around problem }
  487. { if lv is positive and hv is over $7ffffff }
  488. { so it seems negative }
  489. begin
  490. if ((l>=0) and (l<lv)) or
  491. ((l<0) and (l>hv)) then
  492. begin
  493. if (cs_check_range in aktlocalswitches) then
  494. Message(parser_e_range_check_error)
  495. else
  496. Message(parser_w_range_check_error);
  497. end;
  498. end;
  499. end
  500. else if (l<lv) or (l>hv) then
  501. begin
  502. if (def^.deftype=enumdef) or
  503. (cs_check_range in aktlocalswitches) then
  504. Message(parser_e_range_check_error)
  505. else
  506. Message(parser_w_range_check_error);
  507. { Fix the value to be in range }
  508. l:=lv+(l mod (hv-lv+1));
  509. end;
  510. end;
  511. end;
  512. { return the range from def in l and h }
  513. procedure getrange(def : pdef;var l : longint;var h : longint);
  514. begin
  515. case def^.deftype of
  516. orddef :
  517. begin
  518. l:=porddef(def)^.low;
  519. h:=porddef(def)^.high;
  520. end;
  521. enumdef :
  522. begin
  523. l:=penumdef(def)^.min;
  524. h:=penumdef(def)^.max;
  525. end;
  526. arraydef :
  527. begin
  528. l:=parraydef(def)^.lowrange;
  529. h:=parraydef(def)^.highrange;
  530. end;
  531. else
  532. internalerror(987);
  533. end;
  534. end;
  535. function mmx_type(p : pdef) : tmmxtype;
  536. begin
  537. mmx_type:=mmxno;
  538. if is_mmx_able_array(p) then
  539. begin
  540. if parraydef(p)^.definition^.deftype=floatdef then
  541. case pfloatdef(parraydef(p)^.definition)^.typ of
  542. s32real:
  543. mmx_type:=mmxsingle;
  544. f16bit:
  545. mmx_type:=mmxfixed16
  546. end
  547. else
  548. case porddef(parraydef(p)^.definition)^.typ of
  549. u8bit:
  550. mmx_type:=mmxu8bit;
  551. s8bit:
  552. mmx_type:=mmxs8bit;
  553. u16bit:
  554. mmx_type:=mmxu16bit;
  555. s16bit:
  556. mmx_type:=mmxs16bit;
  557. u32bit:
  558. mmx_type:=mmxu32bit;
  559. s32bit:
  560. mmx_type:=mmxs32bit;
  561. end;
  562. end;
  563. end;
  564. function is_mmx_able_array(p : pdef) : boolean;
  565. begin
  566. {$ifdef SUPPORT_MMX}
  567. if (cs_mmx_saturation in aktlocalswitches) then
  568. begin
  569. is_mmx_able_array:=(p^.deftype=arraydef) and
  570. not(is_special_array(p)) and
  571. (
  572. (
  573. (parraydef(p)^.definition^.deftype=orddef) and
  574. (
  575. (
  576. (parraydef(p)^.lowrange=0) and
  577. (parraydef(p)^.highrange=1) and
  578. (porddef(parraydef(p)^.definition)^.typ in [u32bit,s32bit])
  579. )
  580. or
  581. (
  582. (parraydef(p)^.lowrange=0) and
  583. (parraydef(p)^.highrange=3) and
  584. (porddef(parraydef(p)^.definition)^.typ in [u16bit,s16bit])
  585. )
  586. )
  587. )
  588. or
  589. (
  590. (
  591. (parraydef(p)^.definition^.deftype=floatdef) and
  592. (
  593. (parraydef(p)^.lowrange=0) and
  594. (parraydef(p)^.highrange=3) and
  595. (pfloatdef(parraydef(p)^.definition)^.typ=f16bit)
  596. ) or
  597. (
  598. (parraydef(p)^.lowrange=0) and
  599. (parraydef(p)^.highrange=1) and
  600. (pfloatdef(parraydef(p)^.definition)^.typ=s32real)
  601. )
  602. )
  603. )
  604. );
  605. end
  606. else
  607. begin
  608. is_mmx_able_array:=(p^.deftype=arraydef) and
  609. (
  610. (
  611. (parraydef(p)^.definition^.deftype=orddef) and
  612. (
  613. (
  614. (parraydef(p)^.lowrange=0) and
  615. (parraydef(p)^.highrange=1) and
  616. (porddef(parraydef(p)^.definition)^.typ in [u32bit,s32bit])
  617. )
  618. or
  619. (
  620. (parraydef(p)^.lowrange=0) and
  621. (parraydef(p)^.highrange=3) and
  622. (porddef(parraydef(p)^.definition)^.typ in [u16bit,s16bit])
  623. )
  624. or
  625. (
  626. (parraydef(p)^.lowrange=0) and
  627. (parraydef(p)^.highrange=7) and
  628. (porddef(parraydef(p)^.definition)^.typ in [u8bit,s8bit])
  629. )
  630. )
  631. )
  632. or
  633. (
  634. (parraydef(p)^.definition^.deftype=floatdef) and
  635. (
  636. (
  637. (parraydef(p)^.lowrange=0) and
  638. (parraydef(p)^.highrange=3) and
  639. (pfloatdef(parraydef(p)^.definition)^.typ=f32bit)
  640. )
  641. or
  642. (
  643. (parraydef(p)^.lowrange=0) and
  644. (parraydef(p)^.highrange=1) and
  645. (pfloatdef(parraydef(p)^.definition)^.typ=s32real)
  646. )
  647. )
  648. )
  649. );
  650. end;
  651. {$else SUPPORT_MMX}
  652. is_mmx_able_array:=false;
  653. {$endif SUPPORT_MMX}
  654. end;
  655. function is_equal(def1,def2 : pdef) : boolean;
  656. var
  657. b : boolean;
  658. hd : pdef;
  659. hp1,hp2 : pdefcoll;
  660. begin
  661. { both types must exists }
  662. if not (assigned(def1) and assigned(def2)) then
  663. begin
  664. is_equal:=false;
  665. exit;
  666. end;
  667. { be sure, that if there is a stringdef, that this is def1 }
  668. if def2^.deftype=stringdef then
  669. begin
  670. hd:=def1;
  671. def1:=def2;
  672. def2:=hd;
  673. end;
  674. b:=false;
  675. { both point to the same definition ? }
  676. if def1=def2 then
  677. b:=true
  678. else
  679. { pointer with an equal definition are equal }
  680. if (def1^.deftype=pointerdef) and (def2^.deftype=pointerdef) then
  681. begin
  682. { here a problem detected in tabsolutesym }
  683. { the types can be forward type !! }
  684. if assigned(def1^.sym) and (sp_forwarddef in def1^.sym^.symoptions) then
  685. b:=(def1^.sym=def2^.sym)
  686. else
  687. b:=ppointerdef(def1)^.definition=ppointerdef(def2)^.definition;
  688. end
  689. else
  690. { ordinals are equal only when the ordinal type is equal }
  691. if (def1^.deftype=orddef) and (def2^.deftype=orddef) then
  692. begin
  693. case porddef(def1)^.typ of
  694. u8bit,u16bit,u32bit,
  695. s8bit,s16bit,s32bit:
  696. b:=((porddef(def1)^.typ=porddef(def2)^.typ) and
  697. (porddef(def1)^.low=porddef(def2)^.low) and
  698. (porddef(def1)^.high=porddef(def2)^.high));
  699. uvoid,uchar,
  700. bool8bit,bool16bit,bool32bit:
  701. b:=(porddef(def1)^.typ=porddef(def2)^.typ);
  702. end;
  703. end
  704. else
  705. if (def1^.deftype=floatdef) and (def2^.deftype=floatdef) then
  706. b:=pfloatdef(def1)^.typ=pfloatdef(def2)^.typ
  707. else
  708. { strings with the same length are equal }
  709. if (def1^.deftype=stringdef) and (def2^.deftype=stringdef) and
  710. (pstringdef(def1)^.string_typ=pstringdef(def2)^.string_typ) then
  711. begin
  712. b:=not(is_shortstring(def1)) or
  713. (pstringdef(def1)^.len=pstringdef(def2)^.len);
  714. end
  715. else
  716. if (def1^.deftype=formaldef) and (def2^.deftype=formaldef) then
  717. b:=true
  718. { file types with the same file element type are equal }
  719. { this is a problem for assign !! }
  720. { changed to allow if one is untyped }
  721. { all typed files are equal to the special }
  722. { typed file that has voiddef as elemnt type }
  723. { but must NOT match for text file !!! }
  724. else
  725. if (def1^.deftype=filedef) and (def2^.deftype=filedef) then
  726. b:=(pfiledef(def1)^.filetype=pfiledef(def2)^.filetype) and
  727. ((
  728. ((pfiledef(def1)^.typed_as=nil) and
  729. (pfiledef(def2)^.typed_as=nil)) or
  730. (
  731. (pfiledef(def1)^.typed_as<>nil) and
  732. (pfiledef(def2)^.typed_as<>nil) and
  733. is_equal(pfiledef(def1)^.typed_as,pfiledef(def2)^.typed_as)
  734. ) or
  735. ( (pfiledef(def1)^.typed_as=pdef(voiddef)) or
  736. (pfiledef(def2)^.typed_as=pdef(voiddef))
  737. )))
  738. { sets with the same element type are equal }
  739. else
  740. if (def1^.deftype=setdef) and (def2^.deftype=setdef) then
  741. begin
  742. if assigned(psetdef(def1)^.setof) and
  743. assigned(psetdef(def2)^.setof) then
  744. b:=(psetdef(def1)^.setof^.deftype=psetdef(def2)^.setof^.deftype)
  745. else
  746. b:=true;
  747. end
  748. else
  749. if (def1^.deftype=procvardef) and (def2^.deftype=procvardef) then
  750. begin
  751. { poassembler isn't important for compatibility }
  752. { if a method is assigned to a methodpointer }
  753. { is checked before }
  754. b:=((pprocvardef(def1)^.procoptions * po_compatibility_options)=
  755. (pprocvardef(def2)^.procoptions * po_compatibility_options)) and
  756. is_equal(pprocvardef(def1)^.retdef,pprocvardef(def2)^.retdef);
  757. { now evalute the parameters }
  758. if b then
  759. begin
  760. hp1:=pprocvardef(def1)^.para1;
  761. hp2:=pprocvardef(def1)^.para1;
  762. while assigned(hp1) and assigned(hp2) do
  763. begin
  764. if not(is_equal(hp1^.data,hp2^.data)) or
  765. not(hp1^.paratyp=hp2^.paratyp) then
  766. begin
  767. b:=false;
  768. break;
  769. end;
  770. hp1:=hp1^.next;
  771. hp2:=hp2^.next;
  772. end;
  773. b:=(hp1=nil) and (hp2=nil);
  774. end;
  775. end
  776. else
  777. if (def1^.deftype=arraydef) and (def2^.deftype=arraydef) then
  778. begin
  779. if is_open_array(def1) or is_open_array(def2) or
  780. is_array_of_const(def1) or is_array_of_const(def2) then
  781. begin
  782. if parraydef(def1)^.IsArrayOfConst or parraydef(def2)^.IsArrayOfConst then
  783. b:=true
  784. else
  785. b:=is_equal(parraydef(def1)^.definition,parraydef(def2)^.definition);
  786. end
  787. else
  788. begin
  789. b:=not(m_tp in aktmodeswitches) and
  790. not(m_delphi in aktmodeswitches) and
  791. (parraydef(def1)^.lowrange=parraydef(def2)^.lowrange) and
  792. (parraydef(def1)^.highrange=parraydef(def2)^.highrange) and
  793. is_equal(parraydef(def1)^.definition,parraydef(def2)^.definition) and
  794. is_equal(parraydef(def1)^.rangedef,parraydef(def2)^.rangedef);
  795. end;
  796. end
  797. else
  798. if (def1^.deftype=classrefdef) and (def2^.deftype=classrefdef) then
  799. begin
  800. { similar to pointerdef: }
  801. if assigned(def1^.sym) and (sp_forwarddef in def1^.sym^.symoptions) then
  802. b:=(def1^.sym=def2^.sym)
  803. else
  804. b:=is_equal(pclassrefdef(def1)^.definition,pclassrefdef(def2)^.definition);
  805. end;
  806. is_equal:=b;
  807. end;
  808. function is_subequal(def1, def2: pdef): boolean;
  809. Begin
  810. if assigned(def1) and assigned(def2) then
  811. Begin
  812. is_subequal := FALSE;
  813. if (def1^.deftype = orddef) and (def2^.deftype = orddef) then
  814. Begin
  815. { see p.47 of Turbo Pascal 7.01 manual for the separation of types }
  816. { range checking for case statements is done with testrange }
  817. case porddef(def1)^.typ of
  818. u8bit,u16bit,u32bit,
  819. s8bit,s16bit,s32bit :
  820. is_subequal:=(porddef(def2)^.typ in [s32bit,u32bit,u8bit,s8bit,s16bit,u16bit]);
  821. bool8bit,bool16bit,bool32bit :
  822. is_subequal:=(porddef(def2)^.typ in [bool8bit,bool16bit,bool32bit]);
  823. uchar :
  824. is_subequal:=(porddef(def2)^.typ=uchar);
  825. end;
  826. end
  827. else
  828. Begin
  829. { I assume that both enumerations are equal when the first }
  830. { pointers are equal. }
  831. if (def1^.deftype = enumdef) and (def2^.deftype =enumdef) then
  832. Begin
  833. if penumdef(def1)^.firstenum = penumdef(def2)^.firstenum then
  834. is_subequal := TRUE;
  835. end;
  836. end;
  837. end; { endif assigned ... }
  838. end;
  839. function CheckTypes(def1,def2 : pdef) : boolean;
  840. var
  841. s1,s2 : string;
  842. begin
  843. if not is_equal(def1,def2) then
  844. begin
  845. { Crash prevention }
  846. if (not assigned(def1)) or (not assigned(def2)) then
  847. Message(type_e_mismatch)
  848. else
  849. begin
  850. s1:=def1^.typename;
  851. s2:=def2^.typename;
  852. if (s1<>'<unknown type>') and (s2<>'<unknown type>') then
  853. Message2(type_e_not_equal_types,def1^.typename,def2^.typename)
  854. else
  855. Message(type_e_mismatch);
  856. end;
  857. CheckTypes:=false;
  858. end
  859. else
  860. CheckTypes:=true;
  861. end;
  862. end.
  863. {
  864. $Log$
  865. Revision 1.85 1999-08-13 21:27:08 peter
  866. * more fixes for push_addr
  867. Revision 1.84 1999/08/13 15:38:23 peter
  868. * fixed push_addr_param for records < 4, the array high<low range check
  869. broke this code.
  870. Revision 1.83 1999/08/07 14:21:06 florian
  871. * some small problems fixed
  872. Revision 1.82 1999/08/07 13:36:56 daniel
  873. * Recommitted the arraydef overflow bugfix.
  874. Revision 1.80 1999/08/05 22:42:49 daniel
  875. * Fixed potential bug for open arrays (Their size is not known at
  876. compilation time).
  877. Revision 1.79 1999/08/03 22:03:41 peter
  878. * moved bitmask constants to sets
  879. * some other type/const renamings
  880. Revision 1.78 1999/07/30 12:26:42 peter
  881. * array is_equal disabled for tp,delphi mode
  882. Revision 1.77 1999/07/29 11:41:51 peter
  883. * array is_equal extended
  884. Revision 1.76 1999/07/27 23:39:15 peter
  885. * open array checks also for s32bitdef, because u32bit also has a
  886. high range of -1
  887. Revision 1.75 1999/07/06 21:48:29 florian
  888. * a lot bug fixes:
  889. - po_external isn't any longer necessary for procedure compatibility
  890. - m_tp_procvar is in -Sd now available
  891. - error messages of procedure variables improved
  892. - return values with init./finalization fixed
  893. - data types with init./finalization aren't any longer allowed in variant
  894. record
  895. Revision 1.74 1999/07/01 15:49:24 florian
  896. * int64/qword type release
  897. + lo/hi for int64/qword
  898. Revision 1.73 1999/06/28 22:29:22 florian
  899. * qword division fixed
  900. + code for qword/int64 type casting added:
  901. range checking isn't implemented yet
  902. Revision 1.72 1999/06/13 22:41:08 peter
  903. * merged from fixes
  904. Revision 1.71.2.1 1999/06/13 22:37:17 peter
  905. * convertable para's doesn't check for equal, added equal para's to
  906. proc2procvar check
  907. Revision 1.71 1999/06/03 09:34:13 peter
  908. * better methodpointer check for proc->procvar
  909. Revision 1.70 1999/06/02 22:25:55 pierre
  910. types.pas
  911. Revision 1.69 1999/06/02 10:11:55 florian
  912. * make cycle fixed i.e. compilation with 0.99.10
  913. * some fixes for qword
  914. * start of register calling conventions
  915. Revision 1.68 1999/06/01 19:27:58 peter
  916. * better checks for procvar and methodpointer
  917. Revision 1.67 1999/05/31 22:54:19 peter
  918. * when range check error is found then fix the value to be within the
  919. range
  920. Revision 1.66 1999/05/28 11:00:51 peter
  921. * removed ungettempoftype
  922. Revision 1.65 1999/05/23 18:42:23 florian
  923. * better error recovering in typed constants
  924. * some problems with arrays of const fixed, some problems
  925. due my previous
  926. - the location type of array constructor is now LOC_MEM
  927. - the pushing of high fixed
  928. - parameter copying fixed
  929. - zero temp. allocation removed
  930. * small problem in the assembler writers fixed:
  931. ref to nil wasn't written correctly
  932. Revision 1.64 1999/05/19 20:55:08 florian
  933. * fix of my previous commit
  934. Revision 1.63 1999/05/19 20:40:15 florian
  935. * fixed a couple of array related bugs:
  936. - var a : array[0..1] of char; p : pchar; p:=a+123; works now
  937. - open arrays with an odd size doesn't work: movsb wasn't generated
  938. - introduced some new array type helper routines (is_special_array) etc.
  939. - made the array type checking in isconvertable more strict, often
  940. open array can be used where is wasn't allowed etc...
  941. Revision 1.62 1999/05/19 16:48:29 florian
  942. * tdef.typename: returns a now a proper type name for the most types
  943. Revision 1.61 1999/05/19 10:31:56 florian
  944. * two bugs reported by Romio (bugs 13) are fixed:
  945. - empty array constructors are now handled correctly (e.g. for sysutils.format)
  946. - comparsion of ansistrings was sometimes coded wrong
  947. Revision 1.60 1999/05/18 14:16:01 peter
  948. * containsself fixes
  949. * checktypes()
  950. Revision 1.59 1999/05/18 09:52:24 peter
  951. * procedure of object and addrn fixes
  952. Revision 1.58 1999/04/19 09:29:51 pierre
  953. + ungettempoftype(pdef) boolean function
  954. returns true (can call ungetiftemp )
  955. unless the temp should be "unget" with temptoremove
  956. (currently ansistring or widestring !)
  957. Revision 1.57 1999/04/14 09:15:08 peter
  958. * first things to store the symbol/def number in the ppu
  959. Revision 1.56 1999/03/24 23:17:42 peter
  960. * fixed bugs 212,222,225,227,229,231,233
  961. Revision 1.55 1999/03/09 11:45:42 pierre
  962. * small arrays and records (size <=4) are copied directly
  963. Revision 1.54 1999/03/02 22:52:20 peter
  964. * fixed char array, which can start with all possible values
  965. Revision 1.53 1999/02/25 21:02:57 peter
  966. * ag386bin updates
  967. + coff writer
  968. Revision 1.52 1999/02/24 09:51:44 florian
  969. * wrong warning fixed, if a non-virtual method was hidden by a virtual
  970. method (repoerted by Matthias Koeppe)
  971. Revision 1.51 1999/02/22 23:33:31 florian
  972. + message directive for integers added
  973. Revision 1.50 1999/02/22 20:13:42 florian
  974. + first implementation of message keyword
  975. Revision 1.49 1999/02/16 00:45:30 peter
  976. * fixed crashes by forgotten strpnew() for init_symbol
  977. Revision 1.48 1999/02/09 23:03:08 florian
  978. * check for duplicate field names in inherited classes/objects
  979. * bug with self from the mailing list solved (the problem
  980. was that classes were sometimes pushed wrong)
  981. Revision 1.47 1999/01/27 00:14:01 florian
  982. * "procedure of object"-stuff fixed
  983. Revision 1.46 1999/01/21 22:10:54 peter
  984. * fixed array of const
  985. * generic platform independent high() support
  986. Revision 1.45 1999/01/20 12:34:22 peter
  987. * fixed typed file read/write
  988. Revision 1.44 1999/01/15 11:33:03 pierre
  989. * bug in mmx code removed
  990. Revision 1.43 1998/12/30 13:41:20 peter
  991. * released valuepara
  992. Revision 1.42 1998/12/11 00:04:03 peter
  993. + globtype,tokens,version unit splitted from globals
  994. Revision 1.41 1998/12/10 09:47:33 florian
  995. + basic operations with int64/qord (compiler with -dint64)
  996. + rtti of enumerations extended: names are now written
  997. Revision 1.40 1998/12/04 10:18:14 florian
  998. * some stuff for procedures of object added
  999. * bug with overridden virtual constructors fixed (reported by Italo Gomes)
  1000. Revision 1.39 1998/11/27 14:50:55 peter
  1001. + open strings, $P switch support
  1002. Revision 1.38 1998/11/18 15:44:24 peter
  1003. * VALUEPARA for tp7 compatible value parameters
  1004. Revision 1.37 1998/11/13 10:15:50 peter
  1005. * fixed ptr() with constants
  1006. Revision 1.36 1998/11/10 10:09:21 peter
  1007. * va_list -> array of const
  1008. Revision 1.35 1998/10/19 08:55:13 pierre
  1009. * wrong stabs info corrected once again !!
  1010. + variable vmt offset with vmt field only if required
  1011. implemented now !!!
  1012. Revision 1.34 1998/10/12 09:50:06 florian
  1013. + support of <procedure var type>:=<pointer> in delphi mode added
  1014. Revision 1.33 1998/10/06 20:43:30 peter
  1015. * fixed set of bugs. like set of false..true set of #1..#255 and
  1016. set of #1..true which was allowed
  1017. Revision 1.32 1998/10/05 21:33:35 peter
  1018. * fixed 161,165,166,167,168
  1019. Revision 1.31 1998/09/23 09:58:56 peter
  1020. * first working array of const things
  1021. Revision 1.30 1998/09/22 15:40:58 peter
  1022. * some extra ifdef GDB
  1023. Revision 1.29 1998/09/16 12:37:31 michael
  1024. Added FPC_ prefix to abstracterror
  1025. Revision 1.28 1998/09/09 16:44:23 florian
  1026. * I hope, the case bug is fixed now
  1027. Revision 1.27 1998/09/07 17:37:07 florian
  1028. * first fixes for published properties
  1029. Revision 1.26 1998/09/04 12:24:31 florian
  1030. * bug0159 fixed
  1031. Revision 1.25 1998/09/04 09:06:36 florian
  1032. * bug0132 fixed
  1033. Revision 1.24 1998/09/04 08:36:49 peter
  1034. * fixed boolean:=integer which is not explicit
  1035. Revision 1.23 1998/09/01 17:39:55 peter
  1036. + internal constant functions
  1037. Revision 1.22 1998/09/01 12:53:28 peter
  1038. + aktpackenum
  1039. Revision 1.21 1998/08/19 00:42:45 peter
  1040. + subrange types for enums
  1041. + checking for bounds type with ranges
  1042. Revision 1.20 1998/08/18 14:17:14 pierre
  1043. * bug about assigning the return value of a function to
  1044. a procvar fixed : warning
  1045. assigning a proc to a procvar need @ in FPC mode !!
  1046. * missing file/line info restored
  1047. Revision 1.19 1998/08/18 09:24:48 pierre
  1048. * small warning position bug fixed
  1049. * support_mmx switches splitting was missing
  1050. * rhide error and warning output corrected
  1051. Revision 1.18 1998/08/14 18:18:49 peter
  1052. + dynamic set contruction
  1053. * smallsets are now working (always longint size)
  1054. Revision 1.17 1998/08/05 16:00:17 florian
  1055. * some fixes for ansi strings
  1056. Revision 1.16 1998/07/20 23:35:50 michael
  1057. Const ansistrings are not copied.
  1058. Revision 1.15 1998/07/18 22:54:32 florian
  1059. * some ansi/wide/longstring support fixed:
  1060. o parameter passing
  1061. o returning as result from functions
  1062. Revision 1.14 1998/06/12 14:50:50 peter
  1063. * removed the tree dependency to types.pas
  1064. * long_fil.pas support (not fully tested yet)
  1065. Revision 1.13 1998/06/03 22:49:07 peter
  1066. + wordbool,longbool
  1067. * rename bis,von -> high,low
  1068. * moved some systemunit loading/creating to psystem.pas
  1069. Revision 1.12 1998/05/12 10:47:00 peter
  1070. * moved printstatus to verb_def
  1071. + V_Normal which is between V_Error and V_Warning and doesn't have a
  1072. prefix like error: warning: and is included in V_Default
  1073. * fixed some messages
  1074. * first time parameter scan is only for -v and -T
  1075. - removed old style messages
  1076. Revision 1.11 1998/05/01 16:38:46 florian
  1077. * handling of private and protected fixed
  1078. + change_keywords_to_tp implemented to remove
  1079. keywords which aren't supported by tp
  1080. * break and continue are now symbols of the system unit
  1081. + widestring, longstring and ansistring type released
  1082. Revision 1.10 1998/04/29 10:34:08 pierre
  1083. + added some code for ansistring (not complete nor working yet)
  1084. * corrected operator overloading
  1085. * corrected nasm output
  1086. + started inline procedures
  1087. + added starstarn : use ** for exponentiation (^ gave problems)
  1088. + started UseTokenInfo cond to get accurate positions
  1089. Revision 1.9 1998/04/21 10:16:49 peter
  1090. * patches from strasbourg
  1091. * objects is not used anymore in the fpc compiled version
  1092. Revision 1.8 1998/04/12 22:39:44 florian
  1093. * problem with read access to properties solved
  1094. * correct handling of hidding methods via virtual (COM)
  1095. * correct result type of constructor calls (COM), the resulttype
  1096. depends now on the type of the class reference
  1097. Revision 1.7 1998/04/10 21:36:56 florian
  1098. + some stuff to support method pointers (procedure of object) added
  1099. (declaration, parameter handling)
  1100. Revision 1.6 1998/04/10 15:39:49 florian
  1101. * more fixes to get classes.pas compiled
  1102. Revision 1.5 1998/04/09 23:02:16 florian
  1103. * small problems solved to get remake3 work
  1104. Revision 1.4 1998/04/08 16:58:09 pierre
  1105. * several bugfixes
  1106. ADD ADC and AND are also sign extended
  1107. nasm output OK (program still crashes at end
  1108. and creates wrong assembler files !!)
  1109. procsym types sym in tdef removed !!
  1110. Revision 1.3 1998/04/08 11:34:22 peter
  1111. * nasm works (linux only tested)
  1112. }