cpubase.pas 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Contains the base types for the PowerPC
  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 contains the base types for the PowerPC
  19. }
  20. unit cpubase;
  21. {$i fpcdefs.inc}
  22. interface
  23. uses
  24. strings,cutils,cclasses,aasmbase,cpuinfo,cginfo;
  25. {*****************************************************************************
  26. Assembler Opcodes
  27. *****************************************************************************}
  28. type
  29. TAsmOp=(A_None,
  30. { normal opcodes }
  31. a_add, a_add_, a_addo, a_addo_, a_addc, a_addc_, a_addco, a_addco_,
  32. a_adde, a_adde_, a_addeo, a_addeo_, a_addi, a_addic, a_addic_, a_addis,
  33. a_addme, a_addme_, a_addmeo, a_addmeo_, a_addze, a_addze_, a_addzeo,
  34. a_addzeo_, a_and, a_and_, a_andc, a_andc_, a_andi_, a_andis_, a_b,
  35. a_ba, a_bl, a_bla, a_bc, a_bca, a_bcl, a_bcla, a_bcctr, a_bcctrl, a_bclr,
  36. a_bclrl, a_cmp, a_cmpi, a_cmpl, a_cmpli, a_cntlzw, a_cntlzw_, a_crand,
  37. a_crandc, a_creqv, a_crnand, a_crnor, a_cror, a_crorc, a_crxor, a_dcba,
  38. a_dcbf, a_dcbi, a_dcbst, a_dcbt, a_divw, a_divw_, a_divwo, a_divwo_,
  39. a_divwu, a_divwu_, a_divwuo, a_divwuo_, a_eciwx, a_ecowx, a_eieio, a_eqv,
  40. a_eqv_, a_extsb, a_extsb_, a_extsh, a_extsh_, a_fabs, a_fabs_, a_fadd,
  41. a_fadd_, a_fadds, a_fadds_, a_fcmpo, a_fcmpu, a_fctiw, a_fctw_, a_fctwz,
  42. a_fctwz_, a_fdiv, a_fdiv_, a_fdivs, a_fdivs_, a_fmadd, a_fmadd_, a_fmadds,
  43. a_fmadds_, a_fmr, a_fmsub, a_fmsub_, a_fmsubs, a_fmsubs_, a_fmul, a_fmul_,
  44. a_fmuls, a_fmuls_, a_fnabs, a_fnabs_, a_fneg, a_fneg_, a_fnmadd,
  45. a_fnmadd_, a_fnmadds, a_fnmadds_, a_fnmsub, a_fnmsub_, a_fnmsubs,
  46. a_fnmsubs_, a_fres, a_fres_, a_frsp, a_frsp_, a_frsqrte, a_frsqrte_,
  47. a_fsel, a_fsel_, a_fsqrt, a_fsqrt_, a_fsqrts, a_fsqrts_, a_fsub, a_fsub_,
  48. a_fsubs, a_fsubs_, a_icbi, a_isync, a_lbz, a_lbzu, a_lbzux, a_lbzx,
  49. a_lfd, a_lfdu, a_lfdux, a_lfdx, a_lfs, a_lfsu, a_lfsux, a_lfsx, a_lha,
  50. a_lhau, a_lhaux, a_lhax, a_hbrx, a_lhz, a_lhzu, a_lhzux, a_lhzx, a_lmw,
  51. a_lswi, a_lswx, a_lwarx, a_lwbrx, a_lwz, a_lwzu, a_lwzux, a_lwzx, a_mcrf,
  52. a_mcrfs, a_mcrxr, a_lcrxe, a_mfcr, a_mffs, a_maffs_, a_mfmsr, a_mfspr, a_mfsr,
  53. a_mfsrin, a_mftb, a_mtfcrf, a_a_mtfd0, a_mtfsb1, a_mtfsf, a_mtfsf_,
  54. a_mtfsfi, a_mtfsfi_, a_mtmsr, a_mtspr, a_mtsr, a_mtsrin, a_mulhw,
  55. a_mulhw_, a_mulhwu, a_mulhwu_, a_mulli, a_mullw, a_mullw_, a_mullwo,
  56. a_mullwo_, a_nand, a_nand_, a_neg, a_neg_, a_nego, a_nego_, a_nor, a_nor_,
  57. a_or, a_or_, a_orc, a_orc_, a_ori, a_oris, a_rfi, a_rlwimi, a_rlwimi_,
  58. a_rlwinm, a_rlwinm_, a_rlwnm, a_sc, a_slw, a_slw_, a_sraw, a_sraw_,
  59. a_srawi, a_srawi_,a_srw, a_srw_, a_stb, a_stbu, a_stbux, a_stbx, a_stfd,
  60. a_stfdu, a_stfdux, a_stfdx, a_stfiwx, a_stfs, a_stfsu, a_stfsux, a_stfsx,
  61. a_sth, a_sthbrx, a_sthu, a_sthux, a_sthx, a_stmw, a_stswi, a_stswx, a_stw,
  62. a_stwbrx, a_stwx_, a_stwu, a_stwux, a_stwx, a_subf, a_subf_, a_subfo,
  63. a_subfo_, a_subfc, a_subfc_, a_subfco, a_subfco_, a_subfe, a_subfe_,
  64. a_subfeo, a_subfeo_, a_subfic, a_subfme, a_subfme_, a_subfmeo, a_subfmeo_,
  65. a_subfze, a_subfze_, a_subfzeo, a_subfzeo_, a_sync, a_tlbia, a_tlbie,
  66. a_tlbsync, a_tw, a_twi, a_xor, a_xor_, a_xori, a_xoris,
  67. { simplified mnemonics }
  68. a_subi, a_subis, a_subic, a_subic_, a_sub, a_sub_, a_subo, a_subo_,
  69. a_subc, a_subc_, a_subco, a_subco_, a_cmpwi, a_cmpw, a_cmplwi, a_cmplw,
  70. a_extlwi, a_extlwi_, a_extrwi, a_extrwi_, a_inslwi, a_inslwi_, a_insrwi,
  71. a_insrwi_, a_rotlwi, a_rotlwi_, a_rotlw, a_rotlw_, a_slwi, a_slwi_,
  72. a_srwi, a_srwi_, a_clrlwi, a_clrlwi_, a_clrrwi, a_clrrwi_, a_clrslwi,
  73. a_clrslwi_, a_blr, a_bctr, a_blrl, a_bctrl, a_crset, a_crclr, a_crmove,
  74. a_crnot, a_mt {move to special prupose reg}, a_mf {move from special purpose reg},
  75. a_nop, a_li, a_lis, a_la, a_mr, a_mr_, a_not, a_mtcr, a_mtlr, a_mflr,
  76. a_mtctr, a_mfctr);
  77. {# This should define the array of instructions as string }
  78. op2strtable=array[tasmop] of string[8];
  79. Const
  80. {# First value of opcode enumeration }
  81. firstop = low(tasmop);
  82. {# Last value of opcode enumeration }
  83. lastop = high(tasmop);
  84. {*****************************************************************************
  85. Registers
  86. *****************************************************************************}
  87. type
  88. Toldregister = (R_NO,
  89. R_0,R_1,R_2,R_3,R_4,R_5,R_6,R_7,R_8,R_9,R_10,R_11,R_12,R_13,R_14,R_15,R_16,
  90. R_17,R_18,R_19,R_20,R_21,R_22,R_23,R_24,R_25,R_26,R_27,R_28,R_29,R_30,R_31,
  91. R_F0,R_F1,R_F2,R_F3,R_F4,R_F5,R_F6,R_F7,R_F8,R_F9,R_F10,R_F11,R_F12,
  92. R_F13,R_F14,R_F15,R_F16,R_F17, R_F18,R_F19,R_F20,R_F21,R_F22, R_F23,R_F24,
  93. R_F25,R_F26,R_F27,R_F28,R_F29,R_F30,R_F31,
  94. R_M0,R_M1,R_M2,R_M3,R_M4,R_M5,R_M6,R_M7,R_M8,R_M9,R_M10,R_M11,R_M12,
  95. R_M13,R_M14,R_M15,R_M16,R_M17,R_M18,R_M19,R_M20,R_M21,R_M22, R_M23,R_M24,
  96. R_M25,R_M26,R_M27,R_M28,R_M29,R_M30,R_M31,
  97. R_CR,R_CR0,R_CR1,R_CR2,R_CR3,R_CR4,R_CR5,R_CR6,R_CR7,
  98. R_XER,R_LR,R_CTR,R_FPSCR,
  99. R_INTREGISTER {Only for use by the register allocator.}
  100. );
  101. Tnewregister=word;
  102. Tsuperregister=byte;
  103. Tsubregister=byte;
  104. Tregister=record
  105. enum:Toldregister;
  106. number:Tnewregister;
  107. end;
  108. {# Set type definition for registers }
  109. tregisterset = set of Toldregister;
  110. Tsupregset=set of Tsuperregister;
  111. { A type to store register locations for 64 Bit values. }
  112. tregister64 = packed record
  113. reglo,reghi : tregister;
  114. end;
  115. { alias for compact code }
  116. treg64 = tregister64;
  117. Const
  118. {# First register in the tregister enumeration }
  119. firstreg = low(Toldregister);
  120. {# Last register in the tregister enumeration }
  121. lastreg = R_FPSCR;
  122. type
  123. {# Type definition for the array of string of register nnames }
  124. treg2strtable = array[firstreg..lastreg] of string[5];
  125. const
  126. R_SPR1 = R_XER;
  127. R_SPR8 = R_LR;
  128. R_SPR9 = R_CTR;
  129. R_TOC = R_2;
  130. { CR0 = 0;
  131. CR1 = 4;
  132. CR2 = 8;
  133. CR3 = 12;
  134. CR4 = 16;
  135. CR5 = 20;
  136. CR6 = 24;
  137. CR7 = 28;
  138. LT = 0;
  139. GT = 1;
  140. EQ = 2;
  141. SO = 3;
  142. FX = 4;
  143. FEX = 5;
  144. VX = 6;
  145. OX = 7;}
  146. mot_reg2str : treg2strtable = ('',
  147. 'r0','r1','r2','r3','r4','r5','r6','r7','r8','r9','r10','r11','r12','r13',
  148. 'r14','r15','r16','r17','r18','r19','r20','r21','r22','r23','r24','r25',
  149. 'r26','r27','r28','r29','r30','r31',
  150. 'F0','F1','F2','F3','F4','F5','F6','F7', 'F8','F9','F10','F11','F12',
  151. 'F13','F14','F15','F16','F17', 'F18','F19','F20','F21','F22', 'F23','F24',
  152. 'F25','F26','F27','F28','F29','F30','F31',
  153. 'M0','M1','M2','M3','M4','M5','M6','M7','M8','M9','M10','M11','M12',
  154. 'M13','M14','M15','M16','M17','M18','M19','M20','M21','M22', 'M23','M24',
  155. 'M25','M26','M27','M28','M29','M30','M31',
  156. 'CR','CR0','CR1','CR2','CR3','CR4','CR5','CR6','CR7',
  157. 'XER','LR','CTR','FPSCR'
  158. );
  159. std_reg2str : treg2strtable = ('',
  160. 'r0','r1','r2','r3','r4','r5','r6','r7','r8','r9','r10','r11','r12','r13',
  161. 'r14','r15','r16','r17','r18','r19','r20','r21','r22','r23','r24','r25',
  162. 'r26','r27','r28','r29','r30','r31',
  163. 'F0','F1','F2','F3','F4','F5','F6','F7', 'F8','F9','F10','F11','F12',
  164. 'F13','F14','F15','F16','F17', 'F18','F19','F20','F21','F22', 'F23','F24',
  165. 'F25','F26','F27','F28','F29','F30','F31',
  166. 'M0','M1','M2','M3','M4','M5','M6','M7','M8','M9','M10','M11','M12',
  167. 'M13','M14','M15','M16','M17','M18','M19','M20','M21','M22', 'M23','M24',
  168. 'M25','M26','M27','M28','M29','M30','M31',
  169. 'CR','CR0','CR1','CR2','CR3','CR4','CR5','CR6','CR7',
  170. 'XER','LR','CTR','FPSCR'
  171. );
  172. {New register coding:}
  173. {Special registers:}
  174. const
  175. NR_NO = $0000; {Invalid register}
  176. {Normal registers:}
  177. {General purpose registers:}
  178. NR_R0 = $0100; NR_R1 = $0200; NR_R2 = $0300;
  179. NR_R3 = $0400; NR_R4 = $0500; NR_R5 = $0600;
  180. NR_R6 = $0700; NR_R7 = $0800; NR_R8 = $0900;
  181. NR_R9 = $0A00; NR_R10 = $0B00; NR_R11 = $0C00;
  182. NR_R12 = $0D00; NR_R13 = $0E00; NR_R14 = $0F00;
  183. NR_R15 = $1000; NR_R16 = $1100; NR_R17 = $1200;
  184. NR_R18 = $1300; NR_R19 = $1400; NR_R20 = $1500;
  185. NR_R21 = $1600; NR_R22 = $1700; NR_R23 = $1800;
  186. NR_R24 = $1900; NR_R25 = $1A00; NR_R26 = $1B00;
  187. NR_R27 = $1C00; NR_R28 = $1D00; NR_R29 = $1E00;
  188. NR_R30 = $1F00; NR_R31 = $2000;
  189. NR_RTOC = NR_R2;
  190. {Super registers:}
  191. RS_NONE=$00;
  192. RS_R0 = $01; RS_R1 = $02; RS_R2 = $03;
  193. RS_R3 = $04; RS_R4 = $05; RS_R5 = $06;
  194. RS_R6 = $07; RS_R7 = $08; RS_R8 = $09;
  195. RS_R9 = $0A; RS_R10 = $0B; RS_R11 = $0C;
  196. RS_R12 = $0D; RS_R13 = $0E; RS_R14 = $0F;
  197. RS_R15 = $10; RS_R16 = $11; RS_R17 = $12;
  198. RS_R18 = $13; RS_R19 = $14; RS_R20 = $15;
  199. RS_R21 = $16; RS_R22 = $17; RS_R23 = $18;
  200. RS_R24 = $19; RS_R25 = $1A; RS_R26 = $1B;
  201. RS_R27 = $1C; RS_R28 = $1D; RS_R29 = $1E;
  202. RS_R30 = $1F; RS_R31 = $20;
  203. first_supreg = RS_R3;
  204. last_supreg = RS_R31;
  205. { registers which may be destroyed by calls }
  206. VOLATILE_INTREGISTERS = [RS_R3..RS_R12];
  207. {Number of first and last imaginary register.}
  208. first_imreg = $21;
  209. last_imreg = $ff;
  210. {Subregisters, situation unknown!!.}
  211. R_SUBWHOLE=$00;
  212. R_SUBL=$00;
  213. {*****************************************************************************
  214. Conditions
  215. *****************************************************************************}
  216. type
  217. TAsmCondFlag = (C_None { unconditional jumps },
  218. { conditions when not using ctr decrement etc }
  219. C_LT,C_LE,C_EQ,C_GE,C_GT,C_NL,C_NE,C_NG,C_SO,C_NS,C_UN,C_NU,
  220. { conditions when using ctr decrement etc }
  221. C_T,C_F,C_DNZ,C_DNZT,C_DNZF,C_DZ,C_DZT,C_DZF);
  222. const
  223. { these are in the XER, but when moved to CR_x they correspond with the }
  224. { bits below (still needs to be verified!!!) }
  225. C_OV = C_EQ;
  226. C_CA = C_GT;
  227. type
  228. TAsmCond = packed record
  229. case simple: boolean of
  230. false: (BO, BI: byte);
  231. true: (
  232. cond: TAsmCondFlag;
  233. case byte of
  234. 0: ();
  235. { specifies in which part of the cr the bit has to be }
  236. { tested for blt,bgt,beq,..,bnu }
  237. 1: (cr: R_CR0..R_CR7);
  238. { specifies the bit to test for bt,bf,bdz,..,bdzf }
  239. 2: (crbit: byte)
  240. );
  241. end;
  242. const
  243. AsmCondFlag2BO: Array[C_T..C_DZF] of Byte =
  244. (12,4,16,8,0,18,10,2);
  245. AsmCondFlag2BI: Array[C_LT..C_NU] of Byte =
  246. (0,1,2,0,1,0,2,1,3,3,3,3);
  247. AsmCondFlagTF: Array[TAsmCondFlag] of Boolean =
  248. (false,true,false,true,false,true,false,false,false,true,false,true,false,
  249. true,false,false,true,false,false,true,false);
  250. AsmCondFlag2Str: Array[TAsmCondFlag] of string[4] = ({cf_none}'',
  251. { conditions when not using ctr decrement etc}
  252. 'lt','le','eq','ge','gt','nl','ne','ng','so','ns','un','nu',
  253. 't','f','dnz','dzt','dnzf','dz','dzt','dzf');
  254. const
  255. CondAsmOps=3;
  256. CondAsmOp:array[0..CondAsmOps-1] of TasmOp=(
  257. A_BC, A_TW, A_TWI
  258. );
  259. {*****************************************************************************
  260. Flags
  261. *****************************************************************************}
  262. type
  263. TResFlagsEnum = (F_EQ,F_NE,F_LT,F_LE,F_GT,F_GE,F_SO,F_FX,F_FEX,F_VX,F_OX);
  264. TResFlags = record
  265. cr: R_CR0..R_CR7;
  266. flag: TResFlagsEnum;
  267. end;
  268. (*
  269. const
  270. { arrays for boolean location conversions }
  271. flag_2_cond : array[TResFlags] of TAsmCond =
  272. (C_E,C_NE,C_LT,C_LE,C_GT,C_GE,???????????????);
  273. *)
  274. {*****************************************************************************
  275. Reference
  276. *****************************************************************************}
  277. type
  278. trefoptions=(ref_none,ref_parafixup,ref_localfixup,ref_selffixup);
  279. { since we have only 16 offsets, we need to be able to specify the high }
  280. { and low 16 bits of the address of a symbol }
  281. trefsymaddr = (refs_full,refs_ha,refs_l);
  282. { reference record }
  283. preference = ^treference;
  284. treference = packed record
  285. { base register, R_NO if none }
  286. base,
  287. { index register, R_NO if none }
  288. index : tregister;
  289. { offset, 0 if none }
  290. offset : longint;
  291. { symbol this reference refers to, nil if none }
  292. symbol : tasmsymbol;
  293. { used in conjunction with symbols and offsets: refs_full means }
  294. { means a full 32bit reference, refs_ha means the upper 16 bits }
  295. { and refs_l the lower 16 bits of the address }
  296. symaddr : trefsymaddr;
  297. { changed when inlining and possibly in other cases, don't }
  298. { set manually }
  299. offsetfixup : longint;
  300. { used in conjunction with the previous field }
  301. options : trefoptions;
  302. { alignment this reference is guaranteed to have }
  303. alignment : byte;
  304. end;
  305. { reference record }
  306. pparareference = ^tparareference;
  307. tparareference = packed record
  308. index : tregister;
  309. offset : aword;
  310. end;
  311. const
  312. symaddr2str: array[trefsymaddr] of string[3] = ('','@ha','@l');
  313. const
  314. { MacOS only. Whether the direct data area (TOC) directly contain
  315. global variables. Otherwise it contains pointers to global variables. }
  316. macos_direct_globals = false;
  317. {*****************************************************************************
  318. Operand
  319. *****************************************************************************}
  320. type
  321. toptype=(top_none,top_reg,top_ref,top_const,top_symbol,top_bool);
  322. toper=record
  323. ot : longint;
  324. case typ : toptype of
  325. top_none : ();
  326. top_reg : (reg:tregister);
  327. top_ref : (ref:preference);
  328. top_const : (val:aword);
  329. top_symbol : (sym:tasmsymbol;symofs:longint);
  330. top_bool : (b: boolean);
  331. end;
  332. {*****************************************************************************
  333. Operand Sizes
  334. *****************************************************************************}
  335. {*****************************************************************************
  336. Generic Location
  337. *****************************************************************************}
  338. type
  339. { tparamlocation describes where a parameter for a procedure is stored.
  340. References are given from the caller's point of view. The usual
  341. TLocation isn't used, because contains a lot of unnessary fields.
  342. }
  343. tparalocation = packed record
  344. size : TCGSize;
  345. { The location type where the parameter is passed, usually
  346. LOC_REFERENCE,LOC_REGISTER or LOC_FPUREGISTER
  347. }
  348. loc : TCGLoc;
  349. { The stack pointer must be decreased by this value before
  350. the parameter is copied to the given destination.
  351. This allows to "encode" pushes with tparalocation.
  352. On the PowerPC, this field is unsed but it is there
  353. because several generic code accesses it.
  354. }
  355. sp_fixup : longint;
  356. case TCGLoc of
  357. LOC_REFERENCE : (reference : tparareference);
  358. LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER,
  359. LOC_REGISTER,LOC_CREGISTER : (
  360. case longint of
  361. 1 : (register,registerhigh : tregister);
  362. { overlay a registerlow }
  363. 2 : (registerlow : tregister);
  364. { overlay a 64 Bit register type }
  365. 3 : (reg64 : tregister64);
  366. 4 : (register64 : tregister64);
  367. );
  368. end;
  369. treglocation = packed record
  370. case longint of
  371. 1 : (register,registerhigh : tregister);
  372. { overlay a registerlow }
  373. 2 : (registerlow : tregister);
  374. { overlay a 64 Bit register type }
  375. 3 : (reg64 : tregister64);
  376. 4 : (register64 : tregister64);
  377. end;
  378. tlocation = packed record
  379. size : TCGSize;
  380. loc : tcgloc;
  381. case tcgloc of
  382. LOC_CREFERENCE,LOC_REFERENCE : (reference : treference);
  383. LOC_CONSTANT : (
  384. case longint of
  385. {$ifdef FPC_BIG_ENDIAN}
  386. 1 : (_valuedummy,value : AWord);
  387. {$else FPC_BIG_ENDIAN}
  388. 1 : (value : AWord);
  389. {$endif FPC_BIG_ENDIAN}
  390. { can't do this, this layout depends on the host cpu. Use }
  391. { lo(valueqword)/hi(valueqword) instead (JM) }
  392. { 2 : (valuelow, valuehigh:AWord); }
  393. { overlay a complete 64 Bit value }
  394. 3 : (valueqword : qword);
  395. );
  396. LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER,
  397. LOC_REGISTER,LOC_CREGISTER : (
  398. case longint of
  399. 1 : (registerlow,registerhigh : tregister);
  400. 2 : (register : tregister);
  401. { overlay a 64 Bit register type }
  402. 3 : (reg64 : tregister64);
  403. 4 : (register64 : tregister64);
  404. );
  405. LOC_FLAGS : (resflags : tresflags);
  406. end;
  407. {*****************************************************************************
  408. Constants
  409. *****************************************************************************}
  410. const
  411. max_operands = 5;
  412. {# Constant defining possibly all registers which might require saving }
  413. {$warning FIX ME !!!!!!!!! }
  414. ALL_REGISTERS = [R_0..R_FPSCR];
  415. general_registers = [R_0..R_31];
  416. general_superregisters = [RS_R0..RS_R31];
  417. {# low and high of the available maximum width integer general purpose }
  418. { registers }
  419. LoGPReg = R_0;
  420. HiGPReg = R_31;
  421. {# low and high of every possible width general purpose register (same as }
  422. { above on most architctures apart from the 80x86) }
  423. LoReg = R_0;
  424. HiReg = R_31;
  425. {# Table of registers which can be allocated by the code generator
  426. internally, when generating the code.
  427. }
  428. { legend: }
  429. { xxxregs = set of all possibly used registers of that type in the code }
  430. { generator }
  431. { usableregsxxx = set of all 32bit components of registers that can be }
  432. { possible allocated to a regvar or using getregisterxxx (this }
  433. { excludes registers which can be only used for parameter }
  434. { passing on ABI's that define this) }
  435. { c_countusableregsxxx = amount of registers in the usableregsxxx set }
  436. maxintregs = 18;
  437. intregs = [R_0..R_31];
  438. usableregsint = [RS_R13..RS_R27];
  439. c_countusableregsint = 18;
  440. maxfpuregs = 31-14+1;
  441. fpuregs = [R_F0..R_F31];
  442. usableregsfpu = [R_F14..R_F31];
  443. c_countusableregsfpu = 31-14+1;
  444. mmregs = [R_M0..R_M31];
  445. usableregsmm = [R_M14..R_M31];
  446. c_countusableregsmm = 31-14+1;
  447. { no distinction on this platform }
  448. maxaddrregs = 0;
  449. addrregs = [];
  450. usableregsaddr = [];
  451. c_countusableregsaddr = 0;
  452. firstsaveintreg = RS_R13;
  453. {$ifndef newra}
  454. lastsaveintreg = RS_R27;
  455. {$else newra}
  456. lastsaveintreg = RS_R31;
  457. {$endif newra}
  458. firstsavefpureg = R_F14;
  459. lastsavefpureg = R_F31;
  460. { no altivec support yet. Need to override tcgobj.a_loadmm_* first in tcgppc }
  461. firstsavemmreg = R_NO;
  462. lastsavemmreg = R_NO;
  463. maxvarregs = 15;
  464. varregs : Array [1..maxvarregs] of Tnewregister =
  465. (RS_R14,RS_R15,RS_R16,RS_R17,RS_R18,RS_R19,RS_R20,RS_R21,
  466. RS_R22,RS_R23,RS_R24,RS_R25,RS_R26,RS_R27,RS_R28);
  467. maxfpuvarregs = 31-14+1;
  468. fpuvarregs : Array [1..maxfpuvarregs] of Toldregister =
  469. (R_F14,R_F15,R_F16,R_F17,R_F18,R_F19,R_F20,R_F21,R_F22,R_F23,
  470. R_F24,R_F25,R_F26,R_F27,R_F28,R_F29,R_F30,R_F31);
  471. max_param_regs_int = 8;
  472. param_regs_int: Array[1..max_param_regs_int] of Toldregister =
  473. (R_3,R_4,R_5,R_6,R_7,R_8,R_9,R_10);
  474. max_param_regs_fpu = 13;
  475. param_regs_fpu: Array[1..max_param_regs_fpu] of Toldregister =
  476. (R_F1,R_F2,R_F3,R_F4,R_F5,R_F6,R_F7,R_F8,R_F9,R_F10,R_F11,R_F12,R_F13);
  477. max_param_regs_mm = 13;
  478. param_regs_mm: Array[1..max_param_regs_mm] of Toldregister =
  479. (R_M1,R_M2,R_M3,R_M4,R_M5,R_M6,R_M7,R_M8,R_M9,R_M10,R_M11,R_M12,R_M13);
  480. {$ifndef newra}
  481. {# Registers which are defined as scratch and no need to save across
  482. routine calls or in assembler blocks.
  483. }
  484. max_scratch_regs = 3;
  485. scratch_regs: Array[1..max_scratch_regs] of Tsuperregister = (RS_R29,RS_R30,RS_R31);
  486. {$endif newra}
  487. {*****************************************************************************
  488. Default generic sizes
  489. *****************************************************************************}
  490. {# Defines the default address size for a processor, }
  491. OS_ADDR = OS_32;
  492. {# the natural int size for a processor, }
  493. OS_INT = OS_32;
  494. {# the maximum float size for a processor, }
  495. OS_FLOAT = OS_F64;
  496. {# the size of a vector register for a processor }
  497. OS_VECTOR = OS_M128;
  498. {*****************************************************************************
  499. GDB Information
  500. *****************************************************************************}
  501. {# Register indexes for stabs information, when some
  502. parameters or variables are stored in registers.
  503. Taken from rs6000.h (DBX_REGISTER_NUMBER)
  504. from GCC 3.x source code. PowerPC has 1:1 mapping
  505. according to the order of the registers defined
  506. in GCC
  507. }
  508. stab_regindex : array[firstreg..lastreg] of shortint =
  509. (
  510. { R_NO }
  511. -1,
  512. { R0..R7 }
  513. 0,1,2,3,4,5,6,7,
  514. { R8..R15 }
  515. 8,9,10,11,12,13,14,15,
  516. { R16..R23 }
  517. 16,17,18,19,20,21,22,23,
  518. { R24..R32 }
  519. 24,25,26,27,28,29,30,31,
  520. { F0..F7 }
  521. 32,33,34,35,36,37,38,39,
  522. { F8..F15 }
  523. 40,41,42,43,44,45,46,47,
  524. { F16..F23 }
  525. 48,49,50,51,52,53,54,55,
  526. { F24..F31 }
  527. 56,57,58,59,60,61,62,63,
  528. { M0..M7 Multimedia registers are not supported by GCC }
  529. -1,-1,-1,-1,-1,-1,-1,-1,
  530. { M8..M15 }
  531. -1,-1,-1,-1,-1,-1,-1,-1,
  532. { M16..M23 }
  533. -1,-1,-1,-1,-1,-1,-1,-1,
  534. { M24..M31 }
  535. -1,-1,-1,-1,-1,-1,-1,-1,
  536. { CR }
  537. -1,
  538. { CR0..CR7 }
  539. 68,69,70,71,72,73,74,75,
  540. { XER }
  541. 76,
  542. { LR }
  543. 65,
  544. { CTR }
  545. 66,
  546. { FPSCR }
  547. -1
  548. );
  549. {*****************************************************************************
  550. Generic Register names
  551. *****************************************************************************}
  552. {# Stack pointer register }
  553. NR_STACK_POINTER_REG = NR_R1;
  554. RS_STACK_POINTER_REG = RS_R1;
  555. {# Frame pointer register }
  556. NR_FRAME_POINTER_REG = NR_STACK_POINTER_REG;
  557. RS_FRAME_POINTER_REG = RS_STACK_POINTER_REG;
  558. {# Register for addressing absolute data in a position independant way,
  559. such as in PIC code. The exact meaning is ABI specific. For
  560. further information look at GCC source : PIC_OFFSET_TABLE_REGNUM
  561. Taken from GCC rs6000.h
  562. }
  563. {$warning As indicated in rs6000.h, but can't find it anywhere else!}
  564. NR_PIC_OFFSET_REG = NR_R30;
  565. { Results are returned in this register (32-bit values) }
  566. NR_FUNCTION_RETURN_REG = NR_R3;
  567. RS_FUNCTION_RETURN_REG = RS_R3;
  568. { Low part of 64bit return value }
  569. NR_FUNCTION_RETURN64_LOW_REG = NR_R4;
  570. RS_FUNCTION_RETURN64_LOW_REG = RS_R4;
  571. { High part of 64bit return value }
  572. NR_FUNCTION_RETURN64_HIGH_REG = NR_R3;
  573. RS_FUNCTION_RETURN64_HIGH_REG = RS_R3;
  574. { The value returned from a function is available in this register }
  575. NR_FUNCTION_RESULT_REG = NR_FUNCTION_RETURN_REG;
  576. RS_FUNCTION_RESULT_REG = RS_FUNCTION_RETURN_REG;
  577. { The lowh part of 64bit value returned from a function }
  578. NR_FUNCTION_RESULT64_LOW_REG = NR_FUNCTION_RETURN64_LOW_REG;
  579. RS_FUNCTION_RESULT64_LOW_REG = RS_FUNCTION_RETURN64_LOW_REG;
  580. { The high part of 64bit value returned from a function }
  581. NR_FUNCTION_RESULT64_HIGH_REG = NR_FUNCTION_RETURN64_HIGH_REG;
  582. RS_FUNCTION_RESULT64_HIGH_REG = RS_FUNCTION_RETURN64_HIGH_REG;
  583. { WARNING: don't change to R_ST0!! See comments above implementation of }
  584. { a_loadfpu* methods in rgcpu (JM) }
  585. FPU_RESULT_REG = R_F1;
  586. mmresultreg = R_M0;
  587. {*****************************************************************************
  588. GCC /ABI linking information
  589. *****************************************************************************}
  590. {# Registers which must be saved when calling a routine declared as
  591. cppdecl, cdecl, stdcall, safecall, palmossyscall. The registers
  592. saved should be the ones as defined in the target ABI and / or GCC.
  593. This value can be deduced from CALLED_USED_REGISTERS array in the
  594. GCC source.
  595. }
  596. std_saved_registers = [RS_R13..RS_R29];
  597. {# Required parameter alignment when calling a routine declared as
  598. stdcall and cdecl. The alignment value should be the one defined
  599. by GCC or the target ABI.
  600. The value of this constant is equal to the constant
  601. PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.
  602. }
  603. std_param_align = 4; { for 32-bit version only }
  604. {*****************************************************************************
  605. CPU Dependent Constants
  606. *****************************************************************************}
  607. LinkageAreaSizeAIX = 24;
  608. LinkageAreaSizeSYSV = 8;
  609. { offset in the linkage area for the saved stack pointer }
  610. LA_SP = 0;
  611. { offset in the linkage area for the saved conditional register}
  612. LA_CR_AIX = 4;
  613. { offset in the linkage area for the saved link register}
  614. LA_LR_AIX = 8;
  615. LA_LR_SYSV = 4;
  616. { offset in the linkage area for the saved RTOC register}
  617. LA_RTOC_AIX = 20;
  618. PARENT_FRAMEPOINTER_OFFSET = 12;
  619. {*****************************************************************************
  620. Helpers
  621. *****************************************************************************}
  622. function supreg_name(r:Tsuperregister):string;
  623. function is_calljmp(o:tasmop):boolean;
  624. procedure inverse_flags(var r : TResFlags);
  625. procedure inverse_cond(const c: TAsmCond;var r : TAsmCond);
  626. function flags_to_cond(const f: TResFlags) : TAsmCond;
  627. procedure create_cond_imm(BO,BI:byte;var r : TAsmCond);
  628. procedure create_cond_norm(cond: TAsmCondFlag; cr: byte;var r : TasmCond);
  629. procedure convert_register_to_enum(var r:Tregister);
  630. function cgsize2subreg(s:Tcgsize):Tsubregister;
  631. implementation
  632. uses
  633. verbose;
  634. {*****************************************************************************
  635. Helpers
  636. *****************************************************************************}
  637. function supreg_name(r:Tsuperregister):string;
  638. var s:string[4];
  639. const supreg_names:array[0..last_supreg] of string[3]=
  640. ('INV',
  641. 'r0','r1','r2','r3','r4','r5','r6','r7','r8','r9',
  642. 'r10','r11','r12','r13','r14','r15','r16','r17','r18','r19',
  643. 'r20','r21','r22','r23','r24','r25','r26','r27','r28','r29',
  644. 'r30' ,'r31');
  645. begin
  646. if r in [0..last_supreg] then
  647. supreg_name:=supreg_names[r]
  648. else
  649. begin
  650. str(r,s);
  651. supreg_name:='invalid_reg'+s;
  652. end;
  653. end;
  654. function is_calljmp(o:tasmop):boolean;
  655. begin
  656. is_calljmp:=false;
  657. case o of
  658. A_B,A_BA,A_BL,A_BLA,A_BC,A_BCA,A_BCL,A_BCLA,A_BCCTR,A_BCCTRL,A_BCLR,
  659. A_BCLRL,A_TW,A_TWI: is_calljmp:=true;
  660. end;
  661. end;
  662. procedure inverse_flags(var r: TResFlags);
  663. const
  664. inv_flags: array[F_EQ..F_GE] of TResFlagsEnum =
  665. (F_NE,F_EQ,F_GE,F_GE,F_LE,F_LT);
  666. begin
  667. r.flag := inv_flags[r.flag];
  668. end;
  669. procedure inverse_cond(const c: TAsmCond;var r : TAsmCond);
  670. const
  671. inv_condflags:array[TAsmCondFlag] of TAsmCondFlag=(C_None,
  672. C_GE,C_GT,C_NE,C_LT,C_LE,C_LT,C_EQ,C_GT,C_NS,C_SO,C_NU,C_UN,
  673. C_F,C_T,C_DNZ,C_DNZF,C_DNZT,C_DZ,C_DZF,C_DZT);
  674. begin
  675. r := c;
  676. r.cond := inv_condflags[c.cond];
  677. end;
  678. function flags_to_cond(const f: TResFlags) : TAsmCond;
  679. const
  680. flag_2_cond: array[F_EQ..F_SO] of TAsmCondFlag =
  681. (C_EQ,C_NE,C_LT,C_LE,C_GT,C_GE,C_SO);
  682. begin
  683. if f.flag > high(flag_2_cond) then
  684. internalerror(200112301);
  685. result.simple := true;
  686. result.cr := f.cr;
  687. result.cond := flag_2_cond[f.flag];
  688. end;
  689. procedure create_cond_imm(BO,BI:byte;var r : TAsmCond);
  690. begin
  691. r.simple := false;
  692. r.bo := bo;
  693. r.bi := bi;
  694. end;
  695. procedure create_cond_norm(cond: TAsmCondFlag; cr: byte;var r : TasmCond);
  696. begin
  697. r.simple := true;
  698. r.cond := cond;
  699. case cond of
  700. C_NONE:;
  701. C_T..C_DZF: r.crbit := cr
  702. else r.cr := Toldregister(ord(R_CR0)+cr);
  703. end;
  704. end;
  705. procedure convert_register_to_enum(var r:Tregister);
  706. begin
  707. if r.enum = R_INTREGISTER then
  708. if (r.number >= NR_NO) and
  709. (r.number <= NR_R31) then
  710. r.enum := toldregister(r.number shr 8)
  711. else
  712. { case r.number of
  713. NR_NO: r.enum:= R_NO;
  714. NR_R0: r.enum:= R_0;
  715. NR_R1: r.enum:= R_1;
  716. NR_R2: r.enum:= R_2;
  717. NR_R3: r.enum:= R_3;
  718. NR_R4: r.enum:= R_4;
  719. NR_R5: r.enum:= R_5;
  720. NR_R6: r.enum:= R_6;
  721. NR_R7: r.enum:= R_7;
  722. NR_R8: r.enum:= R_8;
  723. NR_R9: r.enum:= R_9;
  724. NR_R10: r.enum:= R_10;
  725. NR_R11: r.enum:= R_11;
  726. NR_R12: r.enum:= R_12;
  727. NR_R13: r.enum:= R_13;
  728. NR_R14: r.enum:= R_14;
  729. NR_R15: r.enum:= R_15;
  730. NR_R16: r.enum:= R_16;
  731. NR_R17: r.enum:= R_17;
  732. NR_R18: r.enum:= R_18;
  733. NR_R19: r.enum:= R_19;
  734. NR_R20: r.enum:= R_20;
  735. NR_R21: r.enum:= R_21;
  736. NR_R22: r.enum:= R_22;
  737. NR_R23: r.enum:= R_23;
  738. NR_R24: r.enum:= R_24;
  739. NR_R25: r.enum:= R_25;
  740. NR_R26: r.enum:= R_26;
  741. NR_R27: r.enum:= R_27;
  742. NR_R28: r.enum:= R_28;
  743. NR_R29: r.enum:= R_29;
  744. NR_R30: r.enum:= R_30;
  745. NR_R31: r.enum:= R_31;
  746. else}
  747. internalerror(200301082);
  748. { end;}
  749. end;
  750. function cgsize2subreg(s:Tcgsize):Tsubregister;
  751. begin
  752. cgsize2subreg:=R_SUBWHOLE;
  753. end;
  754. end.
  755. {
  756. $Log$
  757. Revision 1.63 2003-08-08 15:51:16 olle
  758. * merged macos entry/exit code generation into the general one.
  759. Revision 1.62 2003/07/23 11:00:09 jonas
  760. * "lastsaveintreg" is RS_R31 instead of RS_R27 with -dnewra, because
  761. there are no scratch regs anymore
  762. Revision 1.61 2003/07/06 20:25:03 jonas
  763. * fixed ppc compiler
  764. Revision 1.60 2003/07/06 15:28:24 jonas
  765. * VOLATILE_REGISTERS was wrong (it was more or less the inverted set
  766. of what it had to be :/ )
  767. Revision 1.59 2003/06/17 16:34:44 jonas
  768. * lots of newra fixes (need getfuncretparaloc implementation for i386)!
  769. * renamed all_intregisters to volatile_intregisters and made it
  770. processor dependent
  771. Revision 1.58 2003/06/14 22:32:43 jonas
  772. * ppc compiles with -dnewra, haven't tried to compile anything with it
  773. yet though
  774. Revision 1.57 2003/06/13 17:44:44 jonas
  775. + added supreg_name function
  776. Revision 1.56 2003/06/12 19:11:34 jonas
  777. - removed ALL_INTREGISTERS (only the one in rgobj is valid)
  778. Revision 1.55 2003/05/31 15:05:28 peter
  779. * FUNCTION_RESULT64_LOW/HIGH_REG added for int64 results
  780. Revision 1.54 2003/05/30 23:57:08 peter
  781. * more sparc cleanup
  782. * accumulator removed, splitted in function_return_reg (called) and
  783. function_result_reg (caller)
  784. Revision 1.53 2003/05/30 18:49:59 jonas
  785. * changed scratchregs from r28-r30 to r29-r31
  786. * made sure the regvar registers don't overlap with the scratchregs
  787. anymore
  788. Revision 1.52 2003/05/24 16:02:01 jonas
  789. * fixed endian problem with tlocation.value/valueqword fields
  790. Revision 1.51 2003/05/16 16:26:05 jonas
  791. * adapted for Peter's regvar fixes
  792. Revision 1.50 2003/05/15 22:14:43 florian
  793. * fixed last commit, changing lastsaveintreg to r31 caused some strange problems
  794. Revision 1.49 2003/05/15 21:37:00 florian
  795. * sysv entry code saves r13 now as well
  796. Revision 1.48 2003/04/23 12:35:35 florian
  797. * fixed several issues with powerpc
  798. + applied a patch from Jonas for nested function calls (PowerPC only)
  799. * ...
  800. Revision 1.47 2003/04/22 11:27:48 florian
  801. + added first_ and last_imreg
  802. Revision 1.46 2003/03/19 14:26:26 jonas
  803. * fixed R_TOC bugs introduced by new register allocator conversion
  804. Revision 1.45 2003/03/11 21:46:24 jonas
  805. * lots of new regallocator fixes, both in generic and ppc-specific code
  806. (ppc compiler still can't compile the linux system unit though)
  807. Revision 1.44 2003/02/19 22:00:16 daniel
  808. * Code generator converted to new register notation
  809. - Horribily outdated todo.txt removed
  810. Revision 1.43 2003/02/02 19:25:54 carl
  811. * Several bugfixes for m68k target (register alloc., opcode emission)
  812. + VIS target
  813. + Generic add more complete (still not verified)
  814. Revision 1.42 2003/01/16 11:31:28 olle
  815. + added new register constants
  816. + implemented register convertion proc
  817. Revision 1.41 2003/01/13 17:17:50 olle
  818. * changed global var access, TOC now contain pointers to globals
  819. * fixed handling of function pointers
  820. Revision 1.40 2003/01/09 15:49:56 daniel
  821. * Added register conversion
  822. Revision 1.39 2003/01/08 18:43:58 daniel
  823. * Tregister changed into a record
  824. Revision 1.38 2002/11/25 17:43:27 peter
  825. * splitted defbase in defutil,symutil,defcmp
  826. * merged isconvertable and is_equal into compare_defs(_ext)
  827. * made operator search faster by walking the list only once
  828. Revision 1.37 2002/11/24 14:28:56 jonas
  829. + some comments describing the fields of treference
  830. Revision 1.36 2002/11/17 18:26:16 mazen
  831. * fixed a compilation bug accmulator-->FUNCTION_RETURN_REG, in definition of return_result_reg
  832. Revision 1.35 2002/11/17 17:49:09 mazen
  833. + return_result_reg and FUNCTION_RESULT_REG are now used, in all plateforms, to pass functions result between called function and its caller. See the explanation of each one
  834. Revision 1.34 2002/09/17 18:54:06 jonas
  835. * a_load_reg_reg() now has two size parameters: source and dest. This
  836. allows some optimizations on architectures that don't encode the
  837. register size in the register name.
  838. Revision 1.33 2002/09/07 17:54:59 florian
  839. * first part of PowerPC fixes
  840. Revision 1.32 2002/09/07 15:25:14 peter
  841. * old logs removed and tabs fixed
  842. Revision 1.31 2002/09/01 21:04:49 florian
  843. * several powerpc related stuff fixed
  844. Revision 1.30 2002/08/18 22:16:15 florian
  845. + the ppc gas assembler writer adds now registers aliases
  846. to the assembler file
  847. Revision 1.29 2002/08/18 21:36:42 florian
  848. + handling of local variables in direct reader implemented
  849. Revision 1.28 2002/08/14 18:41:47 jonas
  850. - remove valuelow/valuehigh fields from tlocation, because they depend
  851. on the endianess of the host operating system -> difficult to get
  852. right. Use lo/hi(location.valueqword) instead (remember to use
  853. valueqword and not value!!)
  854. Revision 1.27 2002/08/13 21:40:58 florian
  855. * more fixes for ppc calling conventions
  856. Revision 1.26 2002/08/12 15:08:44 carl
  857. + stab register indexes for powerpc (moved from gdb to cpubase)
  858. + tprocessor enumeration moved to cpuinfo
  859. + linker in target_info is now a class
  860. * many many updates for m68k (will soon start to compile)
  861. - removed some ifdef or correct them for correct cpu
  862. Revision 1.25 2002/08/10 17:15:06 jonas
  863. * endianess fix
  864. Revision 1.24 2002/08/06 20:55:24 florian
  865. * first part of ppc calling conventions fix
  866. Revision 1.23 2002/08/04 12:57:56 jonas
  867. * more misc. fixes, mostly constant-related
  868. Revision 1.22 2002/07/27 19:57:18 jonas
  869. * some typo corrections in the instruction tables
  870. * renamed the m* registers to v*
  871. Revision 1.21 2002/07/26 12:30:51 jonas
  872. * fixed typo in instruction table (_subco_ -> a_subco)
  873. Revision 1.20 2002/07/25 18:04:10 carl
  874. + FPURESULTREG -> FPU_RESULT_REG
  875. Revision 1.19 2002/07/13 19:38:44 florian
  876. * some more generic calling stuff fixed
  877. Revision 1.18 2002/07/11 14:41:34 florian
  878. * start of the new generic parameter handling
  879. Revision 1.17 2002/07/11 07:35:36 jonas
  880. * some available registers fixes
  881. Revision 1.16 2002/07/09 19:45:01 jonas
  882. * unarynminus and shlshr node fixed for 32bit and smaller ordinals
  883. * small fixes in the assembler writer
  884. * changed scratch registers, because they were used by the linker (r11
  885. and r12) and by the abi under linux (r31)
  886. Revision 1.15 2002/07/07 09:44:31 florian
  887. * powerpc target fixed, very simple units can be compiled
  888. Revision 1.14 2002/05/18 13:34:26 peter
  889. * readded missing revisions
  890. Revision 1.12 2002/05/14 19:35:01 peter
  891. * removed old logs and updated copyright year
  892. Revision 1.11 2002/05/14 17:28:10 peter
  893. * synchronized cpubase between powerpc and i386
  894. * moved more tables from cpubase to cpuasm
  895. * tai_align_abstract moved to tainst, cpuasm must define
  896. the tai_align class now, which may be empty
  897. }