cpubase.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. {******************************************************************************
  2. $Id$
  3. Copyright (c) 1998-2000 by Florian Klaempfl and Peter Vreman
  4. Contains the base types for the Scalable Processor ARChitecture (SPARC)
  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. UNIT cpuBase;
  18. {$INCLUDE fpcdefs.inc}
  19. INTERFACE
  20. USES globals,cutils,cclasses,aasmbase,cpuinfo,cginfo;
  21. CONST
  22. {Size of the instruction table converted by nasmconv.pas}
  23. maxinfolen=8;
  24. {Defines the default address size for a processor}
  25. OS_ADDR=OS_32;
  26. {the natural int size for a processor}
  27. OS_INT=OS_32;
  28. {the maximum float size for a processor}
  29. OS_FLOAT=OS_F64;
  30. {the size of a vector register for a processor}
  31. OS_VECTOR=OS_M64;{$WARNING "OS_VECTOR" was set to "OS_M64" but not verified!}
  32. CONST
  33. {Operand types}
  34. OT_NONE = $00000000;
  35. OT_BITS8 = $00000001; { size, and other attributes, of the operand }
  36. OT_BITS16 = $00000002;
  37. OT_BITS32 = $00000004;
  38. OT_BITS64 = $00000008; { FPU only }
  39. OT_BITS80 = $00000010;
  40. OT_FAR = $00000020; { this means 16:16 or 16:32, like in CALL/JMP }
  41. OT_NEAR = $00000040;
  42. OT_SHORT = $00000080;
  43. OT_SIZE_MASK = $000000FF; { all the size attributes }
  44. OT_NON_SIZE = LongInt(not OT_SIZE_MASK);
  45. OT_SIGNED = $00000100; { the operand need to be signed -128-127 }
  46. OT_TO = $00000200; { operand is followed by a colon }
  47. { reverse effect in FADD, FSUB &c }
  48. OT_COLON = $00000400;
  49. OT_REGISTER = $00001000;
  50. OT_IMMEDIATE = $00002000;
  51. OT_IMM8 = $00002001;
  52. OT_IMM16 = $00002002;
  53. OT_IMM32 = $00002004;
  54. OT_IMM64 = $00002008;
  55. OT_IMM80 = $00002010;
  56. OT_REGMEM = $00200000; { for r/m, ie EA, operands }
  57. OT_REGNORM = $00201000; { 'normal' reg, qualifies as EA }
  58. OT_REG8 = $00201001;
  59. OT_REG16 = $00201002;
  60. OT_REG32 = $00201004;
  61. OT_MMXREG = $00201008; { MMX registers }
  62. OT_XMMREG = $00201010; { Katmai registers }
  63. OT_MEMORY = $00204000; { register number in 'basereg' }
  64. OT_MEM8 = $00204001;
  65. OT_MEM16 = $00204002;
  66. OT_MEM32 = $00204004;
  67. OT_MEM64 = $00204008;
  68. OT_MEM80 = $00204010;
  69. OT_FPUREG = $01000000; { floating point stack registers }
  70. OT_FPU0 = $01000800; { FPU stack register zero }
  71. OT_REG_SMASK = $00070000; { special register operands: these may be treated differently }
  72. { a mask for the following }
  73. OT_REG_ACCUM = $00211000; { accumulator: AL, AX or EAX }
  74. OT_REG_AL = $00211001; { REG_ACCUM | BITSxx }
  75. OT_REG_AX = $00211002; { ditto }
  76. OT_REG_EAX = $00211004; { and again }
  77. OT_REG_COUNT = $00221000; { counter: CL, CX or ECX }
  78. OT_REG_CL = $00221001; { REG_COUNT | BITSxx }
  79. OT_REG_CX = $00221002; { ditto }
  80. OT_REG_ECX = $00221004; { another one }
  81. OT_REG_DX = $00241002;
  82. OT_REG_SREG = $00081002; { any segment register }
  83. OT_REG_CS = $01081002; { CS }
  84. OT_REG_DESS = $02081002; { DS, ES, SS (non-CS 86 registers) }
  85. OT_REG_FSGS = $04081002; { FS, GS (386 extENDed registers) }
  86. OT_REG_CDT = $00101004; { CRn, DRn and TRn }
  87. OT_REG_CREG = $08101004; { CRn }
  88. OT_REG_CR4 = $08101404; { CR4 (Pentium only) }
  89. OT_REG_DREG = $10101004; { DRn }
  90. OT_REG_TREG = $20101004; { TRn }
  91. OT_MEM_OFFS = $00604000; { special type of EA }
  92. { simple [address] offset }
  93. OT_ONENESS = $00800000; { special type of immediate operand }
  94. { so UNITY == IMMEDIATE | ONENESS }
  95. OT_UNITY = $00802000; { for shift/rotate instructions }
  96. {Instruction flags }
  97. IF_NONE = $00000000;
  98. IF_SM = $00000001; { size match first two operands }
  99. IF_SM2 = $00000002;
  100. IF_SB = $00000004; { unsized operands can't be non-byte }
  101. IF_SW = $00000008; { unsized operands can't be non-word }
  102. IF_SD = $00000010; { unsized operands can't be nondword }
  103. IF_AR0 = $00000020; { SB, SW, SD applies to argument 0 }
  104. IF_AR1 = $00000040; { SB, SW, SD applies to argument 1 }
  105. IF_AR2 = $00000060; { SB, SW, SD applies to argument 2 }
  106. IF_ARMASK = $00000060; { mask for unsized argument spec }
  107. IF_PRIV = $00000100; { it's a privileged instruction }
  108. IF_SMM = $00000200; { it's only valid in SMM }
  109. IF_PROT = $00000400; { it's protected mode only }
  110. IF_UNDOC = $00001000; { it's an undocumented instruction }
  111. IF_FPU = $00002000; { it's an FPU instruction }
  112. IF_MMX = $00004000; { it's an MMX instruction }
  113. IF_3DNOW = $00008000; { it's a 3DNow! instruction }
  114. IF_SSE = $00010000; { it's a SSE (KNI, MMX2) instruction }
  115. IF_PMASK = LongInt($FF000000); { the mask for processor types }
  116. IF_PFMASK = LongInt($F001FF00); { the mask for disassembly "prefer" }
  117. IF_V7 = $00000000; { SPARC V7 instruction only (not supported)}
  118. IF_V8 = $01000000; { SPARC V8 instruction (the default)}
  119. IF_V9 = $02000000; { SPARC V9 instruction (not yet supported)}
  120. { added flags }
  121. IF_PRE = $40000000; { it's a prefix instruction }
  122. IF_PASS2 = LongInt($80000000);{instruction can change in a second pass?}
  123. TYPE
  124. {$WARNING CPU32 opcodes do not fully include the Ultra SPRAC instruction set.}
  125. { don't change the order of these opcodes! }
  126. TAsmOp=({$INCLUDE opcode.inc});
  127. op2strtable=ARRAY[TAsmOp]OF STRING[11];
  128. CONST
  129. FirstOp=Low(TAsmOp);
  130. LastOp=High(TAsmOp);
  131. std_op2str:op2strtable=({$INCLUDE strinst.inc});
  132. {*****************************************************************************
  133. Operand Sizes
  134. *****************************************************************************}
  135. TYPE
  136. { S_NO = No Size of operand }
  137. { S_B = Byte size operand }
  138. { S_W = Word size operand }
  139. { S_L = DWord size operand }
  140. { USED FOR conversions in x86}
  141. { S_BW = Byte to word }
  142. { S_BL = Byte to long }
  143. { S_WL = Word to long }
  144. { Floating point types }
  145. { S_FS = single type (32 bit) }
  146. { S_FL = double/64bit integer }
  147. { S_FX = ExtENDed type }
  148. { S_IS = integer on 16 bits }
  149. { S_IL = integer on 32 bits }
  150. { S_IQ = integer on 64 bits }
  151. TOpSize=(S_NO,
  152. S_B,
  153. S_W,
  154. S_L,
  155. S_BW,
  156. S_BL,
  157. S_WL,
  158. S_IS,
  159. S_IL,
  160. S_IQ,
  161. S_FS,
  162. S_FL,
  163. S_FX,
  164. S_D,
  165. S_Q,
  166. S_FV,
  167. S_NEAR,
  168. S_FAR,
  169. S_SHORT);
  170. {*****************************************************************************}
  171. { Conditions }
  172. {*****************************************************************************}
  173. TYPE
  174. TAsmCond=(C_None,
  175. C_A,C_AE,C_B,C_BE,C_C,C_E,C_G,C_GE,C_L,C_LE,C_NA,C_NAE,
  176. C_NB,C_NBE,C_NC,C_NE,C_NG,C_NGE,C_NL,C_NLE,C_NO,C_NP,
  177. C_NS,C_NZ,C_O,C_P,C_PE,C_PO,C_S,C_Z
  178. );
  179. CONST
  180. cond2str:ARRAY[TAsmCond] of string[3]=('',
  181. 'a','ae','b','be','c','e','g','ge','l','le','na','nae',
  182. 'nb','nbe','nc','ne','ng','nge','nl','nle','no','np',
  183. 'ns','nz','o','p','pe','po','s','z'
  184. );
  185. inverse_cond:ARRAY[TAsmCond] of TAsmCond=(C_None,
  186. C_NA,C_NAE,C_NB,C_NBE,C_NC,C_NE,C_NG,C_NGE,C_NL,C_NLE,C_A,C_AE,
  187. C_B,C_BE,C_C,C_E,C_G,C_GE,C_L,C_LE,C_O,C_P,
  188. C_S,C_Z,C_NO,C_NP,C_NP,C_P,C_NS,C_NZ
  189. );
  190. CONST
  191. CondAsmOps=3;
  192. CondAsmOp:ARRAY[0..CondAsmOps-1] of TAsmOp=(A_FCMPd, A_JMPL, A_FCMPs);
  193. CondAsmOpStr:ARRAY[0..CondAsmOps-1] of string[4]=('FCMPd','JMPL','FCMPs');
  194. {*****************************************************************************}
  195. { Registers }
  196. {*****************************************************************************}
  197. TYPE
  198. { enumeration for registers, don't change the order }
  199. { it's used by the register size conversions }
  200. TRegister=({$INCLUDE registers.inc});
  201. TRegister64=PACKED RECORD
  202. {A type to store register locations for 64 Bit values.}
  203. RegLo,RegHi:TRegister;
  204. END;
  205. treg64=tregister64;{alias for compact code}
  206. TRegisterSet=SET OF TRegister;
  207. reg2strtable=ARRAY[tregister] OF STRING[6];
  208. CONST
  209. R_NO=R_NONE;
  210. firstreg = low(tregister);
  211. lastreg = high(tregister);
  212. std_reg2str:reg2strtable=({$INCLUDE strregs.inc});
  213. {*****************************************************************************
  214. Flags
  215. *****************************************************************************}
  216. TYPE
  217. TResFlags=(
  218. F_E, {Equal}
  219. F_NE, {Not Equal}
  220. F_G, {Greater}
  221. F_L, {Less}
  222. F_GE, {Greater or Equal}
  223. F_LE, {Less or Equal}
  224. F_C, {Carry}
  225. F_NC, {Not Carry}
  226. F_A, {Above}
  227. F_AE, {Above or Equal}
  228. F_B, {Below}
  229. F_BE {Below or Equal}
  230. );
  231. {*****************************************************************************
  232. Reference
  233. *****************************************************************************}
  234. TYPE
  235. trefoptions=(ref_none,ref_parafixup,ref_localfixup,ref_selffixup);
  236. { immediate/reference record }
  237. poperreference = ^treference;
  238. treference = packed record
  239. segment,
  240. base,
  241. index : tregister;
  242. scalefactor : byte;
  243. offset : LongInt;
  244. symbol : tasmsymbol;
  245. offsetfixup : LongInt;
  246. options : trefoptions;
  247. alignment : byte;
  248. END;
  249. { reference record }
  250. PParaReference=^TParaReference;
  251. TParaReference=PACKED RECORD
  252. Index:TRegister;
  253. Offset:longint;
  254. END;
  255. {*****************************************************************************
  256. Operands
  257. *****************************************************************************}
  258. { Types of operand }
  259. toptype=(top_none,top_reg,top_ref,top_const,top_symbol,top_raddr,top_caddr);
  260. toper=record
  261. ot:LongInt;
  262. case typ:toptype of
  263. top_none:();
  264. top_reg:(reg:tregister);
  265. top_ref:(ref:poperreference);
  266. top_const:(val:aword);
  267. top_symbol:(sym:tasmsymbol;symofs:LongInt);
  268. top_raddr:(reg1,reg2:TRegister);
  269. top_caddr:(regb:TRegister;const13:Integer);
  270. end;
  271. {*****************************************************************************
  272. Argument Classification
  273. *****************************************************************************}
  274. TYPE
  275. TArgClass = (
  276. { the following classes should be defined by all processor implemnations }
  277. AC_NOCLASS,
  278. AC_MEMORY,
  279. AC_INTEGER,
  280. AC_FPU,
  281. { the following argument classes are i386 specific }
  282. AC_FPUUP,
  283. AC_SSE,
  284. AC_SSEUP);
  285. {*****************************************************************************
  286. Generic Location
  287. *****************************************************************************}
  288. TYPE
  289. TLoc=( {information about the location of an operand}
  290. LOC_INVALID, { added for tracking problems}
  291. LOC_CONSTANT, { CONSTant value }
  292. LOC_JUMP, { boolean results only, jump to false or true label }
  293. LOC_FLAGS, { boolean results only, flags are set }
  294. LOC_CREFERENCE, { in memory CONSTant value }
  295. LOC_REFERENCE, { in memory value }
  296. LOC_REGISTER, { in a processor register }
  297. LOC_CREGISTER, { Constant register which shouldn't be modified }
  298. LOC_FPUREGISTER, { FPU stack }
  299. LOC_CFPUREGISTER, { if it is a FPU register variable on the fpu stack }
  300. LOC_MMXREGISTER, { MMX register }
  301. LOC_CMMXREGISTER, { MMX register variable }
  302. LOC_MMREGISTER,
  303. LOC_CMMREGISTER
  304. );
  305. {tparamlocation describes where a parameter for a procedure is stored.
  306. References are given from the caller's point of view. The usual TLocation isn't
  307. used, because contains a lot of unnessary fields.}
  308. TParaLocation=PACKED RECORD
  309. Size:TCGSize;
  310. Loc:TLoc;
  311. sp_fixup:LongInt;
  312. CASE TLoc OF
  313. LOC_REFERENCE:(reference:tparareference);
  314. { segment in reference at the same place as in loc_register }
  315. LOC_REGISTER,LOC_CREGISTER : (
  316. CASE LongInt OF
  317. 1 : (register,registerhigh : tregister);
  318. { overlay a registerlow }
  319. 2 : (registerlow : tregister);
  320. { overlay a 64 Bit register type }
  321. 3 : (reg64 : tregister64);
  322. 4 : (register64 : tregister64);
  323. );
  324. { it's only for better handling }
  325. LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
  326. END;
  327. TLocation=PACKED RECORD
  328. loc : TLoc;
  329. size : TCGSize;
  330. case TLoc of
  331. LOC_FLAGS : (resflags : tresflags);
  332. LOC_CONSTANT : (
  333. case longint of
  334. 1 : (value : AWord);
  335. 2 : (valuelow, valuehigh:AWord);
  336. { overlay a complete 64 Bit value }
  337. 3 : (valueqword : qword);
  338. );
  339. LOC_CREFERENCE,
  340. LOC_REFERENCE : (reference : treference);
  341. { segment in reference at the same place as in loc_register }
  342. LOC_REGISTER,LOC_CREGISTER : (
  343. case longint of
  344. 1 : (register,registerhigh,segment : tregister);
  345. { overlay a registerlow }
  346. 2 : (registerlow : tregister);
  347. { overlay a 64 Bit register type }
  348. 3 : (reg64 : tregister64);
  349. 4 : (register64 : tregister64);
  350. );
  351. { it's only for better handling }
  352. LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
  353. end;
  354. {*****************************************************************************
  355. Constants
  356. *****************************************************************************}
  357. CONST
  358. general_registers = [R_L0..R_L7];
  359. { legEND: }
  360. { xxxregs = set of all possibly used registers of that type in the code }
  361. { generator }
  362. { usableregsxxx = set of all 32bit components of registers that can be }
  363. { possible allocated to a regvar or using getregisterxxx (this }
  364. { excludes registers which can be only used for parameter }
  365. { passing on ABI's that define this) }
  366. { c_countusableregsxxx = amount of registers in the usableregsxxx set }
  367. IntRegs=[R_G0..R_I7];
  368. usableregsint=general_registers;
  369. c_countusableregsint = 4;
  370. fpuregs=[R_F0..R_F31];
  371. usableregsfpu=[];
  372. c_countusableregsfpu=0;
  373. mmregs=[];
  374. usableregsmm=[];
  375. c_countusableregsmm=8;
  376. firstsaveintreg = R_G0;
  377. lastsaveintreg = R_I7;
  378. firstsavefpureg = R_F0;
  379. lastsavefpureg = R_F31;
  380. firstsavemmreg = R_G0;
  381. lastsavemmreg = R_I7;
  382. lowsavereg = R_G0;
  383. highsavereg = R_I7;
  384. ALL_REGISTERS = [lowsavereg..highsavereg];
  385. lvaluelocations = [LOC_REFERENCE,LOC_CFPUREGISTER,
  386. LOC_CREGISTER,LOC_MMXREGISTER,LOC_CMMXREGISTER];
  387. {
  388. registers_saved_on_cdecl = [R_ESI,R_EDI,R_EBX];}
  389. {*****************************************************************************
  390. GDB Information
  391. *****************************************************************************}
  392. {# Register indexes for stabs information, when some
  393. parameters or variables are stored in registers.
  394. Taken from rs6000.h (DBX_REGISTER_NUMBER)
  395. from GCC 3.x source code. PowerPC has 1:1 mapping
  396. according to the order of the registers defined
  397. in GCC
  398. }
  399. stab_regindex:ARRAY[tregister]OF ShortInt=({$INCLUDE stabregi.inc});
  400. {*************************** generic register names **************************}
  401. stack_pointer_reg = R_O6;
  402. frame_pointer_reg = R_I6;
  403. {the return_result_reg, is used inside the called function to store its return
  404. value when that is a scalar value otherwise a pointer to the address of the
  405. result is placed inside it}
  406. return_result_reg = R_I0;
  407. {the function_result_reg contains the function result after a call to a scalar
  408. function othewise it contains a pointer to the returned result}
  409. function_result_reg = R_O0;
  410. self_pointer_reg =R_G5;
  411. {There is no accumulator in the SPARC architecture. There are just families of
  412. registers. All registers belonging to the same family are identical except in
  413. the "global registers" family where GO is different from the others : G0 gives
  414. always 0 when it is red and thows away any value written to it.Nevertheless,
  415. scalar routine results are returned onto R_O0.}
  416. accumulator = R_O0;
  417. accumulatorhigh = R_O1;
  418. fpu_result_reg =R_F0;
  419. mmresultreg =R_G0;
  420. {*****************************************************************************}
  421. { GCC /ABI linking information }
  422. {*****************************************************************************}
  423. {# Registers which must be saved when calling a routine declared as cppdecl,
  424. cdecl, stdcall, safecall, palmossyscall. The registers saved should be the ones
  425. as defined in the target ABI and / or GCC.
  426. This value can be deduced from the CALLED_USED_REGISTERS array in the GCC
  427. source.}
  428. std_saved_registers=[R_O6];
  429. {# Required parameter alignment when calling a routine declared as stdcall and
  430. cdecl. The alignment value should be the one defined by GCC or the target ABI.
  431. The value of this constant is equal to the constant
  432. PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.}
  433. std_param_align=4;
  434. {# Registers which are defined as scratch and no need to save across routine
  435. calls or in assembler blocks.}
  436. ScratchRegsCount=3;
  437. scratch_regs:ARRAY[1..ScratchRegsCount]OF TRegister=(R_O4,R_O5,R_I7);
  438. {$WARNING FIXME : Scratch registers list has to be verified}
  439. { low and high of the available maximum width integer general purpose }
  440. { registers }
  441. LoGPReg = R_G0;
  442. HiGPReg = R_I7;
  443. { low and high of every possible width general purpose register (same as }
  444. { above on most architctures apart from the 80x86) }
  445. LoReg = R_G0;
  446. HiReg = R_I7;
  447. cpuflags = [];
  448. { sizes }
  449. pointersize = 4;
  450. extENDed_size = 8;{SPARC architecture uses IEEE floating point numbers}
  451. mmreg_size = 8;
  452. sizepostfix_pointer = S_L;
  453. {*****************************************************************************
  454. Instruction table
  455. *****************************************************************************}
  456. {$ifndef NOAG386BIN}
  457. TYPE
  458. tinsentry=packed record
  459. opcode : tasmop;
  460. ops : byte;
  461. optypes : ARRAY[0..2] of LongInt;
  462. code : ARRAY[0..maxinfolen] of char;
  463. flags : LongInt;
  464. END;
  465. pinsentry=^tinsentry;
  466. TInsTabCache=ARRAY[TasmOp] of LongInt;
  467. PInsTabCache=^TInsTabCache;
  468. VAR
  469. InsTabCache : PInsTabCache;
  470. {$ENDif NOAG386BIN}
  471. {*****************************************************************************
  472. Helpers
  473. *****************************************************************************}
  474. const
  475. maxvarregs=30;
  476. VarRegs:ARRAY[1..maxvarregs]OF TRegister=(
  477. R_G0,R_G1,R_G2,R_G3,R_G4,R_G5,R_G6,R_G7,
  478. R_O0,R_O1,R_O2,R_O3,R_O4,R_O5,{R_R14=R_SP}R_O7,
  479. R_L0,R_L1,R_L2,R_L3,R_L4,R_L5,R_L6,R_L7,
  480. R_I0,R_I1,R_I2,R_I3,R_I4,R_I5,{R_R30=R_FP}R_I7
  481. );
  482. maxfpuvarregs = 8;
  483. max_operands = 3;
  484. maxintregs = maxvarregs;
  485. maxfpuregs = maxfpuvarregs;
  486. FUNCTION is_calljmp(o:tasmop):boolean;
  487. FUNCTION flags_to_cond(CONST f:TResFlags):TAsmCond;
  488. IMPLEMENTATION
  489. const
  490. CallJmpOp=[A_JMPL..A_CBccc];
  491. function is_calljmp(o:tasmop):boolean;
  492. begin
  493. if o in CallJmpOp
  494. then
  495. is_calljmp:=true
  496. else
  497. is_calljmp:=false;
  498. end;
  499. function flags_to_cond(const f:TResFlags):TAsmCond;
  500. CONST
  501. flags_2_cond:ARRAY[TResFlags]OF TAsmCond=
  502. (C_E,C_NE,C_G,C_L,C_GE,C_LE,C_C,C_NC,C_A,C_AE,C_B,C_BE);
  503. BEGIN
  504. result:=flags_2_cond[f];
  505. END;
  506. END.
  507. {
  508. $Log$
  509. Revision 1.14 2002-10-20 19:01:38 mazen
  510. + op_raddr_reg and op_caddr_reg added to fix functions prologue
  511. Revision 1.13 2002/10/19 20:35:07 mazen
  512. * carl's patch applied
  513. Revision 1.12 2002/10/11 13:35:14 mazen
  514. *** empty log message ***
  515. Revision 1.11 2002/10/10 19:57:51 mazen
  516. * Just to update repsitory
  517. Revision 1.10 2002/10/02 22:20:28 mazen
  518. + out registers allocator for the first 6 scalar parameters which must be passed into %o0..%o5
  519. Revision 1.9 2002/10/01 21:06:29 mazen
  520. attinst.inc --> strinst.inc
  521. Revision 1.8 2002/09/30 19:12:14 mazen
  522. * function prologue fixed
  523. Revision 1.7 2002/09/27 04:30:53 mazen
  524. * cleanup made
  525. Revision 1.6 2002/09/24 03:57:53 mazen
  526. * some cleanup was made
  527. }