cg64f32.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Member of the Free Pascal development team
  5. This unit implements the code generation for 64 bit int
  6. arithmethics on 32 bit processors
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. ****************************************************************************
  19. }
  20. {# This unit implements the code generation for 64 bit int arithmethics on
  21. 32 bit processors.
  22. }
  23. unit cg64f32;
  24. {$i fpcdefs.inc}
  25. interface
  26. uses
  27. aasmbase,aasmtai,aasmcpu,
  28. cpuinfo, cpubase,
  29. cginfo, cgobj,
  30. node,symtype;
  31. type
  32. {# Defines all the methods required on 32-bit processors
  33. to handle 64-bit integers.
  34. }
  35. tcg64f32 = class(tcg64)
  36. procedure a_load64_const_ref(list : taasmoutput;value : qword;const ref : treference);override;
  37. procedure a_load64_reg_ref(list : taasmoutput;reg : tregister64;const ref : treference);override;
  38. procedure a_load64_ref_reg(list : taasmoutput;const ref : treference;reg : tregister64);override;
  39. procedure a_load64_reg_reg(list : taasmoutput;regsrc,regdst : tregister64);override;
  40. procedure a_load64_const_reg(list : taasmoutput;value: qword;reg : tregister64);override;
  41. procedure a_load64_loc_reg(list : taasmoutput;const l : tlocation;reg : tregister64);override;
  42. procedure a_load64_loc_ref(list : taasmoutput;const l : tlocation;const ref : treference);override;
  43. procedure a_load64_const_loc(list : taasmoutput;value : qword;const l : tlocation);override;
  44. procedure a_load64_reg_loc(list : taasmoutput;reg : tregister64;const l : tlocation);override;
  45. procedure a_load64high_reg_ref(list : taasmoutput;reg : tregister;const ref : treference);override;
  46. procedure a_load64low_reg_ref(list : taasmoutput;reg : tregister;const ref : treference);override;
  47. procedure a_load64high_ref_reg(list : taasmoutput;const ref : treference;reg : tregister);override;
  48. procedure a_load64low_ref_reg(list : taasmoutput;const ref : treference;reg : tregister);override;
  49. procedure a_load64high_loc_reg(list : taasmoutput;const l : tlocation;reg : tregister);override;
  50. procedure a_load64low_loc_reg(list : taasmoutput;const l : tlocation;reg : tregister);override;
  51. procedure a_op64_const_loc(list : taasmoutput;op:TOpCG;value : qword;const l: tlocation);override;
  52. procedure a_op64_reg_loc(list : taasmoutput;op:TOpCG;reg : tregister64;const l : tlocation);override;
  53. procedure a_op64_loc_reg(list : taasmoutput;op:TOpCG;const l : tlocation;reg : tregister64);override;
  54. procedure a_param64_reg(list : taasmoutput;reg : tregister64;const locpara : tparalocation);override;
  55. procedure a_param64_const(list : taasmoutput;value : qword;const locpara : tparalocation);override;
  56. procedure a_param64_ref(list : taasmoutput;const r : treference;const locpara : tparalocation);override;
  57. procedure a_param64_loc(list : taasmoutput;const l : tlocation;const locpara : tparalocation);override;
  58. procedure g_rangecheck64(list: taasmoutput; const p: tnode;
  59. const todef: tdef); override;
  60. end;
  61. {# Creates a tregister64 record from 2 32 Bit registers. }
  62. function joinreg64(reglo,reghi : tregister) : tregister64;
  63. implementation
  64. uses
  65. globtype,globals,systems,
  66. cgbase,
  67. verbose,
  68. symbase,symconst,symdef,types;
  69. function joinreg64(reglo,reghi : tregister) : tregister64;
  70. begin
  71. result.reglo:=reglo;
  72. result.reghi:=reghi;
  73. end;
  74. procedure tcg64f32.a_load64_reg_ref(list : taasmoutput;reg : tregister64;const ref : treference);
  75. var
  76. tmpreg: tregister;
  77. tmpref: treference;
  78. begin
  79. if target_info.endian=endian_big then
  80. begin
  81. tmpreg:=reg.reglo;
  82. reg.reglo:=reg.reghi;
  83. reg.reghi:=tmpreg;
  84. end;
  85. cg.a_load_reg_ref(list,OS_32,reg.reglo,ref);
  86. tmpref := ref;
  87. inc(tmpref.offset,4);
  88. cg.a_load_reg_ref(list,OS_32,reg.reghi,tmpref);
  89. end;
  90. procedure tcg64f32.a_load64_const_ref(list : taasmoutput;value : qword;const ref : treference);
  91. var
  92. tmpvalue : DWord;
  93. tmpref: treference;
  94. begin
  95. if target_info.endian<>source_info.endian then
  96. swap_qword(value);
  97. cg.a_load_const_ref(list,OS_32,lo(value),ref);
  98. tmpref := ref;
  99. inc(tmpref.offset,4);
  100. cg.a_load_const_ref(list,OS_32,hi(value),tmpref);
  101. end;
  102. procedure tcg64f32.a_load64_ref_reg(list : taasmoutput;const ref : treference;reg : tregister64);
  103. var
  104. tmpreg: tregister;
  105. tmpref: treference;
  106. got_scratch: boolean;
  107. begin
  108. if target_info.endian = endian_big then
  109. begin
  110. tmpreg := reg.reglo;
  111. reg.reglo := reg.reghi;
  112. reg.reghi := tmpreg;
  113. end;
  114. got_scratch:=false;
  115. tmpref := ref;
  116. if (tmpref.base=reg.reglo) then
  117. begin
  118. tmpreg := cg.get_scratch_reg_int(list);
  119. got_scratch:=true;
  120. cg.a_load_reg_reg(list,OS_ADDR,tmpref.base,tmpreg);
  121. tmpref.base:=tmpreg;
  122. end
  123. else
  124. { this works only for the i386, thus the i386 needs to override }
  125. { this method and this method must be replaced by a more generic }
  126. { implementation FK }
  127. if (tmpref.index=reg.reglo) then
  128. begin
  129. tmpreg:=cg.get_scratch_reg_int(list);
  130. got_scratch:=true;
  131. cg.a_load_reg_reg(list,OS_ADDR,tmpref.index,tmpreg);
  132. tmpref.index:=tmpreg;
  133. end;
  134. cg.a_load_ref_reg(list,OS_32,tmpref,reg.reglo);
  135. inc(tmpref.offset,4);
  136. cg.a_load_ref_reg(list,OS_32,tmpref,reg.reghi);
  137. if got_scratch then
  138. cg.free_scratch_reg(list,tmpreg);
  139. end;
  140. procedure tcg64f32.a_load64_reg_reg(list : taasmoutput;regsrc,regdst : tregister64);
  141. begin
  142. cg.a_load_reg_reg(list,OS_32,regsrc.reglo,regdst.reglo);
  143. cg.a_load_reg_reg(list,OS_32,regsrc.reghi,regdst.reghi);
  144. end;
  145. procedure tcg64f32.a_load64_const_reg(list : taasmoutput;value : qword;reg : tregister64);
  146. begin
  147. if target_info.endian<>source_info.endian then
  148. swap_qword(value);
  149. cg.a_load_const_reg(list,OS_32,lo(value),reg.reglo);
  150. cg.a_load_const_reg(list,OS_32,hi(value),reg.reghi);
  151. end;
  152. procedure tcg64f32.a_load64_loc_reg(list : taasmoutput;const l : tlocation;reg : tregister64);
  153. begin
  154. case l.loc of
  155. LOC_REFERENCE, LOC_CREFERENCE:
  156. a_load64_ref_reg(list,l.reference,reg);
  157. LOC_REGISTER,LOC_CREGISTER:
  158. a_load64_reg_reg(list,l.register64,reg);
  159. LOC_CONSTANT :
  160. a_load64_const_reg(list,l.valueqword,reg);
  161. else
  162. internalerror(200112292);
  163. end;
  164. end;
  165. procedure tcg64f32.a_load64_loc_ref(list : taasmoutput;const l : tlocation;const ref : treference);
  166. begin
  167. case l.loc of
  168. LOC_REGISTER,LOC_CREGISTER:
  169. a_load64_reg_ref(list,l.reg64,ref);
  170. LOC_CONSTANT :
  171. a_load64_const_ref(list,l.valueqword,ref);
  172. else
  173. internalerror(200203288);
  174. end;
  175. end;
  176. procedure tcg64f32.a_load64_const_loc(list : taasmoutput;value : qword;const l : tlocation);
  177. begin
  178. case l.loc of
  179. LOC_REFERENCE, LOC_CREFERENCE:
  180. a_load64_const_ref(list,value,l.reference);
  181. LOC_REGISTER,LOC_CREGISTER:
  182. a_load64_const_reg(list,value,l.reg64);
  183. else
  184. internalerror(200112293);
  185. end;
  186. end;
  187. procedure tcg64f32.a_load64_reg_loc(list : taasmoutput;reg : tregister64;const l : tlocation);
  188. begin
  189. case l.loc of
  190. LOC_REFERENCE, LOC_CREFERENCE:
  191. a_load64_reg_ref(list,reg,l.reference);
  192. LOC_REGISTER,LOC_CREGISTER:
  193. a_load64_reg_reg(list,reg,l.register64);
  194. else
  195. internalerror(200112293);
  196. end;
  197. end;
  198. procedure tcg64f32.a_load64high_reg_ref(list : taasmoutput;reg : tregister;const ref : treference);
  199. var
  200. tmpref: treference;
  201. begin
  202. if target_info.endian = endian_big then
  203. cg.a_load_reg_ref(list,OS_32,reg,ref)
  204. else
  205. begin
  206. tmpref := ref;
  207. inc(tmpref.offset,4);
  208. cg.a_load_reg_ref(list,OS_32,reg,tmpref)
  209. end;
  210. end;
  211. procedure tcg64f32.a_load64low_reg_ref(list : taasmoutput;reg : tregister;const ref : treference);
  212. var
  213. tmpref: treference;
  214. begin
  215. if target_info.endian = endian_little then
  216. cg.a_load_reg_ref(list,OS_32,reg,ref)
  217. else
  218. begin
  219. tmpref := ref;
  220. inc(tmpref.offset,4);
  221. cg.a_load_reg_ref(list,OS_32,reg,tmpref)
  222. end;
  223. end;
  224. procedure tcg64f32.a_load64high_ref_reg(list : taasmoutput;const ref : treference;reg : tregister);
  225. var
  226. tmpref: treference;
  227. begin
  228. if target_info.endian = endian_big then
  229. cg.a_load_ref_reg(list,OS_32,ref,reg)
  230. else
  231. begin
  232. tmpref := ref;
  233. inc(tmpref.offset,4);
  234. cg.a_load_ref_reg(list,OS_32,tmpref,reg)
  235. end;
  236. end;
  237. procedure tcg64f32.a_load64low_ref_reg(list : taasmoutput;const ref : treference;reg : tregister);
  238. var
  239. tmpref: treference;
  240. begin
  241. if target_info.endian = endian_little then
  242. cg.a_load_ref_reg(list,OS_32,ref,reg)
  243. else
  244. begin
  245. tmpref := ref;
  246. inc(tmpref.offset,4);
  247. cg.a_load_ref_reg(list,OS_32,tmpref,reg)
  248. end;
  249. end;
  250. procedure tcg64f32.a_load64low_loc_reg(list : taasmoutput;const l : tlocation;reg : tregister);
  251. begin
  252. case l.loc of
  253. LOC_REFERENCE,
  254. LOC_CREFERENCE :
  255. a_load64low_ref_reg(list,l.reference,reg);
  256. LOC_REGISTER :
  257. cg.a_load_reg_reg(list,OS_32,l.registerlow,reg);
  258. LOC_CONSTANT :
  259. cg.a_load_const_reg(list,OS_32,l.valuelow,reg);
  260. else
  261. internalerror(200203244);
  262. end;
  263. end;
  264. procedure tcg64f32.a_load64high_loc_reg(list : taasmoutput;const l : tlocation;reg : tregister);
  265. begin
  266. case l.loc of
  267. LOC_REFERENCE,
  268. LOC_CREFERENCE :
  269. a_load64high_ref_reg(list,l.reference,reg);
  270. LOC_REGISTER :
  271. cg.a_load_reg_reg(list,OS_32,l.registerhigh,reg);
  272. LOC_CONSTANT :
  273. cg.a_load_const_reg(list,OS_32,l.valuehigh,reg);
  274. else
  275. internalerror(200203244);
  276. end;
  277. end;
  278. procedure tcg64f32.a_op64_const_loc(list : taasmoutput;op:TOpCG;value : qword;const l: tlocation);
  279. begin
  280. case l.loc of
  281. LOC_REFERENCE, LOC_CREFERENCE:
  282. a_op64_const_reg(list,op,value,l.register64);
  283. LOC_REGISTER,LOC_CREGISTER:
  284. a_op64_const_ref(list,op,value,l.reference);
  285. else
  286. internalerror(200203292);
  287. end;
  288. end;
  289. procedure tcg64f32.a_op64_reg_loc(list : taasmoutput;op:TOpCG;reg : tregister64;const l : tlocation);
  290. begin
  291. case l.loc of
  292. LOC_REFERENCE, LOC_CREFERENCE:
  293. a_op64_reg_ref(list,op,reg,l.reference);
  294. LOC_REGISTER,LOC_CREGISTER:
  295. a_op64_reg_reg(list,op,reg,l.register64);
  296. else
  297. internalerror(2002032422);
  298. end;
  299. end;
  300. procedure tcg64f32.a_op64_loc_reg(list : taasmoutput;op:TOpCG;const l : tlocation;reg : tregister64);
  301. begin
  302. case l.loc of
  303. LOC_REFERENCE, LOC_CREFERENCE:
  304. a_op64_ref_reg(list,op,l.reference,reg);
  305. LOC_REGISTER,LOC_CREGISTER:
  306. a_op64_reg_reg(list,op,l.register64,reg);
  307. LOC_CONSTANT :
  308. a_op64_const_reg(list,op,l.valueqword,reg);
  309. else
  310. internalerror(200203242);
  311. end;
  312. end;
  313. procedure tcg64f32.a_param64_reg(list : taasmoutput;reg : tregister64;const locpara : tparalocation);
  314. begin
  315. {$warning FIX ME}
  316. cg.a_param_reg(list,OS_32,reg.reghi,locpara);
  317. { the nr+1 needs definitivly a fix FK }
  318. { maybe the parameter numbering needs }
  319. { to take care of this on 32 Bit }
  320. { systems FK }
  321. cg.a_param_reg(list,OS_32,reg.reglo,locpara);
  322. end;
  323. procedure tcg64f32.a_param64_const(list : taasmoutput;value : qword;const locpara : tparalocation);
  324. begin
  325. {$warning FIX ME}
  326. if target_info.endian<>source_info.endian then
  327. swap_qword(value);
  328. cg.a_param_const(list,OS_32,hi(value),locpara);
  329. { the nr+1 needs definitivly a fix FK }
  330. { maybe the parameter numbering needs }
  331. { to take care of this on 32 Bit }
  332. { systems FK }
  333. cg.a_param_const(list,OS_32,lo(value),locpara);
  334. end;
  335. procedure tcg64f32.a_param64_ref(list : taasmoutput;const r : treference;const locpara : tparalocation);
  336. var
  337. tmpref: treference;
  338. begin
  339. {$warning FIX ME}
  340. tmpref := r;
  341. inc(tmpref.offset,4);
  342. cg.a_param_ref(list,OS_32,tmpref,locpara);
  343. { the nr+1 needs definitivly a fix FK }
  344. { maybe the parameter numbering needs }
  345. { to take care of this on 32 Bit }
  346. { systems FK }
  347. cg.a_param_ref(list,OS_32,r,locpara);
  348. end;
  349. procedure tcg64f32.a_param64_loc(list : taasmoutput;const l:tlocation;const locpara : tparalocation);
  350. begin
  351. {$warning FIX ME}
  352. case l.loc of
  353. LOC_REGISTER,
  354. LOC_CREGISTER :
  355. a_param64_reg(list,l.register64,locpara);
  356. LOC_CONSTANT :
  357. a_param64_const(list,l.valueqword,locpara);
  358. LOC_CREFERENCE,
  359. LOC_REFERENCE :
  360. a_param64_ref(list,l.reference,locpara);
  361. else
  362. internalerror(200203287);
  363. end;
  364. end;
  365. procedure tcg64f32.g_rangecheck64(list : taasmoutput;const p : tnode;const todef : tdef);
  366. var
  367. neglabel,
  368. poslabel,
  369. endlabel: tasmlabel;
  370. hreg : tregister;
  371. hdef : torddef;
  372. fromdef : tdef;
  373. opsize : tcgsize;
  374. oldregisterdef: boolean;
  375. from_signed,to_signed: boolean;
  376. got_scratch: boolean;
  377. begin
  378. fromdef:=p.resulttype.def;
  379. from_signed := is_signed(fromdef);
  380. to_signed := is_signed(todef);
  381. if not is_64bitint(todef) then
  382. begin
  383. oldregisterdef := registerdef;
  384. registerdef := false;
  385. { get the high dword in a register }
  386. if p.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
  387. begin
  388. hreg := p.location.registerhigh;
  389. got_scratch := false
  390. end
  391. else
  392. begin
  393. hreg := cg.get_scratch_reg_int(list);
  394. got_scratch := true;
  395. a_load64high_ref_reg(list,p.location.reference,hreg);
  396. end;
  397. getlabel(poslabel);
  398. { check high dword, must be 0 (for positive numbers) }
  399. cg.a_cmp_const_reg_label(list,OS_32,OC_EQ,0,hreg,poslabel);
  400. { It can also be $ffffffff, but only for negative numbers }
  401. if from_signed and to_signed then
  402. begin
  403. getlabel(neglabel);
  404. cg.a_cmp_const_reg_label(list,OS_32,OC_EQ,aword(-1),hreg,neglabel);
  405. end;
  406. { !!! freeing of register should happen directly after compare! (JM) }
  407. if got_scratch then
  408. cg.free_scratch_reg(list,hreg);
  409. { For all other values we have a range check error }
  410. cg.a_call_name(list,'FPC_RANGEERROR');
  411. { if the high dword = 0, the low dword can be considered a }
  412. { simple cardinal }
  413. cg.a_label(list,poslabel);
  414. hdef:=torddef.create(u32bit,0,cardinal($ffffffff));
  415. { the real p.resulttype.def is already saved in fromdef }
  416. p.resulttype.def := hdef;
  417. { no use in calling just "g_rangecheck" since that one will }
  418. { simply call the inherited method too (JM) }
  419. cg.g_rangecheck(list,p,todef);
  420. hdef.free;
  421. { restore original resulttype.def }
  422. p.resulttype.def := todef;
  423. if from_signed and to_signed then
  424. begin
  425. getlabel(endlabel);
  426. cg.a_jmp_always(list,endlabel);
  427. { if the high dword = $ffffffff, then the low dword (when }
  428. { considered as a longint) must be < 0 }
  429. cg.a_label(list,neglabel);
  430. if p.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
  431. begin
  432. hreg := p.location.registerlow;
  433. got_scratch := false
  434. end
  435. else
  436. begin
  437. hreg := cg.get_scratch_reg_int(list);
  438. got_scratch := true;
  439. a_load64low_ref_reg(list,p.location.reference,hreg);
  440. end;
  441. { get a new neglabel (JM) }
  442. getlabel(neglabel);
  443. cg.a_cmp_const_reg_label(list,OS_32,OC_LT,0,hreg,neglabel);
  444. { !!! freeing of register should happen directly after compare! (JM) }
  445. if got_scratch then
  446. cg.free_scratch_reg(list,hreg);
  447. cg.a_call_name(list,'FPC_RANGEERROR');
  448. { if we get here, the 64bit value lies between }
  449. { longint($80000000) and -1 (JM) }
  450. cg.a_label(list,neglabel);
  451. hdef:=torddef.create(s32bit,longint($80000000),-1);
  452. p.resulttype.def := hdef;
  453. cg.g_rangecheck(list,p,todef);
  454. hdef.free;
  455. cg.a_label(list,endlabel);
  456. end;
  457. registerdef := oldregisterdef;
  458. p.resulttype.def := fromdef;
  459. { restore p's resulttype.def }
  460. end
  461. else
  462. { todef = 64bit int }
  463. { no 64bit subranges supported, so only a small check is necessary }
  464. { if both are signed or both are unsigned, no problem! }
  465. if (from_signed xor to_signed) and
  466. { also not if the fromdef is unsigned and < 64bit, since that will }
  467. { always fit in a 64bit int (todef is 64bit) }
  468. (from_signed or
  469. (torddef(fromdef).typ = u64bit)) then
  470. begin
  471. { in all cases, there is only a problem if the higest bit is set }
  472. if p.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
  473. begin
  474. if is_64bitint(fromdef) then
  475. begin
  476. hreg := p.location.registerhigh;
  477. opsize := OS_32;
  478. end
  479. else
  480. begin
  481. hreg := p.location.register;
  482. opsize := def_cgsize(p.resulttype.def);
  483. end;
  484. got_scratch := false;
  485. end
  486. else
  487. begin
  488. hreg := cg.get_scratch_reg_int(list);
  489. got_scratch := true;
  490. opsize := def_cgsize(p.resulttype.def);
  491. if opsize in [OS_64,OS_S64] then
  492. a_load64high_ref_reg(list,p.location.reference,hreg)
  493. else
  494. cg.a_load_ref_reg(list,opsize,p.location.reference,hreg);
  495. end;
  496. getlabel(poslabel);
  497. cg.a_cmp_const_reg_label(list,opsize,OC_GTE,0,hreg,poslabel);
  498. { !!! freeing of register should happen directly after compare! (JM) }
  499. if got_scratch then
  500. cg.free_scratch_reg(list,hreg);
  501. cg.a_call_name(list,'FPC_RANGEERROR');
  502. cg.a_label(list,poslabel);
  503. end;
  504. end;
  505. (*
  506. procedure int64f32_assignment_int64_reg(p : passignmentnode);
  507. begin
  508. end;
  509. begin
  510. p2_assignment:=@int64f32_assignement_int64;
  511. *)
  512. end.
  513. {
  514. $Log$
  515. Revision 1.17 2002-07-07 09:52:32 florian
  516. * powerpc target fixed, very simple units can be compiled
  517. * some basic stuff for better callparanode handling, far from being finished
  518. Revision 1.16 2002/07/01 18:46:21 peter
  519. * internal linker
  520. * reorganized aasm layer
  521. Revision 1.15 2002/07/01 16:23:52 peter
  522. * cg64 patch
  523. * basics for currency
  524. * asnode updates for class and interface (not finished)
  525. Revision 1.14 2002/05/20 13:30:40 carl
  526. * bugfix of hdisponen (base must be set, not index)
  527. * more portability fixes
  528. Revision 1.13 2002/05/18 13:34:05 peter
  529. * readded missing revisions
  530. Revision 1.12 2002/05/16 19:46:35 carl
  531. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  532. + try to fix temp allocation (still in ifdef)
  533. + generic constructor calls
  534. + start of tassembler / tmodulebase class cleanup
  535. Revision 1.10 2002/05/12 16:53:04 peter
  536. * moved entry and exitcode to ncgutil and cgobj
  537. * foreach gets extra argument for passing local data to the
  538. iterator function
  539. * -CR checks also class typecasts at runtime by changing them
  540. into as
  541. * fixed compiler to cycle with the -CR option
  542. * fixed stabs with elf writer, finally the global variables can
  543. be watched
  544. * removed a lot of routines from cga unit and replaced them by
  545. calls to cgobj
  546. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  547. u32bit then the other is typecasted also to u32bit without giving
  548. a rangecheck warning/error.
  549. * fixed pascal calling method with reversing also the high tree in
  550. the parast, detected by tcalcst3 test
  551. Revision 1.9 2002/04/25 20:16:38 peter
  552. * moved more routines from cga/n386util
  553. Revision 1.8 2002/04/21 15:28:51 carl
  554. * a_jmp_cond -> a_jmp_always
  555. Revision 1.7 2002/04/07 13:21:18 carl
  556. + more documentation
  557. Revision 1.6 2002/04/03 10:41:35 jonas
  558. + a_load64_const_loc method
  559. Revision 1.5 2002/04/02 17:11:27 peter
  560. * tlocation,treference update
  561. * LOC_CONSTANT added for better constant handling
  562. * secondadd splitted in multiple routines
  563. * location_force_reg added for loading a location to a register
  564. of a specified size
  565. * secondassignment parses now first the right and then the left node
  566. (this is compatible with Kylix). This saves a lot of push/pop especially
  567. with string operations
  568. * adapted some routines to use the new cg methods
  569. Revision 1.4 2002/03/04 19:10:11 peter
  570. * removed compiler warnings
  571. Revision 1.3 2002/01/24 12:33:52 jonas
  572. * adapted ranges of native types to int64 (e.g. high cardinal is no
  573. longer longint($ffffffff), but just $fffffff in psystem)
  574. * small additional fix in 64bit rangecheck code generation for 32 bit
  575. processors
  576. * adaption of ranges required the matching talgorithm used for selecting
  577. which overloaded procedure to call to be adapted. It should now always
  578. select the closest match for ordinal parameters.
  579. + inttostr(qword) in sysstr.inc/sysstrh.inc
  580. + abs(int64), sqr(int64), sqr(qword) in systemh.inc/generic.inc (previous
  581. fixes were required to be able to add them)
  582. * is_in_limit() moved from ncal to types unit, should always be used
  583. instead of direct comparisons of low/high values of orddefs because
  584. qword is a special case
  585. }