raarmgas.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Carl Eric Codere and Peter Vreman
  4. Does the parsing for the ARM GNU AS styled inline assembler.
  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. Unit raarmgas;
  19. {$i fpcdefs.inc}
  20. Interface
  21. uses
  22. raatt,raarm,
  23. cpubase;
  24. type
  25. tarmattreader = class(tattreader)
  26. actoppostfix : TOpPostfix;
  27. function is_asmopcode(const s: string):boolean;override;
  28. function is_register(const s:string):boolean;override;
  29. procedure handleopcode;override;
  30. procedure BuildReference(oper : tarmoperand);
  31. procedure BuildOperand(oper : tarmoperand);
  32. procedure BuildOpCode(instr : tarminstruction);
  33. procedure ReadSym(oper : tarmoperand);
  34. procedure ConvertCalljmp(instr : tarminstruction);
  35. end;
  36. Implementation
  37. uses
  38. { helpers }
  39. cutils,
  40. { global }
  41. globtype,globals,verbose,
  42. systems,
  43. { aasm }
  44. cpuinfo,aasmbase,aasmtai,aasmcpu,
  45. { symtable }
  46. symconst,symbase,symtype,symsym,symtable,
  47. { parser }
  48. scanner,
  49. procinfo,
  50. itcpugas,
  51. rabase,rautils,
  52. cgbase,cgobj
  53. ;
  54. function tarmattreader.is_register(const s:string):boolean;
  55. type
  56. treg2str = record
  57. name : string[2];
  58. reg : tregister;
  59. end;
  60. const
  61. extraregs : array[0..19] of treg2str = (
  62. (name: 'A1'; reg : NR_R0),
  63. (name: 'A2'; reg : NR_R1),
  64. (name: 'A3'; reg : NR_R2),
  65. (name: 'A4'; reg : NR_R3),
  66. (name: 'V1'; reg : NR_R4),
  67. (name: 'V2'; reg : NR_R5),
  68. (name: 'V3'; reg : NR_R6),
  69. (name: 'V4'; reg : NR_R7),
  70. (name: 'V5'; reg : NR_R8),
  71. (name: 'V6'; reg : NR_R9),
  72. (name: 'V7'; reg : NR_R10),
  73. (name: 'V8'; reg : NR_R11),
  74. (name: 'WR'; reg : NR_R7),
  75. (name: 'SB'; reg : NR_R9),
  76. (name: 'SL'; reg : NR_R10),
  77. (name: 'FP'; reg : NR_R11),
  78. (name: 'IP'; reg : NR_R12),
  79. (name: 'SP'; reg : NR_R13),
  80. (name: 'LR'; reg : NR_R14),
  81. (name: 'PC'; reg : NR_R15));
  82. var
  83. i : longint;
  84. begin
  85. result:=inherited is_register(s);
  86. { reg found?
  87. possible aliases are always 2 char
  88. }
  89. if result or (length(s)<>2) then
  90. exit;
  91. for i:=low(extraregs) to high(extraregs) do
  92. begin
  93. if s=extraregs[i].name then
  94. begin
  95. actasmregister:=extraregs[i].reg;
  96. result:=true;
  97. actasmtoken:=AS_REGISTER;
  98. exit;
  99. end;
  100. end;
  101. end;
  102. procedure tarmattreader.ReadSym(oper : tarmoperand);
  103. var
  104. tempstr : string;
  105. typesize,l,k : longint;
  106. begin
  107. tempstr:=actasmpattern;
  108. Consume(AS_ID);
  109. { typecasting? }
  110. if (actasmtoken=AS_LPAREN) and
  111. SearchType(tempstr,typesize) then
  112. begin
  113. oper.hastype:=true;
  114. Consume(AS_LPAREN);
  115. BuildOperand(oper);
  116. Consume(AS_RPAREN);
  117. if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
  118. oper.SetSize(typesize,true);
  119. end
  120. else
  121. if not oper.SetupVar(tempstr,false) then
  122. Message1(sym_e_unknown_id,tempstr);
  123. { record.field ? }
  124. if actasmtoken=AS_DOT then
  125. begin
  126. BuildRecordOffsetSize(tempstr,l,k);
  127. inc(oper.opr.ref.offset,l);
  128. end;
  129. end;
  130. Procedure tarmattreader.BuildReference(oper : tarmoperand);
  131. procedure Consume_RBracket;
  132. begin
  133. if actasmtoken<>AS_RBRACKET then
  134. Begin
  135. Message(asmr_e_invalid_reference_syntax);
  136. RecoverConsume(true);
  137. end
  138. else
  139. begin
  140. Consume(AS_RBRACKET);
  141. if not (actasmtoken in [AS_COMMA,AS_SEPARATOR,AS_END]) then
  142. Begin
  143. Message(asmr_e_invalid_reference_syntax);
  144. RecoverConsume(true);
  145. end;
  146. end;
  147. end;
  148. procedure read_index;
  149. begin
  150. Consume(AS_COMMA);
  151. if actasmtoken=AS_REGISTER then
  152. Begin
  153. oper.opr.ref.index:=actasmregister;
  154. Consume(AS_REGISTER);
  155. end;
  156. end;
  157. begin
  158. Consume(AS_LBRACKET);
  159. if actasmtoken=AS_REGISTER then
  160. begin
  161. oper.opr.ref.base:=actasmregister;
  162. Consume(AS_REGISTER);
  163. { can either be a register or a right parenthesis }
  164. { (reg) }
  165. if actasmtoken=AS_RBRACKET then
  166. Begin
  167. Consume_RBracket;
  168. oper.opr.ref.addressmode:=AM_POSTINDEXED;
  169. if actasmtoken=AS_COMMA then
  170. read_index;
  171. exit;
  172. end;
  173. if actasmtoken=AS_COMMA then
  174. read_index;
  175. if actasmtoken=AS_NOT then
  176. begin
  177. consume(AS_NOT);
  178. oper.opr.ref.addressmode:=AM_PREINDEXED;
  179. end;
  180. end {end case }
  181. else
  182. Begin
  183. Message(asmr_e_invalid_reference_syntax);
  184. RecoverConsume(false);
  185. end;
  186. end;
  187. Procedure tarmattreader.BuildOperand(oper : tarmoperand);
  188. var
  189. expr : string;
  190. typesize,l : longint;
  191. procedure AddLabelOperand(hl:tasmlabel);
  192. begin
  193. if not(actasmtoken in [AS_PLUS,AS_MINUS,AS_LPAREN]) and
  194. is_calljmp(actopcode) then
  195. begin
  196. oper.opr.typ:=OPR_SYMBOL;
  197. oper.opr.symbol:=hl;
  198. end
  199. else
  200. begin
  201. oper.InitRef;
  202. oper.opr.ref.symbol:=hl;
  203. end;
  204. end;
  205. procedure MaybeRecordOffset;
  206. var
  207. hasdot : boolean;
  208. l,
  209. toffset,
  210. tsize : longint;
  211. begin
  212. if not(actasmtoken in [AS_DOT,AS_PLUS,AS_MINUS]) then
  213. exit;
  214. l:=0;
  215. hasdot:=(actasmtoken=AS_DOT);
  216. if hasdot then
  217. begin
  218. if expr<>'' then
  219. begin
  220. BuildRecordOffsetSize(expr,toffset,tsize);
  221. inc(l,toffset);
  222. oper.SetSize(tsize,true);
  223. end;
  224. end;
  225. if actasmtoken in [AS_PLUS,AS_MINUS] then
  226. inc(l,BuildConstExpression(true,false));
  227. case oper.opr.typ of
  228. OPR_LOCAL :
  229. begin
  230. { don't allow direct access to fields of parameters, because that
  231. will generate buggy code. Allow it only for explicit typecasting }
  232. if hasdot and
  233. (not oper.hastype) and
  234. (tvarsym(oper.opr.localsym).owner.symtabletype=parasymtable) and
  235. (current_procinfo.procdef.proccalloption<>pocall_register) then
  236. Message(asmr_e_cannot_access_field_directly_for_parameters);
  237. inc(oper.opr.localsymofs,l)
  238. end;
  239. OPR_CONSTANT :
  240. inc(oper.opr.val,l);
  241. OPR_REFERENCE :
  242. inc(oper.opr.ref.offset,l);
  243. else
  244. internalerror(200309221);
  245. end;
  246. end;
  247. function MaybeBuildReference:boolean;
  248. { Try to create a reference, if not a reference is found then false
  249. is returned }
  250. begin
  251. MaybeBuildReference:=true;
  252. case actasmtoken of
  253. AS_INTNUM,
  254. AS_MINUS,
  255. AS_PLUS:
  256. Begin
  257. oper.opr.ref.offset:=BuildConstExpression(True,False);
  258. if actasmtoken<>AS_LPAREN then
  259. Message(asmr_e_invalid_reference_syntax)
  260. else
  261. BuildReference(oper);
  262. end;
  263. AS_LPAREN:
  264. BuildReference(oper);
  265. AS_ID: { only a variable is allowed ... }
  266. Begin
  267. ReadSym(oper);
  268. case actasmtoken of
  269. AS_END,
  270. AS_SEPARATOR,
  271. AS_COMMA: ;
  272. AS_LPAREN:
  273. BuildReference(oper);
  274. else
  275. Begin
  276. Message(asmr_e_invalid_reference_syntax);
  277. Consume(actasmtoken);
  278. end;
  279. end; {end case }
  280. end;
  281. else
  282. MaybeBuildReference:=false;
  283. end; { end case }
  284. end;
  285. var
  286. tempreg,ireg : tregister;
  287. hl : tasmlabel;
  288. ofs : longint;
  289. registerset : tcpuregisterset;
  290. Begin
  291. expr:='';
  292. case actasmtoken of
  293. AS_LBRACKET: { Memory reference or constant expression }
  294. Begin
  295. oper.InitRef;
  296. BuildReference(oper);
  297. end;
  298. AS_HASH: { Constant expression }
  299. Begin
  300. Consume(AS_HASH);
  301. BuildConstantOperand(oper);
  302. end;
  303. (*
  304. AS_INTNUM,
  305. AS_MINUS,
  306. AS_PLUS:
  307. Begin
  308. { Constant memory offset }
  309. { This must absolutely be followed by ( }
  310. oper.InitRef;
  311. oper.opr.ref.offset:=BuildConstExpression(True,False);
  312. if actasmtoken<>AS_LPAREN then
  313. begin
  314. ofs:=oper.opr.ref.offset;
  315. BuildConstantOperand(oper);
  316. inc(oper.opr.val,ofs);
  317. end
  318. else
  319. BuildReference(oper);
  320. end;
  321. *)
  322. AS_ID: { A constant expression, or a Variable ref. }
  323. Begin
  324. { Local Label ? }
  325. if is_locallabel(actasmpattern) then
  326. begin
  327. CreateLocalLabel(actasmpattern,hl,false);
  328. Consume(AS_ID);
  329. AddLabelOperand(hl);
  330. end
  331. else
  332. { Check for label }
  333. if SearchLabel(actasmpattern,hl,false) then
  334. begin
  335. Consume(AS_ID);
  336. AddLabelOperand(hl);
  337. end
  338. else
  339. { probably a variable or normal expression }
  340. { or a procedure (such as in CALL ID) }
  341. Begin
  342. { is it a constant ? }
  343. if SearchIConstant(actasmpattern,l) then
  344. Begin
  345. if not (oper.opr.typ in [OPR_NONE,OPR_CONSTANT]) then
  346. Message(asmr_e_invalid_operand_type);
  347. BuildConstantOperand(oper);
  348. end
  349. else
  350. begin
  351. expr:=actasmpattern;
  352. Consume(AS_ID);
  353. { typecasting? }
  354. if (actasmtoken=AS_LPAREN) and
  355. SearchType(expr,typesize) then
  356. begin
  357. oper.hastype:=true;
  358. Consume(AS_LPAREN);
  359. BuildOperand(oper);
  360. Consume(AS_RPAREN);
  361. if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
  362. oper.SetSize(typesize,true);
  363. end
  364. else
  365. begin
  366. if not(oper.SetupVar(expr,false)) then
  367. Begin
  368. { look for special symbols ... }
  369. if expr= '__HIGH' then
  370. begin
  371. consume(AS_LPAREN);
  372. if not oper.setupvar('high'+actasmpattern,false) then
  373. Message1(sym_e_unknown_id,'high'+actasmpattern);
  374. consume(AS_ID);
  375. consume(AS_RPAREN);
  376. end
  377. else
  378. if expr = '__RESULT' then
  379. oper.SetUpResult
  380. else
  381. if expr = '__SELF' then
  382. oper.SetupSelf
  383. else
  384. if expr = '__OLDEBP' then
  385. oper.SetupOldEBP
  386. else
  387. { check for direct symbolic names }
  388. { only if compiling the system unit }
  389. if (cs_compilesystem in aktmoduleswitches) then
  390. begin
  391. if not oper.SetupDirectVar(expr) then
  392. Begin
  393. { not found, finally ... add it anyways ... }
  394. Message1(asmr_w_id_supposed_external,expr);
  395. oper.InitRef;
  396. oper.opr.ref.symbol:=objectlibrary.newasmsymbol(expr);
  397. end;
  398. end
  399. else
  400. Message1(sym_e_unknown_id,expr);
  401. end;
  402. end;
  403. end;
  404. if actasmtoken=AS_DOT then
  405. MaybeRecordOffset;
  406. { add a constant expression? }
  407. if (actasmtoken=AS_PLUS) then
  408. begin
  409. l:=BuildConstExpression(true,false);
  410. case oper.opr.typ of
  411. OPR_CONSTANT :
  412. inc(oper.opr.val,l);
  413. OPR_LOCAL :
  414. inc(oper.opr.localsymofs,l);
  415. OPR_REFERENCE :
  416. inc(oper.opr.ref.offset,l);
  417. else
  418. internalerror(200309202);
  419. end;
  420. end
  421. end;
  422. { Do we have a indexing reference, then parse it also }
  423. if actasmtoken=AS_LPAREN then
  424. BuildReference(oper);
  425. end;
  426. { Register, a variable reference or a constant reference }
  427. AS_REGISTER:
  428. Begin
  429. { save the type of register used. }
  430. tempreg:=actasmregister;
  431. Consume(AS_REGISTER);
  432. if (actasmtoken in [AS_END,AS_SEPARATOR,AS_COMMA]) then
  433. Begin
  434. if not (oper.opr.typ in [OPR_NONE,OPR_REGISTER]) then
  435. Message(asmr_e_invalid_operand_type);
  436. oper.opr.typ:=OPR_REGISTER;
  437. oper.opr.reg:=tempreg;
  438. end
  439. else if (actasmtoken=AS_NOT) and (actopcode in [A_LDM,A_STM]) then
  440. begin
  441. consume(AS_NOT);
  442. oper.opr.typ:=OPR_REFERENCE;
  443. oper.opr.ref.addressmode:=AM_PREINDEXED;
  444. oper.opr.ref.index:=tempreg;
  445. end
  446. else
  447. Message(asmr_e_syn_operand);
  448. end;
  449. { Registerset }
  450. AS_LSBRACKET:
  451. begin
  452. consume(AS_LSBRACKET);
  453. registerset:=[];
  454. while true do
  455. begin
  456. if actasmtoken=AS_REGISTER then
  457. begin
  458. include(registerset,getsupreg(actasmregister));
  459. tempreg:=actasmregister;
  460. consume(AS_REGISTER);
  461. if actasmtoken=AS_MINUS then
  462. begin
  463. consume(AS_MINUS);
  464. for ireg:=getsupreg(tempreg) to getsupreg(actasmregister) do
  465. include(registerset,ireg);
  466. consume(AS_REGISTER);
  467. end;
  468. end
  469. else
  470. consume(AS_REGISTER);
  471. if actasmtoken=AS_COMMA then
  472. consume(AS_COMMA)
  473. else
  474. break;
  475. end;
  476. consume(AS_RSBRACKET);
  477. oper.opr.typ:=OPR_REGSET;
  478. oper.opr.regset:=registerset;
  479. end;
  480. AS_END,
  481. AS_SEPARATOR,
  482. AS_COMMA: ;
  483. else
  484. Begin
  485. Message(asmr_e_syn_operand);
  486. Consume(actasmtoken);
  487. end;
  488. end; { end case }
  489. end;
  490. {*****************************************************************************
  491. tarmattreader
  492. *****************************************************************************}
  493. procedure tarmattreader.BuildOpCode(instr : tarminstruction);
  494. var
  495. operandnum : longint;
  496. Begin
  497. { opcode }
  498. if (actasmtoken<>AS_OPCODE) then
  499. Begin
  500. Message(asmr_e_invalid_or_missing_opcode);
  501. RecoverConsume(true);
  502. exit;
  503. end;
  504. { Fill the instr object with the current state }
  505. with instr do
  506. begin
  507. Opcode:=ActOpcode;
  508. condition:=ActCondition;
  509. oppostfix:=actoppostfix;
  510. end;
  511. { We are reading operands, so opcode will be an AS_ID }
  512. operandnum:=1;
  513. Consume(AS_OPCODE);
  514. { Zero operand opcode ? }
  515. if actasmtoken in [AS_SEPARATOR,AS_END] then
  516. begin
  517. operandnum:=0;
  518. exit;
  519. end;
  520. { Read the operands }
  521. repeat
  522. case actasmtoken of
  523. AS_COMMA: { Operand delimiter }
  524. Begin
  525. if operandnum>Max_Operands then
  526. Message(asmr_e_too_many_operands)
  527. else
  528. Inc(operandnum);
  529. Consume(AS_COMMA);
  530. end;
  531. AS_SEPARATOR,
  532. AS_END : { End of asm operands for this opcode }
  533. begin
  534. break;
  535. end;
  536. else
  537. BuildOperand(instr.Operands[operandnum] as tarmoperand);
  538. end; { end case }
  539. until false;
  540. instr.Ops:=operandnum;
  541. end;
  542. function tarmattreader.is_asmopcode(const s: string):boolean;
  543. const
  544. { sorted by length so longer postfixes will match first }
  545. postfix2strsorted : array[1..19] of string[2] = (
  546. 'EP','SB','BT','SH',
  547. 'IA','IB','DA','DB','FD','FA','ED','EA',
  548. 'B','D','E','P','T','H','S');
  549. postfixsorted : array[1..19] of TOpPostfix = (
  550. PF_EP,PF_SB,PF_BT,PF_SH,
  551. PF_IA,PF_IB,PF_DA,PF_DB,PF_FD,PF_FA,PF_ED,PF_EA,
  552. PF_B,PF_D,PF_E,PF_P,PF_T,PF_H,PF_S);
  553. var
  554. str2opentry: tstr2opentry;
  555. len,
  556. j,
  557. sufidx : longint;
  558. hs : string;
  559. maxlen : longint;
  560. icond : tasmcond;
  561. Begin
  562. { making s a value parameter would break other assembler readers }
  563. hs:=s;
  564. is_asmopcode:=false;
  565. { clear op code }
  566. actopcode:=A_None;
  567. actcondition:=C_None;
  568. { first, handle B else BLS is read wrong }
  569. if ((hs[1]='B') and (length(hs)=3)) then
  570. begin
  571. for icond:=low(tasmcond) to high(tasmcond) do
  572. begin
  573. if copy(hs,2,3)=uppercond2str[icond] then
  574. begin
  575. actopcode:=A_B;
  576. actasmtoken:=AS_OPCODE;
  577. actcondition:=icond;
  578. is_asmopcode:=true;
  579. exit;
  580. end;
  581. end;
  582. end;
  583. maxlen:=max(length(hs),5);
  584. for j:=maxlen downto 1 do
  585. begin
  586. str2opentry:=tstr2opentry(iasmops.search(copy(hs,1,j)));
  587. if assigned(str2opentry) then
  588. begin
  589. actopcode:=str2opentry.op;
  590. actasmtoken:=AS_OPCODE;
  591. { strip op code }
  592. delete(hs,1,j);
  593. break;
  594. end;
  595. end;
  596. if not(assigned(str2opentry)) then
  597. exit;
  598. { search for condition, conditions are always 2 chars }
  599. if length(hs)>1 then
  600. begin
  601. for icond:=low(tasmcond) to high(tasmcond) do
  602. begin
  603. if copy(hs,1,2)=uppercond2str[icond] then
  604. begin
  605. actcondition:=icond;
  606. { strip condition }
  607. delete(hs,1,2);
  608. break;
  609. end;
  610. end;
  611. end;
  612. { check for postfix }
  613. if length(hs)>0 then
  614. begin
  615. for j:=low(postfixsorted) to high(postfixsorted) do
  616. begin
  617. if copy(hs,1,length(postfix2strsorted[j]))=postfix2strsorted[j] then
  618. begin
  619. actoppostfix:=postfixsorted[j];
  620. { strip postfix }
  621. delete(hs,1,length(postfix2strsorted[j]));
  622. break;
  623. end;
  624. end;
  625. end;
  626. { if we stripped all postfixes, it's a valid opcode }
  627. is_asmopcode:=length(hs)=0;
  628. end;
  629. procedure tarmattreader.ConvertCalljmp(instr : tarminstruction);
  630. var
  631. newopr : toprrec;
  632. begin
  633. if instr.Operands[1].opr.typ=OPR_REFERENCE then
  634. begin
  635. newopr.typ:=OPR_SYMBOL;
  636. newopr.symbol:=instr.Operands[1].opr.ref.symbol;
  637. newopr.symofs:=instr.Operands[1].opr.ref.offset;
  638. if (instr.Operands[1].opr.ref.base<>NR_NO) or
  639. (instr.Operands[1].opr.ref.index<>NR_NO) then
  640. Message(asmr_e_syn_operand);
  641. instr.Operands[1].opr:=newopr;
  642. end;
  643. end;
  644. procedure tarmattreader.handleopcode;
  645. var
  646. instr : tarminstruction;
  647. begin
  648. instr:=TarmInstruction.Create(TarmOperand);
  649. BuildOpcode(instr);
  650. if is_calljmp(instr.opcode) then
  651. ConvertCalljmp(instr);
  652. {
  653. instr.AddReferenceSizes;
  654. instr.SetInstructionOpsize;
  655. instr.CheckOperandSizes;
  656. }
  657. instr.ConcatInstruction(curlist);
  658. instr.Free;
  659. actoppostfix:=PF_None;
  660. end;
  661. {*****************************************************************************
  662. Initialize
  663. *****************************************************************************}
  664. const
  665. asmmode_arm_att_info : tasmmodeinfo =
  666. (
  667. id : asmmode_arm_gas;
  668. idtxt : 'GAS';
  669. casmreader : tarmattreader;
  670. );
  671. asmmode_arm_standard_info : tasmmodeinfo =
  672. (
  673. id : asmmode_standard;
  674. idtxt : 'STANDARD';
  675. casmreader : tarmattreader;
  676. );
  677. initialization
  678. RegisterAsmMode(asmmode_arm_att_info);
  679. RegisterAsmMode(asmmode_arm_standard_info);
  680. end.
  681. {
  682. $Log$
  683. Revision 1.5 2003-12-08 17:43:57 florian
  684. * fixed ldm/stm arm assembler reading
  685. * fixed a_load_reg_reg with OS_8 on ARM
  686. * non supported calling conventions cause only a warning now
  687. Revision 1.4 2003/12/03 17:39:05 florian
  688. * fixed several arm calling conventions issues
  689. * fixed reference reading in the assembler reader
  690. * fixed a_loadaddr_ref_reg
  691. Revision 1.3 2003/11/24 15:17:37 florian
  692. * changed some types to prevend range check errors
  693. Revision 1.2 2003/11/21 16:29:26 florian
  694. * fixed reading of reg. sets in the arm assembler reader
  695. Revision 1.1 2003/11/17 23:23:47 florian
  696. + first part of arm assembler reader
  697. }