ncgcnv.pas 25 KB

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