ncgcnv.pas 25 KB

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