cpubase.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl and Peter Vreman
  4. Contains the base types for the i386
  5. * This code was inspired by the NASM sources
  6. The Netwide Assembler is Copyright (c) 1996 Simon Tatham and
  7. Julian Hall. All rights reserved.
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2 of the License, or
  11. (at your option) any later version.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. ****************************************************************************
  20. }
  21. {# Base unit for processor information. This unit contains
  22. enumerations of registers, opcodes, sizes, and other
  23. such things which are processor specific.
  24. }
  25. unit cpubase;
  26. {$i fpcdefs.inc}
  27. interface
  28. uses
  29. cutils,cclasses,
  30. globals,
  31. cpuinfo,
  32. aasmbase,
  33. cginfo
  34. {$ifdef delphi}
  35. ,dmisc
  36. {$endif}
  37. ;
  38. {*****************************************************************************
  39. Assembler Opcodes
  40. *****************************************************************************}
  41. type
  42. TAsmOp={$i i386op.inc}
  43. {# This should define the array of instructions as string }
  44. op2strtable=array[tasmop] of string[11];
  45. Const
  46. {# First value of opcode enumeration }
  47. firstop = low(tasmop);
  48. {# Last value of opcode enumeration }
  49. lastop = high(tasmop);
  50. {*****************************************************************************
  51. Operand Sizes
  52. *****************************************************************************}
  53. type
  54. topsize = (S_NO,
  55. S_B,S_W,S_L,S_BW,S_BL,S_WL,
  56. S_IS,S_IL,S_IQ,
  57. S_FS,S_FL,S_FX,S_D,S_Q,S_FV,
  58. S_NEAR,S_FAR,S_SHORT
  59. );
  60. {*****************************************************************************
  61. Registers
  62. *****************************************************************************}
  63. type
  64. {# Enumeration for all possible registers for cpu. It
  65. is to note that all registers of the same type
  66. (for example all FPU registers), should be grouped
  67. together.
  68. }
  69. { don't change the order }
  70. { it's used by the register size conversions }
  71. tregister = (R_NO,
  72. R_EAX,R_ECX,R_EDX,R_EBX,R_ESP,R_EBP,R_ESI,R_EDI,
  73. R_AX,R_CX,R_DX,R_BX,R_SP,R_BP,R_SI,R_DI,
  74. R_AL,R_CL,R_DL,R_BL,R_AH,R_CH,R_BH,R_DH,
  75. R_CS,R_DS,R_ES,R_SS,R_FS,R_GS,
  76. R_ST,R_ST0,R_ST1,R_ST2,R_ST3,R_ST4,R_ST5,R_ST6,R_ST7,
  77. R_DR0,R_DR1,R_DR2,R_DR3,R_DR6,R_DR7,
  78. R_CR0,R_CR2,R_CR3,R_CR4,
  79. R_TR3,R_TR4,R_TR5,R_TR6,R_TR7,
  80. R_MM0,R_MM1,R_MM2,R_MM3,R_MM4,R_MM5,R_MM6,R_MM7,
  81. R_XMM0,R_XMM1,R_XMM2,R_XMM3,R_XMM4,R_XMM5,R_XMM6,R_XMM7
  82. );
  83. { A type to store register locations for 64 Bit values. }
  84. tregister64 = packed record
  85. reglo,reghi : tregister;
  86. end;
  87. { alias for compact code }
  88. treg64 = tregister64;
  89. {# Set type definition for registers }
  90. tregisterset = set of tregister;
  91. {# Type definition for the array of string of register names }
  92. reg2strtable = array[tregister] of string[6];
  93. const
  94. {# First register in the tregister enumeration }
  95. firstreg = low(tregister);
  96. {# Last register in the tregister enumeration }
  97. lastreg = high(tregister);
  98. firstsreg = R_CS;
  99. lastsreg = R_GS;
  100. regset8bit : tregisterset = [R_AL..R_DH];
  101. regset16bit : tregisterset = [R_AX..R_DI,R_CS..R_SS];
  102. regset32bit : tregisterset = [R_EAX..R_EDI];
  103. { Convert reg to opsize }
  104. reg2opsize : array[firstreg..lastreg] of topsize = (S_NO,
  105. S_L,S_L,S_L,S_L,S_L,S_L,S_L,S_L,
  106. S_W,S_W,S_W,S_W,S_W,S_W,S_W,S_W,
  107. S_B,S_B,S_B,S_B,S_B,S_B,S_B,S_B,
  108. S_W,S_W,S_W,S_W,S_W,S_W,
  109. S_FL,S_FL,S_FL,S_FL,S_FL,S_FL,S_FL,S_FL,S_FL,
  110. S_L,S_L,S_L,S_L,S_L,S_L,
  111. S_L,S_L,S_L,S_L,
  112. S_L,S_L,S_L,S_L,S_L,
  113. S_D,S_D,S_D,S_D,S_D,S_D,S_D,S_D,
  114. S_D,S_D,S_D,S_D,S_D,S_D,S_D,S_D
  115. );
  116. {# Standard opcode string table (for each tasmop enumeration). The
  117. opcode strings should conform to the names as defined by the
  118. processor manufacturer.
  119. }
  120. std_op2str:op2strtable={$i i386int.inc}
  121. {# Standard register table (for each tregister enumeration). The
  122. register strings should conform to the the names as defined
  123. by the processor manufacturer
  124. }
  125. std_reg2str : reg2strtable = ('',
  126. 'eax','ecx','edx','ebx','esp','ebp','esi','edi',
  127. 'ax','cx','dx','bx','sp','bp','si','di',
  128. 'al','cl','dl','bl','ah','ch','bh','dh',
  129. 'cs','ds','es','ss','fs','gs',
  130. 'st','st(0)','st(1)','st(2)','st(3)','st(4)','st(5)','st(6)','st(7)',
  131. 'dr0','dr1','dr2','dr3','dr6','dr7',
  132. 'cr0','cr2','cr3','cr4',
  133. 'tr3','tr4','tr5','tr6','tr7',
  134. 'mm0','mm1','mm2','mm3','mm4','mm5','mm6','mm7',
  135. 'xmm0','xmm1','xmm2','xmm3','xmm4','xmm5','xmm6','xmm7'
  136. );
  137. {*****************************************************************************
  138. Conditions
  139. *****************************************************************************}
  140. type
  141. TAsmCond=(C_None,
  142. C_A,C_AE,C_B,C_BE,C_C,C_E,C_G,C_GE,C_L,C_LE,C_NA,C_NAE,
  143. C_NB,C_NBE,C_NC,C_NE,C_NG,C_NGE,C_NL,C_NLE,C_NO,C_NP,
  144. C_NS,C_NZ,C_O,C_P,C_PE,C_PO,C_S,C_Z
  145. );
  146. const
  147. cond2str:array[TAsmCond] of string[3]=('',
  148. 'a','ae','b','be','c','e','g','ge','l','le','na','nae',
  149. 'nb','nbe','nc','ne','ng','nge','nl','nle','no','np',
  150. 'ns','nz','o','p','pe','po','s','z'
  151. );
  152. inverse_cond:array[TAsmCond] of TAsmCond=(C_None,
  153. C_NA,C_NAE,C_NB,C_NBE,C_NC,C_NE,C_NG,C_NGE,C_NL,C_NLE,C_A,C_AE,
  154. C_B,C_BE,C_C,C_E,C_G,C_GE,C_L,C_LE,C_O,C_P,
  155. C_S,C_Z,C_NO,C_NP,C_NP,C_P,C_NS,C_NZ
  156. );
  157. {*****************************************************************************
  158. Flags
  159. *****************************************************************************}
  160. type
  161. TResFlags = (F_E,F_NE,F_G,F_L,F_GE,F_LE,F_C,F_NC,F_A,F_AE,F_B,F_BE);
  162. {*****************************************************************************
  163. Reference
  164. *****************************************************************************}
  165. type
  166. trefoptions=(ref_none,ref_parafixup,ref_localfixup,ref_selffixup);
  167. { reference record }
  168. preference = ^treference;
  169. treference = packed record
  170. segment,
  171. base,
  172. index : tregister;
  173. scalefactor : byte;
  174. offset : longint;
  175. symbol : tasmsymbol;
  176. offsetfixup : longint;
  177. options : trefoptions;
  178. end;
  179. { reference record }
  180. pparareference = ^tparareference;
  181. tparareference = packed record
  182. index : tregister;
  183. offset : longint;
  184. end;
  185. {*****************************************************************************
  186. Operands
  187. *****************************************************************************}
  188. { Types of operand }
  189. toptype=(top_none,top_reg,top_ref,top_const,top_symbol);
  190. toper=record
  191. ot : longint;
  192. case typ : toptype of
  193. top_none : ();
  194. top_reg : (reg:tregister);
  195. top_ref : (ref:preference);
  196. top_const : (val:aword);
  197. top_symbol : (sym:tasmsymbol;symofs:longint);
  198. end;
  199. {*****************************************************************************
  200. Generic Location
  201. *****************************************************************************}
  202. type
  203. TLoc=(
  204. LOC_INVALID, { added for tracking problems}
  205. LOC_CONSTANT, { constant value }
  206. LOC_JUMP, { boolean results only, jump to false or true label }
  207. LOC_FLAGS, { boolean results only, flags are set }
  208. LOC_CREFERENCE, { in memory constant value reference (cannot change) }
  209. LOC_REFERENCE, { in memory value }
  210. LOC_REGISTER, { in a processor register }
  211. LOC_CREGISTER, { Constant register which shouldn't be modified }
  212. LOC_FPUREGISTER, { FPU stack }
  213. LOC_CFPUREGISTER, { if it is a FPU register variable on the fpu stack }
  214. LOC_MMXREGISTER, { MMX register }
  215. LOC_CMMXREGISTER, { MMX register variable }
  216. LOC_SSEREGISTER,
  217. LOC_CSSEREGISTER
  218. );
  219. { tparamlocation describes where a parameter for a procedure is stored.
  220. References are given from the caller's point of view. The usual
  221. TLocation isn't used, because contains a lot of unnessary fields.
  222. }
  223. tparalocation = packed record
  224. size : TCGSize;
  225. loc : TLoc;
  226. sp_fixup : longint;
  227. case TLoc of
  228. LOC_REFERENCE : (reference : tparareference);
  229. { segment in reference at the same place as in loc_register }
  230. LOC_REGISTER,LOC_CREGISTER : (
  231. case longint of
  232. 1 : (register,registerhigh : tregister);
  233. { overlay a registerlow }
  234. 2 : (registerlow : tregister);
  235. { overlay a 64 Bit register type }
  236. 3 : (reg64 : tregister64);
  237. 4 : (register64 : tregister64);
  238. );
  239. { it's only for better handling }
  240. LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
  241. end;
  242. tlocation = packed record
  243. loc : TLoc;
  244. size : TCGSize;
  245. case TLoc of
  246. LOC_FLAGS : (resflags : tresflags);
  247. LOC_CONSTANT : (
  248. case longint of
  249. 1 : (value : AWord);
  250. { can't do this, this layout depends on the host cpu. Use }
  251. { lo(valueqword)/hi(valueqword) instead (JM) }
  252. { 2 : (valuelow, valuehigh:AWord); }
  253. { overlay a complete 64 Bit value }
  254. 3 : (valueqword : qword);
  255. );
  256. LOC_CREFERENCE,
  257. LOC_REFERENCE : (reference : treference);
  258. { segment in reference at the same place as in loc_register }
  259. LOC_REGISTER,LOC_CREGISTER : (
  260. case longint of
  261. 1 : (register,registerhigh,segment : tregister);
  262. { overlay a registerlow }
  263. 2 : (registerlow : tregister);
  264. { overlay a 64 Bit register type }
  265. 3 : (reg64 : tregister64);
  266. 4 : (register64 : tregister64);
  267. );
  268. { it's only for better handling }
  269. LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
  270. end;
  271. {*****************************************************************************
  272. Constants
  273. *****************************************************************************}
  274. const
  275. { declare aliases }
  276. LOC_MMREGISTER = LOC_SSEREGISTER;
  277. LOC_CMMREGISTER = LOC_CSSEREGISTER;
  278. max_operands = 3;
  279. lvaluelocations = [LOC_REFERENCE,LOC_CFPUREGISTER,
  280. LOC_CREGISTER,LOC_MMXREGISTER,LOC_CMMXREGISTER];
  281. {# Constant defining possibly all registers which might require saving }
  282. ALL_REGISTERS = [firstreg..lastreg];
  283. general_registers = [R_EAX,R_EBX,R_ECX,R_EDX];
  284. {# low and high of the available maximum width integer general purpose }
  285. { registers }
  286. LoGPReg = R_EAX;
  287. HiGPReg = R_EDX;
  288. {# low and high of every possible width general purpose register (same as }
  289. { above on most architctures apart from the 80x86) }
  290. LoReg = R_EAX;
  291. HiReg = R_DH;
  292. {# Table of registers which can be allocated by the code generator
  293. internally, when generating the code.
  294. }
  295. { legend: }
  296. { xxxregs = set of all possibly used registers of that type in the code }
  297. { generator }
  298. { usableregsxxx = set of all 32bit components of registers that can be }
  299. { possible allocated to a regvar or using getregisterxxx (this }
  300. { excludes registers which can be only used for parameter }
  301. { passing on ABI's that define this) }
  302. { c_countusableregsxxx = amount of registers in the usableregsxxx set }
  303. maxintregs = 4;
  304. intregs = [R_EAX..R_BL];
  305. usableregsint = [R_EAX,R_EBX,R_ECX,R_EDX];
  306. c_countusableregsint = 4;
  307. maxfpuregs = 8;
  308. fpuregs = [R_ST0..R_ST7];
  309. usableregsfpu = [];
  310. c_countusableregsfpu = 0;
  311. mmregs = [R_MM0..R_MM7];
  312. usableregsmm = [R_MM0..R_MM7];
  313. c_countusableregsmm = 8;
  314. firstsaveintreg = R_EAX;
  315. lastsaveintreg = R_EBX;
  316. firstsavefpureg = R_NO;
  317. lastsavefpureg = R_NO;
  318. firstsavemmreg = R_MM0;
  319. lastsavemmreg = R_MM7;
  320. maxvarregs = 4;
  321. varregs : array[1..maxvarregs] of tregister =
  322. (R_EBX,R_EDX,R_ECX,R_EAX);
  323. maxfpuvarregs = 8;
  324. {# Registers which are defined as scratch and no need to save across
  325. routine calls or in assembler blocks.
  326. }
  327. max_scratch_regs = 1;
  328. scratch_regs : array[1..max_scratch_regs] of tregister = (R_EDI);
  329. {*****************************************************************************
  330. GDB Information
  331. *****************************************************************************}
  332. {# Register indexes for stabs information, when some
  333. parameters or variables are stored in registers.
  334. Taken from i386.c (dbx_register_map) and i386.h
  335. (FIXED_REGISTERS) from GCC 3.x source code
  336. }
  337. stab_regindex : array[tregister] of shortint =
  338. (-1,
  339. 0,1,2,3,4,5,6,7,
  340. 0,1,2,3,4,5,6,7,
  341. 0,1,2,3,0,1,2,3,
  342. -1,-1,-1,-1,-1,-1,
  343. 12,12,13,14,15,16,17,18,19,
  344. -1,-1,-1,-1,-1,-1,
  345. -1,-1,-1,-1,
  346. -1,-1,-1,-1,-1,
  347. 29,30,31,32,33,34,35,36,
  348. 21,22,23,24,25,26,27,28
  349. );
  350. {*****************************************************************************
  351. Default generic sizes
  352. *****************************************************************************}
  353. {# Defines the default address size for a processor, }
  354. OS_ADDR = OS_32;
  355. {# the natural int size for a processor, }
  356. OS_INT = OS_32;
  357. {# the maximum float size for a processor, }
  358. OS_FLOAT = OS_F80;
  359. {# the size of a vector register for a processor }
  360. OS_VECTOR = OS_M64;
  361. {*****************************************************************************
  362. Generic Register names
  363. *****************************************************************************}
  364. {# Stack pointer register }
  365. stack_pointer_reg = R_ESP;
  366. {# Frame pointer register }
  367. frame_pointer_reg = R_EBP;
  368. {# Self pointer register : contains the instance address of an
  369. object or class. }
  370. self_pointer_reg = R_ESI;
  371. {# Register for addressing absolute data in a position independant way,
  372. such as in PIC code. The exact meaning is ABI specific. For
  373. further information look at GCC source : PIC_OFFSET_TABLE_REGNUM
  374. }
  375. pic_offset_reg = R_EBX;
  376. {# Results are returned in this register (32-bit values) }
  377. accumulator = R_EAX;
  378. {# Hi-Results are returned in this register (64-bit value high register) }
  379. accumulatorhigh = R_EDX;
  380. { WARNING: don't change to R_ST0!! See comments above implementation of }
  381. { a_loadfpu* methods in rgcpu (JM) }
  382. fpu_result_reg = R_ST;
  383. mmresultreg = R_MM0;
  384. {*****************************************************************************
  385. GCC /ABI linking information
  386. *****************************************************************************}
  387. const
  388. {# Registers which must be saved when calling a routine declared as
  389. cppdecl, cdecl, stdcall, safecall, palmossyscall. The registers
  390. saved should be the ones as defined in the target ABI and / or GCC.
  391. This value can be deduced from the CALLED_USED_REGISTERS array in the
  392. GCC source.
  393. }
  394. std_saved_registers = [R_ESI,R_EDI,R_EBX];
  395. {# Required parameter alignment when calling a routine declared as
  396. stdcall and cdecl. The alignment value should be the one defined
  397. by GCC or the target ABI.
  398. The value of this constant is equal to the constant
  399. PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.
  400. }
  401. std_param_align = 4;
  402. {*****************************************************************************
  403. CPU Dependent Constants
  404. *****************************************************************************}
  405. {*****************************************************************************
  406. Helpers
  407. *****************************************************************************}
  408. function is_calljmp(o:tasmop):boolean;
  409. function flags_to_cond(const f: TResFlags) : TAsmCond;
  410. implementation
  411. {*****************************************************************************
  412. Helpers
  413. *****************************************************************************}
  414. function is_calljmp(o:tasmop):boolean;
  415. begin
  416. case o of
  417. A_CALL,
  418. A_JCXZ,
  419. A_JECXZ,
  420. A_JMP,
  421. A_LOOP,
  422. A_LOOPE,
  423. A_LOOPNE,
  424. A_LOOPNZ,
  425. A_LOOPZ,
  426. A_Jcc :
  427. is_calljmp:=true;
  428. else
  429. is_calljmp:=false;
  430. end;
  431. end;
  432. function flags_to_cond(const f: TResFlags) : TAsmCond;
  433. const
  434. flags_2_cond : array[TResFlags] of TAsmCond =
  435. (C_E,C_NE,C_G,C_L,C_GE,C_LE,C_C,C_NC,C_A,C_AE,C_B,C_BE);
  436. begin
  437. result := flags_2_cond[f];
  438. end;
  439. end.
  440. {
  441. $Log$
  442. Revision 1.32 2002-10-05 12:43:29 carl
  443. * fixes for Delphi 6 compilation
  444. (warning : Some features do not work under Delphi)
  445. Revision 1.31 2002/08/14 18:41:48 jonas
  446. - remove valuelow/valuehigh fields from tlocation, because they depend
  447. on the endianess of the host operating system -> difficult to get
  448. right. Use lo/hi(location.valueqword) instead (remember to use
  449. valueqword and not value!!)
  450. Revision 1.30 2002/08/13 21:40:58 florian
  451. * more fixes for ppc calling conventions
  452. Revision 1.29 2002/08/12 15:08:41 carl
  453. + stab register indexes for powerpc (moved from gdb to cpubase)
  454. + tprocessor enumeration moved to cpuinfo
  455. + linker in target_info is now a class
  456. * many many updates for m68k (will soon start to compile)
  457. - removed some ifdef or correct them for correct cpu
  458. Revision 1.28 2002/08/06 20:55:23 florian
  459. * first part of ppc calling conventions fix
  460. Revision 1.27 2002/07/25 18:01:29 carl
  461. + FPURESULTREG -> FPU_RESULT_REG
  462. Revision 1.26 2002/07/07 09:52:33 florian
  463. * powerpc target fixed, very simple units can be compiled
  464. * some basic stuff for better callparanode handling, far from being finished
  465. Revision 1.25 2002/07/01 18:46:30 peter
  466. * internal linker
  467. * reorganized aasm layer
  468. Revision 1.24 2002/07/01 16:23:55 peter
  469. * cg64 patch
  470. * basics for currency
  471. * asnode updates for class and interface (not finished)
  472. Revision 1.23 2002/05/18 13:34:22 peter
  473. * readded missing revisions
  474. Revision 1.22 2002/05/16 19:46:50 carl
  475. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  476. + try to fix temp allocation (still in ifdef)
  477. + generic constructor calls
  478. + start of tassembler / tmodulebase class cleanup
  479. Revision 1.19 2002/05/12 16:53:16 peter
  480. * moved entry and exitcode to ncgutil and cgobj
  481. * foreach gets extra argument for passing local data to the
  482. iterator function
  483. * -CR checks also class typecasts at runtime by changing them
  484. into as
  485. * fixed compiler to cycle with the -CR option
  486. * fixed stabs with elf writer, finally the global variables can
  487. be watched
  488. * removed a lot of routines from cga unit and replaced them by
  489. calls to cgobj
  490. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  491. u32bit then the other is typecasted also to u32bit without giving
  492. a rangecheck warning/error.
  493. * fixed pascal calling method with reversing also the high tree in
  494. the parast, detected by tcalcst3 test
  495. Revision 1.18 2002/04/21 15:31:40 carl
  496. - removed some other stuff to their units
  497. Revision 1.17 2002/04/20 21:37:07 carl
  498. + generic FPC_CHECKPOINTER
  499. + first parameter offset in stack now portable
  500. * rename some constants
  501. + move some cpu stuff to other units
  502. - remove unused constents
  503. * fix stacksize for some targets
  504. * fix generic size problems which depend now on EXTEND_SIZE constant
  505. * removing frame pointer in routines is only available for : i386,m68k and vis targets
  506. Revision 1.16 2002/04/15 19:53:54 peter
  507. * fixed conflicts between the last 2 commits
  508. Revision 1.15 2002/04/15 19:44:20 peter
  509. * fixed stackcheck that would be called recursively when a stack
  510. error was found
  511. * generic changeregsize(reg,size) for i386 register resizing
  512. * removed some more routines from cga unit
  513. * fixed returnvalue handling
  514. * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
  515. Revision 1.14 2002/04/15 19:12:09 carl
  516. + target_info.size_of_pointer -> pointer_size
  517. + some cleanup of unused types/variables
  518. * move several constants from cpubase to their specific units
  519. (where they are used)
  520. + att_Reg2str -> gas_reg2str
  521. + int_reg2str -> std_reg2str
  522. Revision 1.13 2002/04/14 16:59:41 carl
  523. + att_reg2str -> gas_reg2str
  524. Revision 1.12 2002/04/02 17:11:34 peter
  525. * tlocation,treference update
  526. * LOC_CONSTANT added for better constant handling
  527. * secondadd splitted in multiple routines
  528. * location_force_reg added for loading a location to a register
  529. of a specified size
  530. * secondassignment parses now first the right and then the left node
  531. (this is compatible with Kylix). This saves a lot of push/pop especially
  532. with string operations
  533. * adapted some routines to use the new cg methods
  534. Revision 1.11 2002/03/31 20:26:37 jonas
  535. + a_loadfpu_* and a_loadmm_* methods in tcg
  536. * register allocation is now handled by a class and is mostly processor
  537. independent (+rgobj.pas and i386/rgcpu.pas)
  538. * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  539. * some small improvements and fixes to the optimizer
  540. * some register allocation fixes
  541. * some fpuvaroffset fixes in the unary minus node
  542. * push/popusedregisters is now called rg.save/restoreusedregisters and
  543. (for i386) uses temps instead of push/pop's when using -Op3 (that code is
  544. also better optimizable)
  545. * fixed and optimized register saving/restoring for new/dispose nodes
  546. * LOC_FPU locations now also require their "register" field to be set to
  547. R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  548. - list field removed of the tnode class because it's not used currently
  549. and can cause hard-to-find bugs
  550. Revision 1.10 2002/03/04 19:10:12 peter
  551. * removed compiler warnings
  552. }