cpubase.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  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. { warning: CPU32 opcodes are not fully compatible with the MC68020. }
  30. { 68000 only opcodes }
  31. tasmop = (a_abcd,
  32. a_add,a_adda,a_addi,a_addq,a_addx,a_and,a_andi,
  33. a_asl,a_asr,a_bcc,a_bcs,a_beq,a_bge,a_bgt,a_bhi,
  34. a_ble,a_bls,a_blt,a_bmi,a_bne,a_bpl,a_bvc,a_bvs,
  35. a_bchg,a_bclr,a_bra,a_bset,a_bsr,a_btst,a_chk,
  36. a_clr,a_cmp,a_cmpa,a_cmpi,a_cmpm,a_dbcc,a_dbcs,a_dbeq,a_dbge,
  37. a_dbgt,a_dbhi,a_dble,a_dbls,a_dblt,a_dbmi,a_dbne,a_dbra,
  38. a_dbpl,a_dbt,a_dbvc,a_dbvs,a_dbf,a_divs,a_divu,
  39. a_eor,a_eori,a_exg,a_illegal,a_ext,a_jmp,a_jsr,
  40. a_lea,a_link,a_lsl,a_lsr,a_move,a_movea,a_movei,a_moveq,
  41. a_movem,a_movep,a_muls,a_mulu,a_nbcd,a_neg,a_negx,
  42. a_nop,a_not,a_or,a_ori,a_pea,a_rol,a_ror,a_roxl,
  43. a_roxr,a_rtr,a_rts,a_sbcd,a_scc,a_scs,a_seq,a_sge,
  44. a_sgt,a_shi,a_sle,a_sls,a_slt,a_smi,a_sne,
  45. a_spl,a_st,a_svc,a_svs,a_sf,a_sub,a_suba,a_subi,a_subq,
  46. a_subx,a_swap,a_tas,a_trap,a_trapv,a_tst,a_unlk,
  47. a_rte,a_reset,a_stop,
  48. { mc68010 instructions }
  49. a_bkpt,a_movec,a_moves,a_rtd,
  50. { mc68020 instructions }
  51. a_bfchg,a_bfclr,a_bfexts,a_bfextu,a_bfffo,
  52. a_bfins,a_bfset,a_bftst,a_callm,a_cas,a_cas2,
  53. a_chk2,a_cmp2,a_divsl,a_divul,a_extb,a_pack,a_rtm,
  54. a_trapcc,a_tracs,a_trapeq,a_trapf,a_trapge,a_trapgt,
  55. a_traphi,a_traple,a_trapls,a_traplt,a_trapmi,a_trapne,
  56. a_trappl,a_trapt,a_trapvc,a_trapvs,a_unpk,
  57. { fpu processor instructions - directly supported only. }
  58. { ieee aware and misc. condition codes not supported }
  59. a_fabs,a_fadd,
  60. a_fbeq,a_fbne,a_fbngt,a_fbgt,a_fbge,a_fbnge,
  61. a_fblt,a_fbnlt,a_fble,a_fbgl,a_fbngl,a_fbgle,a_fbngle,
  62. a_fdbeq,a_fdbne,a_fdbgt,a_fdbngt,a_fdbge,a_fdbnge,
  63. a_fdblt,a_fdbnlt,a_fdble,a_fdbgl,a_fdbngl,a_fdbgle,a_fbdngle,
  64. a_fseq,a_fsne,a_fsgt,a_fsngt,a_fsge,a_fsnge,
  65. a_fslt,a_fsnlt,a_fsle,a_fsgl,a_fsngl,a_fsgle,a_fsngle,
  66. a_fcmp,a_fdiv,a_fmove,a_fmovem,
  67. a_fmul,a_fneg,a_fnop,a_fsqrt,a_fsub,a_fsgldiv,
  68. a_fsflmul,a_ftst,
  69. a_ftrapeq,a_ftrapne,a_ftrapgt,a_ftrapngt,a_ftrapge,a_ftrapnge,
  70. a_ftraplt,a_ftrapnlt,a_ftraple,a_ftrapgl,a_ftrapngl,a_ftrapgle,a_ftrapngle,
  71. { protected instructions }
  72. a_cprestore,a_cpsave,
  73. { fpu unit protected instructions }
  74. { and 68030/68851 common mmu instructions }
  75. { (this may include 68040 mmu instructions) }
  76. a_frestore,a_fsave,a_pflush,a_pflusha,a_pload,a_pmove,a_ptest,
  77. { useful for assembly langage output }
  78. a_label,a_none);
  79. {# This should define the array of instructions as string }
  80. op2strtable=array[tasmop] of string[8];
  81. Const
  82. {# First value of opcode enumeration }
  83. firstop = low(tasmop);
  84. {# Last value of opcode enumeration }
  85. lastop = high(tasmop);
  86. {*****************************************************************************
  87. Registers
  88. *****************************************************************************}
  89. type
  90. tregister = (
  91. R_NO,R_D0,R_D1,R_D2,R_D3,R_D4,R_D5,R_D6,R_D7,
  92. R_A0,R_A1,R_A2,R_A3,R_A4,R_A5,R_A6,R_SP,
  93. { PUSH/PULL- quick and dirty hack }
  94. R_SPPUSH,R_SPPULL,
  95. { misc. }
  96. R_CCR,R_FP0,R_FP1,R_FP2,R_FP3,R_FP4,R_FP5,R_FP6,
  97. R_FP7,R_FPCR,R_SR,R_SSP,R_DFC,R_SFC,R_VBR,R_FPSR,
  98. { other - not used in reg2str }
  99. R_DEFAULT_SEG);
  100. {# Set type definition for registers }
  101. tregisterset = set of tregister;
  102. { A type to store register locations for 64 Bit values. }
  103. tregister64 = packed record
  104. reglo,reghi : tregister;
  105. end;
  106. { alias for compact code }
  107. treg64 = tregister64;
  108. {# Type definition for the array of string of register nnames }
  109. reg2strtable = array[tregister] of string[5];
  110. Const
  111. {# First register in the tregister enumeration }
  112. firstreg = low(tregister);
  113. {# Last register in the tregister enumeration }
  114. lastreg = high(tregister);
  115. (*
  116. gas_reg2str : reg2strtable =
  117. ('', '%d0','%d1','%d2','%d3','%d4','%d5','%d6','%d7',
  118. '%a0','%a1','%a2','%a3','%a4','%a5','%a6','%sp',
  119. '-(%sp)','(%sp)+',
  120. '%ccr','%fp0','%fp1','%fp2','%fp3','%fp4','%fp5',
  121. '%fp6','%fp7','%fpcr','%sr','%ssp','%dfc',
  122. '%sfc','%vbr','%fpsr');
  123. *)
  124. std_reg2str : reg2strtable =
  125. ('', 'd0','d1','d2','d3','d4','d5','d6','d7',
  126. 'a0','a1','a2','a3','a4','a5','a6','sp',
  127. '-(sp)','(sp)+',
  128. 'ccr','fp0','fp1','fp2','fp3','fp4','fp5',
  129. 'fp6','fp7','fpcr','sr','ssp','dfc',
  130. 'sfc','vbr','fpsr');
  131. mit_reg2str : reg2strtable =
  132. ('', 'd0','d1','d2','d3','d4','d5','d6','d7',
  133. 'a0','a1','a2','a3','a4','a5','a6','sp',
  134. 'sp@-','sp@+',
  135. 'ccr','fp0','fp1','fp2','fp3','fp4','fp5',
  136. 'fp6','fp7','fpcr','sr','ssp','dfc',
  137. 'sfc','vbr','fpsr');
  138. {*****************************************************************************
  139. Conditions
  140. *****************************************************************************}
  141. type
  142. TAsmCondFlag = (C_None { unconditional jumps },
  143. { conditions when not using ctr decrement etc }
  144. C_LT,C_LE,C_EQ,C_GE,C_GT,C_NL,C_NE,C_NG,C_SO,C_NS,C_UN,C_NU,
  145. { conditions when using ctr decrement etc }
  146. C_T,C_F,C_DNZ,C_DNZT,C_DNZF,C_DZ,C_DZT,C_DZF);
  147. const
  148. { these are in the XER, but when moved to CR_x they correspond with the }
  149. { bits below (still needs to be verified!!!) }
  150. C_OV = C_EQ;
  151. C_CA = C_GT;
  152. type
  153. TAsmCond = packed record
  154. case simple: boolean of
  155. false: (BO, BI: byte);
  156. true: (
  157. cond: TAsmCondFlag;
  158. case byte of
  159. 0: ();
  160. { specifies in which part of the cr the bit has to be }
  161. { tested for blt,bgt,beq,..,bnu }
  162. 1: (cr: R_CR0..R_CR7);
  163. { specifies the bit to test for bt,bf,bdz,..,bdzf }
  164. 2: (crbit: byte)
  165. );
  166. end;
  167. const
  168. AsmCondFlag2BO: Array[C_T..C_DZF] of Byte =
  169. (12,4,16,8,0,18,10,2);
  170. AsmCondFlag2BI: Array[C_LT..C_NU] of Byte =
  171. (0,1,2,0,1,0,2,1,3,3,3,3);
  172. AsmCondFlagTF: Array[TAsmCondFlag] of Boolean =
  173. (false,true,false,true,false,true,false,false,false,true,false,true,false,
  174. true,false,false,true,false,false,true,false);
  175. AsmCondFlag2Str: Array[TAsmCondFlag] of string[4] = ({cf_none}'',
  176. { conditions when not using ctr decrement etc}
  177. 'lt','le','eq','ge','gt','nl','ne','ng','so','ns','un','nu',
  178. 't','f','dnz','dzt','dnzf','dz','dzt','dzf');
  179. const
  180. CondAsmOps=3;
  181. CondAsmOp:array[0..CondAsmOps-1] of TasmOp=(
  182. A_BC, A_TW, A_TWI
  183. );
  184. {*****************************************************************************
  185. Flags
  186. *****************************************************************************}
  187. type
  188. TResFlagsEnum = (F_EQ,F_NE,F_LT,F_LE,F_GT,F_GE,F_SO,F_FX,F_FEX,F_VX,F_OX);
  189. TResFlags = record
  190. cr: R_CR0..R_CR7;
  191. flag: TResFlagsEnum;
  192. end;
  193. (*
  194. const
  195. { arrays for boolean location conversions }
  196. flag_2_cond : array[TResFlags] of TAsmCond =
  197. (C_E,C_NE,C_LT,C_LE,C_GT,C_GE,???????????????);
  198. *)
  199. {*****************************************************************************
  200. Reference
  201. *****************************************************************************}
  202. type
  203. trefoptions=(ref_none,ref_parafixup,ref_localfixup,ref_selffixup);
  204. { direction of address register : }
  205. { (An) (An)+ -(An) }
  206. tdirection = (dir_none,dir_inc,dir_dec);
  207. { reference record }
  208. preference = ^treference;
  209. treference = packed record
  210. segment,
  211. base,
  212. index : tregister;
  213. scalefactor : byte;
  214. offset : longint;
  215. symbol : tasmsymbol;
  216. offsetfixup : longint;
  217. options : trefoptions;
  218. { indexed increment and decrement mode }
  219. { (An)+ and -(An) }
  220. direction : tdirection;
  221. end;
  222. { reference record }
  223. pparareference = ^tparareference;
  224. tparareference = packed record
  225. index : tregister;
  226. offset : aword;
  227. end;
  228. {*****************************************************************************
  229. Operands
  230. *****************************************************************************}
  231. { Types of operand }
  232. toptype=(top_none,top_reg,top_ref,top_const,top_symbol);
  233. toper=record
  234. ot : longint;
  235. case typ : toptype of
  236. top_none : ();
  237. top_reg : (reg:tregister);
  238. top_ref : (ref:preference);
  239. top_const : (val:aword);
  240. top_symbol : (sym:tasmsymbol;symofs:longint);
  241. end;
  242. {*****************************************************************************
  243. Generic Location
  244. *****************************************************************************}
  245. type
  246. TLoc=(
  247. LOC_INVALID, { added for tracking problems}
  248. LOC_CONSTANT, { constant value }
  249. LOC_JUMP, { boolean results only, jump to false or true label }
  250. LOC_FLAGS, { boolean results only, flags are set }
  251. LOC_CREFERENCE, { in memory constant value reference (cannot change) }
  252. LOC_REFERENCE, { in memory value }
  253. LOC_REGISTER, { in a processor register }
  254. LOC_CREGISTER, { Constant register which shouldn't be modified }
  255. LOC_FPUREGISTER, { FPU stack }
  256. LOC_CFPUREGISTER, { if it is a FPU register variable on the fpu stack }
  257. LOC_MMXREGISTER, { MMX register }
  258. LOC_CMMXREGISTER, { MMX register variable }
  259. );
  260. { tparamlocation describes where a parameter for a procedure is stored.
  261. References are given from the caller's point of view. The usual
  262. TLocation isn't used, because contains a lot of unnessary fields.
  263. }
  264. tparalocation = packed record
  265. loc : TLoc;
  266. sp_fixup : longint;
  267. case TLoc of
  268. LOC_REFERENCE : (reference : tparareference);
  269. { segment in reference at the same place as in loc_register }
  270. LOC_REGISTER,LOC_CREGISTER : (
  271. case longint of
  272. 1 : (register,registerhigh : tregister);
  273. { overlay a registerlow }
  274. 2 : (registerlow : tregister);
  275. { overlay a 64 Bit register type }
  276. 3 : (reg64 : tregister64);
  277. 4 : (register64 : tregister64);
  278. );
  279. { it's only for better handling }
  280. LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
  281. end;
  282. tlocation = packed record
  283. loc : TLoc;
  284. size : TCGSize;
  285. case TLoc of
  286. LOC_FLAGS : (resflags : tresflags);
  287. LOC_CONSTANT : (
  288. case longint of
  289. 1 : (value : AWord);
  290. 2 : (valuelow, valuehigh:AWord);
  291. { overlay a complete 64 Bit value }
  292. 3 : (valueqword : qword);
  293. );
  294. LOC_CREFERENCE,
  295. LOC_REFERENCE : (reference : treference);
  296. { segment in reference at the same place as in loc_register }
  297. LOC_REGISTER,LOC_CREGISTER : (
  298. case longint of
  299. 1 : (register,registerhigh,segment : tregister);
  300. { overlay a registerlow }
  301. 2 : (registerlow : tregister);
  302. { overlay a 64 Bit register type }
  303. 3 : (reg64 : tregister64);
  304. 4 : (register64 : tregister64);
  305. );
  306. { it's only for better handling }
  307. LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
  308. end;
  309. {*****************************************************************************
  310. Operand
  311. *****************************************************************************}
  312. type
  313. toptype=(top_none,top_reg,top_ref,top_const,top_symbol,top_bool);
  314. toper=record
  315. ot : longint;
  316. case typ : toptype of
  317. top_none : ();
  318. top_reg : (reg:tregister);
  319. top_ref : (ref:^treference);
  320. top_const : (val:aword);
  321. top_symbol : (sym:tasmsymbol;symofs:longint);
  322. top_bool : (b: boolean);
  323. end;
  324. {*****************************************************************************
  325. Operand Sizes
  326. *****************************************************************************}
  327. { S_NO = No Size of operand }
  328. { S_B = 8-bit size operand }
  329. { S_W = 16-bit size operand }
  330. { S_L = 32-bit size operand }
  331. { Floating point types }
  332. { S_FS = single type (32 bit) }
  333. { S_FD = double/64bit integer }
  334. { S_FX = Extended type }
  335. topsize = (S_NO,S_B,S_W,S_L,S_FS,S_FD,S_FX);
  336. {*****************************************************************************
  337. Constants
  338. *****************************************************************************}
  339. const
  340. max_operands = 5;
  341. lvaluelocations = [LOC_REFERENCE, LOC_CREGISTER, LOC_CFPUREGISTER,
  342. LOC_CMMREGISTER];
  343. {# Constant defining possibly all registers which might require saving }
  344. ALL_REGISTERS = [R_D1..R_FPCR];
  345. general_registers = [R_D0..R_D7];
  346. {# low and high of the available maximum width integer general purpose }
  347. { registers }
  348. LoGPReg = R_D0;
  349. HiGPReg = R_D7;
  350. {# low and high of every possible width general purpose register (same as }
  351. { above on most architctures apart from the 80x86) }
  352. LoReg = LoGPReg;
  353. HiReg = HighGPReg;
  354. { Table of registers which can be allocated by the code generator
  355. internally, when generating the code.
  356. legend:
  357. xxxregs = set of all possibly used registers of that type in the code
  358. generator
  359. usableregsxxx = set of all 32bit components of registers that can be
  360. possible allocated to a regvar or using getregisterxxx (this
  361. excludes registers which can be only used for parameter
  362. passing on ABI's that define this)
  363. c_countusableregsxxx = amount of registers in the usableregsxxx set }
  364. maxintregs = 8;
  365. intregs = [R_D0..R_D7];
  366. usableregsint = [R_D2..R_D7];
  367. c_countusableregsint = 6;
  368. maxfpuregs = 8;
  369. fpuregs = [R_FP0..R_FP7];
  370. usableregsfpu = [R_FP2..R_FP7];
  371. c_countusableregsfpu = 6;
  372. mmregs = [];
  373. usableregsmm = [];
  374. c_countusableregsmm = 0;
  375. maxaddrregs = 8;
  376. addrregs = [R_A0..R_SP];
  377. usableregsaddr = [R_A2..R_A4];
  378. c_countusableregsaddr = 3;
  379. { The first register in the usableregsint array }
  380. firstsaveintreg = R_D2;
  381. { The last register in the usableregsint array }
  382. lastsaveintreg = R_D7;
  383. { The first register in the usableregsfpu array }
  384. firstsavefpureg = R_FP2;
  385. { The last register in the usableregsfpu array }
  386. lastsavefpureg = R_FP7;
  387. { these constants are m68k specific }
  388. { The first register in the usableregsaddr array }
  389. firstsaveaddrreg = R_A2;
  390. { The last register in the usableregsaddr array }
  391. lastsaveaddrreg = R_A4;
  392. firstsavemmreg = R_NO;
  393. lastsavemmreg = R_NO;
  394. {
  395. Defines the maxinum number of integer registers which can be used as variable registers
  396. }
  397. maxvarregs = 6;
  398. { Array of integer registers which can be used as variable registers }
  399. varregs : Array [1..maxvarregs] of Tregister =
  400. (R_D2,R_D3,R_D4,R_D5,R_D6,R_D7);
  401. {
  402. Defines the maxinum number of float registers which can be used as variable registers
  403. }
  404. maxfpuvarregs = 6;
  405. { Array of float registers which can be used as variable registers }
  406. fpuvarregs : Array [1..maxfpuvarregs] of Tregister =
  407. (R_FP2,R_FP3,R_FP4,R_FP5,R_FP6,R_FP7);
  408. {
  409. Defines the number of integer registers which are used in the ABI to pass parameters
  410. (might be empty on systems which use the stack to pass parameters)
  411. }
  412. max_param_regs_int = 0;
  413. {param_regs_int: Array[1..max_param_regs_int] of tregister =
  414. (R_3,R_4,R_5,R_6,R_7,R_8,R_9,R_10);}
  415. {
  416. Defines the number of float registers which are used in the ABI to pass parameters
  417. (might be empty on systems which use the stack to pass parameters)
  418. }
  419. max_param_regs_fpu = 0;
  420. {param_regs_fpu: Array[1..max_param_regs_fpu] of tregister =
  421. (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);}
  422. {
  423. Defines the number of mmx registers which are used in the ABI to pass parameters
  424. (might be empty on systems which use the stack to pass parameters)
  425. }
  426. max_param_regs_mm = 0;
  427. {param_regs_mm: Array[1..max_param_regs_mm] of tregister =
  428. (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);}
  429. {# Registers which are defined as scratch integer and no need to save across
  430. routine calls or in assembler blocks.
  431. }
  432. max_scratch_regs = 2;
  433. scratch_regs: Array[1..max_scratch_regs] of TRegister = (R_D0,R_D1);
  434. {*****************************************************************************
  435. Default generic sizes
  436. *****************************************************************************}
  437. {# Defines the default address size for a processor, }
  438. OS_ADDR = OS_32;
  439. {# the natural int size for a processor, }
  440. OS_INT = OS_32;
  441. {# the maximum float size for a processor, }
  442. OS_FLOAT = OS_F64;
  443. {# the size of a vector register for a processor }
  444. OS_VECTOR = OS_M128;
  445. {*****************************************************************************
  446. Generic Register names
  447. *****************************************************************************}
  448. {# Stack pointer register }
  449. stack_pointer_reg = R_SP;
  450. {# Frame pointer register }
  451. frame_pointer_reg = R_A6;
  452. {# Self pointer register : contains the instance address of an
  453. object or class. }
  454. self_pointer_reg = R_A5;
  455. {# Register for addressing absolute data in a position independant way,
  456. such as in PIC code. The exact meaning is ABI specific }
  457. pic_offset_reg = R_A5;
  458. {# Results are returned in this register (32-bit values) }
  459. accumulator = R_D0;
  460. {# Hi-Results are returned in this register (64-bit value high register) }
  461. accumulatorhigh = R_D1;
  462. { Floating point results will be placed into this register }
  463. FPU_RESULT_REG = R_FP0;
  464. mmresultreg = R_N0;
  465. {*****************************************************************************
  466. GCC /ABI linking information
  467. *****************************************************************************}
  468. {# Registers which must be saved when calling a routine declared as
  469. cppdecl, cdecl, stdcall, safecall, palmossyscall. The registers
  470. saved should be the ones as defined in the target ABI and / or GCC.
  471. This value can be deduced from CALLED_USED_REGISTERS array in the
  472. GCC source.
  473. }
  474. std_saved_registers = [R_D2..R_D7,R_A2..R_A5];
  475. {# Required parameter alignment when calling a routine declared as
  476. stdcall and cdecl. The alignment value should be the one defined
  477. by GCC or the target ABI.
  478. The value of this constant is equal to the constant
  479. PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.
  480. }
  481. std_param_align = 4; { for 32-bit version only }
  482. {*****************************************************************************
  483. CPU Dependent Constants
  484. *****************************************************************************}
  485. {*****************************************************************************
  486. Helpers
  487. *****************************************************************************}
  488. function is_calljmp(o:tasmop):boolean;
  489. procedure inverse_flags(var r : TResFlags);
  490. procedure inverse_cond(const c: TAsmCond;var r : TAsmCond);
  491. function flags_to_cond(const f: TResFlags) : TAsmCond;
  492. procedure create_cond_imm(BO,BI:byte;var r : TAsmCond);
  493. procedure create_cond_norm(cond: TAsmCondFlag; cr: byte;var r : TasmCond);
  494. implementation
  495. uses
  496. verbose;
  497. {*****************************************************************************
  498. Helpers
  499. *****************************************************************************}
  500. function is_calljmp(o:tasmop):boolean;
  501. begin
  502. end;
  503. procedure inverse_flags(var r: TResFlags);
  504. begin
  505. end;
  506. procedure inverse_cond(const c: TAsmCond;var r : TAsmCond);
  507. begin
  508. end;
  509. function flags_to_cond(const f: TResFlags) : TAsmCond;
  510. begin
  511. end;
  512. procedure create_cond_imm(BO,BI:byte;var r : TAsmCond);
  513. begin
  514. end;
  515. procedure create_cond_norm(cond: TAsmCondFlag; cr: byte;var r : TasmCond);
  516. begin
  517. end;
  518. end.
  519. {
  520. $Log$
  521. Revision 1.3 2002-07-29 17:51:32 carl
  522. + restart m68k support
  523. }