cgcpu.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. This unit implements the code generator for the i386
  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. { This unit implements the code generator for the i386.
  19. }
  20. unit cgcpu;
  21. {$i fpcdefs.inc}
  22. interface
  23. uses
  24. cgbase,cgobj,cg64f32,cgx86,
  25. aasmbase,aasmtai,aasmcpu,
  26. cpubase,cpuinfo,
  27. node,symconst
  28. {$ifdef delphi}
  29. ,dmisc
  30. {$endif}
  31. ;
  32. type
  33. tcg386 = class(tcgx86)
  34. procedure init_register_allocators;override;
  35. class function reg_cgsize(const reg: tregister): tcgsize; override;
  36. procedure g_save_all_registers(list : taasmoutput);override;
  37. procedure g_restore_all_registers(list : taasmoutput;const funcretparaloc:tparalocation);override;
  38. procedure g_copyvaluepara_openarray(list : taasmoutput;const ref, lenref:treference;elesize:aword);override;
  39. end;
  40. tcg64f386 = class(tcg64f32)
  41. procedure a_op64_ref_reg(list : taasmoutput;op:TOpCG;const ref : treference;reg : tregister64);override;
  42. procedure a_op64_reg_reg(list : taasmoutput;op:TOpCG;regsrc,regdst : tregister64);override;
  43. procedure a_op64_const_reg(list : taasmoutput;op:TOpCG;value : qword;reg : tregister64);override;
  44. procedure a_op64_const_ref(list : taasmoutput;op:TOpCG;value : qword;const ref : treference);override;
  45. private
  46. procedure get_64bit_ops(op:TOpCG;var op1,op2:TAsmOp);
  47. end;
  48. implementation
  49. uses
  50. globtype,globals,verbose,systems,cutils,
  51. symdef,symsym,defutil,paramgr,procinfo,
  52. rgcpu,rgx86,tgobj,
  53. cgutils;
  54. procedure Tcg386.init_register_allocators;
  55. begin
  56. inherited init_register_allocators;
  57. if cs_create_pic in aktmoduleswitches then
  58. rg[R_INTREGISTER]:=trgcpu.create(R_INTREGISTER,R_SUBWHOLE,[RS_EAX,RS_EDX,RS_ECX,RS_ESI,RS_EDI],first_int_imreg,[RS_EBP,RS_EBX])
  59. else
  60. rg[R_INTREGISTER]:=trgcpu.create(R_INTREGISTER,R_SUBWHOLE,[RS_EAX,RS_EDX,RS_ECX,RS_EBX,RS_ESI,RS_EDI],first_int_imreg,[RS_EBP]);
  61. rg[R_MMXREGISTER]:=trgcpu.create(R_MMXREGISTER,R_SUBNONE,[RS_XMM0,RS_XMM1,RS_XMM2,RS_XMM3,RS_XMM4,RS_XMM5,RS_XMM6,RS_XMM7],first_sse_imreg,[]);
  62. rg[R_MMREGISTER]:=trgcpu.create(R_MMREGISTER,R_SUBNONE,[RS_XMM0,RS_XMM1,RS_XMM2,RS_XMM3,RS_XMM4,RS_XMM5,RS_XMM6,RS_XMM7],first_sse_imreg,[]);
  63. rgfpu:=Trgx86fpu.create;
  64. end;
  65. class function tcg386.reg_cgsize(const reg: tregister): tcgsize;
  66. const subreg2cgsize:array[Tsubregister] of Tcgsize =
  67. (OS_NO,OS_8,OS_8,OS_16,OS_32,OS_64,OS_NO,OS_NO);
  68. begin
  69. case getregtype(reg) of
  70. R_INTREGISTER :
  71. reg_cgsize:=subreg2cgsize[getsubreg(reg)];
  72. R_FPUREGISTER :
  73. reg_cgsize:=OS_F80;
  74. R_MMXREGISTER,
  75. R_MMREGISTER :
  76. reg_cgsize:=OS_M64;
  77. R_SPECIALREGISTER :
  78. case reg of
  79. NR_CS,NR_DS,NR_ES,NR_SS,NR_FS,NR_GS:
  80. reg_cgsize:=OS_16
  81. else
  82. reg_cgsize:=OS_32
  83. end
  84. else
  85. internalerror(200303181);
  86. end;
  87. end;
  88. { const
  89. opsize_2_cgsize: array[topsize] of tcgsize = (OS_NO,
  90. OS_8,OS_16,OS_32,OS_NO,OS_NO,OS_NO,
  91. OS_32,OS_64,OS_64,
  92. OS_F32,OS_F64,OS_F80,OS_F32,OS_F64,OS_M64,OS_NO,
  93. OS_NO,OS_NO,OS_NO
  94. );
  95. begin
  96. result := opsize_2_cgsize[reg2opsize(reg)];
  97. end;}
  98. procedure tcg386.g_save_all_registers(list : taasmoutput);
  99. begin
  100. list.concat(Taicpu.Op_none(A_PUSHA,S_L));
  101. tg.GetTemp(list,POINTER_SIZE,tt_noreuse,current_procinfo.save_regs_ref);
  102. a_load_reg_ref(list,OS_ADDR,OS_ADDR,NR_STACK_POINTER_REG,current_procinfo.save_regs_ref);
  103. end;
  104. procedure tcg386.g_restore_all_registers(list : taasmoutput;const funcretparaloc:tparalocation);
  105. var
  106. href : treference;
  107. begin
  108. a_load_ref_reg(list,OS_ADDR,OS_ADDR,current_procinfo.save_regs_ref,NR_STACK_POINTER_REG);
  109. tg.UnGetTemp(list,current_procinfo.save_regs_ref);
  110. if funcretparaloc.loc=LOC_REGISTER then
  111. begin
  112. if funcretparaloc.size in [OS_64,OS_S64] then
  113. begin
  114. reference_reset_base(href,NR_STACK_POINTER_REG,20);
  115. a_load_reg_ref(list,OS_32,OS_32,NR_FUNCTION_RETURN64_HIGH_REG,href);
  116. reference_reset_base(href,NR_STACK_POINTER_REG,28);
  117. a_load_reg_ref(list,OS_32,OS_32,NR_FUNCTION_RETURN64_LOW_REG,href);
  118. end
  119. else
  120. begin
  121. reference_reset_base(href,NR_STACK_POINTER_REG,28);
  122. a_load_reg_ref(list,OS_32,OS_32,NR_FUNCTION_RETURN_REG,href);
  123. end;
  124. end;
  125. list.concat(Taicpu.Op_none(A_POPA,S_L));
  126. { We add a NOP because of the 386DX CPU bugs with POPAD }
  127. list.concat(taicpu.op_none(A_NOP,S_L));
  128. end;
  129. procedure tcg386.g_copyvaluepara_openarray(list : taasmoutput;const ref, lenref:treference;elesize:aword);
  130. var
  131. power,len : longint;
  132. opsize : topsize;
  133. {$ifndef __NOWINPECOFF__}
  134. again,ok : tasmlabel;
  135. {$endif}
  136. begin
  137. { get stack space }
  138. getexplicitregister(list,NR_EDI);
  139. list.concat(Taicpu.op_ref_reg(A_MOV,S_L,lenref,NR_EDI));
  140. list.concat(Taicpu.op_reg(A_INC,S_L,NR_EDI));
  141. if (elesize<>1) then
  142. begin
  143. if ispowerof2(elesize, power) then
  144. list.concat(Taicpu.op_const_reg(A_SHL,S_L,power,NR_EDI))
  145. else
  146. list.concat(Taicpu.op_const_reg(A_IMUL,S_L,elesize,NR_EDI));
  147. end;
  148. {$ifndef __NOWINPECOFF__}
  149. { windows guards only a few pages for stack growing, }
  150. { so we have to access every page first }
  151. if target_info.system=system_i386_win32 then
  152. begin
  153. objectlibrary.getlabel(again);
  154. objectlibrary.getlabel(ok);
  155. a_label(list,again);
  156. list.concat(Taicpu.op_const_reg(A_CMP,S_L,winstackpagesize,NR_EDI));
  157. a_jmp_cond(list,OC_B,ok);
  158. list.concat(Taicpu.op_const_reg(A_SUB,S_L,winstackpagesize-4,NR_ESP));
  159. list.concat(Taicpu.op_reg(A_PUSH,S_L,NR_EDI));
  160. list.concat(Taicpu.op_const_reg(A_SUB,S_L,winstackpagesize,NR_EDI));
  161. a_jmp_always(list,again);
  162. a_label(list,ok);
  163. list.concat(Taicpu.op_reg_reg(A_SUB,S_L,NR_EDI,NR_ESP));
  164. ungetregister(list,NR_EDI);
  165. { now reload EDI }
  166. getexplicitregister(list,NR_EDI);
  167. list.concat(Taicpu.op_ref_reg(A_MOV,S_L,lenref,NR_EDI));
  168. list.concat(Taicpu.op_reg(A_INC,S_L,NR_EDI));
  169. if (elesize<>1) then
  170. begin
  171. if ispowerof2(elesize, power) then
  172. list.concat(Taicpu.op_const_reg(A_SHL,S_L,power,NR_EDI))
  173. else
  174. list.concat(Taicpu.op_const_reg(A_IMUL,S_L,elesize,NR_EDI));
  175. end;
  176. end
  177. else
  178. {$endif __NOWINPECOFF__}
  179. list.concat(Taicpu.op_reg_reg(A_SUB,S_L,NR_EDI,NR_ESP));
  180. { align stack on 4 bytes }
  181. list.concat(Taicpu.op_const_reg(A_AND,S_L,$fffffff4,NR_ESP));
  182. { load destination }
  183. a_load_reg_reg(list,OS_INT,OS_INT,NR_ESP,NR_EDI);
  184. { Allocate other registers }
  185. getexplicitregister(list,NR_ECX);
  186. getexplicitregister(list,NR_ESI);
  187. { load count }
  188. a_load_ref_reg(list,OS_INT,OS_INT,lenref,NR_ECX);
  189. { load source }
  190. a_load_ref_reg(list,OS_INT,OS_INT,ref,NR_ESI);
  191. { scheduled .... }
  192. list.concat(Taicpu.op_reg(A_INC,S_L,NR_ECX));
  193. { calculate size }
  194. len:=elesize;
  195. opsize:=S_B;
  196. if (len and 3)=0 then
  197. begin
  198. opsize:=S_L;
  199. len:=len shr 2;
  200. end
  201. else
  202. if (len and 1)=0 then
  203. begin
  204. opsize:=S_W;
  205. len:=len shr 1;
  206. end;
  207. if ispowerof2(len, power) then
  208. list.concat(Taicpu.op_const_reg(A_SHL,S_L,power,NR_ECX))
  209. else
  210. list.concat(Taicpu.op_const_reg(A_IMUL,S_L,len,NR_ECX));
  211. list.concat(Taicpu.op_none(A_REP,S_NO));
  212. case opsize of
  213. S_B : list.concat(Taicpu.Op_none(A_MOVSB,S_NO));
  214. S_W : list.concat(Taicpu.Op_none(A_MOVSW,S_NO));
  215. S_L : list.concat(Taicpu.Op_none(A_MOVSL,S_NO));
  216. end;
  217. ungetregister(list,NR_EDI);
  218. ungetregister(list,NR_ECX);
  219. ungetregister(list,NR_ESI);
  220. { patch the new address }
  221. a_load_reg_ref(list,OS_INT,OS_INT,NR_ESP,ref);
  222. end;
  223. { ************* 64bit operations ************ }
  224. procedure tcg64f386.get_64bit_ops(op:TOpCG;var op1,op2:TAsmOp);
  225. begin
  226. case op of
  227. OP_ADD :
  228. begin
  229. op1:=A_ADD;
  230. op2:=A_ADC;
  231. end;
  232. OP_SUB :
  233. begin
  234. op1:=A_SUB;
  235. op2:=A_SBB;
  236. end;
  237. OP_XOR :
  238. begin
  239. op1:=A_XOR;
  240. op2:=A_XOR;
  241. end;
  242. OP_OR :
  243. begin
  244. op1:=A_OR;
  245. op2:=A_OR;
  246. end;
  247. OP_AND :
  248. begin
  249. op1:=A_AND;
  250. op2:=A_AND;
  251. end;
  252. else
  253. internalerror(200203241);
  254. end;
  255. end;
  256. procedure tcg64f386.a_op64_ref_reg(list : taasmoutput;op:TOpCG;const ref : treference;reg : tregister64);
  257. var
  258. op1,op2 : TAsmOp;
  259. tempref : treference;
  260. begin
  261. get_64bit_ops(op,op1,op2);
  262. list.concat(taicpu.op_ref_reg(op1,S_L,ref,reg.reglo));
  263. tempref:=ref;
  264. inc(tempref.offset,4);
  265. list.concat(taicpu.op_ref_reg(op2,S_L,tempref,reg.reghi));
  266. end;
  267. procedure tcg64f386.a_op64_reg_reg(list : taasmoutput;op:TOpCG;regsrc,regdst : tregister64);
  268. var
  269. op1,op2 : TAsmOp;
  270. begin
  271. case op of
  272. OP_NEG :
  273. begin
  274. if (regsrc.reglo<>regdst.reglo) then
  275. a_load64_reg_reg(list,regsrc,regdst);
  276. list.concat(taicpu.op_reg(A_NOT,S_L,regdst.reghi));
  277. list.concat(taicpu.op_reg(A_NEG,S_L,regdst.reglo));
  278. list.concat(taicpu.op_const_reg(A_SBB,S_L,aword(-1),regdst.reghi));
  279. exit;
  280. end;
  281. OP_NOT :
  282. begin
  283. if (regsrc.reglo<>regdst.reglo) then
  284. a_load64_reg_reg(list,regsrc,regdst);
  285. list.concat(taicpu.op_reg(A_NOT,S_L,regdst.reghi));
  286. list.concat(taicpu.op_reg(A_NOT,S_L,regdst.reglo));
  287. exit;
  288. end;
  289. end;
  290. get_64bit_ops(op,op1,op2);
  291. list.concat(taicpu.op_reg_reg(op1,S_L,regsrc.reglo,regdst.reglo));
  292. list.concat(taicpu.op_reg_reg(op2,S_L,regsrc.reghi,regdst.reghi));
  293. end;
  294. procedure tcg64f386.a_op64_const_reg(list : taasmoutput;op:TOpCG;value : qword;reg : tregister64);
  295. var
  296. op1,op2 : TAsmOp;
  297. begin
  298. case op of
  299. OP_AND,OP_OR,OP_XOR:
  300. begin
  301. cg.a_op_const_reg(list,op,OS_32,lo(value),reg.reglo);
  302. cg.a_op_const_reg(list,op,OS_32,hi(value),reg.reghi);
  303. end;
  304. OP_ADD, OP_SUB:
  305. begin
  306. // can't use a_op_const_ref because this may use dec/inc
  307. get_64bit_ops(op,op1,op2);
  308. list.concat(taicpu.op_const_reg(op1,S_L,lo(value),reg.reglo));
  309. list.concat(taicpu.op_const_reg(op2,S_L,hi(value),reg.reghi));
  310. end;
  311. else
  312. internalerror(200204021);
  313. end;
  314. end;
  315. procedure tcg64f386.a_op64_const_ref(list : taasmoutput;op:TOpCG;value : qword;const ref : treference);
  316. var
  317. op1,op2 : TAsmOp;
  318. tempref : treference;
  319. begin
  320. case op of
  321. OP_AND,OP_OR,OP_XOR:
  322. begin
  323. cg.a_op_const_ref(list,op,OS_32,lo(value),ref);
  324. tempref:=ref;
  325. inc(tempref.offset,4);
  326. cg.a_op_const_ref(list,op,OS_32,hi(value),tempref);
  327. end;
  328. OP_ADD, OP_SUB:
  329. begin
  330. get_64bit_ops(op,op1,op2);
  331. // can't use a_op_const_ref because this may use dec/inc
  332. list.concat(taicpu.op_const_ref(op1,S_L,lo(value),ref));
  333. tempref:=ref;
  334. inc(tempref.offset,4);
  335. list.concat(taicpu.op_const_ref(op2,S_L,hi(value),tempref));
  336. end;
  337. else
  338. internalerror(200204022);
  339. end;
  340. end;
  341. begin
  342. cg := tcg386.create;
  343. cg64 := tcg64f386.create;
  344. end.
  345. {
  346. $Log$
  347. Revision 1.47 2004-02-27 10:21:05 florian
  348. * top_symbol killed
  349. + refaddr to treference added
  350. + refsymbol to treference added
  351. * top_local stuff moved to an extra record to save memory
  352. + aint introduced
  353. * tppufile.get/putint64/aint implemented
  354. Revision 1.46 2004/02/22 16:48:09 florian
  355. * x86_64 uses generic concatcopy_valueopenarray for now
  356. Revision 1.45 2004/02/04 22:01:13 peter
  357. * first try to get cpupara working for x86_64
  358. Revision 1.44 2004/01/14 23:39:05 florian
  359. * another bunch of x86-64 fixes mainly calling convention and
  360. assembler reader related
  361. Revision 1.43 2004/01/12 16:39:40 peter
  362. * sparc updates, mostly float related
  363. Revision 1.42 2003/12/24 00:10:02 florian
  364. - delete parameter in cg64 methods removed
  365. Revision 1.41 2003/12/19 22:08:44 daniel
  366. * Some work to restore the MMX capabilities
  367. Revision 1.40 2003/10/10 17:48:14 peter
  368. * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
  369. * tregisteralloctor renamed to trgobj
  370. * removed rgobj from a lot of units
  371. * moved location_* and reference_* to cgobj
  372. * first things for mmx register allocation
  373. Revision 1.39 2003/10/01 20:34:49 peter
  374. * procinfo unit contains tprocinfo
  375. * cginfo renamed to cgbase
  376. * moved cgmessage to verbose
  377. * fixed ppc and sparc compiles
  378. Revision 1.38 2003/09/25 13:13:32 florian
  379. * more x86-64 fixes
  380. Revision 1.37 2003/09/03 15:55:01 peter
  381. * NEWRA branch merged
  382. Revision 1.36.2.1 2003/08/29 17:28:59 peter
  383. * next batch of updates
  384. Revision 1.36 2003/06/12 18:31:18 peter
  385. * fix newra cycle for i386
  386. Revision 1.35 2003/06/03 21:11:09 peter
  387. * cg.a_load_* get a from and to size specifier
  388. * makeregsize only accepts newregister
  389. * i386 uses generic tcgnotnode,tcgunaryminus
  390. Revision 1.34 2003/06/01 21:38:06 peter
  391. * getregisterfpu size parameter added
  392. * op_const_reg size parameter added
  393. * sparc updates
  394. Revision 1.33 2003/05/22 21:32:28 peter
  395. * removed some unit dependencies
  396. Revision 1.32 2002/11/25 17:43:26 peter
  397. * splitted defbase in defutil,symutil,defcmp
  398. * merged isconvertable and is_equal into compare_defs(_ext)
  399. * made operator search faster by walking the list only once
  400. Revision 1.31 2002/10/05 12:43:29 carl
  401. * fixes for Delphi 6 compilation
  402. (warning : Some features do not work under Delphi)
  403. Revision 1.30 2002/09/07 15:25:10 peter
  404. * old logs removed and tabs fixed
  405. Revision 1.29 2002/07/20 19:28:47 florian
  406. * splitting of i386\cgcpu.pas into x86\cgx86.pas and i386\cgcpu.pas
  407. cgx86.pas will contain the common code for i386 and x86_64
  408. Revision 1.28 2002/07/20 11:58:00 florian
  409. * types.pas renamed to defbase.pas because D6 contains a types
  410. unit so this would conflicts if D6 programms are compiled
  411. + Willamette/SSE2 instructions to assembler added
  412. Revision 1.27 2002/07/11 14:41:32 florian
  413. * start of the new generic parameter handling
  414. Revision 1.26 2002/07/07 09:52:33 florian
  415. * powerpc target fixed, very simple units can be compiled
  416. * some basic stuff for better callparanode handling, far from being finished
  417. Revision 1.25 2002/07/01 18:46:30 peter
  418. * internal linker
  419. * reorganized aasm layer
  420. Revision 1.24 2002/07/01 16:23:55 peter
  421. * cg64 patch
  422. * basics for currency
  423. * asnode updates for class and interface (not finished)
  424. Revision 1.23 2002/06/16 08:16:59 carl
  425. * bugfix of missing popecx for shift operations
  426. Revision 1.22 2002/05/22 19:02:16 carl
  427. + generic FPC_HELP_FAIL
  428. + generic FPC_HELP_DESTRUCTOR instated (original from Pierre)
  429. + generic FPC_DISPOSE_CLASS
  430. + TEST_GENERIC define
  431. Revision 1.21 2002/05/20 13:30:40 carl
  432. * bugfix of hdisponen (base must be set, not index)
  433. * more portability fixes
  434. Revision 1.20 2002/05/18 13:34:22 peter
  435. * readded missing revisions
  436. Revision 1.19 2002/05/16 19:46:50 carl
  437. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  438. + try to fix temp allocation (still in ifdef)
  439. + generic constructor calls
  440. + start of tassembler / tmodulebase class cleanup
  441. Revision 1.17 2002/05/13 19:54:37 peter
  442. * removed n386ld and n386util units
  443. * maybe_save/maybe_restore added instead of the old maybe_push
  444. Revision 1.16 2002/05/12 19:59:05 carl
  445. * some small portability fixes
  446. Revision 1.15 2002/05/12 16:53:16 peter
  447. * moved entry and exitcode to ncgutil and cgobj
  448. * foreach gets extra argument for passing local data to the
  449. iterator function
  450. * -CR checks also class typecasts at runtime by changing them
  451. into as
  452. * fixed compiler to cycle with the -CR option
  453. * fixed stabs with elf writer, finally the global variables can
  454. be watched
  455. * removed a lot of routines from cga unit and replaced them by
  456. calls to cgobj
  457. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  458. u32bit then the other is typecasted also to u32bit without giving
  459. a rangecheck warning/error.
  460. * fixed pascal calling method with reversing also the high tree in
  461. the parast, detected by tcalcst3 test
  462. Revision 1.14 2002/04/25 20:16:40 peter
  463. * moved more routines from cga/n386util
  464. Revision 1.13 2002/04/21 15:31:05 carl
  465. * changeregsize -> rg.makeregsize
  466. + a_jmp_always added
  467. Revision 1.12 2002/04/15 19:44:20 peter
  468. * fixed stackcheck that would be called recursively when a stack
  469. error was found
  470. * generic changeregsize(reg,size) for i386 register resizing
  471. * removed some more routines from cga unit
  472. * fixed returnvalue handling
  473. * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
  474. Revision 1.11 2002/04/04 19:06:10 peter
  475. * removed unused units
  476. * use tlocation.size in a_*loc*() routines
  477. Revision 1.10 2002/04/02 20:29:02 jonas
  478. * optimized the code generated by the a_op_const_* and a_op64_const
  479. methods
  480. Revision 1.9 2002/04/02 17:11:33 peter
  481. * tlocation,treference update
  482. * LOC_CONSTANT added for better constant handling
  483. * secondadd splitted in multiple routines
  484. * location_force_reg added for loading a location to a register
  485. of a specified size
  486. * secondassignment parses now first the right and then the left node
  487. (this is compatible with Kylix). This saves a lot of push/pop especially
  488. with string operations
  489. * adapted some routines to use the new cg methods
  490. }