ncgcnv.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. {
  2. $Id$
  3. Copyright (c) 2000-2002 by Florian Klaempfl
  4. Generate assembler for nodes that handle type conversions which are
  5. the same for all (most) processors
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. unit ncgcnv;
  20. {$i fpcdefs.inc}
  21. interface
  22. uses
  23. node,ncnv,defutil,defcmp;
  24. type
  25. tcgtypeconvnode = class(ttypeconvnode)
  26. procedure second_int_to_int;override;
  27. procedure second_cstring_to_pchar;override;
  28. procedure second_string_to_chararray;override;
  29. procedure second_array_to_pointer;override;
  30. procedure second_pointer_to_array;override;
  31. procedure second_char_to_string;override;
  32. procedure second_real_to_real;override;
  33. procedure second_cord_to_pointer;override;
  34. procedure second_proc_to_procvar;override;
  35. procedure second_bool_to_int;override;
  36. procedure second_bool_to_bool;override;
  37. procedure second_ansistring_to_pchar;override;
  38. procedure second_class_to_intf;override;
  39. procedure second_char_to_char;override;
  40. procedure second_nothing;override;
  41. procedure pass_2;override;
  42. end;
  43. tcgasnode = class(tasnode)
  44. procedure pass_2;override;
  45. end;
  46. implementation
  47. uses
  48. cutils,verbose,globtype,globals,
  49. aasmbase,aasmtai,aasmcpu,symconst,symdef,paramgr,
  50. ncon,ncal,
  51. cpubase,cpuinfo,systems,
  52. pass_2,
  53. procinfo,cgbase,
  54. cgobj,
  55. ncgutil,
  56. tgobj
  57. ;
  58. procedure tcgtypeconvnode.second_int_to_int;
  59. var
  60. newsize : tcgsize;
  61. ressize,
  62. leftsize : longint;
  63. begin
  64. newsize:=def_cgsize(resulttype.def);
  65. { insert range check if not explicit conversion }
  66. if not(nf_explicit in flags) then
  67. cg.g_rangecheck(exprasmlist,left.location,left.resulttype.def,resulttype.def);
  68. { is the result size smaller? when typecasting from void
  69. we always reuse the current location, because there is
  70. nothing that we can load in a register }
  71. ressize := resulttype.def.size;
  72. leftsize := left.resulttype.def.size;
  73. if (ressize<>leftsize) and
  74. not is_void(left.resulttype.def) then
  75. begin
  76. location_copy(location,left.location);
  77. { reuse a loc_reference when the newsize is smaller than
  78. than the original, else load it to a register }
  79. if (location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) and
  80. (ressize<leftsize) then
  81. begin
  82. location.size:=newsize;
  83. if (target_info.endian = ENDIAN_BIG) then
  84. inc(location.reference.offset,leftsize-ressize);
  85. end
  86. else
  87. location_force_reg(exprasmlist,location,newsize,false);
  88. end
  89. else
  90. begin
  91. { no special loading is required, reuse current location }
  92. location_copy(location,left.location);
  93. location.size:=newsize;
  94. end;
  95. end;
  96. procedure tcgtypeconvnode.second_cstring_to_pchar;
  97. var
  98. hr : treference;
  99. begin
  100. location_release(exprasmlist,left.location);
  101. location_reset(location,LOC_REGISTER,OS_ADDR);
  102. case tstringdef(left.resulttype.def).string_typ of
  103. st_shortstring :
  104. begin
  105. inc(left.location.reference.offset);
  106. location.register:=cg.getaddressregister(exprasmlist);
  107. cg.a_loadaddr_ref_reg(exprasmlist,left.location.reference,location.register);
  108. end;
  109. st_ansistring :
  110. begin
  111. if (left.nodetype=stringconstn) and
  112. (str_length(left)=0) then
  113. begin
  114. reference_reset(hr);
  115. hr.symbol:=objectlibrary.newasmsymboldata('FPC_EMPTYCHAR');
  116. location.register:=cg.getaddressregister(exprasmlist);
  117. cg.a_loadaddr_ref_reg(exprasmlist,hr,location.register);
  118. end
  119. else
  120. begin
  121. location.register:=cg.getaddressregister(exprasmlist);
  122. cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,left.location.reference,location.register);
  123. end;
  124. end;
  125. st_longstring:
  126. begin
  127. {!!!!!!!}
  128. internalerror(8888);
  129. end;
  130. st_widestring:
  131. begin
  132. if (left.nodetype=stringconstn) and
  133. (str_length(left)=0) then
  134. begin
  135. reference_reset(hr);
  136. hr.symbol:=objectlibrary.newasmsymboldata('FPC_EMPTYCHAR');
  137. location.register:=cg.getaddressregister(exprasmlist);
  138. cg.a_loadaddr_ref_reg(exprasmlist,hr,location.register);
  139. end
  140. else
  141. begin
  142. location.register:=cg.getintregister(exprasmlist,OS_INT);
  143. {$ifdef fpc}
  144. {$warning Todo: convert widestrings to ascii when typecasting them to pchars}
  145. {$endif}
  146. cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_INT,left.location.reference,
  147. location.register);
  148. end;
  149. end;
  150. end;
  151. end;
  152. procedure tcgtypeconvnode.second_string_to_chararray;
  153. var
  154. arrsize: longint;
  155. begin
  156. with tarraydef(resulttype.def) do
  157. arrsize := highrange-lowrange+1;
  158. if (left.nodetype = stringconstn) and
  159. { left.length+1 since there's always a terminating #0 character (JM) }
  160. (tstringconstnode(left).len+1 >= arrsize) and
  161. (tstringdef(left.resulttype.def).string_typ=st_shortstring) then
  162. begin
  163. location_copy(location,left.location);
  164. inc(location.reference.offset);
  165. exit;
  166. end
  167. else
  168. { should be handled already in resulttype pass (JM) }
  169. internalerror(200108292);
  170. end;
  171. procedure tcgtypeconvnode.second_array_to_pointer;
  172. begin
  173. location_release(exprasmlist,left.location);
  174. location_reset(location,LOC_REGISTER,OS_ADDR);
  175. location.register:=cg.getaddressregister(exprasmlist);
  176. cg.a_loadaddr_ref_reg(exprasmlist,left.location.reference,location.register);
  177. end;
  178. procedure tcgtypeconvnode.second_pointer_to_array;
  179. begin
  180. location_reset(location,LOC_REFERENCE,OS_NO);
  181. case left.location.loc of
  182. LOC_REGISTER :
  183. begin
  184. {$ifdef cpu_uses_separate_address_registers}
  185. if getregtype(left.location.register)<>R_ADDRESSREGISTER then
  186. begin
  187. location_release(exprasmlist,left.location);
  188. location.reference.base:=rg.getaddressregister(exprasmlist);
  189. cg.a_load_reg_reg(exprasmlist,OS_ADDR,OS_ADDR,
  190. left.location.register,location.reference.base);
  191. end
  192. else
  193. {$endif}
  194. location.reference.base := left.location.register;
  195. end;
  196. LOC_CREGISTER :
  197. begin
  198. location.reference.base:=cg.getaddressregister(exprasmlist);
  199. cg.a_load_reg_reg(exprasmlist,OS_ADDR,OS_ADDR,left.location.register,
  200. location.reference.base);
  201. end;
  202. LOC_REFERENCE,
  203. LOC_CREFERENCE :
  204. begin
  205. location_release(exprasmlist,left.location);
  206. location.reference.base:=cg.getaddressregister(exprasmlist);
  207. cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,left.location.reference,
  208. location.reference.base);
  209. location_freetemp(exprasmlist,left.location);
  210. end;
  211. else
  212. internalerror(2002032216);
  213. end;
  214. end;
  215. procedure tcgtypeconvnode.second_char_to_string;
  216. begin
  217. location_reset(location,LOC_REFERENCE,OS_NO);
  218. case tstringdef(resulttype.def).string_typ of
  219. st_shortstring :
  220. begin
  221. location_release(exprasmlist,left.location);
  222. tg.GetTemp(exprasmlist,256,tt_normal,location.reference);
  223. cg.a_load_loc_ref(exprasmlist,left.location.size,left.location,
  224. location.reference);
  225. location_freetemp(exprasmlist,left.location);
  226. end;
  227. { the rest is removed in the resulttype pass and converted to compilerprocs }
  228. else
  229. internalerror(4179);
  230. end;
  231. end;
  232. procedure tcgtypeconvnode.second_real_to_real;
  233. begin
  234. location_reset(location,LOC_FPUREGISTER,def_cgsize(resulttype.def));
  235. case left.location.loc of
  236. LOC_FPUREGISTER,
  237. LOC_CFPUREGISTER:
  238. begin
  239. location_copy(location,left.location);
  240. location.size:=def_cgsize(resulttype.def);
  241. case expectloc of
  242. LOC_FPUREGISTER:
  243. ;
  244. LOC_MMREGISTER:
  245. location_force_mmregscalar(exprasmlist,location,false);
  246. else
  247. internalerror(2003012262);
  248. end;
  249. exit
  250. end;
  251. LOC_CREFERENCE,
  252. LOC_REFERENCE:
  253. begin
  254. location_release(exprasmlist,left.location);
  255. location.register:=cg.getfpuregister(exprasmlist,left.location.size);
  256. cg.a_loadfpu_loc_reg(exprasmlist,left.location,location.register);
  257. location_freetemp(exprasmlist,left.location);
  258. end;
  259. LOC_MMREGISTER,
  260. LOC_CMMREGISTER:
  261. begin
  262. location_copy(location,left.location);
  263. case expectloc of
  264. LOC_FPUREGISTER:
  265. begin
  266. location_force_fpureg(exprasmlist,location,false);
  267. location.size:=def_cgsize(resulttype.def);
  268. end;
  269. LOC_MMREGISTER:
  270. ;
  271. else
  272. internalerror(2003012261);
  273. end;
  274. end;
  275. else
  276. internalerror(2002032215);
  277. end;
  278. end;
  279. procedure tcgtypeconvnode.second_cord_to_pointer;
  280. begin
  281. { this can't happen because constants are already processed in
  282. pass 1 }
  283. internalerror(47423985);
  284. end;
  285. procedure tcgtypeconvnode.second_proc_to_procvar;
  286. begin
  287. { method pointer ? }
  288. if tabstractprocdef(left.resulttype.def).is_methodpointer and
  289. not(tabstractprocdef(left.resulttype.def).is_addressonly) then
  290. begin
  291. location_copy(location,left.location);
  292. end
  293. else
  294. begin
  295. location_release(exprasmlist,left.location);
  296. location_reset(location,LOC_REGISTER,OS_ADDR);
  297. location.register:=cg.getaddressregister(exprasmlist);
  298. cg.a_loadaddr_ref_reg(exprasmlist,left.location.reference,location.register);
  299. end;
  300. end;
  301. procedure tcgtypeconvnode.second_bool_to_int;
  302. var
  303. oldtruelabel,oldfalselabel : tasmlabel;
  304. begin
  305. oldtruelabel:=truelabel;
  306. oldfalselabel:=falselabel;
  307. objectlibrary.getlabel(truelabel);
  308. objectlibrary.getlabel(falselabel);
  309. secondpass(left);
  310. location_copy(location,left.location);
  311. { byte(boolean) or word(wordbool) or longint(longbool) must }
  312. { be accepted for var parameters }
  313. if not((nf_explicit in flags) and
  314. (left.resulttype.def.size=resulttype.def.size) and
  315. (left.location.loc in [LOC_REFERENCE,LOC_CREFERENCE,LOC_CREGISTER])) then
  316. location_force_reg(exprasmlist,location,def_cgsize(resulttype.def),false);
  317. truelabel:=oldtruelabel;
  318. falselabel:=oldfalselabel;
  319. end;
  320. procedure tcgtypeconvnode.second_bool_to_bool;
  321. begin
  322. { we can reuse the conversion already available
  323. in bool_to_int to resize the value. But when the
  324. size of the new boolean is smaller we need to calculate
  325. the value as is done in int_to_bool. This is needed because
  326. the bits that define the true status can be outside the limits
  327. of the new size and truncating the register can result in a 0
  328. value }
  329. if resulttype.def.size<left.resulttype.def.size then
  330. second_int_to_bool
  331. else
  332. second_bool_to_int;
  333. end;
  334. procedure tcgtypeconvnode.second_ansistring_to_pchar;
  335. var
  336. l1 : tasmlabel;
  337. hr : treference;
  338. begin
  339. location_reset(location,LOC_REGISTER,OS_ADDR);
  340. objectlibrary.getlabel(l1);
  341. case left.location.loc of
  342. LOC_CREGISTER,LOC_REGISTER:
  343. begin
  344. {$ifdef cpu_uses_separate_address_registers}
  345. if getregtype(left.location.register)<>R_ADDRESSREGISTER then
  346. begin
  347. location_release(exprasmlist,left.location);
  348. location.register:=cg.getaddressregister(exprasmlist);
  349. cg.a_load_reg_reg(exprasmlist,OS_ADDR,OS_ADDR,
  350. left.location.register,location.register);
  351. end
  352. else
  353. {$endif}
  354. location.register := left.location.register;
  355. end;
  356. LOC_CREFERENCE,LOC_REFERENCE:
  357. begin
  358. location_release(exprasmlist,left.location);
  359. location.register:=cg.getaddressregister(exprasmlist);
  360. cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,left.location.reference,location.register);
  361. location_freetemp(exprasmlist,left.location);
  362. end;
  363. else
  364. internalerror(2002032214);
  365. end;
  366. cg.a_cmp_const_reg_label(exprasmlist,OS_32,OC_NE,0,location.register,l1);
  367. reference_reset(hr);
  368. hr.symbol:=objectlibrary.newasmsymboldata('FPC_EMPTYCHAR');
  369. cg.a_loadaddr_ref_reg(exprasmlist,hr,location.register);
  370. cg.a_label(exprasmlist,l1);
  371. end;
  372. procedure tcgtypeconvnode.second_class_to_intf;
  373. var
  374. l1 : tasmlabel;
  375. hd : tobjectdef;
  376. begin
  377. location_reset(location,LOC_REGISTER,OS_ADDR);
  378. case left.location.loc of
  379. LOC_CREFERENCE,
  380. LOC_REFERENCE:
  381. begin
  382. location_release(exprasmlist,left.location);
  383. location.register:=cg.getaddressregister(exprasmlist);
  384. cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,left.location.reference,location.register);
  385. location_freetemp(exprasmlist,left.location);
  386. end;
  387. LOC_CREGISTER:
  388. begin
  389. location.register:=cg.getaddressregister(exprasmlist);
  390. cg.a_load_reg_reg(exprasmlist,OS_ADDR,OS_ADDR,left.location.register,location.register);
  391. end;
  392. LOC_REGISTER:
  393. location.register:=left.location.register;
  394. else
  395. internalerror(121120001);
  396. end;
  397. objectlibrary.getlabel(l1);
  398. cg.a_cmp_const_reg_label(exprasmlist,OS_ADDR,OC_EQ,0,location.register,l1);
  399. hd:=tobjectdef(left.resulttype.def);
  400. while assigned(hd) do
  401. begin
  402. if hd.implementedinterfaces.searchintf(resulttype.def)<>-1 then
  403. begin
  404. cg.a_op_const_reg(exprasmlist,OP_ADD,OS_32,aword(
  405. hd.implementedinterfaces.ioffsets(
  406. hd.implementedinterfaces.searchintf(resulttype.def))^),location.register);
  407. break;
  408. end;
  409. hd:=hd.childof;
  410. end;
  411. if hd=nil then
  412. internalerror(2002081301);
  413. cg.a_label(exprasmlist,l1);
  414. end;
  415. procedure tcgtypeconvnode.second_char_to_char;
  416. begin
  417. {$ifdef fpc}
  418. {$warning todo: add RTL routine for widechar-char conversion }
  419. {$endif}
  420. { Quick hack to atleast generate 'working' code (PFV) }
  421. second_int_to_int;
  422. end;
  423. procedure tcgtypeconvnode.second_nothing;
  424. begin
  425. { we reuse the old value }
  426. location_copy(location,left.location);
  427. { Floats should never be returned as LOC_CONSTANT, do the
  428. moving to memory before the new size is set }
  429. if (resulttype.def.deftype=floatdef) and
  430. (location.loc=LOC_CONSTANT) then
  431. location_force_mem(exprasmlist,location);
  432. { but use the new size, but we don't know the size of all arrays }
  433. location.size:=def_cgsize(resulttype.def);
  434. end;
  435. {$ifdef TESTOBJEXT2}
  436. procedure tcgtypeconvnode.checkobject;
  437. begin
  438. { no checking by default }
  439. end;
  440. {$endif TESTOBJEXT2}
  441. procedure tcgtypeconvnode.pass_2;
  442. begin
  443. { the boolean routines can be called with LOC_JUMP and
  444. call secondpass themselves in the helper }
  445. if not(convtype in [tc_bool_2_int,tc_bool_2_bool,tc_int_2_bool]) then
  446. begin
  447. secondpass(left);
  448. if codegenerror then
  449. exit;
  450. end;
  451. second_call_helper(convtype);
  452. {$ifdef TESTOBJEXT2}
  453. { Check explicit conversions to objects pointers !! }
  454. if p^.explizit and
  455. (p^.resulttype.def.deftype=pointerdef) and
  456. (tpointerdef(p^.resulttype.def).definition.deftype=objectdef) and not
  457. (tobjectdef(tpointerdef(p^.resulttype.def).definition).isclass) and
  458. ((tobjectdef(tpointerdef(p^.resulttype.def).definition).options and oo_hasvmt)<>0) and
  459. (cs_check_range in aktlocalswitches) then
  460. checkobject;
  461. {$endif TESTOBJEXT2}
  462. end;
  463. procedure tcgasnode.pass_2;
  464. begin
  465. secondpass(call);
  466. location_copy(location,call.location);
  467. end;
  468. begin
  469. ctypeconvnode := tcgtypeconvnode;
  470. casnode := tcgasnode;
  471. end.
  472. {
  473. $Log$
  474. Revision 1.52 2003-12-26 00:32:21 florian
  475. + fpu<->mm register conversion
  476. Revision 1.51 2003/12/22 23:08:59 peter
  477. * removed unused checkobject method
  478. Revision 1.50 2003/11/04 22:30:15 florian
  479. + type cast variant<->enum
  480. * cnv. node second pass uses now as well helper wrappers
  481. Revision 1.49 2003/10/10 17:48:13 peter
  482. * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
  483. * tregisteralloctor renamed to trgobj
  484. * removed rgobj from a lot of units
  485. * moved location_* and reference_* to cgobj
  486. * first things for mmx register allocation
  487. Revision 1.48 2003/10/09 21:31:37 daniel
  488. * Register allocator splitted, ans abstract now
  489. Revision 1.47 2003/10/01 20:34:48 peter
  490. * procinfo unit contains tprocinfo
  491. * cginfo renamed to cgbase
  492. * moved cgmessage to verbose
  493. * fixed ppc and sparc compiles
  494. Revision 1.46 2003/09/28 13:39:38 peter
  495. * optimized releasing of registers
  496. Revision 1.45 2003/08/26 12:43:02 peter
  497. * methodpointer fixes
  498. Revision 1.44 2003/06/03 21:11:09 peter
  499. * cg.a_load_* get a from and to size specifier
  500. * makeregsize only accepts newregister
  501. * i386 uses generic tcgnotnode,tcgunaryminus
  502. Revision 1.43 2003/06/01 21:38:06 peter
  503. * getregisterfpu size parameter added
  504. * op_const_reg size parameter added
  505. * sparc updates
  506. Revision 1.42 2003/05/25 09:27:13 jonas
  507. - undid previous patch, it was not necessary and on top of that, it
  508. contained a bug :/
  509. Revision 1.40 2003/05/23 14:27:35 peter
  510. * remove some unit dependencies
  511. * current_procinfo changes to store more info
  512. Revision 1.39 2003/04/22 23:50:22 peter
  513. * firstpass uses expectloc
  514. * checks if there are differences between the expectloc and
  515. location.loc from secondpass in EXTDEBUG
  516. Revision 1.38 2003/04/06 21:11:23 olle
  517. * changed newasmsymbol to newasmsymboldata for data symbols
  518. Revision 1.37 2003/03/28 19:16:56 peter
  519. * generic constructor working for i386
  520. * remove fixed self register
  521. * esi added as address register for i386
  522. Revision 1.36 2003/02/19 22:00:14 daniel
  523. * Code generator converted to new register notation
  524. - Horribily outdated todo.txt removed
  525. Revision 1.35 2003/01/02 22:20:51 peter
  526. * fix typecasts from void to int
  527. Revision 1.34 2002/11/25 17:43:17 peter
  528. * splitted defbase in defutil,symutil,defcmp
  529. * merged isconvertable and is_equal into compare_defs(_ext)
  530. * made operator search faster by walking the list only once
  531. Revision 1.33 2002/10/05 12:43:25 carl
  532. * fixes for Delphi 6 compilation
  533. (warning : Some features do not work under Delphi)
  534. Revision 1.32 2002/09/17 18:54:02 jonas
  535. * a_load_reg_reg() now has two size parameters: source and dest. This
  536. allows some optimizations on architectures that don't encode the
  537. register size in the register name.
  538. Revision 1.31 2002/09/16 13:08:44 jonas
  539. * big endian fix for second_int_to_int
  540. Revision 1.30 2002/09/07 15:25:02 peter
  541. * old logs removed and tabs fixed
  542. Revision 1.29 2002/09/02 18:46:00 peter
  543. * reuse a reference when resizing ordinal values to smaller sizes,
  544. this is required for constructions like byte(w):=1 that are
  545. allowed in tp mode only
  546. Revision 1.28 2002/08/25 09:06:58 peter
  547. * add calls to release temps
  548. Revision 1.27 2002/08/23 16:14:48 peter
  549. * tempgen cleanup
  550. * tt_noreuse temp type added that will be used in genentrycode
  551. Revision 1.26 2002/08/20 18:23:32 jonas
  552. * the as node again uses a compilerproc
  553. + (untested) support for interface "as" statements
  554. Revision 1.25 2002/08/13 18:01:52 carl
  555. * rename swatoperands to swapoperands
  556. + m68k first compilable version (still needs a lot of testing):
  557. assembler generator, system information , inline
  558. assembler reader.
  559. Revision 1.24 2002/08/12 20:39:17 florian
  560. * casting of classes to interface fixed when the interface was
  561. implemented by a parent class
  562. Revision 1.23 2002/08/11 14:32:26 peter
  563. * renamed current_library to objectlibrary
  564. Revision 1.22 2002/08/11 13:24:11 peter
  565. * saving of asmsymbols in ppu supported
  566. * asmsymbollist global is removed and moved into a new class
  567. tasmlibrarydata that will hold the info of a .a file which
  568. corresponds with a single module. Added librarydata to tmodule
  569. to keep the library info stored for the module. In the future the
  570. objectfiles will also be stored to the tasmlibrarydata class
  571. * all getlabel/newasmsymbol and friends are moved to the new class
  572. Revision 1.21 2002/07/20 11:57:53 florian
  573. * types.pas renamed to defbase.pas because D6 contains a types
  574. unit so this would conflicts if D6 programms are compiled
  575. + Willamette/SSE2 instructions to assembler added
  576. Revision 1.20 2002/07/11 14:41:28 florian
  577. * start of the new generic parameter handling
  578. Revision 1.19 2002/07/07 09:52:32 florian
  579. * powerpc target fixed, very simple units can be compiled
  580. * some basic stuff for better callparanode handling, far from being finished
  581. Revision 1.18 2002/07/04 20:43:01 florian
  582. * first x86-64 patches
  583. Revision 1.17 2002/07/01 18:46:22 peter
  584. * internal linker
  585. * reorganized aasm layer
  586. Revision 1.16 2002/07/01 16:23:53 peter
  587. * cg64 patch
  588. * basics for currency
  589. * asnode updates for class and interface (not finished)
  590. Revision 1.15 2002/05/18 13:34:09 peter
  591. * readded missing revisions
  592. Revision 1.14 2002/05/16 19:46:37 carl
  593. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  594. + try to fix temp allocation (still in ifdef)
  595. + generic constructor calls
  596. + start of tassembler / tmodulebase class cleanup
  597. Revision 1.12 2002/05/12 16:53:07 peter
  598. * moved entry and exitcode to ncgutil and cgobj
  599. * foreach gets extra argument for passing local data to the
  600. iterator function
  601. * -CR checks also class typecasts at runtime by changing them
  602. into as
  603. * fixed compiler to cycle with the -CR option
  604. * fixed stabs with elf writer, finally the global variables can
  605. be watched
  606. * removed a lot of routines from cga unit and replaced them by
  607. calls to cgobj
  608. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  609. u32bit then the other is typecasted also to u32bit without giving
  610. a rangecheck warning/error.
  611. * fixed pascal calling method with reversing also the high tree in
  612. the parast, detected by tcalcst3 test
  613. Revision 1.11 2002/04/21 19:02:03 peter
  614. * removed newn and disposen nodes, the code is now directly
  615. inlined from pexpr
  616. * -an option that will write the secondpass nodes to the .s file, this
  617. requires EXTDEBUG define to actually write the info
  618. * fixed various internal errors and crashes due recent code changes
  619. Revision 1.10 2002/04/19 15:39:34 peter
  620. * removed some more routines from cga
  621. * moved location_force_reg/mem to ncgutil
  622. * moved arrayconstructnode secondpass to ncgld
  623. Revision 1.9 2002/04/15 19:44:19 peter
  624. * fixed stackcheck that would be called recursively when a stack
  625. error was found
  626. * generic changeregsize(reg,size) for i386 register resizing
  627. * removed some more routines from cga unit
  628. * fixed returnvalue handling
  629. * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
  630. }