cpubase.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  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. RS_PC = RS_R15;
  108. first_supreg = RS_R0;
  109. last_supreg = RS_R15;
  110. { registers which may be destroyed by calls }
  111. VOLATILE_INTREGISTERS = [RS_R0..RS_R3];
  112. VOLATILE_FPUREGISTERS = [R_F0..R_F3];
  113. { Number of first and last imaginary register. }
  114. first_imreg = $21;
  115. last_imreg = $ff;
  116. { Subregisters, situation unknown!!.}
  117. R_SUBWHOLE=$00;
  118. R_SUBL=$00;
  119. type
  120. tnewregister=word;
  121. Tregister = packed record
  122. enum : Toldregister;
  123. { This is a word for now, change to cardinal
  124. when the old register coding is away.}
  125. number : Tnewregister;
  126. end;
  127. Tsuperregister = byte;
  128. Tsubregister = byte;
  129. { A type to store register locations for 64 Bit values. }
  130. tregister64 = packed record
  131. reglo,reghi : tregister;
  132. end;
  133. { alias for compact code }
  134. treg64 = tregister64;
  135. { Set type definition for registers }
  136. tregisterset = set of toldregister;
  137. tsupregset = set of tsuperregister;
  138. const
  139. { First register in the tregister enumeration }
  140. firstreg = low(toldregister);
  141. { Last register in the tregister enumeration }
  142. lastreg = R_D15;
  143. type
  144. { Type definition for the array of string of register names }
  145. reg2strtable = array[firstreg..lastreg] of string[6];
  146. regname2regnumrec = record
  147. name:string[6];
  148. number:Tnewregister;
  149. end;
  150. {*****************************************************************************
  151. Instruction post fixes
  152. *****************************************************************************}
  153. type
  154. { ARM instructions load/store and arithmetic instructions
  155. can have several instruction post fixes which are collected
  156. in this enumeration
  157. }
  158. TOpPostfix = (PF_None,
  159. { update condition flags }
  160. PF_S,
  161. { load/store }
  162. PF_B,PF_SB,PF_BT,PF_H,PF_SH,PF_T,
  163. { multiple load/store address modes }
  164. PF_IA,PF_IB,PF_DA,PF_DB,PF_DF,PF_FA,PF_ED,PF_EA
  165. );
  166. const
  167. oppostfix2str : array[TOpPostfix] of string[2] = ('',
  168. 's',
  169. 'b','sb','bt','h','sh','t',
  170. 'ia','ib','da','db','df','fa','ed','ea');
  171. {*****************************************************************************
  172. Conditions
  173. *****************************************************************************}
  174. type
  175. TAsmCond=(C_None,
  176. C_EQ,C_NE,C_CS,C_CC,C_MI,C_PL,C_VS,C_VC,C_HI,C_LS,
  177. C_GE,C_LT,C_GT,C_LE,C_AL,C_NV
  178. );
  179. const
  180. cond2str : array[TAsmCond] of string[2]=('',
  181. 'eq','ne','cs','cc','mi','pl','vs','vc','hi','ls',
  182. 'ge','lt','gt','le','al','nv'
  183. );
  184. inverse_cond : array[TAsmCond] of TAsmCond=(C_None,
  185. C_NE,C_EQ,C_CC,C_CS,C_PL,C_MI,C_VC,C_VS,C_LS,C_HI,
  186. C_LT,C_GE,C_LE,C_GT,C_None,C_None
  187. );
  188. {*****************************************************************************
  189. Flags
  190. *****************************************************************************}
  191. type
  192. TResFlags = (F_EQ,F_NE,F_CS,F_CC,F_MI,F_PL,F_VS,F_VC,F_HI,F_LS,
  193. F_GE,F_LT,F_GT,F_LE);
  194. {*****************************************************************************
  195. Reference
  196. *****************************************************************************}
  197. type
  198. trefoptions=(ref_none,ref_parafixup,ref_localfixup,ref_selffixup);
  199. taddressmode = (AM_OFFSET,AM_PREINDEXED,AM_POSTINDEXED);
  200. tshiftmode = (SM_LSL,SM_LSR,SM_ASR,SM_ROR,SM_RRX);
  201. { reference record }
  202. preference = ^treference;
  203. treference = packed record
  204. base,
  205. index : tregister;
  206. scalefactor : byte;
  207. offset : longint;
  208. symbol : tasmsymbol;
  209. offsetfixup : longint;
  210. options : trefoptions;
  211. addressmode : taddressmode;
  212. shiftmode : tshiftmode;
  213. end;
  214. { reference record }
  215. pparareference = ^tparareference;
  216. tparareference = packed record
  217. index : tregister;
  218. offset : longint;
  219. end;
  220. {*****************************************************************************
  221. Operands
  222. *****************************************************************************}
  223. { Types of operand }
  224. toptype=(top_none,top_reg,top_ref,top_const,top_symbol,top_regset,top_shifterop);
  225. tupdatereg = (UR_None,UR_Update);
  226. tshiftertype = (SO_None,SO_ASR,SO_LSL,SO_LSR,SO_ROR,SO_RRX);
  227. pshifterop = ^tshifterop;
  228. tshifterop = record
  229. shiftertype : tshiftertype;
  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_shifterop : (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. general_registers = [R_R0..R_PC];
  310. general_superregisters = [RS_R0..RS_PC];
  311. {# low and high of the available maximum width integer general purpose }
  312. { registers }
  313. LoGPReg = R_R0;
  314. HiGPReg = R_R14;
  315. {# low and high of every possible width general purpose register (same as }
  316. { above on most architctures apart from the 80x86) }
  317. LoReg = R_R0;
  318. HiReg = R_R14;
  319. {# Table of registers which can be allocated by the code generator
  320. internally, when generating the code.
  321. }
  322. { legend: }
  323. { xxxregs = set of all possibly used registers of that type in the code }
  324. { generator }
  325. { usableregsxxx = set of all 32bit components of registers that can be }
  326. { possible allocated to a regvar or using getregisterxxx (this }
  327. { excludes registers which can be only used for parameter }
  328. { passing on ABI's that define this) }
  329. { c_countusableregsxxx = amount of registers in the usableregsxxx set }
  330. maxintregs = 15;
  331. maxintscratchregs = 2;
  332. intregs = [R_R0..R_R14];
  333. usableregsint = [RS_R4..RS_R10];
  334. c_countusableregsint = 7;
  335. maxfpuregs = 8;
  336. fpuregs = [R_F0..R_F7];
  337. usableregsfpu = [R_F4..R_F7];
  338. c_countusableregsfpu = 4;
  339. mmregs = [R_S0..R_D7];
  340. usableregsmm = [R_S16..R_S31];
  341. c_countusableregsmm = 16;
  342. {*****************************************************************************
  343. Operand Sizes
  344. *****************************************************************************}
  345. type
  346. topsize = (S_NO,
  347. S_B,S_W,S_L,S_BW,S_BL,S_WL,
  348. S_IS,S_IL,S_IQ,
  349. S_FS,S_FL,S_FX,S_D,S_Q,S_FV,S_FXX
  350. );
  351. {*****************************************************************************
  352. Registers
  353. *****************************************************************************}
  354. const
  355. { Standard opcode string table (for each tasmop enumeration). The
  356. opcode strings should conform to the names as defined by the
  357. processor manufacturer.
  358. }
  359. std_op2str : op2strtable = (
  360. '','adc','add','and','n','bic','bkpt','b','bl','blx','bx',
  361. 'cdp','cdp2','clz','cmn','cmp','eor','ldc','ldc2',
  362. 'ldm','ldr','ldrb','ldrd','ldrbt','ldrh','ldrsb',
  363. 'ldrsh','ldrt','mcr','mcr2','mcrr','mla','mov',
  364. 'mrc','mrc2','mrrc','rs','msr','mul','mvn',
  365. 'orr','pld','qadd','qdadd','qdsub','qsub','rsb','rsc',
  366. 'sbc','smlal','smull','smul',
  367. 'smulw','stc','stc2','stm','str','strb','strbt','strd',
  368. 'strh','strt','sub','swi','swp','swpb','teq','tst',
  369. 'umlal','umull'
  370. { FPA coprocessor codes }
  371. { VPA coprocessor codes }
  372. );
  373. { Standard register table (for each tregister enumeration). The
  374. register strings should conform to the the names as defined
  375. by the processor manufacturer
  376. }
  377. std_reg2str : reg2strtable = ('',
  378. 'r0','r1','r2','r3','r4','r5','r6','r7',
  379. 'r8','r9','r10','r11','r12','r13','r14','pc',
  380. 'cpsr',
  381. { FPA registers }
  382. 'f0','f1','f2','f3','f4','f5','f6','f7',
  383. 'f8','f9','f10','f11','f12','f13','f14','f15',
  384. { VPA registers }
  385. 's0','s1','s2','s3','s4','s5','s6','s7',
  386. 's8','s9','s10','s11','s12','s13','s14','s15',
  387. 's16','s17','s18','s19','s20','s21','s22','s23',
  388. 's24','s25','s26','s27','s28','s29','s30','s31',
  389. 'd0','d1','d2','d3','d4','d5','d6','d7',
  390. 'd8','d9','d10','d11','d12','d13','d14','d15'
  391. );
  392. {*****************************************************************************
  393. Constants
  394. *****************************************************************************}
  395. firstsaveintreg = R_R4;
  396. lastsaveintreg = R_R10;
  397. firstsavefpureg = R_F4;
  398. lastsavefpureg = R_F7;
  399. firstsavemmreg = R_S16;
  400. lastsavemmreg = R_S31;
  401. //!!! general_registers = [R_EAX,R_EBX,R_ECX,R_EDX];
  402. //!!! general_superregisters = [RS_EAX,RS_EBX,RS_ECX,RS_EDX];
  403. //!!! usableregsint = [first_imreg..last_imreg];
  404. //!!! c_countusableregsint = 4;
  405. maxaddrregs = 0;
  406. addrregs = [];
  407. usableregsaddr = [];
  408. c_countusableregsaddr = 0;
  409. maxvarregs = 7;
  410. varregs : Array [1..maxvarregs] of Tnewregister =
  411. (RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,RS_R9,RS_R10);
  412. maxfpuvarregs = 4;
  413. fpuvarregs : Array [1..maxfpuvarregs] of Toldregister =
  414. (R_F4,R_F5,R_F6,R_F7);
  415. {*****************************************************************************
  416. GDB Information
  417. *****************************************************************************}
  418. {
  419. I don't know where I could get this information for the arm
  420. }
  421. stab_regindex : array[0..0] of shortint =
  422. (0
  423. );
  424. {*****************************************************************************
  425. Default generic sizes
  426. *****************************************************************************}
  427. { Defines the default address size for a processor, }
  428. OS_ADDR = OS_32;
  429. { the natural int size for a processor, }
  430. OS_INT = OS_32;
  431. { the maximum float size for a processor, }
  432. OS_FLOAT = OS_F64;
  433. { the size of a vector register for a processor }
  434. OS_VECTOR = OS_M32;
  435. {*****************************************************************************
  436. Generic Register names
  437. *****************************************************************************}
  438. { Stack pointer register }
  439. NR_STACK_POINTER_REG = NR_R13;
  440. RS_STACK_POINTER_REG = RS_R13;
  441. { Frame pointer register }
  442. frame_pointer_reg = R_R11;
  443. RS_FRAME_POINTER_REG = RS_R11;
  444. NR_FRAME_POINTER_REG = NR_R11;
  445. { Register for addressing absolute data in a position independant way,
  446. such as in PIC code. The exact meaning is ABI specific. For
  447. further information look at GCC source : PIC_OFFSET_TABLE_REGNUM
  448. }
  449. NR_PIC_OFFSET_REG = NR_R9;
  450. { Results are returned in this register (32-bit values) }
  451. NR_FUNCTION_RETURN_REG = NR_R0;
  452. RS_FUNCTION_RETURN_REG = RS_R0;
  453. { Low part of 64bit return value }
  454. NR_FUNCTION_RETURN64_LOW_REG = NR_R0;
  455. RS_FUNCTION_RETURN64_LOW_REG = RS_R0;
  456. { High part of 64bit return value }
  457. NR_FUNCTION_RETURN64_HIGH_REG = NR_R1;
  458. RS_FUNCTION_RETURN64_HIGH_REG = RS_R1;
  459. { The value returned from a function is available in this register }
  460. NR_FUNCTION_RESULT_REG = NR_FUNCTION_RETURN_REG;
  461. RS_FUNCTION_RESULT_REG = RS_FUNCTION_RETURN_REG;
  462. { The lowh part of 64bit value returned from a function }
  463. NR_FUNCTION_RESULT64_LOW_REG = NR_FUNCTION_RETURN64_LOW_REG;
  464. RS_FUNCTION_RESULT64_LOW_REG = RS_FUNCTION_RETURN64_LOW_REG;
  465. { The high part of 64bit value returned from a function }
  466. NR_FUNCTION_RESULT64_HIGH_REG = NR_FUNCTION_RETURN64_HIGH_REG;
  467. RS_FUNCTION_RESULT64_HIGH_REG = RS_FUNCTION_RETURN64_HIGH_REG;
  468. fpu_result_reg = R_F0;
  469. //!!! mmresultreg = R_MM0;
  470. { Offset where the parent framepointer is pushed }
  471. PARENT_FRAMEPOINTER_OFFSET = 0;
  472. {*****************************************************************************
  473. GCC /ABI linking information
  474. *****************************************************************************}
  475. const
  476. { Registers which must be saved when calling a routine declared as
  477. cppdecl, cdecl, stdcall, safecall, palmossyscall. The registers
  478. saved should be the ones as defined in the target ABI and / or GCC.
  479. This value can be deduced from the CALLED_USED_REGISTERS array in the
  480. GCC source.
  481. }
  482. std_saved_registers = [R_R4..R_R10];
  483. { Required parameter alignment when calling a routine declared as
  484. stdcall and cdecl. The alignment value should be the one defined
  485. by GCC or the target ABI.
  486. The value of this constant is equal to the constant
  487. PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.
  488. }
  489. std_param_align = 4;
  490. {*****************************************************************************
  491. Helpers
  492. *****************************************************************************}
  493. procedure convert_register_to_enum(var r:Tregister);
  494. function cgsize2subreg(s:Tcgsize):Tsubregister;
  495. function reg2opsize(r:tregister):topsize;
  496. function is_calljmp(o:tasmop):boolean;
  497. procedure inverse_flags(var f: TResFlags);
  498. function flags_to_cond(const f: TResFlags) : TAsmCond;
  499. function supreg_name(r:Tsuperregister):string;
  500. procedure shifterop_reset(var so : tshifterop);
  501. implementation
  502. procedure convert_register_to_enum(var r:Tregister);
  503. begin
  504. end;
  505. function cgsize2subreg(s:Tcgsize):Tsubregister;
  506. begin
  507. end;
  508. function reg2opsize(r:tregister):topsize;
  509. begin
  510. end;
  511. function is_calljmp(o:tasmop):boolean;
  512. begin
  513. { This isn't 100% perfect because the arm allows jumps also by writing to PC=R15.
  514. To overcome this problem we simply forbid that FPC generates jumps by loading R15 }
  515. is_calljmp:= o in [A_B,A_BL,A_BX,A_BLX];
  516. end;
  517. procedure inverse_flags(var f: TResFlags);
  518. begin
  519. end;
  520. function flags_to_cond(const f: TResFlags) : TAsmCond;
  521. begin
  522. end;
  523. function supreg_name(r:Tsuperregister):string;
  524. begin
  525. end;
  526. procedure shifterop_reset(var so : tshifterop);
  527. begin
  528. FillChar(so,sizeof(so),0);
  529. end;
  530. end.
  531. {
  532. $Log$
  533. Revision 1.6 2003-08-24 12:27:26 florian
  534. * continued to work on the arm port
  535. Revision 1.5 2003/08/21 03:14:00 florian
  536. * arm compiler can be compiled; far from being working
  537. Revision 1.4 2003/08/20 15:50:13 florian
  538. * more arm stuff
  539. Revision 1.3 2003/08/16 13:23:01 florian
  540. * several arm related stuff fixed
  541. Revision 1.2 2003/07/26 00:55:57 florian
  542. * basic stuff fixed
  543. Revision 1.1 2003/07/21 16:35:30 florian
  544. * very basic stuff for the arm
  545. }