cpubase.pas 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  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. {$warning FIXME!!}
  208. { FIXME: only R_F1..R_F8 under the SYSV ABI -> has to become a }
  209. { typed const (JM) }
  210. VOLATILE_FPUREGISTERS = [R_F3..R_F13];
  211. {Number of first and last imaginary register.}
  212. first_imreg = $21;
  213. last_imreg = $ff;
  214. {Subregisters, situation unknown!!.}
  215. R_SUBWHOLE=$00;
  216. R_SUBL=$00;
  217. {*****************************************************************************
  218. Conditions
  219. *****************************************************************************}
  220. type
  221. TAsmCondFlag = (C_None { unconditional jumps },
  222. { conditions when not using ctr decrement etc }
  223. C_LT,C_LE,C_EQ,C_GE,C_GT,C_NL,C_NE,C_NG,C_SO,C_NS,C_UN,C_NU,
  224. { conditions when using ctr decrement etc }
  225. C_T,C_F,C_DNZ,C_DNZT,C_DNZF,C_DZ,C_DZT,C_DZF);
  226. const
  227. { these are in the XER, but when moved to CR_x they correspond with the }
  228. { bits below (still needs to be verified!!!) }
  229. C_OV = C_EQ;
  230. C_CA = C_GT;
  231. type
  232. TAsmCond = packed record
  233. case simple: boolean of
  234. false: (BO, BI: byte);
  235. true: (
  236. cond: TAsmCondFlag;
  237. case byte of
  238. 0: ();
  239. { specifies in which part of the cr the bit has to be }
  240. { tested for blt,bgt,beq,..,bnu }
  241. 1: (cr: R_CR0..R_CR7);
  242. { specifies the bit to test for bt,bf,bdz,..,bdzf }
  243. 2: (crbit: byte)
  244. );
  245. end;
  246. const
  247. AsmCondFlag2BO: Array[C_T..C_DZF] of Byte =
  248. (12,4,16,8,0,18,10,2);
  249. AsmCondFlag2BI: Array[C_LT..C_NU] of Byte =
  250. (0,1,2,0,1,0,2,1,3,3,3,3);
  251. AsmCondFlagTF: Array[TAsmCondFlag] of Boolean =
  252. (false,true,false,true,false,true,false,false,false,true,false,true,false,
  253. true,false,false,true,false,false,true,false);
  254. AsmCondFlag2Str: Array[TAsmCondFlag] of string[4] = ({cf_none}'',
  255. { conditions when not using ctr decrement etc}
  256. 'lt','le','eq','ge','gt','nl','ne','ng','so','ns','un','nu',
  257. 't','f','dnz','dzt','dnzf','dz','dzt','dzf');
  258. const
  259. CondAsmOps=3;
  260. CondAsmOp:array[0..CondAsmOps-1] of TasmOp=(
  261. A_BC, A_TW, A_TWI
  262. );
  263. {*****************************************************************************
  264. Flags
  265. *****************************************************************************}
  266. type
  267. TResFlagsEnum = (F_EQ,F_NE,F_LT,F_LE,F_GT,F_GE,F_SO,F_FX,F_FEX,F_VX,F_OX);
  268. TResFlags = record
  269. cr: R_CR0..R_CR7;
  270. flag: TResFlagsEnum;
  271. end;
  272. (*
  273. const
  274. { arrays for boolean location conversions }
  275. flag_2_cond : array[TResFlags] of TAsmCond =
  276. (C_E,C_NE,C_LT,C_LE,C_GT,C_GE,???????????????);
  277. *)
  278. {*****************************************************************************
  279. Reference
  280. *****************************************************************************}
  281. type
  282. trefoptions=(ref_none,ref_parafixup,ref_localfixup,ref_selffixup);
  283. { since we have only 16 offsets, we need to be able to specify the high }
  284. { and low 16 bits of the address of a symbol }
  285. trefsymaddr = (refs_full,refs_ha,refs_l);
  286. { reference record }
  287. preference = ^treference;
  288. treference = packed record
  289. { base register, R_NO if none }
  290. base,
  291. { index register, R_NO if none }
  292. index : tregister;
  293. { offset, 0 if none }
  294. offset : longint;
  295. { symbol this reference refers to, nil if none }
  296. symbol : tasmsymbol;
  297. { used in conjunction with symbols and offsets: refs_full means }
  298. { means a full 32bit reference, refs_ha means the upper 16 bits }
  299. { and refs_l the lower 16 bits of the address }
  300. symaddr : trefsymaddr;
  301. { changed when inlining and possibly in other cases, don't }
  302. { set manually }
  303. offsetfixup : longint;
  304. { used in conjunction with the previous field }
  305. options : trefoptions;
  306. { alignment this reference is guaranteed to have }
  307. alignment : byte;
  308. end;
  309. { reference record }
  310. pparareference = ^tparareference;
  311. tparareference = packed record
  312. index : tregister;
  313. offset : aword;
  314. end;
  315. const
  316. symaddr2str: array[trefsymaddr] of string[3] = ('','@ha','@l');
  317. const
  318. { MacOS only. Whether the direct data area (TOC) directly contain
  319. global variables. Otherwise it contains pointers to global variables. }
  320. macos_direct_globals = false;
  321. {*****************************************************************************
  322. Operand
  323. *****************************************************************************}
  324. type
  325. toptype=(top_none,top_reg,top_ref,top_const,top_symbol,top_bool);
  326. toper=record
  327. ot : longint;
  328. case typ : toptype of
  329. top_none : ();
  330. top_reg : (reg:tregister);
  331. top_ref : (ref:preference);
  332. top_const : (val:aword);
  333. top_symbol : (sym:tasmsymbol;symofs:longint);
  334. top_bool : (b: boolean);
  335. end;
  336. {*****************************************************************************
  337. Operand Sizes
  338. *****************************************************************************}
  339. {*****************************************************************************
  340. Generic Location
  341. *****************************************************************************}
  342. type
  343. { tparamlocation describes where a parameter for a procedure is stored.
  344. References are given from the caller's point of view. The usual
  345. TLocation isn't used, because contains a lot of unnessary fields.
  346. }
  347. tparalocation = packed record
  348. size : TCGSize;
  349. { The location type where the parameter is passed, usually
  350. LOC_REFERENCE,LOC_REGISTER or LOC_FPUREGISTER
  351. }
  352. loc : TCGLoc;
  353. { The stack pointer must be decreased by this value before
  354. the parameter is copied to the given destination.
  355. This allows to "encode" pushes with tparalocation.
  356. On the PowerPC, this field is unsed but it is there
  357. because several generic code accesses it.
  358. }
  359. sp_fixup : longint;
  360. case TCGLoc of
  361. LOC_REFERENCE : (reference : tparareference);
  362. LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER,
  363. LOC_REGISTER,LOC_CREGISTER : (
  364. case longint of
  365. 1 : (register,registerhigh : tregister);
  366. { overlay a registerlow }
  367. 2 : (registerlow : tregister);
  368. { overlay a 64 Bit register type }
  369. 3 : (reg64 : tregister64);
  370. 4 : (register64 : tregister64);
  371. );
  372. end;
  373. treglocation = packed record
  374. case longint of
  375. 1 : (register,registerhigh : tregister);
  376. { overlay a registerlow }
  377. 2 : (registerlow : tregister);
  378. { overlay a 64 Bit register type }
  379. 3 : (reg64 : tregister64);
  380. 4 : (register64 : tregister64);
  381. end;
  382. tlocation = packed record
  383. size : TCGSize;
  384. loc : tcgloc;
  385. case tcgloc of
  386. LOC_CREFERENCE,LOC_REFERENCE : (reference : treference);
  387. LOC_CONSTANT : (
  388. case longint of
  389. {$ifdef FPC_BIG_ENDIAN}
  390. 1 : (_valuedummy,value : AWord);
  391. {$else FPC_BIG_ENDIAN}
  392. 1 : (value : AWord);
  393. {$endif FPC_BIG_ENDIAN}
  394. { can't do this, this layout depends on the host cpu. Use }
  395. { lo(valueqword)/hi(valueqword) instead (JM) }
  396. { 2 : (valuelow, valuehigh:AWord); }
  397. { overlay a complete 64 Bit value }
  398. 3 : (valueqword : qword);
  399. );
  400. LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER,
  401. LOC_REGISTER,LOC_CREGISTER : (
  402. case longint of
  403. 1 : (registerlow,registerhigh : tregister);
  404. 2 : (register : tregister);
  405. { overlay a 64 Bit register type }
  406. 3 : (reg64 : tregister64);
  407. 4 : (register64 : tregister64);
  408. );
  409. LOC_FLAGS : (resflags : tresflags);
  410. end;
  411. {*****************************************************************************
  412. Constants
  413. *****************************************************************************}
  414. const
  415. max_operands = 5;
  416. {# Constant defining possibly all registers which might require saving }
  417. {$warning FIX ME !!!!!!!!! }
  418. ALL_REGISTERS = [R_0..R_FPSCR];
  419. general_registers = [R_0..R_31];
  420. general_superregisters = [RS_R0..RS_R31];
  421. {# low and high of the available maximum width integer general purpose }
  422. { registers }
  423. LoGPReg = R_0;
  424. HiGPReg = R_31;
  425. {# low and high of every possible width general purpose register (same as }
  426. { above on most architctures apart from the 80x86) }
  427. LoReg = R_0;
  428. HiReg = R_31;
  429. {# Table of registers which can be allocated by the code generator
  430. internally, when generating the code.
  431. }
  432. { legend: }
  433. { xxxregs = set of all possibly used registers of that type in the code }
  434. { generator }
  435. { usableregsxxx = set of all 32bit components of registers that can be }
  436. { possible allocated to a regvar or using getregisterxxx (this }
  437. { excludes registers which can be only used for parameter }
  438. { passing on ABI's that define this) }
  439. { c_countusableregsxxx = amount of registers in the usableregsxxx set }
  440. maxintregs = 18;
  441. { to determine how many registers to use for regvars }
  442. maxintscratchregs = 3;
  443. intregs = [R_0..R_31];
  444. usableregsint = [RS_R13..RS_R27];
  445. c_countusableregsint = 18;
  446. maxfpuregs = 31-14+1;
  447. fpuregs = [R_F0..R_F31];
  448. usableregsfpu = [R_F14..R_F31];
  449. c_countusableregsfpu = 31-14+1;
  450. mmregs = [R_M0..R_M31];
  451. usableregsmm = [R_M14..R_M31];
  452. c_countusableregsmm = 31-14+1;
  453. { no distinction on this platform }
  454. maxaddrregs = 0;
  455. addrregs = [];
  456. usableregsaddr = [];
  457. c_countusableregsaddr = 0;
  458. firstsaveintreg = RS_R13;
  459. {$ifndef newra}
  460. lastsaveintreg = RS_R27;
  461. {$else newra}
  462. lastsaveintreg = RS_R31;
  463. {$endif newra}
  464. firstsavefpureg = R_F14;
  465. lastsavefpureg = R_F31;
  466. { no altivec support yet. Need to override tcgobj.a_loadmm_* first in tcgppc }
  467. firstsavemmreg = R_NO;
  468. lastsavemmreg = R_NO;
  469. maxvarregs = 15;
  470. varregs : Array [1..maxvarregs] of Tnewregister =
  471. (RS_R14,RS_R15,RS_R16,RS_R17,RS_R18,RS_R19,RS_R20,RS_R21,
  472. RS_R22,RS_R23,RS_R24,RS_R25,RS_R26,RS_R27,RS_R28);
  473. maxfpuvarregs = 31-14+1;
  474. fpuvarregs : Array [1..maxfpuvarregs] of Toldregister =
  475. (R_F14,R_F15,R_F16,R_F17,R_F18,R_F19,R_F20,R_F21,R_F22,R_F23,
  476. R_F24,R_F25,R_F26,R_F27,R_F28,R_F29,R_F30,R_F31);
  477. max_param_regs_int = 8;
  478. param_regs_int: Array[1..max_param_regs_int] of Toldregister =
  479. (R_3,R_4,R_5,R_6,R_7,R_8,R_9,R_10);
  480. max_param_regs_fpu = 13;
  481. param_regs_fpu: Array[1..max_param_regs_fpu] of Toldregister =
  482. (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);
  483. max_param_regs_mm = 13;
  484. param_regs_mm: Array[1..max_param_regs_mm] of Toldregister =
  485. (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);
  486. {$ifndef newra}
  487. {# Registers which are defined as scratch and no need to save across
  488. routine calls or in assembler blocks.
  489. }
  490. max_scratch_regs = 3;
  491. scratch_regs: Array[1..max_scratch_regs] of Tsuperregister = (RS_R29,RS_R30,RS_R31);
  492. {$endif newra}
  493. {*****************************************************************************
  494. Default generic sizes
  495. *****************************************************************************}
  496. {# Defines the default address size for a processor, }
  497. OS_ADDR = OS_32;
  498. {# the natural int size for a processor, }
  499. OS_INT = OS_32;
  500. {# the maximum float size for a processor, }
  501. OS_FLOAT = OS_F64;
  502. {# the size of a vector register for a processor }
  503. OS_VECTOR = OS_M128;
  504. {*****************************************************************************
  505. GDB Information
  506. *****************************************************************************}
  507. {# Register indexes for stabs information, when some
  508. parameters or variables are stored in registers.
  509. Taken from rs6000.h (DBX_REGISTER_NUMBER)
  510. from GCC 3.x source code. PowerPC has 1:1 mapping
  511. according to the order of the registers defined
  512. in GCC
  513. }
  514. stab_regindex : array[firstreg..lastreg] of shortint =
  515. (
  516. { R_NO }
  517. -1,
  518. { R0..R7 }
  519. 0,1,2,3,4,5,6,7,
  520. { R8..R15 }
  521. 8,9,10,11,12,13,14,15,
  522. { R16..R23 }
  523. 16,17,18,19,20,21,22,23,
  524. { R24..R32 }
  525. 24,25,26,27,28,29,30,31,
  526. { F0..F7 }
  527. 32,33,34,35,36,37,38,39,
  528. { F8..F15 }
  529. 40,41,42,43,44,45,46,47,
  530. { F16..F23 }
  531. 48,49,50,51,52,53,54,55,
  532. { F24..F31 }
  533. 56,57,58,59,60,61,62,63,
  534. { M0..M7 Multimedia registers are not supported by GCC }
  535. -1,-1,-1,-1,-1,-1,-1,-1,
  536. { M8..M15 }
  537. -1,-1,-1,-1,-1,-1,-1,-1,
  538. { M16..M23 }
  539. -1,-1,-1,-1,-1,-1,-1,-1,
  540. { M24..M31 }
  541. -1,-1,-1,-1,-1,-1,-1,-1,
  542. { CR }
  543. -1,
  544. { CR0..CR7 }
  545. 68,69,70,71,72,73,74,75,
  546. { XER }
  547. 76,
  548. { LR }
  549. 65,
  550. { CTR }
  551. 66,
  552. { FPSCR }
  553. -1
  554. );
  555. {*****************************************************************************
  556. Generic Register names
  557. *****************************************************************************}
  558. {# Stack pointer register }
  559. NR_STACK_POINTER_REG = NR_R1;
  560. RS_STACK_POINTER_REG = RS_R1;
  561. {# Frame pointer register }
  562. NR_FRAME_POINTER_REG = NR_STACK_POINTER_REG;
  563. RS_FRAME_POINTER_REG = RS_STACK_POINTER_REG;
  564. {# Register for addressing absolute data in a position independant way,
  565. such as in PIC code. The exact meaning is ABI specific. For
  566. further information look at GCC source : PIC_OFFSET_TABLE_REGNUM
  567. Taken from GCC rs6000.h
  568. }
  569. {$warning As indicated in rs6000.h, but can't find it anywhere else!}
  570. NR_PIC_OFFSET_REG = NR_R30;
  571. { Results are returned in this register (32-bit values) }
  572. NR_FUNCTION_RETURN_REG = NR_R3;
  573. RS_FUNCTION_RETURN_REG = RS_R3;
  574. { Low part of 64bit return value }
  575. NR_FUNCTION_RETURN64_LOW_REG = NR_R4;
  576. RS_FUNCTION_RETURN64_LOW_REG = RS_R4;
  577. { High part of 64bit return value }
  578. NR_FUNCTION_RETURN64_HIGH_REG = NR_R3;
  579. RS_FUNCTION_RETURN64_HIGH_REG = RS_R3;
  580. { The value returned from a function is available in this register }
  581. NR_FUNCTION_RESULT_REG = NR_FUNCTION_RETURN_REG;
  582. RS_FUNCTION_RESULT_REG = RS_FUNCTION_RETURN_REG;
  583. { The lowh part of 64bit value returned from a function }
  584. NR_FUNCTION_RESULT64_LOW_REG = NR_FUNCTION_RETURN64_LOW_REG;
  585. RS_FUNCTION_RESULT64_LOW_REG = RS_FUNCTION_RETURN64_LOW_REG;
  586. { The high part of 64bit value returned from a function }
  587. NR_FUNCTION_RESULT64_HIGH_REG = NR_FUNCTION_RETURN64_HIGH_REG;
  588. RS_FUNCTION_RESULT64_HIGH_REG = RS_FUNCTION_RETURN64_HIGH_REG;
  589. { WARNING: don't change to R_ST0!! See comments above implementation of }
  590. { a_loadfpu* methods in rgcpu (JM) }
  591. FPU_RESULT_REG = R_F1;
  592. mmresultreg = R_M0;
  593. {*****************************************************************************
  594. GCC /ABI linking information
  595. *****************************************************************************}
  596. {# Registers which must be saved when calling a routine declared as
  597. cppdecl, cdecl, stdcall, safecall, palmossyscall. The registers
  598. saved should be the ones as defined in the target ABI and / or GCC.
  599. This value can be deduced from CALLED_USED_REGISTERS array in the
  600. GCC source.
  601. }
  602. std_saved_registers = [RS_R13..RS_R29];
  603. {# Required parameter alignment when calling a routine declared as
  604. stdcall and cdecl. The alignment value should be the one defined
  605. by GCC or the target ABI.
  606. The value of this constant is equal to the constant
  607. PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.
  608. }
  609. std_param_align = 4; { for 32-bit version only }
  610. {*****************************************************************************
  611. CPU Dependent Constants
  612. *****************************************************************************}
  613. LinkageAreaSizeAIX = 24;
  614. LinkageAreaSizeSYSV = 8;
  615. { offset in the linkage area for the saved stack pointer }
  616. LA_SP = 0;
  617. { offset in the linkage area for the saved conditional register}
  618. LA_CR_AIX = 4;
  619. { offset in the linkage area for the saved link register}
  620. LA_LR_AIX = 8;
  621. LA_LR_SYSV = 4;
  622. { offset in the linkage area for the saved RTOC register}
  623. LA_RTOC_AIX = 20;
  624. PARENT_FRAMEPOINTER_OFFSET = 12;
  625. {*****************************************************************************
  626. Helpers
  627. *****************************************************************************}
  628. function supreg_name(r:Tsuperregister):string;
  629. function is_calljmp(o:tasmop):boolean;
  630. procedure inverse_flags(var r : TResFlags);
  631. procedure inverse_cond(const c: TAsmCond;var r : TAsmCond);
  632. function flags_to_cond(const f: TResFlags) : TAsmCond;
  633. procedure create_cond_imm(BO,BI:byte;var r : TAsmCond);
  634. procedure create_cond_norm(cond: TAsmCondFlag; cr: byte;var r : TasmCond);
  635. procedure convert_register_to_enum(var r:Tregister);
  636. function cgsize2subreg(s:Tcgsize):Tsubregister;
  637. implementation
  638. uses
  639. verbose;
  640. {*****************************************************************************
  641. Helpers
  642. *****************************************************************************}
  643. function supreg_name(r:Tsuperregister):string;
  644. var s:string[4];
  645. const supreg_names:array[0..last_supreg] of string[3]=
  646. ('INV',
  647. 'r0','r1','r2','r3','r4','r5','r6','r7','r8','r9',
  648. 'r10','r11','r12','r13','r14','r15','r16','r17','r18','r19',
  649. 'r20','r21','r22','r23','r24','r25','r26','r27','r28','r29',
  650. 'r30' ,'r31');
  651. begin
  652. if r in [0..last_supreg] then
  653. supreg_name:=supreg_names[r]
  654. else
  655. begin
  656. str(r,s);
  657. supreg_name:='invalid_reg'+s;
  658. end;
  659. end;
  660. function is_calljmp(o:tasmop):boolean;
  661. begin
  662. is_calljmp:=false;
  663. case o of
  664. A_B,A_BA,A_BL,A_BLA,A_BC,A_BCA,A_BCL,A_BCLA,A_BCCTR,A_BCCTRL,A_BCLR,
  665. A_BCLRL,A_TW,A_TWI: is_calljmp:=true;
  666. end;
  667. end;
  668. procedure inverse_flags(var r: TResFlags);
  669. const
  670. inv_flags: array[F_EQ..F_GE] of TResFlagsEnum =
  671. (F_NE,F_EQ,F_GE,F_GE,F_LE,F_LT);
  672. begin
  673. r.flag := inv_flags[r.flag];
  674. end;
  675. procedure inverse_cond(const c: TAsmCond;var r : TAsmCond);
  676. const
  677. inv_condflags:array[TAsmCondFlag] of TAsmCondFlag=(C_None,
  678. C_GE,C_GT,C_NE,C_LT,C_LE,C_LT,C_EQ,C_GT,C_NS,C_SO,C_NU,C_UN,
  679. C_F,C_T,C_DNZ,C_DNZF,C_DNZT,C_DZ,C_DZF,C_DZT);
  680. begin
  681. r := c;
  682. r.cond := inv_condflags[c.cond];
  683. end;
  684. function flags_to_cond(const f: TResFlags) : TAsmCond;
  685. const
  686. flag_2_cond: array[F_EQ..F_SO] of TAsmCondFlag =
  687. (C_EQ,C_NE,C_LT,C_LE,C_GT,C_GE,C_SO);
  688. begin
  689. if f.flag > high(flag_2_cond) then
  690. internalerror(200112301);
  691. result.simple := true;
  692. result.cr := f.cr;
  693. result.cond := flag_2_cond[f.flag];
  694. end;
  695. procedure create_cond_imm(BO,BI:byte;var r : TAsmCond);
  696. begin
  697. r.simple := false;
  698. r.bo := bo;
  699. r.bi := bi;
  700. end;
  701. procedure create_cond_norm(cond: TAsmCondFlag; cr: byte;var r : TasmCond);
  702. begin
  703. r.simple := true;
  704. r.cond := cond;
  705. case cond of
  706. C_NONE:;
  707. C_T..C_DZF: r.crbit := cr
  708. else r.cr := Toldregister(ord(R_CR0)+cr);
  709. end;
  710. end;
  711. procedure convert_register_to_enum(var r:Tregister);
  712. begin
  713. if r.enum = R_INTREGISTER then
  714. {$ifndef notranslation}
  715. if (r.number >= NR_NO) and
  716. (r.number <= NR_R31) then
  717. {$endif not notranslation}
  718. r.enum := toldregister(r.number shr 8)
  719. {$ifndef notranslation}
  720. else
  721. internalerror(200301082);
  722. {$endif notranslation}
  723. end;
  724. function cgsize2subreg(s:Tcgsize):Tsubregister;
  725. begin
  726. cgsize2subreg:=R_SUBWHOLE;
  727. end;
  728. end.
  729. {
  730. $Log$
  731. Revision 1.64 2003-08-17 16:59:20 jonas
  732. * fixed regvars so they work with newra (at least for ppc)
  733. * fixed some volatile register bugs
  734. + -dnotranslation option for -dnewra, which causes the registers not to
  735. be translated from virtual to normal registers. Requires support in
  736. the assembler writer as well, which is only implemented in aggas/
  737. agppcgas currently
  738. Revision 1.63 2003/08/08 15:51:16 olle
  739. * merged macos entry/exit code generation into the general one.
  740. Revision 1.62 2003/07/23 11:00:09 jonas
  741. * "lastsaveintreg" is RS_R31 instead of RS_R27 with -dnewra, because
  742. there are no scratch regs anymore
  743. Revision 1.61 2003/07/06 20:25:03 jonas
  744. * fixed ppc compiler
  745. Revision 1.60 2003/07/06 15:28:24 jonas
  746. * VOLATILE_REGISTERS was wrong (it was more or less the inverted set
  747. of what it had to be :/ )
  748. Revision 1.59 2003/06/17 16:34:44 jonas
  749. * lots of newra fixes (need getfuncretparaloc implementation for i386)!
  750. * renamed all_intregisters to volatile_intregisters and made it
  751. processor dependent
  752. Revision 1.58 2003/06/14 22:32:43 jonas
  753. * ppc compiles with -dnewra, haven't tried to compile anything with it
  754. yet though
  755. Revision 1.57 2003/06/13 17:44:44 jonas
  756. + added supreg_name function
  757. Revision 1.56 2003/06/12 19:11:34 jonas
  758. - removed ALL_INTREGISTERS (only the one in rgobj is valid)
  759. Revision 1.55 2003/05/31 15:05:28 peter
  760. * FUNCTION_RESULT64_LOW/HIGH_REG added for int64 results
  761. Revision 1.54 2003/05/30 23:57:08 peter
  762. * more sparc cleanup
  763. * accumulator removed, splitted in function_return_reg (called) and
  764. function_result_reg (caller)
  765. Revision 1.53 2003/05/30 18:49:59 jonas
  766. * changed scratchregs from r28-r30 to r29-r31
  767. * made sure the regvar registers don't overlap with the scratchregs
  768. anymore
  769. Revision 1.52 2003/05/24 16:02:01 jonas
  770. * fixed endian problem with tlocation.value/valueqword fields
  771. Revision 1.51 2003/05/16 16:26:05 jonas
  772. * adapted for Peter's regvar fixes
  773. Revision 1.50 2003/05/15 22:14:43 florian
  774. * fixed last commit, changing lastsaveintreg to r31 caused some strange problems
  775. Revision 1.49 2003/05/15 21:37:00 florian
  776. * sysv entry code saves r13 now as well
  777. Revision 1.48 2003/04/23 12:35:35 florian
  778. * fixed several issues with powerpc
  779. + applied a patch from Jonas for nested function calls (PowerPC only)
  780. * ...
  781. Revision 1.47 2003/04/22 11:27:48 florian
  782. + added first_ and last_imreg
  783. Revision 1.46 2003/03/19 14:26:26 jonas
  784. * fixed R_TOC bugs introduced by new register allocator conversion
  785. Revision 1.45 2003/03/11 21:46:24 jonas
  786. * lots of new regallocator fixes, both in generic and ppc-specific code
  787. (ppc compiler still can't compile the linux system unit though)
  788. Revision 1.44 2003/02/19 22:00:16 daniel
  789. * Code generator converted to new register notation
  790. - Horribily outdated todo.txt removed
  791. Revision 1.43 2003/02/02 19:25:54 carl
  792. * Several bugfixes for m68k target (register alloc., opcode emission)
  793. + VIS target
  794. + Generic add more complete (still not verified)
  795. Revision 1.42 2003/01/16 11:31:28 olle
  796. + added new register constants
  797. + implemented register convertion proc
  798. Revision 1.41 2003/01/13 17:17:50 olle
  799. * changed global var access, TOC now contain pointers to globals
  800. * fixed handling of function pointers
  801. Revision 1.40 2003/01/09 15:49:56 daniel
  802. * Added register conversion
  803. Revision 1.39 2003/01/08 18:43:58 daniel
  804. * Tregister changed into a record
  805. Revision 1.38 2002/11/25 17:43:27 peter
  806. * splitted defbase in defutil,symutil,defcmp
  807. * merged isconvertable and is_equal into compare_defs(_ext)
  808. * made operator search faster by walking the list only once
  809. Revision 1.37 2002/11/24 14:28:56 jonas
  810. + some comments describing the fields of treference
  811. Revision 1.36 2002/11/17 18:26:16 mazen
  812. * fixed a compilation bug accmulator-->FUNCTION_RETURN_REG, in definition of return_result_reg
  813. Revision 1.35 2002/11/17 17:49:09 mazen
  814. + 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
  815. Revision 1.34 2002/09/17 18:54:06 jonas
  816. * a_load_reg_reg() now has two size parameters: source and dest. This
  817. allows some optimizations on architectures that don't encode the
  818. register size in the register name.
  819. Revision 1.33 2002/09/07 17:54:59 florian
  820. * first part of PowerPC fixes
  821. Revision 1.32 2002/09/07 15:25:14 peter
  822. * old logs removed and tabs fixed
  823. Revision 1.31 2002/09/01 21:04:49 florian
  824. * several powerpc related stuff fixed
  825. Revision 1.30 2002/08/18 22:16:15 florian
  826. + the ppc gas assembler writer adds now registers aliases
  827. to the assembler file
  828. Revision 1.29 2002/08/18 21:36:42 florian
  829. + handling of local variables in direct reader implemented
  830. Revision 1.28 2002/08/14 18:41:47 jonas
  831. - remove valuelow/valuehigh fields from tlocation, because they depend
  832. on the endianess of the host operating system -> difficult to get
  833. right. Use lo/hi(location.valueqword) instead (remember to use
  834. valueqword and not value!!)
  835. Revision 1.27 2002/08/13 21:40:58 florian
  836. * more fixes for ppc calling conventions
  837. Revision 1.26 2002/08/12 15:08:44 carl
  838. + stab register indexes for powerpc (moved from gdb to cpubase)
  839. + tprocessor enumeration moved to cpuinfo
  840. + linker in target_info is now a class
  841. * many many updates for m68k (will soon start to compile)
  842. - removed some ifdef or correct them for correct cpu
  843. Revision 1.25 2002/08/10 17:15:06 jonas
  844. * endianess fix
  845. Revision 1.24 2002/08/06 20:55:24 florian
  846. * first part of ppc calling conventions fix
  847. Revision 1.23 2002/08/04 12:57:56 jonas
  848. * more misc. fixes, mostly constant-related
  849. Revision 1.22 2002/07/27 19:57:18 jonas
  850. * some typo corrections in the instruction tables
  851. * renamed the m* registers to v*
  852. Revision 1.21 2002/07/26 12:30:51 jonas
  853. * fixed typo in instruction table (_subco_ -> a_subco)
  854. Revision 1.20 2002/07/25 18:04:10 carl
  855. + FPURESULTREG -> FPU_RESULT_REG
  856. Revision 1.19 2002/07/13 19:38:44 florian
  857. * some more generic calling stuff fixed
  858. Revision 1.18 2002/07/11 14:41:34 florian
  859. * start of the new generic parameter handling
  860. Revision 1.17 2002/07/11 07:35:36 jonas
  861. * some available registers fixes
  862. Revision 1.16 2002/07/09 19:45:01 jonas
  863. * unarynminus and shlshr node fixed for 32bit and smaller ordinals
  864. * small fixes in the assembler writer
  865. * changed scratch registers, because they were used by the linker (r11
  866. and r12) and by the abi under linux (r31)
  867. Revision 1.15 2002/07/07 09:44:31 florian
  868. * powerpc target fixed, very simple units can be compiled
  869. Revision 1.14 2002/05/18 13:34:26 peter
  870. * readded missing revisions
  871. Revision 1.12 2002/05/14 19:35:01 peter
  872. * removed old logs and updated copyright year
  873. Revision 1.11 2002/05/14 17:28:10 peter
  874. * synchronized cpubase between powerpc and i386
  875. * moved more tables from cpubase to cpuasm
  876. * tai_align_abstract moved to tainst, cpuasm must define
  877. the tai_align class now, which may be empty
  878. }