paramgr.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. {
  2. $Id$
  3. Copyright (c) 2002 by Florian Klaempfl
  4. Generic calling convention handling
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. {# Parameter passing manager. Used to manage how
  19. parameters are passed to routines.
  20. }
  21. unit paramgr;
  22. {$i fpcdefs.inc}
  23. interface
  24. uses
  25. cclasses,globtype,
  26. cpubase,cgbase,
  27. aasmtai,
  28. symconst,symtype,symdef;
  29. type
  30. {# This class defines some methods to take care of routine
  31. parameters. It should be overriden for each new processor
  32. }
  33. tparamanager = class
  34. {# Returns true if the return value is actually a parameter
  35. pointer.
  36. }
  37. function ret_in_param(def : tdef;calloption : tproccalloption) : boolean;virtual;
  38. function push_high_param(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;virtual;
  39. { Returns true if a parameter is too large to copy and only
  40. the address is pushed
  41. }
  42. function push_addr_param(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;virtual;
  43. { return the size of a push }
  44. function push_size(varspez:tvarspez;def : tdef;calloption : tproccalloption) : longint;
  45. { Returns true if a parameter needs to be copied on the stack, this
  46. is required for cdecl procedures
  47. }
  48. function copy_value_on_stack(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;virtual;
  49. {# Returns a structure giving the information on
  50. the storage of the parameter (which must be
  51. an integer parameter). This is only used when calling
  52. internal routines directly, where all parameters must
  53. be 4-byte values.
  54. In case the location is a register, this register is allocated.
  55. Call freeintparaloc() after the call to free the locations again.
  56. Default implementation: don't do anything at all (in case you don't
  57. use register parameter passing)
  58. @param(list Current assembler list)
  59. @param(nr Parameter number of routine, starting from 1)
  60. }
  61. function get_para_align(calloption : tproccalloption):byte;virtual;
  62. function get_volatile_registers_int(calloption : tproccalloption):tcpuregisterset;virtual;
  63. function get_volatile_registers_fpu(calloption : tproccalloption):tcpuregisterset;virtual;
  64. function get_volatile_registers_flags(calloption : tproccalloption):tcpuregisterset;virtual;
  65. function get_volatile_registers_mm(calloption : tproccalloption):tcpuregisterset;virtual;
  66. function getintparaloc(calloption : tproccalloption; nr : longint) : tparalocation;virtual;abstract;
  67. {# allocate a parameter location created with create_paraloc_info
  68. @param(list Current assembler list)
  69. @param(loc Parameter location)
  70. }
  71. procedure allocparaloc(list: taasmoutput; const loc: tparalocation); virtual;
  72. {# free a parameter location allocated with allocparaloc
  73. @param(list Current assembler list)
  74. @param(loc Parameter location)
  75. }
  76. procedure freeparaloc(list: taasmoutput; const loc: tparalocation); virtual;
  77. { This is used to populate the location information on all parameters
  78. for the routine as seen in either the caller or the callee. It returns
  79. the size allocated on the stack
  80. }
  81. function create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;virtual;abstract;
  82. { This is used to populate the location information on all parameters
  83. for the routine when it is being inlined. It returns
  84. the size allocated on the stack
  85. }
  86. function create_inline_paraloc_info(p : tabstractprocdef):longint;virtual;
  87. { This is used to populate the location information on all parameters
  88. for the routine that are passed as varargs. It returns
  89. the size allocated on the stack (including the normal parameters)
  90. }
  91. function create_varargs_paraloc_info(p : tabstractprocdef; varargspara:tlinkedlist):longint;virtual;abstract;
  92. { Return the location of the low and high part of a 64bit parameter }
  93. procedure splitparaloc64(const locpara:tparalocation;var loclopara,lochipara:tparalocation);virtual;
  94. procedure alloctempregs(list: taasmoutput;var locpara:tparalocation);virtual;
  95. end;
  96. var
  97. paramanager : tparamanager;
  98. implementation
  99. uses
  100. cpuinfo,systems,
  101. cgobj,
  102. defutil,verbose;
  103. { true if uses a parameter as return value }
  104. function tparamanager.ret_in_param(def : tdef;calloption : tproccalloption) : boolean;
  105. begin
  106. ret_in_param:=(def.deftype in [arraydef,recorddef]) or
  107. ((def.deftype=stringdef) and (tstringdef(def).string_typ in [st_shortstring,st_longstring])) or
  108. ((def.deftype=procvardef) and (po_methodpointer in tprocvardef(def).procoptions)) or
  109. ((def.deftype=objectdef) and is_object(def)) or
  110. (def.deftype=variantdef) or
  111. ((def.deftype=setdef) and (tsetdef(def).settype<>smallset));
  112. end;
  113. function tparamanager.push_high_param(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;
  114. begin
  115. push_high_param:=not(calloption in [pocall_cdecl,pocall_cppdecl]) and
  116. (
  117. is_open_array(def) or
  118. is_open_string(def) or
  119. is_array_of_const(def)
  120. );
  121. end;
  122. { true if a parameter is too large to copy and only the address is pushed }
  123. function tparamanager.push_addr_param(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;
  124. begin
  125. result:=false;
  126. { var,out always require address }
  127. if varspez in [vs_var,vs_out] then
  128. begin
  129. result:=true;
  130. exit;
  131. end;
  132. { Only vs_const, vs_value here }
  133. case def.deftype of
  134. variantdef,
  135. formaldef :
  136. result:=true;
  137. recorddef :
  138. result:=not(calloption in [pocall_cdecl,pocall_cppdecl]) and (def.size>pointer_size);
  139. arraydef :
  140. begin
  141. if (calloption in [pocall_cdecl,pocall_cppdecl]) then
  142. begin
  143. { array of const values are pushed on the stack }
  144. result:=not is_array_of_const(def);
  145. end
  146. else
  147. begin
  148. result:=(
  149. (tarraydef(def).highrange>=tarraydef(def).lowrange) and
  150. (def.size>pointer_size)
  151. ) or
  152. is_open_array(def) or
  153. is_array_of_const(def) or
  154. is_array_constructor(def);
  155. end;
  156. end;
  157. objectdef :
  158. result:=is_object(def);
  159. stringdef :
  160. result:=not(calloption in [pocall_cdecl,pocall_cppdecl]) and (tstringdef(def).string_typ in [st_shortstring,st_longstring]);
  161. procvardef :
  162. result:=not(calloption in [pocall_cdecl,pocall_cppdecl]) and (po_methodpointer in tprocvardef(def).procoptions);
  163. setdef :
  164. result:=not(calloption in [pocall_cdecl,pocall_cppdecl]) and (tsetdef(def).settype<>smallset);
  165. end;
  166. end;
  167. { true if a parameter is too large to push and needs a concatcopy to get the value on the stack }
  168. function tparamanager.copy_value_on_stack(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;
  169. begin
  170. copy_value_on_stack:=false;
  171. { this is only for cdecl procedures with vs_const,vs_value }
  172. if not(
  173. (calloption in [pocall_cdecl,pocall_cppdecl]) and
  174. (varspez in [vs_value,vs_const])
  175. ) then
  176. exit;
  177. case def.deftype of
  178. variantdef,
  179. formaldef :
  180. copy_value_on_stack:=true;
  181. recorddef :
  182. copy_value_on_stack:=(def.size>pointer_size);
  183. arraydef :
  184. copy_value_on_stack:=(tarraydef(def).highrange>=tarraydef(def).lowrange) and
  185. (def.size>pointer_size);
  186. objectdef :
  187. copy_value_on_stack:=is_object(def);
  188. stringdef :
  189. copy_value_on_stack:=tstringdef(def).string_typ in [st_shortstring,st_longstring];
  190. procvardef :
  191. copy_value_on_stack:=(po_methodpointer in tprocvardef(def).procoptions);
  192. setdef :
  193. copy_value_on_stack:=(tsetdef(def).settype<>smallset);
  194. end;
  195. end;
  196. { return the size of a push }
  197. function tparamanager.push_size(varspez:tvarspez;def : tdef;calloption : tproccalloption) : longint;
  198. begin
  199. push_size:=-1;
  200. case varspez of
  201. vs_out,
  202. vs_var :
  203. push_size:=pointer_size;
  204. vs_value,
  205. vs_const :
  206. begin
  207. if push_addr_param(varspez,def,calloption) then
  208. push_size:=pointer_size
  209. else
  210. begin
  211. { special array are normally pushed by addr, only for
  212. cdecl array of const it comes here and the pushsize
  213. is unknown }
  214. if is_array_of_const(def) then
  215. push_size:=0
  216. else
  217. push_size:=def.size;
  218. end;
  219. end;
  220. end;
  221. end;
  222. function tparamanager.get_para_align(calloption : tproccalloption):byte;
  223. begin
  224. result:=std_param_align;
  225. end;
  226. function tparamanager.get_volatile_registers_int(calloption : tproccalloption):tcpuregisterset;
  227. begin
  228. result:=[];
  229. end;
  230. function tparamanager.get_volatile_registers_fpu(calloption : tproccalloption):tcpuregisterset;
  231. begin
  232. result:=[];
  233. end;
  234. function tparamanager.get_volatile_registers_flags(calloption : tproccalloption):tcpuregisterset;
  235. begin
  236. result:=[];
  237. end;
  238. function tparamanager.get_volatile_registers_mm(calloption : tproccalloption):tcpuregisterset;
  239. begin
  240. result:=[];
  241. end;
  242. procedure tparamanager.allocparaloc(list: taasmoutput; const loc: tparalocation);
  243. begin
  244. case loc.loc of
  245. LOC_REGISTER, LOC_CREGISTER:
  246. begin
  247. { NR_NO means we don't need to allocate the parameter.
  248. This is used for inlining parameters which allocates
  249. the parameters in gen_alloc_parast (PFV) }
  250. if loc.register<>NR_NO then
  251. begin
  252. {$ifndef cpu64bit}
  253. if (loc.size in [OS_64,OS_S64,OS_F64]) then
  254. begin
  255. cg.getexplicitregister(list,loc.registerhigh);
  256. cg.getexplicitregister(list,loc.registerlow);
  257. end
  258. else
  259. {$endif cpu64bit}
  260. cg.getexplicitregister(list,loc.register);
  261. end;
  262. end;
  263. LOC_FPUREGISTER, LOC_CFPUREGISTER:
  264. begin
  265. if loc.register<>NR_NO then
  266. cg.getexplicitregister(list,loc.register);
  267. end;
  268. LOC_REFERENCE,LOC_CREFERENCE:
  269. { do nothing by default, most of the time it's the framepointer }
  270. else
  271. internalerror(200306091);
  272. end;
  273. end;
  274. procedure tparamanager.freeparaloc(list: taasmoutput; const loc: tparalocation);
  275. begin
  276. case loc.loc of
  277. LOC_REGISTER, LOC_CREGISTER:
  278. begin
  279. {$ifndef cpu64bit}
  280. if (loc.size in [OS_64,OS_S64,OS_F64]) then
  281. begin
  282. cg.ungetregister(list,loc.registerhigh);
  283. cg.ungetregister(list,loc.registerlow);
  284. end
  285. else
  286. {$endif cpu64bit}
  287. cg.ungetregister(list,loc.register);
  288. end;
  289. LOC_FPUREGISTER, LOC_CFPUREGISTER:
  290. cg.ungetregister(list,loc.register);
  291. LOC_REFERENCE,LOC_CREFERENCE:
  292. { do nothing by default, most of the time it's the framepointer }
  293. else
  294. internalerror(200306091);
  295. end;
  296. end;
  297. procedure tparamanager.splitparaloc64(const locpara:tparalocation;var loclopara,lochipara:tparalocation);
  298. begin
  299. if not(locpara.size in [OS_64,OS_S64]) then
  300. internalerror(200307023);
  301. lochipara:=locpara;
  302. loclopara:=locpara;
  303. if locpara.size=OS_S64 then
  304. lochipara.size:=OS_S32
  305. else
  306. lochipara.size:=OS_32;
  307. loclopara.size:=OS_32;
  308. case locpara.loc of
  309. LOC_REGISTER,LOC_CREGISTER:
  310. begin
  311. loclopara.register:=locpara.registerlow;
  312. lochipara.register:=locpara.registerhigh;
  313. end;
  314. LOC_REFERENCE:
  315. begin
  316. if target_info.endian=endian_big then
  317. inc(loclopara.reference.offset,4)
  318. else
  319. inc(lochipara.reference.offset,4);
  320. end;
  321. else
  322. internalerror(200307024);
  323. end;
  324. end;
  325. procedure tparamanager.alloctempregs(list: taasmoutput;var locpara:tparalocation);
  326. begin
  327. case locpara.loc of
  328. LOC_REGISTER:
  329. begin
  330. {$ifndef cpu64bit}
  331. if locpara.size in [OS_64,OS_S64] then
  332. begin
  333. locpara.registerlow:=cg.getintregister(list,OS_32);
  334. locpara.registerhigh:=cg.getintregister(list,OS_32);
  335. end
  336. else
  337. {$endif cpu64bit}
  338. locpara.register:=cg.getintregister(list,locpara.size);
  339. end;
  340. LOC_FPUREGISTER:
  341. begin
  342. locpara.register:=cg.getfpuregister(list,locpara.size);
  343. end;
  344. LOC_MMREGISTER:
  345. begin
  346. locpara.register:=cg.getfpuregister(list,locpara.size);
  347. end;
  348. else
  349. internalerror(200308123);
  350. end;
  351. end;
  352. function tparamanager.create_inline_paraloc_info(p : tabstractprocdef):longint;
  353. var
  354. hp : tparaitem;
  355. paraloc : tparalocation;
  356. parasize : longint;
  357. begin
  358. parasize:=0;
  359. hp:=tparaitem(p.para.first);
  360. while assigned(hp) do
  361. begin
  362. if push_addr_param(hp.paratyp,hp.paratype.def,p.proccalloption) then
  363. paraloc.size:=OS_ADDR
  364. else
  365. paraloc.size:=def_cgsize(hp.paratype.def);
  366. if paraloc.size=OS_NO then
  367. internalerror(200309301);
  368. { Indicate parameter is loaded in register, the register
  369. will be allocated when the allocpara is called }
  370. paraloc.loc:=LOC_REGISTER;
  371. paraloc.register:=NR_NO;
  372. (*
  373. paraloc.loc:=LOC_REFERENCE;
  374. paraloc.reference.index:=NR_FRAME_POINTER_REG;
  375. l:=push_size(hp.paratyp,hp.paratype.def,p.proccalloption);
  376. varalign:=size_2_align(l);
  377. paraloc.reference.offset:=parasize+target_info.first_parm_offset;
  378. varalign:=used_align(varalign,p.paraalign,p.paraalign);
  379. parasize:=align(parasize+l,varalign);
  380. *)
  381. hp.paraloc[callerside]:=paraloc;
  382. hp.paraloc[calleeside]:=paraloc;
  383. hp:=tparaitem(hp.next);
  384. end;
  385. { We need to return the size allocated }
  386. result:=parasize;
  387. end;
  388. initialization
  389. ;
  390. finalization
  391. paramanager.free;
  392. end.
  393. {
  394. $Log$
  395. Revision 1.65 2003-10-29 21:24:14 jonas
  396. + support for fpu temp parameters
  397. + saving/restoring of fpu register before/after a procedure call
  398. Revision 1.64 2003/10/17 14:38:32 peter
  399. * 64k registers supported
  400. * fixed some memory leaks
  401. Revision 1.63 2003/10/11 16:06:42 florian
  402. * fixed some MMX<->SSE
  403. * started to fix ppc, needs an overhaul
  404. + stabs info improve for spilling, not sure if it works correctly/completly
  405. - MMX_SUPPORT removed from Makefile.fpc
  406. Revision 1.62 2003/10/10 17:48:13 peter
  407. * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
  408. * tregisteralloctor renamed to trgobj
  409. * removed rgobj from a lot of units
  410. * moved location_* and reference_* to cgobj
  411. * first things for mmx register allocation
  412. Revision 1.61 2003/10/09 21:31:37 daniel
  413. * Register allocator splitted, ans abstract now
  414. Revision 1.60 2003/10/05 21:21:52 peter
  415. * c style array of const generates callparanodes
  416. * varargs paraloc fixes
  417. Revision 1.59 2003/10/03 22:00:33 peter
  418. * parameter alignment fixes
  419. Revision 1.58 2003/10/01 20:34:49 peter
  420. * procinfo unit contains tprocinfo
  421. * cginfo renamed to cgbase
  422. * moved cgmessage to verbose
  423. * fixed ppc and sparc compiles
  424. Revision 1.57 2003/09/30 21:02:37 peter
  425. * updates for inlining
  426. Revision 1.56 2003/09/23 17:56:05 peter
  427. * locals and paras are allocated in the code generation
  428. * tvarsym.localloc contains the location of para/local when
  429. generating code for the current procedure
  430. Revision 1.55 2003/09/16 16:17:01 peter
  431. * varspez in calls to push_addr_param
  432. Revision 1.54 2003/09/10 08:31:47 marco
  433. * Patch from Peter for paraloc
  434. Revision 1.53 2003/09/07 22:09:35 peter
  435. * preparations for different default calling conventions
  436. * various RA fixes
  437. Revision 1.52 2003/09/04 15:39:58 peter
  438. * released useparatemp
  439. Revision 1.51 2003/09/03 15:55:01 peter
  440. * NEWRA branch merged
  441. Revision 1.50.2.1 2003/08/29 17:28:59 peter
  442. * next batch of updates
  443. Revision 1.50 2003/08/11 21:18:20 peter
  444. * start of sparc support for newra
  445. Revision 1.49 2003/07/08 21:24:59 peter
  446. * sparc fixes
  447. Revision 1.48 2003/07/05 20:11:41 jonas
  448. * create_paraloc_info() is now called separately for the caller and
  449. callee info
  450. * fixed ppc cycle
  451. Revision 1.47 2003/07/02 22:18:04 peter
  452. * paraloc splitted in callerparaloc,calleeparaloc
  453. * sparc calling convention updates
  454. Revision 1.46 2003/06/17 16:32:03 peter
  455. * allocpara/freepara 64bit support
  456. Revision 1.45 2003/06/13 21:19:30 peter
  457. * current_procdef removed, use current_procinfo.procdef instead
  458. Revision 1.44 2003/06/12 21:11:10 peter
  459. * ungetregisterfpu gets size parameter
  460. Revision 1.43 2003/06/09 14:54:26 jonas
  461. * (de)allocation of registers for parameters is now performed properly
  462. (and checked on the ppc)
  463. - removed obsolete allocation of all parameter registers at the start
  464. of a procedure (and deallocation at the end)
  465. Revision 1.42 2003/06/08 10:54:41 jonas
  466. - disabled changing of LOC_*REGISTER to LOC_C*REGISTER in setparalocs,
  467. this is not necessary anymore (doesn't do anything anymore actually,
  468. except making sure the interface crc changes)
  469. Revision 1.41 2003/06/07 18:57:04 jonas
  470. + added freeintparaloc
  471. * ppc get/freeintparaloc now check whether the parameter regs are
  472. properly allocated/deallocated (and get an extra list para)
  473. * ppc a_call_* now internalerrors if pi_do_call is not yet set
  474. * fixed lot of missing pi_do_call's
  475. Revision 1.40 2003/05/31 15:05:28 peter
  476. * FUNCTION_RESULT64_LOW/HIGH_REG added for int64 results
  477. Revision 1.39 2003/05/30 23:57:08 peter
  478. * more sparc cleanup
  479. * accumulator removed, splitted in function_return_reg (called) and
  480. function_result_reg (caller)
  481. Revision 1.38 2003/05/13 15:16:13 peter
  482. * removed ret_in_acc, it's the reverse of ret_in_param
  483. * fixed ret_in_param for win32 cdecl array
  484. Revision 1.37 2003/04/30 22:15:59 florian
  485. * some 64 bit adaptions in ncgadd
  486. * x86-64 now uses ncgadd
  487. * tparamanager.ret_in_acc doesn't return true anymore for a void-def
  488. Revision 1.36 2003/04/27 11:21:33 peter
  489. * aktprocdef renamed to current_procinfo.procdef
  490. * procinfo renamed to current_procinfo
  491. * procinfo will now be stored in current_module so it can be
  492. cleaned up properly
  493. * gen_main_procsym changed to create_main_proc and release_main_proc
  494. to also generate a tprocinfo structure
  495. * fixed unit implicit initfinal
  496. Revision 1.35 2003/04/27 07:29:50 peter
  497. * current_procinfo.procdef cleanup, current_procdef is now always nil when parsing
  498. a new procdef declaration
  499. * aktprocsym removed
  500. * lexlevel removed, use symtable.symtablelevel instead
  501. * implicit init/final code uses the normal genentry/genexit
  502. * funcret state checking updated for new funcret handling
  503. Revision 1.34 2003/04/23 13:15:04 peter
  504. * fix push_high_param for cdecl
  505. Revision 1.33 2003/04/23 10:14:30 peter
  506. * cdecl array of const has no addr push
  507. Revision 1.32 2003/04/22 13:47:08 peter
  508. * fixed C style array of const
  509. * fixed C array passing
  510. * fixed left to right with high parameters
  511. Revision 1.31 2003/02/02 19:25:54 carl
  512. * Several bugfixes for m68k target (register alloc., opcode emission)
  513. + VIS target
  514. + Generic add more complete (still not verified)
  515. Revision 1.30 2003/01/08 18:43:56 daniel
  516. * Tregister changed into a record
  517. Revision 1.29 2002/12/23 20:58:03 peter
  518. * remove unused global var
  519. Revision 1.28 2002/12/17 22:19:33 peter
  520. * fixed pushing of records>8 bytes with stdcall
  521. * simplified hightree loading
  522. Revision 1.27 2002/12/06 16:56:58 peter
  523. * only compile cs_fp_emulation support when cpufpuemu is defined
  524. * define cpufpuemu for m68k only
  525. Revision 1.26 2002/11/27 20:04:09 peter
  526. * tvarsym.get_push_size replaced by paramanager.push_size
  527. Revision 1.25 2002/11/27 02:33:19 peter
  528. * copy_value_on_stack method added for cdecl record passing
  529. Revision 1.24 2002/11/25 17:43:21 peter
  530. * splitted defbase in defutil,symutil,defcmp
  531. * merged isconvertable and is_equal into compare_defs(_ext)
  532. * made operator search faster by walking the list only once
  533. Revision 1.23 2002/11/18 17:31:58 peter
  534. * pass proccalloption to ret_in_xxx and push_xxx functions
  535. Revision 1.22 2002/11/16 18:00:04 peter
  536. * only push small arrays on the stack for win32
  537. Revision 1.21 2002/10/05 12:43:25 carl
  538. * fixes for Delphi 6 compilation
  539. (warning : Some features do not work under Delphi)
  540. Revision 1.20 2002/09/30 07:07:25 florian
  541. * fixes to common code to get the alpha compiler compiled applied
  542. Revision 1.19 2002/09/30 07:00:47 florian
  543. * fixes to common code to get the alpha compiler compiled applied
  544. Revision 1.18 2002/09/09 09:10:51 florian
  545. + added generic tparamanager.getframepointerloc
  546. Revision 1.17 2002/09/07 19:40:39 florian
  547. * tvarsym.paraitem is set now
  548. Revision 1.16 2002/09/01 21:04:48 florian
  549. * several powerpc related stuff fixed
  550. Revision 1.15 2002/08/25 19:25:19 peter
  551. * sym.insert_in_data removed
  552. * symtable.insertvardata/insertconstdata added
  553. * removed insert_in_data call from symtable.insert, it needs to be
  554. called separatly. This allows to deref the address calculation
  555. * procedures now calculate the parast addresses after the procedure
  556. directives are parsed. This fixes the cdecl parast problem
  557. * push_addr_param has an extra argument that specifies if cdecl is used
  558. or not
  559. Revision 1.14 2002/08/17 22:09:47 florian
  560. * result type handling in tcgcal.pass_2 overhauled
  561. * better tnode.dowrite
  562. * some ppc stuff fixed
  563. Revision 1.13 2002/08/17 09:23:38 florian
  564. * first part of procinfo rewrite
  565. Revision 1.12 2002/08/16 14:24:58 carl
  566. * issameref() to test if two references are the same (then emit no opcodes)
  567. + ret_in_reg to replace ret_in_acc
  568. (fix some register allocation bugs at the same time)
  569. + save_std_register now has an extra parameter which is the
  570. usedinproc registers
  571. Revision 1.11 2002/08/12 15:08:40 carl
  572. + stab register indexes for powerpc (moved from gdb to cpubase)
  573. + tprocessor enumeration moved to cpuinfo
  574. + linker in target_info is now a class
  575. * many many updates for m68k (will soon start to compile)
  576. - removed some ifdef or correct them for correct cpu
  577. Revision 1.10 2002/08/10 17:15:20 jonas
  578. * register parameters are now LOC_CREGISTER instead of LOC_REGISTER
  579. Revision 1.9 2002/08/09 07:33:02 florian
  580. * a couple of interface related fixes
  581. Revision 1.8 2002/08/06 20:55:21 florian
  582. * first part of ppc calling conventions fix
  583. Revision 1.7 2002/08/05 18:27:48 carl
  584. + more more more documentation
  585. + first version include/exclude (can't test though, not enough scratch for i386 :()...
  586. Revision 1.6 2002/07/30 20:50:43 florian
  587. * the code generator knows now if parameters are in registers
  588. Revision 1.5 2002/07/26 21:15:39 florian
  589. * rewrote the system handling
  590. Revision 1.4 2002/07/20 11:57:55 florian
  591. * types.pas renamed to defbase.pas because D6 contains a types
  592. unit so this would conflicts if D6 programms are compiled
  593. + Willamette/SSE2 instructions to assembler added
  594. Revision 1.3 2002/07/13 19:38:43 florian
  595. * some more generic calling stuff fixed
  596. Revision 1.2 2002/07/13 07:17:15 jonas
  597. * fixed memory leak reported by Sergey Korshunoff
  598. Revision 1.1 2002/07/11 14:41:28 florian
  599. * start of the new generic parameter handling
  600. }