cpubase.pas 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl and Peter Vreman
  4. Contains the base types for the ARM
  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. {# Base unit for processor information. This unit contains
  19. enumerations of registers, opcodes, sizes, and other
  20. such things which are processor specific.
  21. }
  22. unit cpubase;
  23. {$i fpcdefs.inc}
  24. interface
  25. uses
  26. cutils,cclasses,
  27. globtype,globals,
  28. cpuinfo,
  29. aasmbase,
  30. cginfo
  31. {$ifdef delphi}
  32. ,dmisc
  33. {$endif}
  34. ;
  35. {*****************************************************************************
  36. Assembler Opcodes
  37. *****************************************************************************}
  38. type
  39. TAsmOp=(A_None,A_ADC,A_ADD,A_AND,A_N,A_BIC,A_BKPT,A_B,A_BL,A_BLX,A_BX,
  40. A_CDP,A_CDP2,A_CLZ,A_CMN,A_CMP,A_EOR,A_LDC,_A_LDC2,
  41. A_LDM,A_LDR,A_LDRB,A_LDRD,A_LDRBT,A_LDRH,A_LDRSB,
  42. A_LDRSH,A_LDRT,A_MCR,A_MCR2,A_MCRR,A_MLA,A_MOV,
  43. A_MRC,A_MRC2,A_MRRC,A_RS,A_MSR,A_MUL,A_MVN,
  44. A_ORR,A_PLD,A_QADD,A_QDADD,A_QDSUB,A_QSUB,A_RSB,A_RSC,
  45. A_SBC,A_SMLAL,A_SMULL,A_SMUL,
  46. A_SMULW,A_STC,A_STC2,A_STM,A_STR,A_STRB,A_STRBT,A_STRD,
  47. A_STRH,A_STRT,A_SUB,A_SWI,A_SWP,A_SWPB,A_TEQ,A_TST,
  48. A_UMLAL,A_UMULL
  49. { FPA coprocessor codes }
  50. { VPA coprocessor codes }
  51. );
  52. { This should define the array of instructions as string }
  53. op2strtable=array[tasmop] of string[11];
  54. Const
  55. { First value of opcode enumeration }
  56. firstop = low(tasmop);
  57. { Last value of opcode enumeration }
  58. lastop = high(tasmop);
  59. {*****************************************************************************
  60. Registers
  61. *****************************************************************************}
  62. type
  63. {# Enumeration for all possible registers for cpu. It
  64. is to note that all registers of the same type
  65. (for example all FPU registers), should be grouped
  66. together.
  67. }
  68. { don't change the order }
  69. { it's used by the register size conversions }
  70. toldregister = (R_NO,
  71. R_R0,R_R1,R_R2,R_R3,R_R4,R_R5,R_R6,R_R7,
  72. R_R8,R_R9,R_R10,R_R11,R_R12,R_R13,R_R14,R_PC,
  73. R_CPSR,
  74. { FPA registers }
  75. R_F0,R_F1,R_F2,R_F3,R_F4,R_F5,R_F6,R_F7,
  76. R_F8,R_F9,R_F10,R_F11,R_F12,R_F13,R_F14,R_F15,
  77. { VPA registers }
  78. R_S0,R_S1,R_S2,R_S3,R_S4,R_S5,R_S6,R_S7,
  79. R_S8,R_S9,R_S10,R_S11,R_S12,R_S13,R_S14,R_S15,
  80. R_S16,R_S17,R_S18,R_S19,R_S20,R_S21,R_S22,R_S23,
  81. R_S24,R_S25,R_S26,R_S27,R_S28,R_S29,R_S30,R_S31,
  82. R_D0,R_D1,R_D2,R_D3,R_D4,R_D5,R_D6,R_D7,
  83. R_D8,R_D9,R_D10,R_D11,R_D12,R_D13,R_D14,R_D15,
  84. R_INTREGISTER,R_FLOATREGISTER,R_MMXREGISTER,R_KNIREGISTER
  85. );
  86. const
  87. { special registers }
  88. { Invalid register }
  89. NR_NO = $0000;
  90. { Normal registers:}
  91. { General purpose registers }
  92. NR_R0 = $0100; NR_R1 = $0200; NR_R2 = $0300;
  93. NR_R3 = $0400; NR_R4 = $0500; NR_R5 = $0600;
  94. NR_R6 = $0700; NR_R7 = $0800; NR_R8 = $0900;
  95. NR_R9 = $0A00; NR_R10 = $0B00; NR_R11 = $0C00;
  96. NR_R12 = $0D00; NR_R13 = $0E00; NR_R14 = $0F00;
  97. NR_R15 = $1000;
  98. NR_PC = NR_R15;
  99. { Super registers: }
  100. RS_NONE=$00;
  101. RS_R0 = $01; RS_R1 = $02; RS_R2 = $03;
  102. RS_R3 = $04; RS_R4 = $05; RS_R5 = $06;
  103. RS_R6 = $07; RS_R7 = $08; RS_R8 = $09;
  104. RS_R9 = $0A; RS_R10 = $0B; RS_R11 = $0C;
  105. RS_R12 = $0D; RS_R13 = $0E; RS_R14 = $0F;
  106. RS_R15 = $10;
  107. first_supreg = RS_R0;
  108. last_supreg = RS_R15;
  109. { registers which may be destroyed by calls }
  110. VOLATILE_INTREGISTERS = [RS_R0..RS_R3];
  111. VOLATILE_FPUREGISTERS = [R_F0..R_F3];
  112. { Number of first and last imaginary register. }
  113. first_imreg = $21;
  114. last_imreg = $ff;
  115. { Subregisters, situation unknown!!.}
  116. R_SUBWHOLE=$00;
  117. R_SUBL=$00;
  118. type
  119. tnewregister=word;
  120. Tregister = packed record
  121. enum : Toldregister;
  122. { This is a word for now, change to cardinal
  123. when the old register coding is away.}
  124. number : Tnewregister;
  125. end;
  126. Tsuperregister = byte;
  127. Tsubregister = byte;
  128. { A type to store register locations for 64 Bit values. }
  129. tregister64 = packed record
  130. reglo,reghi : tregister;
  131. end;
  132. { alias for compact code }
  133. treg64 = tregister64;
  134. { Set type definition for registers }
  135. tregisterset = set of toldregister;
  136. tsupregset = set of tsuperregister;
  137. const
  138. { First register in the tregister enumeration }
  139. firstreg = low(toldregister);
  140. { Last register in the tregister enumeration }
  141. lastreg = R_D15;
  142. type
  143. { Type definition for the array of string of register names }
  144. reg2strtable = array[firstreg..lastreg] of string[6];
  145. regname2regnumrec = record
  146. name:string[6];
  147. number:Tnewregister;
  148. end;
  149. {*****************************************************************************
  150. Instruction post fixes
  151. *****************************************************************************}
  152. type
  153. { ARM instructions load/store and arithmetic instructions
  154. can have several instruction post fixes which are collected
  155. in this enumeration
  156. }
  157. TOpPostfix = (PF_None,
  158. { update condition flags }
  159. PF_S,
  160. { load/store }
  161. PF_B,PF_SB,PF_BT,PF_H,PF_SH,PF_T,
  162. { multiple load/store address modes }
  163. PF_IA,PF_IB,PF_DA,PF_DB,PF_DF,PF_FA,PF_ED,PF_EA
  164. );
  165. const
  166. oppostfix2str : array[TOpPostfix] of string[2] = ('',
  167. 's',
  168. 'b','sb','bt','h','sh','t',
  169. 'ia','ib','da','db','df','fa','ed','ea');
  170. {*****************************************************************************
  171. Conditions
  172. *****************************************************************************}
  173. type
  174. TAsmCond=(C_None,
  175. C_EQ,C_NE,C_CS,C_CC,C_MI,C_PL,C_VS,C_VC,C_HI,C_LS,
  176. C_GE,C_LT,C_GT,C_LE,C_AL,C_NV
  177. );
  178. const
  179. cond2str : array[TAsmCond] of string[2]=('',
  180. 'eq','ne','cs','cc','mi','pl','vs','vc','hi','ls',
  181. 'ge','lt','gt','le','al','nv'
  182. );
  183. inverse_cond : array[TAsmCond] of TAsmCond=(C_None,
  184. C_NE,C_EQ,C_CC,C_CS,C_PL,C_MI,C_VC,C_VS,C_LS,C_HI,
  185. C_LT,C_GE,C_LE,C_GT,C_None,C_None
  186. );
  187. {*****************************************************************************
  188. Flags
  189. *****************************************************************************}
  190. type
  191. TResFlags = (F_EQ,F_NE,F_CS,F_CC,F_MI,F_PL,F_VS,F_VC,F_HI,F_LS,
  192. F_GE,F_LT,F_GT,F_LE);
  193. {*****************************************************************************
  194. Reference
  195. *****************************************************************************}
  196. type
  197. trefoptions=(ref_none,ref_parafixup,ref_localfixup,ref_selffixup);
  198. taddressmode = (AM_OFFSET,AM_PREINDEXED,AM_POSTINDEXED);
  199. tshiftmode = (SM_LSL,SM_LSR,SM_ASR,SM_ROR,SM_RRX);
  200. { reference record }
  201. preference = ^treference;
  202. treference = packed record
  203. base,
  204. index : tregister;
  205. scalefactor : byte;
  206. offset : longint;
  207. symbol : tasmsymbol;
  208. offsetfixup : longint;
  209. options : trefoptions;
  210. addressmode : taddressmode;
  211. shiftmode : tshiftmode;
  212. end;
  213. { reference record }
  214. pparareference = ^tparareference;
  215. tparareference = packed record
  216. index : tregister;
  217. offset : longint;
  218. end;
  219. {*****************************************************************************
  220. Operands
  221. *****************************************************************************}
  222. { Types of operand }
  223. toptype=(top_none,top_reg,top_ref,top_const,top_symbol,top_regset,top_shifter);
  224. tupdatereg = (UR_None,UR_Update);
  225. tshiftertype = (SO_None,SO_ASR,SO_LSL,SO_LSR,SO_ROR,SO_RRX);
  226. pshifterop = ^tshifterop;
  227. tshifterop = record
  228. imm : dword;
  229. rm : tregister;
  230. rs : tregister;
  231. shiftimm : byte;
  232. end;
  233. toper = record
  234. case typ : toptype of
  235. top_none : ();
  236. top_reg : (reg:tregister;update:tupdatereg);
  237. top_ref : (ref:preference);
  238. top_const : (val:aword);
  239. top_symbol : (sym:tasmsymbol;symofs:longint);
  240. top_regset : (regset:tsupregset);
  241. top_shifter : (shifterop : pshifterop);
  242. end;
  243. {*****************************************************************************
  244. Generic Location
  245. *****************************************************************************}
  246. type
  247. { tparamlocation describes where a parameter for a procedure is stored.
  248. References are given from the caller's point of view. The usual
  249. TLocation isn't used, because contains a lot of unnessary fields.
  250. }
  251. tparalocation = packed record
  252. size : TCGSize;
  253. loc : TCGLoc;
  254. sp_fixup : longint;
  255. case TCGLoc of
  256. LOC_REFERENCE : (reference : tparareference);
  257. { segment in reference at the same place as in loc_register }
  258. LOC_REGISTER,LOC_CREGISTER : (
  259. case longint of
  260. 1 : (register,registerhigh : tregister);
  261. { overlay a registerlow }
  262. 2 : (registerlow : tregister);
  263. { overlay a 64 Bit register type }
  264. 3 : (reg64 : tregister64);
  265. 4 : (register64 : tregister64);
  266. );
  267. { it's only for better handling }
  268. LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
  269. end;
  270. tlocation = packed record
  271. loc : TCGLoc;
  272. size : TCGSize;
  273. case TCGLoc of
  274. LOC_FLAGS : (resflags : tresflags);
  275. LOC_CONSTANT : (
  276. case longint of
  277. 1 : (value : AWord);
  278. { can't do this, this layout depends on the host cpu. Use }
  279. { lo(valueqword)/hi(valueqword) instead (JM) }
  280. { 2 : (valuelow, valuehigh:AWord); }
  281. { overlay a complete 64 Bit value }
  282. 3 : (valueqword : qword);
  283. );
  284. LOC_CREFERENCE,
  285. LOC_REFERENCE : (reference : treference);
  286. { segment in reference at the same place as in loc_register }
  287. LOC_REGISTER,LOC_CREGISTER : (
  288. case longint of
  289. 1 : (register,registerhigh,segment : tregister);
  290. { overlay a registerlow }
  291. 2 : (registerlow : tregister);
  292. { overlay a 64 Bit register type }
  293. 3 : (reg64 : tregister64);
  294. 4 : (register64 : tregister64);
  295. );
  296. { it's only for better handling }
  297. LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
  298. end;
  299. {*****************************************************************************
  300. Constants
  301. *****************************************************************************}
  302. const
  303. { declare aliases }
  304. LOC_MMREGISTER = LOC_SSEREGISTER;
  305. LOC_CMMREGISTER = LOC_CSSEREGISTER;
  306. max_operands = 3;
  307. {# Constant defining possibly all registers which might require saving }
  308. ALL_REGISTERS = [firstreg..lastreg];
  309. {# low and high of the available maximum width integer general purpose }
  310. { registers }
  311. LoGPReg = R_R0;
  312. HiGPReg = R_R14;
  313. {# low and high of every possible width general purpose register (same as }
  314. { above on most architctures apart from the 80x86) }
  315. LoReg = R_R0;
  316. HiReg = R_R14;
  317. {# Table of registers which can be allocated by the code generator
  318. internally, when generating the code.
  319. }
  320. { legend: }
  321. { xxxregs = set of all possibly used registers of that type in the code }
  322. { generator }
  323. { usableregsxxx = set of all 32bit components of registers that can be }
  324. { possible allocated to a regvar or using getregisterxxx (this }
  325. { excludes registers which can be only used for parameter }
  326. { passing on ABI's that define this) }
  327. { c_countusableregsxxx = amount of registers in the usableregsxxx set }
  328. maxintregs = 15;
  329. maxintscratchregs = 2;
  330. intregs = [R_R0..R_R14];
  331. usableregsint = [RS_R4..RS_R10];
  332. c_countusableregsint = 7;
  333. maxfpuregs = 8;
  334. fpuregs = [R_F0..R_F7];
  335. usableregsfpu = [R_F4..R_F7];
  336. c_countusableregsfpu = 4;
  337. mmregs = [R_S0..R_D7];
  338. usableregsmm = [R_S16..R_S31];
  339. c_countusableregsmm = 16;
  340. {*****************************************************************************
  341. Operand Sizes
  342. *****************************************************************************}
  343. type
  344. topsize = (S_NO,
  345. S_B,S_W,S_L,S_BW,S_BL,S_WL,
  346. S_IS,S_IL,S_IQ,
  347. S_FS,S_FL,S_FX,S_D,S_Q,S_FV,S_FXX
  348. );
  349. {*****************************************************************************
  350. Registers
  351. *****************************************************************************}
  352. const
  353. { Standard opcode string table (for each tasmop enumeration). The
  354. opcode strings should conform to the names as defined by the
  355. processor manufacturer.
  356. }
  357. std_op2str : op2strtable = (
  358. '','adc','add','and','n','bic','bkpt','b','bl','blx','bx',
  359. 'cdp','cdp2','clz','cmn','cmp','eor','ldc','ldc2',
  360. 'ldm','ldr','ldrb','ldrd','ldrbt','ldrh','ldrsb',
  361. 'ldrsh','ldrt','mcr','mcr2','mcrr','mla','mov',
  362. 'mrc','mrc2','mrrc','rs','msr','mul','mvn',
  363. 'orr','pld','qadd','qdadd','qdsub','qsub','rsb','rsc',
  364. 'sbc','smlal','smull','smul',
  365. 'smulw','stc','stc2','stm','str','strb','strbt','strd',
  366. 'strh','strt','sub','swi','swp','swpb','teq','tst',
  367. 'umlal','umull'
  368. { FPA coprocessor codes }
  369. { VPA coprocessor codes }
  370. );
  371. { Standard register table (for each tregister enumeration). The
  372. register strings should conform to the the names as defined
  373. by the processor manufacturer
  374. }
  375. std_reg2str : reg2strtable = ('',
  376. 'r0','r1','r2','r3','r4','r5','r6','r7',
  377. 'r8','r9','r10','r11','r12','r13','r14','pc',
  378. 'cpsr',
  379. { FPA registers }
  380. 'f0','f1','f2','f3','f4','f5','f6','f7',
  381. 'f8','f9','f10','f11','f12','f13','f14','f15',
  382. { VPA registers }
  383. 's0','s1','s2','s3','s4','s5','s6','s7',
  384. 's8','s9','s10','s11','s12','s13','s14','s15',
  385. 's16','s17','s18','s19','s20','s21','s22','s23',
  386. 's24','s25','s26','s27','s28','s29','s30','s31',
  387. 'd0','d1','d2','d3','d4','d5','d6','d7',
  388. 'd8','d9','d10','d11','d12','d13','d14','d15'
  389. );
  390. {*****************************************************************************
  391. Constants
  392. *****************************************************************************}
  393. firstsaveintreg = R_R4;
  394. lastsaveintreg = R_R10;
  395. firstsavefpureg = R_F4;
  396. lastsavefpureg = R_F7;
  397. firstsavemmreg = R_S16;
  398. lastsavemmreg = R_S31;
  399. //!!! general_registers = [R_EAX,R_EBX,R_ECX,R_EDX];
  400. //!!! general_superregisters = [RS_EAX,RS_EBX,RS_ECX,RS_EDX];
  401. //!!! usableregsint = [first_imreg..last_imreg];
  402. //!!! c_countusableregsint = 4;
  403. maxaddrregs = 0;
  404. addrregs = [];
  405. usableregsaddr = [];
  406. c_countusableregsaddr = 0;
  407. maxvarregs = 7;
  408. varregs : Array [1..maxvarregs] of Tnewregister =
  409. (RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,RS_R9,RS_R10);
  410. maxfpuvarregs = 4;
  411. fpuvarregs : Array [1..maxfpuvarregs] of Toldregister =
  412. (R_F4,R_F5,R_F6,R_F7);
  413. {*****************************************************************************
  414. GDB Information
  415. *****************************************************************************}
  416. {
  417. I don't know where I could get this information for the arm
  418. }
  419. stab_regindex : array[0..0] of shortint =
  420. (0
  421. );
  422. {*****************************************************************************
  423. Default generic sizes
  424. *****************************************************************************}
  425. { Defines the default address size for a processor, }
  426. OS_ADDR = OS_32;
  427. { the natural int size for a processor, }
  428. OS_INT = OS_32;
  429. { the maximum float size for a processor, }
  430. OS_FLOAT = OS_F64;
  431. { the size of a vector register for a processor }
  432. OS_VECTOR = OS_M32;
  433. {*****************************************************************************
  434. Generic Register names
  435. *****************************************************************************}
  436. { Stack pointer register }
  437. NR_STACK_POINTER_REG = NR_R13;
  438. RS_STACK_POINTER_REG = RS_R13;
  439. { Frame pointer register }
  440. frame_pointer_reg = R_R11;
  441. RS_FRAME_POINTER_REG = RS_R11;
  442. NR_FRAME_POINTER_REG = NR_R11;
  443. { Register for addressing absolute data in a position independant way,
  444. such as in PIC code. The exact meaning is ABI specific. For
  445. further information look at GCC source : PIC_OFFSET_TABLE_REGNUM
  446. }
  447. NR_PIC_OFFSET_REG = NR_R9;
  448. { Results are returned in this register (32-bit values) }
  449. NR_FUNCTION_RETURN_REG = NR_R0;
  450. RS_FUNCTION_RETURN_REG = RS_R0;
  451. { Low part of 64bit return value }
  452. NR_FUNCTION_RETURN64_LOW_REG = NR_R0;
  453. RS_FUNCTION_RETURN64_LOW_REG = RS_R0;
  454. { High part of 64bit return value }
  455. NR_FUNCTION_RETURN64_HIGH_REG = NR_R1;
  456. RS_FUNCTION_RETURN64_HIGH_REG = RS_R1;
  457. { The value returned from a function is available in this register }
  458. NR_FUNCTION_RESULT_REG = NR_FUNCTION_RETURN_REG;
  459. RS_FUNCTION_RESULT_REG = RS_FUNCTION_RETURN_REG;
  460. { The lowh part of 64bit value returned from a function }
  461. NR_FUNCTION_RESULT64_LOW_REG = NR_FUNCTION_RETURN64_LOW_REG;
  462. RS_FUNCTION_RESULT64_LOW_REG = RS_FUNCTION_RETURN64_LOW_REG;
  463. { The high part of 64bit value returned from a function }
  464. NR_FUNCTION_RESULT64_HIGH_REG = NR_FUNCTION_RETURN64_HIGH_REG;
  465. RS_FUNCTION_RESULT64_HIGH_REG = RS_FUNCTION_RETURN64_HIGH_REG;
  466. fpu_result_reg = R_F0;
  467. //!!! mmresultreg = R_MM0;
  468. { Offset where the parent framepointer is pushed }
  469. PARENT_FRAMEPOINTER_OFFSET = 0;
  470. {*****************************************************************************
  471. GCC /ABI linking information
  472. *****************************************************************************}
  473. const
  474. { Registers which must be saved when calling a routine declared as
  475. cppdecl, cdecl, stdcall, safecall, palmossyscall. The registers
  476. saved should be the ones as defined in the target ABI and / or GCC.
  477. This value can be deduced from the CALLED_USED_REGISTERS array in the
  478. GCC source.
  479. }
  480. std_saved_registers = [R_R4..R_R10];
  481. { Required parameter alignment when calling a routine declared as
  482. stdcall and cdecl. The alignment value should be the one defined
  483. by GCC or the target ABI.
  484. The value of this constant is equal to the constant
  485. PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.
  486. }
  487. std_param_align = 4;
  488. {*****************************************************************************
  489. Helpers
  490. *****************************************************************************}
  491. procedure convert_register_to_enum(var r:Tregister);
  492. function cgsize2subreg(s:Tcgsize):Tsubregister;
  493. function reg2opsize(r:tregister):topsize;
  494. function is_calljmp(o:tasmop):boolean;
  495. procedure inverse_flags(var f: TResFlags);
  496. function flags_to_cond(const f: TResFlags) : TAsmCond;
  497. function supreg_name(r:Tsuperregister):string;
  498. implementation
  499. procedure convert_register_to_enum(var r:Tregister);
  500. begin
  501. end;
  502. function cgsize2subreg(s:Tcgsize):Tsubregister;
  503. begin
  504. end;
  505. function reg2opsize(r:tregister):topsize;
  506. begin
  507. end;
  508. function is_calljmp(o:tasmop):boolean;
  509. begin
  510. { This isn't 100% perfect because the arm allows jumps also by writing to PC=R15.
  511. To overcome this problem we simply forbid that FPC generates jumps by loading R15 }
  512. is_calljmp:= o in [A_B,A_BL,A_BX,A_BLX];
  513. end;
  514. procedure inverse_flags(var f: TResFlags);
  515. begin
  516. end;
  517. function flags_to_cond(const f: TResFlags) : TAsmCond;
  518. begin
  519. end;
  520. function supreg_name(r:Tsuperregister):string;
  521. begin
  522. end;
  523. end.
  524. {
  525. $Log$
  526. Revision 1.4 2003-08-20 15:50:13 florian
  527. * more arm stuff
  528. Revision 1.3 2003/08/16 13:23:01 florian
  529. * several arm related stuff fixed
  530. Revision 1.2 2003/07/26 00:55:57 florian
  531. * basic stuff fixed
  532. Revision 1.1 2003/07/21 16:35:30 florian
  533. * very basic stuff for the arm
  534. }