nmat.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  1. {
  2. $Id$
  3. Copyright (c) 2000 by Florian Klaempfl
  4. Type checking and register allocation for math nodes
  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 nmat;
  19. {$i defines.inc}
  20. interface
  21. uses
  22. node;
  23. type
  24. tmoddivnode = class(tbinopnode)
  25. function pass_1 : tnode;override;
  26. function det_resulttype:tnode;override;
  27. protected
  28. { override the following if you want to implement }
  29. { parts explicitely in the code generator (JM) }
  30. function first_moddiv64bitint: tnode; virtual;
  31. end;
  32. tmoddivnodeclass = class of tmoddivnode;
  33. tshlshrnode = class(tbinopnode)
  34. function pass_1 : tnode;override;
  35. function det_resulttype:tnode;override;
  36. end;
  37. tshlshrnodeclass = class of tshlshrnode;
  38. tunaryminusnode = class(tunarynode)
  39. constructor create(expr : tnode);virtual;
  40. function pass_1 : tnode;override;
  41. function det_resulttype:tnode;override;
  42. end;
  43. tunaryminusnodeclass = class of tunaryminusnode;
  44. tnotnode = class(tunarynode)
  45. constructor create(expr : tnode);virtual;
  46. function pass_1 : tnode;override;
  47. function det_resulttype:tnode;override;
  48. end;
  49. tnotnodeclass = class of tnotnode;
  50. var
  51. cmoddivnode : tmoddivnodeclass;
  52. cshlshrnode : tshlshrnodeclass;
  53. cunaryminusnode : tunaryminusnodeclass;
  54. cnotnode : tnotnodeclass;
  55. implementation
  56. uses
  57. systems,tokens,
  58. verbose,globals,cutils,
  59. {$ifdef support_mmx}
  60. globtype,
  61. {$endif}
  62. symconst,symtype,symtable,symdef,types,
  63. htypechk,pass_1,cpubase,cpuinfo,
  64. cgbase,
  65. ncon,ncnv,ncal,nadd;
  66. {****************************************************************************
  67. TMODDIVNODE
  68. ****************************************************************************}
  69. function tmoddivnode.det_resulttype:tnode;
  70. var
  71. t : tnode;
  72. rd,ld : tdef;
  73. rv,lv : tconstexprint;
  74. begin
  75. result:=nil;
  76. resulttypepass(left);
  77. resulttypepass(right);
  78. set_varstate(left,true);
  79. set_varstate(right,true);
  80. if codegenerror then
  81. exit;
  82. { constant folding }
  83. if is_constintnode(left) and is_constintnode(right) then
  84. begin
  85. rv:=tordconstnode(right).value;
  86. lv:=tordconstnode(left).value;
  87. { check for division by zero }
  88. if (rv=0) then
  89. begin
  90. Message(parser_e_division_by_zero);
  91. { recover }
  92. rv:=1;
  93. end;
  94. case nodetype of
  95. modn:
  96. t:=genintconstnode(lv mod rv);
  97. divn:
  98. t:=genintconstnode(lv div rv);
  99. end;
  100. result:=t;
  101. exit;
  102. end;
  103. { allow operator overloading }
  104. t:=self;
  105. if isbinaryoverloaded(t) then
  106. begin
  107. result:=t;
  108. exit;
  109. end;
  110. { if one operand is a cardinal and the other is a positive constant, convert the }
  111. { constant to a cardinal as well so we don't have to do a 64bit division (JM) }
  112. { Do the same for qwords and positive constants as well, otherwise things like }
  113. { "qword mod 10" are evaluated with int64 as result, which is wrong if the }
  114. { "qword" was > high(int64) (JM) }
  115. if (left.resulttype.def.deftype=orddef) and (right.resulttype.def.deftype=orddef) then
  116. if (torddef(right.resulttype.def).typ in [u32bit,u64bit]) and
  117. is_constintnode(left) and
  118. (tordconstnode(left).value >= 0) then
  119. inserttypeconv(left,right.resulttype)
  120. else if (torddef(left.resulttype.def).typ in [u32bit,u64bit]) and
  121. is_constintnode(right) and
  122. (tordconstnode(right).value >= 0) then
  123. inserttypeconv(right,left.resulttype);
  124. if (left.resulttype.def.deftype=orddef) and (right.resulttype.def.deftype=orddef) and
  125. (is_64bitint(left.resulttype.def) or is_64bitint(right.resulttype.def) or
  126. { when mixing cardinals and signed numbers, convert everythign to 64bit (JM) }
  127. ((torddef(right.resulttype.def).typ = u32bit) and
  128. is_signed(left.resulttype.def)) or
  129. ((torddef(left.resulttype.def).typ = u32bit) and
  130. is_signed(right.resulttype.def))) then
  131. begin
  132. rd:=right.resulttype.def;
  133. ld:=left.resulttype.def;
  134. { issue warning if necessary }
  135. if not (is_64bitint(left.resulttype.def) or is_64bitint(right.resulttype.def)) then
  136. CGMessage(type_w_mixed_signed_unsigned);
  137. if is_signed(rd) or is_signed(ld) then
  138. begin
  139. if (torddef(ld).typ<>s64bit) then
  140. inserttypeconv(left,cs64bittype);
  141. if (torddef(rd).typ<>s64bit) then
  142. inserttypeconv(right,cs64bittype);
  143. end
  144. else
  145. begin
  146. if (torddef(ld).typ<>u64bit) then
  147. inserttypeconv(left,cu64bittype);
  148. if (torddef(rd).typ<>u64bit) then
  149. inserttypeconv(right,cu64bittype);
  150. end;
  151. resulttype:=left.resulttype;
  152. end
  153. else
  154. begin
  155. if not(right.resulttype.def.deftype=orddef) or
  156. not(torddef(right.resulttype.def).typ in [s32bit,u32bit]) then
  157. inserttypeconv(right,s32bittype);
  158. if not(left.resulttype.def.deftype=orddef) or
  159. not(torddef(left.resulttype.def).typ in [s32bit,u32bit]) then
  160. inserttypeconv(left,s32bittype);
  161. { the resulttype.def depends on the right side, because the left becomes }
  162. { always 64 bit }
  163. resulttype:=right.resulttype;
  164. end;
  165. end;
  166. function tmoddivnode.first_moddiv64bitint: tnode;
  167. var
  168. procname: string[31];
  169. power: longint;
  170. begin
  171. result := nil;
  172. { divide/mod an unsigned number by a constant which is a power of 2? }
  173. if (right.nodetype = ordconstn) and
  174. not is_signed(resulttype.def) and
  175. ispowerof2(tordconstnode(right).value,power) then
  176. begin
  177. if nodetype = divn then
  178. begin
  179. tordconstnode(right).value := power;
  180. result := cshlshrnode.create(shrn,left,right)
  181. end
  182. else
  183. begin
  184. dec(tordconstnode(right).value);
  185. result := caddnode.create(andn,left,right);
  186. end;
  187. { left and right are reused }
  188. left := nil;
  189. right := nil;
  190. firstpass(result);
  191. exit;
  192. end;
  193. { otherwise create a call to a helper }
  194. if nodetype = divn then
  195. procname := 'fpc_div_'
  196. else
  197. procname := 'fpc_mod_';
  198. if is_signed(resulttype.def) then
  199. procname := procname + 'int64'
  200. else
  201. procname := procname + 'qword';
  202. result := ccallnode.createintern(procname,ccallparanode.create(left,
  203. ccallparanode.create(right,nil)));
  204. left := nil;
  205. right := nil;
  206. firstpass(result);
  207. end;
  208. function tmoddivnode.pass_1 : tnode;
  209. begin
  210. result:=nil;
  211. firstpass(left);
  212. firstpass(right);
  213. if codegenerror then
  214. exit;
  215. { 64bit }
  216. if (left.resulttype.def.deftype=orddef) and (right.resulttype.def.deftype=orddef) and
  217. (is_64bitint(left.resulttype.def) or is_64bitint(right.resulttype.def)) then
  218. begin
  219. result := first_moddiv64bitint;
  220. if assigned(result) then
  221. exit;
  222. location.loc:=LOC_REGISTER;
  223. calcregisters(self,2,0,0);
  224. end
  225. else
  226. begin
  227. left_right_max;
  228. if left.registers32<=right.registers32 then
  229. inc(registers32);
  230. end;
  231. location.loc:=LOC_REGISTER;
  232. end;
  233. {****************************************************************************
  234. TSHLSHRNODE
  235. ****************************************************************************}
  236. function tshlshrnode.det_resulttype:tnode;
  237. var
  238. t : tnode;
  239. begin
  240. result:=nil;
  241. resulttypepass(left);
  242. resulttypepass(right);
  243. set_varstate(right,true);
  244. set_varstate(left,true);
  245. if codegenerror then
  246. exit;
  247. { constant folding }
  248. if is_constintnode(left) and is_constintnode(right) then
  249. begin
  250. case nodetype of
  251. shrn:
  252. t:=genintconstnode(tordconstnode(left).value shr tordconstnode(right).value);
  253. shln:
  254. t:=genintconstnode(tordconstnode(left).value shl tordconstnode(right).value);
  255. end;
  256. result:=t;
  257. exit;
  258. end;
  259. { allow operator overloading }
  260. t:=self;
  261. if isbinaryoverloaded(t) then
  262. begin
  263. result:=t;
  264. exit;
  265. end;
  266. { 64 bit ints have their own shift handling }
  267. if not(is_64bitint(left.resulttype.def)) then
  268. begin
  269. if torddef(left.resulttype.def).typ <> u32bit then
  270. inserttypeconv(left,s32bittype);
  271. end;
  272. inserttypeconv(right,s32bittype);
  273. resulttype:=left.resulttype;
  274. end;
  275. function tshlshrnode.pass_1 : tnode;
  276. var
  277. regs : longint;
  278. begin
  279. result:=nil;
  280. firstpass(left);
  281. firstpass(right);
  282. if codegenerror then
  283. exit;
  284. { 64 bit ints have their own shift handling }
  285. if not(is_64bitint(left.resulttype.def)) then
  286. regs:=1
  287. else
  288. regs:=2;
  289. if (right.nodetype<>ordconstn) then
  290. inc(regs);
  291. location.loc:=LOC_REGISTER;
  292. calcregisters(self,regs,0,0);
  293. end;
  294. {****************************************************************************
  295. TUNARYMINUSNODE
  296. ****************************************************************************}
  297. constructor tunaryminusnode.create(expr : tnode);
  298. begin
  299. inherited create(unaryminusn,expr);
  300. end;
  301. function tunaryminusnode.det_resulttype : tnode;
  302. var
  303. t : tnode;
  304. minusdef : pprocdeflist;
  305. begin
  306. result:=nil;
  307. resulttypepass(left);
  308. set_varstate(left,true);
  309. if codegenerror then
  310. exit;
  311. { constant folding }
  312. if is_constintnode(left) then
  313. begin
  314. tordconstnode(left).value:=-tordconstnode(left).value;
  315. result:=left;
  316. left:=nil;
  317. exit;
  318. end;
  319. if is_constrealnode(left) then
  320. begin
  321. trealconstnode(left).value_real:=-trealconstnode(left).value_real;
  322. result:=left;
  323. left:=nil;
  324. exit;
  325. end;
  326. resulttype:=left.resulttype;
  327. if (left.resulttype.def.deftype=floatdef) then
  328. begin
  329. end
  330. {$ifdef SUPPORT_MMX}
  331. else if (cs_mmx in aktlocalswitches) and
  332. is_mmx_able_array(left.resulttype.def) then
  333. begin
  334. { if saturation is on, left.resulttype.def isn't
  335. "mmx able" (FK)
  336. if (cs_mmx_saturation in aktlocalswitches^) and
  337. (torddef(tarraydef(resulttype.def).definition).typ in
  338. [s32bit,u32bit]) then
  339. CGMessage(type_e_mismatch);
  340. }
  341. end
  342. {$endif SUPPORT_MMX}
  343. else if is_64bitint(left.resulttype.def) then
  344. begin
  345. end
  346. else if (left.resulttype.def.deftype=orddef) then
  347. begin
  348. inserttypeconv(left,s32bittype);
  349. resulttype:=left.resulttype;
  350. end
  351. else
  352. begin
  353. if assigned(overloaded_operators[_minus]) then
  354. minusdef:=overloaded_operators[_minus].defs
  355. else
  356. minusdef:=nil;
  357. while assigned(minusdef) do
  358. begin
  359. if is_equal(tparaitem(minusdef^.def.para.first).paratype.def,left.resulttype.def) and
  360. (tparaitem(minusdef^.def.para.first).next=nil) then
  361. begin
  362. t:=ccallnode.create(ccallparanode.create(left,nil),
  363. overloaded_operators[_minus],nil,nil);
  364. left:=nil;
  365. result:=t;
  366. exit;
  367. end;
  368. minusdef:=minusdef^.next;
  369. end;
  370. CGMessage(type_e_mismatch);
  371. end;
  372. end;
  373. { generic code }
  374. { overridden by: }
  375. { i386 }
  376. function tunaryminusnode.pass_1 : tnode;
  377. begin
  378. result:=nil;
  379. firstpass(left);
  380. if codegenerror then
  381. exit;
  382. registers32:=left.registers32;
  383. registersfpu:=left.registersfpu;
  384. {$ifdef SUPPORT_MMX}
  385. registersmmx:=left.registersmmx;
  386. {$endif SUPPORT_MMX}
  387. if (left.resulttype.def.deftype=floatdef) then
  388. begin
  389. if (left.location.loc<>LOC_REGISTER) and
  390. (registersfpu<1) then
  391. registersfpu:=1;
  392. location.loc:=LOC_REGISTER;
  393. end
  394. {$ifdef SUPPORT_MMX}
  395. else if (cs_mmx in aktlocalswitches) and
  396. is_mmx_able_array(left.resulttype.def) then
  397. begin
  398. if (left.location.loc<>LOC_MMXREGISTER) and
  399. (registersmmx<1) then
  400. registersmmx:=1;
  401. end
  402. {$endif SUPPORT_MMX}
  403. else if is_64bitint(left.resulttype.def) then
  404. begin
  405. if (left.location.loc<>LOC_REGISTER) and
  406. (registers32<2) then
  407. registers32:=2;
  408. location.loc:=LOC_REGISTER;
  409. end
  410. else if (left.resulttype.def.deftype=orddef) then
  411. begin
  412. if (left.location.loc<>LOC_REGISTER) and
  413. (registers32<1) then
  414. registers32:=1;
  415. location.loc:=LOC_REGISTER;
  416. end;
  417. end;
  418. {****************************************************************************
  419. TNOTNODE
  420. ****************************************************************************}
  421. constructor tnotnode.create(expr : tnode);
  422. begin
  423. inherited create(notn,expr);
  424. end;
  425. function tnotnode.det_resulttype : tnode;
  426. var
  427. t : tnode;
  428. notdef : pprocdeflist;
  429. v : tconstexprint;
  430. begin
  431. result:=nil;
  432. resulttypepass(left);
  433. set_varstate(left,true);
  434. if codegenerror then
  435. exit;
  436. { constant folding }
  437. if (left.nodetype=ordconstn) then
  438. begin
  439. v:=tordconstnode(left).value;
  440. case torddef(left.resulttype.def).typ of
  441. bool8bit,
  442. bool16bit,
  443. bool32bit :
  444. begin
  445. { here we do a boolean(byte(..)) type cast because }
  446. { boolean(<int64>) is buggy in 1.00 }
  447. v:=byte(not(boolean(byte(v))));
  448. end;
  449. uchar,
  450. u8bit :
  451. v:=byte(not byte(v));
  452. s8bit :
  453. v:=shortint(not shortint(v));
  454. uwidechar,
  455. u16bit :
  456. v:=word(not word(v));
  457. s16bit :
  458. v:=smallint(not smallint(v));
  459. u32bit :
  460. v:=cardinal(not cardinal(v));
  461. s32bit :
  462. v:=longint(not longint(v));
  463. u64bit :
  464. v:=int64(not int64(v)); { maybe qword is required }
  465. s64bit :
  466. v:=int64(not int64(v));
  467. else
  468. CGMessage(type_e_mismatch);
  469. end;
  470. t:=cordconstnode.create(v,left.resulttype);
  471. result:=t;
  472. exit;
  473. end;
  474. resulttype:=left.resulttype;
  475. if is_boolean(resulttype.def) then
  476. begin
  477. end
  478. else
  479. {$ifdef SUPPORT_MMX}
  480. if (cs_mmx in aktlocalswitches) and
  481. is_mmx_able_array(left.resulttype.def) then
  482. begin
  483. end
  484. else
  485. {$endif SUPPORT_MMX}
  486. if is_64bitint(left.resulttype.def) then
  487. begin
  488. end
  489. else if is_integer(left.resulttype.def) then
  490. begin
  491. end
  492. else
  493. begin
  494. if assigned(overloaded_operators[_op_not]) then
  495. notdef:=overloaded_operators[_op_not].defs
  496. else
  497. notdef:=nil;
  498. while assigned(notdef) do
  499. begin
  500. if is_equal(tparaitem(notdef^.def.para.first).paratype.def,left.resulttype.def) and
  501. (tparaitem(notdef^.def.para.first).next=nil) then
  502. begin
  503. t:=ccallnode.create(ccallparanode.create(left,nil),
  504. overloaded_operators[_op_not],nil,nil);
  505. left:=nil;
  506. result:=t;
  507. exit;
  508. end;
  509. notdef:=notdef^.next;
  510. end;
  511. CGMessage(type_e_mismatch);
  512. end;
  513. end;
  514. function tnotnode.pass_1 : tnode;
  515. begin
  516. result:=nil;
  517. firstpass(left);
  518. if codegenerror then
  519. exit;
  520. location.loc:=left.location.loc;
  521. registers32:=left.registers32;
  522. {$ifdef SUPPORT_MMX}
  523. registersmmx:=left.registersmmx;
  524. {$endif SUPPORT_MMX}
  525. if is_boolean(resulttype.def) then
  526. begin
  527. if (location.loc in [LOC_REFERENCE,LOC_MEM,LOC_CREGISTER]) then
  528. begin
  529. location.loc:=LOC_REGISTER;
  530. if (registers32<1) then
  531. registers32:=1;
  532. end;
  533. { before loading it into flags we need to load it into
  534. a register thus 1 register is need PM }
  535. {$ifdef i386}
  536. if left.location.loc<>LOC_JUMP then
  537. location.loc:=LOC_FLAGS;
  538. {$endif def i386}
  539. end
  540. else
  541. {$ifdef SUPPORT_MMX}
  542. if (cs_mmx in aktlocalswitches) and
  543. is_mmx_able_array(left.resulttype.def) then
  544. begin
  545. if (left.location.loc<>LOC_MMXREGISTER) and
  546. (registersmmx<1) then
  547. registersmmx:=1;
  548. end
  549. else
  550. {$endif SUPPORT_MMX}
  551. if is_64bitint(left.resulttype.def) then
  552. begin
  553. if (location.loc in [LOC_REFERENCE,LOC_MEM,LOC_CREGISTER]) then
  554. begin
  555. location.loc:=LOC_REGISTER;
  556. if (registers32<2) then
  557. registers32:=2;
  558. end;
  559. end
  560. else if is_integer(left.resulttype.def) then
  561. begin
  562. if (left.location.loc<>LOC_REGISTER) and
  563. (registers32<1) then
  564. registers32:=1;
  565. location.loc:=LOC_REGISTER;
  566. end
  567. end;
  568. begin
  569. cmoddivnode:=tmoddivnode;
  570. cshlshrnode:=tshlshrnode;
  571. cunaryminusnode:=tunaryminusnode;
  572. cnotnode:=tnotnode;
  573. end.
  574. {
  575. $Log$
  576. Revision 1.26 2001-12-27 15:33:58 jonas
  577. * fixed fpuregister counting errors ("merged")
  578. Revision 1.25 2001/11/02 22:58:02 peter
  579. * procsym definition rewrite
  580. Revision 1.24 2001/10/12 13:51:51 jonas
  581. * fixed internalerror(10) due to previous fpu overflow fixes ("merged")
  582. * fixed bug in n386add (introduced after compilerproc changes for string
  583. operations) where calcregisters wasn't called for shortstring addnodes
  584. * NOTE: from now on, the location of a binary node must now always be set
  585. before you call calcregisters() for it
  586. Revision 1.23 2001/09/05 15:22:09 jonas
  587. * made multiplying, dividing and mod'ing of int64 and qword processor
  588. independent with compilerprocs (+ small optimizations by using shift/and
  589. where possible)
  590. Revision 1.22 2001/09/02 21:12:07 peter
  591. * move class of definitions into type section for delphi
  592. Revision 1.21 2001/08/26 13:36:41 florian
  593. * some cg reorganisation
  594. * some PPC updates
  595. Revision 1.20 2001/04/13 01:22:10 peter
  596. * symtable change to classes
  597. * range check generation and errors fixed, make cycle DEBUG=1 works
  598. * memory leaks fixed
  599. Revision 1.19 2001/04/05 21:00:27 peter
  600. * fix constant not evaluation
  601. Revision 1.18 2001/04/04 22:42:40 peter
  602. * move constant folding into det_resulttype
  603. Revision 1.17 2001/04/02 21:20:31 peter
  604. * resulttype rewrite
  605. Revision 1.16 2001/03/20 18:11:03 jonas
  606. * not (cardinal) now has cardinal instead of longint result (bug reported
  607. in mailinglist) ("merged")
  608. Revision 1.15 2001/03/04 10:38:55 jonas
  609. * fixed 'qword mod/div pos_const' to have qword result
  610. Revision 1.14 2001/02/20 21:48:17 peter
  611. * remove nasm hack
  612. Revision 1.13 2001/01/06 18:28:39 peter
  613. * fixed wrong notes about locals
  614. Revision 1.12 2001/01/05 17:36:57 florian
  615. * the info about exception frames is stored now on the stack
  616. instead on the heap
  617. Revision 1.11 2000/12/25 00:07:26 peter
  618. + new tlinkedlist class (merge of old tstringqueue,tcontainer and
  619. tlinkedlist objects)
  620. Revision 1.10 2000/12/16 15:54:01 jonas
  621. * 'resulttype.def of cardinal shl/shr x' is cardinal instead of longint
  622. Revision 1.9 2000/11/29 00:30:34 florian
  623. * unused units removed from uses clause
  624. * some changes for widestrings
  625. Revision 1.8 2000/10/31 22:02:49 peter
  626. * symtable splitted, no real code changes
  627. Revision 1.7 2000/10/01 19:48:24 peter
  628. * lot of compile updates for cg11
  629. Revision 1.6 2000/09/27 21:33:22 florian
  630. * finally nadd.pas compiles
  631. Revision 1.5 2000/09/27 20:25:44 florian
  632. * more stuff fixed
  633. Revision 1.4 2000/09/24 15:06:19 peter
  634. * use defines.inc
  635. Revision 1.3 2000/09/22 22:48:54 florian
  636. * some fixes
  637. Revision 1.2 2000/09/22 22:09:54 florian
  638. * more stuff converted
  639. Revision 1.1 2000/09/20 21:35:12 florian
  640. * initial revision
  641. }