cpubase.pas 24 KB

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