raavrgas.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. {
  2. Copyright (c) 1998-2008 by Carl Eric Codere and Peter Vreman
  3. Does the parsing for the ARM GNU AS styled inline assembler.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. Unit raavrgas;
  18. {$i fpcdefs.inc}
  19. Interface
  20. uses
  21. raatt,raavr,
  22. cpubase;
  23. type
  24. tavrattreader = class(tattreader)
  25. function is_asmopcode(const s: string):boolean;override;
  26. function is_register(const s:string):boolean;override;
  27. procedure handleopcode;override;
  28. procedure BuildReference(oper : tavroperand);
  29. procedure BuildOperand(oper : tavroperand);
  30. procedure BuildOpCode(instr : tavrinstruction);
  31. procedure ReadSym(oper : tavroperand);
  32. procedure ConvertCalljmp(instr : tavrinstruction);
  33. end;
  34. Implementation
  35. uses
  36. { helpers }
  37. cutils,
  38. { global }
  39. globtype,globals,verbose,
  40. systems,
  41. { aasm }
  42. cpuinfo,aasmbase,aasmtai,aasmdata,aasmcpu,
  43. { symtable }
  44. symconst,symbase,symtype,symsym,symtable,symdef,
  45. { parser }
  46. scanner,
  47. procinfo,
  48. itcpugas,
  49. rabase,rautils,
  50. cgbase,cgutils,cgobj,paramgr
  51. ;
  52. function tavrattreader.is_register(const s:string):boolean;
  53. type
  54. treg2str = record
  55. name : string[2];
  56. reg : tregister;
  57. end;
  58. const
  59. extraregs : array[0..5] of treg2str = (
  60. (name: 'XL'; reg : NR_R26),
  61. (name: 'XH'; reg : NR_R27),
  62. (name: 'YL'; reg : NR_R28),
  63. (name: 'YH'; reg : NR_R29),
  64. (name: 'ZL'; reg : NR_R30),
  65. (name: 'ZH'; reg : NR_R31)
  66. );
  67. var
  68. i : longint;
  69. begin
  70. result:=inherited is_register(s);
  71. { reg found?
  72. possible aliases are always 2 char
  73. }
  74. if result or (not (length(s) in [1,2])) then
  75. exit;
  76. for i:=low(extraregs) to high(extraregs) do
  77. begin
  78. if s=extraregs[i].name then
  79. begin
  80. actasmregister:=extraregs[i].reg;
  81. result:=true;
  82. actasmtoken:=AS_REGISTER;
  83. exit;
  84. end;
  85. end;
  86. end;
  87. procedure tavrattreader.ReadSym(oper : tavroperand);
  88. var
  89. tempstr, mangledname : string;
  90. typesize : tcgint;
  91. l,k : tcgint;
  92. begin
  93. tempstr:=actasmpattern;
  94. Consume(AS_ID);
  95. { typecasting? }
  96. if (actasmtoken=AS_LPAREN) and
  97. SearchType(tempstr,typesize) then
  98. begin
  99. oper.hastype:=true;
  100. Consume(AS_LPAREN);
  101. BuildOperand(oper);
  102. Consume(AS_RPAREN);
  103. if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
  104. oper.SetSize(typesize,true);
  105. end
  106. else
  107. if not oper.SetupVar(tempstr,false) then
  108. Message1(sym_e_unknown_id,tempstr);
  109. { record.field ? }
  110. if actasmtoken=AS_DOT then
  111. begin
  112. BuildRecordOffsetSize(tempstr,l,k,mangledname,false);
  113. if (mangledname<>'') then
  114. Message(asmr_e_invalid_reference_syntax);
  115. inc(oper.opr.ref.offset,l);
  116. end;
  117. end;
  118. Procedure tavrattreader.BuildReference(oper : tavroperand);
  119. procedure Consume_RParen;
  120. begin
  121. if actasmtoken<>AS_RPAREN then
  122. Begin
  123. Message(asmr_e_invalid_reference_syntax);
  124. RecoverConsume(true);
  125. end
  126. else
  127. begin
  128. Consume(AS_RPAREN);
  129. if not (actasmtoken in [AS_COMMA,AS_SEPARATOR,AS_END]) then
  130. Begin
  131. Message(asmr_e_invalid_reference_syntax);
  132. RecoverConsume(true);
  133. end;
  134. end;
  135. end;
  136. procedure read_index;
  137. begin
  138. Consume(AS_COMMA);
  139. if actasmtoken=AS_REGISTER then
  140. Begin
  141. oper.opr.ref.index:=actasmregister;
  142. Consume(AS_REGISTER);
  143. end
  144. else if actasmtoken=AS_HASH then
  145. begin
  146. Consume(AS_HASH);
  147. inc(oper.opr.ref.offset,BuildConstExpression(false,true));
  148. end;
  149. end;
  150. begin
  151. Consume(AS_LPAREN);
  152. if actasmtoken=AS_REGISTER then
  153. begin
  154. oper.opr.ref.base:=actasmregister;
  155. Consume(AS_REGISTER);
  156. { can either be a register or a right parenthesis }
  157. { (reg) }
  158. if actasmtoken=AS_LPAREN then
  159. Begin
  160. Consume_RParen;
  161. exit;
  162. end;
  163. if actasmtoken=AS_PLUS then
  164. begin
  165. consume(AS_PLUS);
  166. oper.opr.ref.addressmode:=AM_POSTINCREMENT;
  167. end;
  168. end {end case }
  169. else
  170. Begin
  171. Message(asmr_e_invalid_reference_syntax);
  172. RecoverConsume(false);
  173. end;
  174. end;
  175. Procedure tavrattreader.BuildOperand(oper : tavroperand);
  176. var
  177. expr : string;
  178. typesize,l : tcgint;
  179. procedure AddLabelOperand(hl:tasmlabel);
  180. begin
  181. if not(actasmtoken in [AS_PLUS,AS_MINUS,AS_LPAREN]) { and
  182. is_calljmp(actopcode) } then
  183. begin
  184. oper.opr.typ:=OPR_SYMBOL;
  185. oper.opr.symbol:=hl;
  186. end
  187. else
  188. begin
  189. oper.InitRef;
  190. oper.opr.ref.symbol:=hl;
  191. end;
  192. end;
  193. procedure MaybeRecordOffset;
  194. var
  195. mangledname: string;
  196. hasdot : boolean;
  197. l,
  198. toffset,
  199. tsize : tcgint;
  200. begin
  201. if not(actasmtoken in [AS_DOT,AS_PLUS,AS_MINUS]) then
  202. exit;
  203. l:=0;
  204. mangledname:='';
  205. hasdot:=(actasmtoken=AS_DOT);
  206. if hasdot then
  207. begin
  208. if expr<>'' then
  209. begin
  210. BuildRecordOffsetSize(expr,toffset,tsize,mangledname,false);
  211. if (oper.opr.typ<>OPR_CONSTANT) and
  212. (mangledname<>'') then
  213. Message(asmr_e_wrong_sym_type);
  214. inc(l,toffset);
  215. oper.SetSize(tsize,true);
  216. end;
  217. end;
  218. if actasmtoken in [AS_PLUS,AS_MINUS] then
  219. inc(l,BuildConstExpression(true,false));
  220. case oper.opr.typ of
  221. OPR_LOCAL :
  222. begin
  223. { don't allow direct access to fields of parameters, because that
  224. will generate buggy code. Allow it only for explicit typecasting }
  225. if hasdot and
  226. (not oper.hastype) then
  227. checklocalsubscript(oper.opr.localsym);
  228. inc(oper.opr.localsymofs,l)
  229. end;
  230. OPR_CONSTANT :
  231. inc(oper.opr.val,l);
  232. OPR_REFERENCE :
  233. if (mangledname<>'') then
  234. begin
  235. if (oper.opr.val<>0) then
  236. Message(asmr_e_wrong_sym_type);
  237. oper.opr.typ:=OPR_SYMBOL;
  238. oper.opr.symbol:=current_asmdata.RefAsmSymbol(mangledname,AT_FUNCTION);
  239. end
  240. else
  241. inc(oper.opr.val,l);
  242. OPR_SYMBOL:
  243. Message(asmr_e_invalid_symbol_ref);
  244. else
  245. internalerror(200309221);
  246. end;
  247. end;
  248. function MaybeBuildReference:boolean;
  249. { Try to create a reference, if not a reference is found then false
  250. is returned }
  251. begin
  252. MaybeBuildReference:=true;
  253. case actasmtoken of
  254. AS_INTNUM,
  255. AS_MINUS,
  256. AS_PLUS:
  257. Begin
  258. oper.opr.ref.offset:=BuildConstExpression(True,False);
  259. case actasmtoken of
  260. AS_LPAREN:
  261. BuildReference(oper);
  262. AS_COMMA:
  263. exit;
  264. else
  265. Message(asmr_e_invalid_reference_syntax)
  266. end;
  267. end;
  268. AS_LPAREN:
  269. BuildReference(oper);
  270. AS_ID: { only a variable is allowed ... }
  271. Begin
  272. ReadSym(oper);
  273. case actasmtoken of
  274. AS_END,
  275. AS_SEPARATOR,
  276. AS_COMMA: ;
  277. AS_LPAREN:
  278. BuildReference(oper);
  279. else
  280. Begin
  281. Message(asmr_e_invalid_reference_syntax);
  282. Consume(actasmtoken);
  283. end;
  284. end; {end case }
  285. end;
  286. else
  287. MaybeBuildReference:=false;
  288. end; { end case }
  289. end;
  290. var
  291. tempreg : tregister;
  292. ireg : tsuperregister;
  293. hl : tasmlabel;
  294. ofs : longint;
  295. registerset : tcpuregisterset;
  296. tempstr : string;
  297. tempsymtyp : tasmsymtype;
  298. Begin
  299. expr:='';
  300. case actasmtoken of
  301. AS_LBRACKET: { Memory reference or constant expression }
  302. Begin
  303. oper.InitRef;
  304. BuildReference(oper);
  305. end;
  306. AS_INTNUM,
  307. AS_MINUS,
  308. AS_PLUS,
  309. AS_NOT:
  310. Begin
  311. if (actasmtoken=AS_MINUS) and
  312. (actopcode in [A_LD,A_ST]) then
  313. begin
  314. { Special handling of predecrement addressing }
  315. oper.InitRef;
  316. oper.opr.ref.addressmode:=AM_PREDECREMENT;
  317. consume(AS_MINUS);
  318. if actasmtoken=AS_REGISTER then
  319. begin
  320. oper.opr.ref.base:=actasmregister;
  321. consume(AS_REGISTER);
  322. end
  323. else
  324. begin
  325. Message(asmr_e_invalid_reference_syntax);
  326. RecoverConsume(false);
  327. end;
  328. end
  329. else
  330. begin
  331. { Constant memory offset }
  332. { This must absolutely be followed by ( }
  333. oper.InitRef;
  334. oper.opr.ref.offset:=BuildConstExpression(True,False);
  335. { absolute memory addresss? }
  336. if ((actopcode = A_LDS) and (actasmtoken <> AS_SEPARATOR)) or
  337. ((actopcode = A_STS) and (actasmtoken <> AS_COMMA)) then
  338. begin
  339. if not(MaybeBuildReference) then
  340. Message(asmr_e_invalid_reference_syntax);
  341. end
  342. else
  343. begin
  344. ofs:=oper.opr.ref.offset;
  345. BuildConstantOperand(oper);
  346. inc(oper.opr.val,ofs);
  347. end;
  348. end;
  349. end;
  350. AS_ID: { A constant expression, or a Variable ref. }
  351. Begin
  352. if (actasmpattern='LO8') or (actasmpattern='HI8') then
  353. begin
  354. { Low or High part of a constant (or constant
  355. memory location) }
  356. oper.InitRef;
  357. if actasmpattern='LO8' then
  358. oper.opr.ref.refaddr:=addr_lo8
  359. else
  360. oper.opr.ref.refaddr:=addr_hi8;
  361. Consume(actasmtoken);
  362. Consume(AS_LPAREN);
  363. BuildConstSymbolExpression(false, true,false,l,tempstr,tempsymtyp);
  364. if not assigned(oper.opr.ref.symbol) then
  365. oper.opr.ref.symbol:=current_asmdata.RefAsmSymbol(tempstr,tempsymtyp)
  366. else
  367. Message(asmr_e_cant_have_multiple_relocatable_symbols);
  368. case oper.opr.typ of
  369. OPR_CONSTANT :
  370. inc(oper.opr.val,l);
  371. OPR_LOCAL :
  372. inc(oper.opr.localsymofs,l);
  373. OPR_REFERENCE :
  374. inc(oper.opr.ref.offset,l);
  375. else
  376. internalerror(200309202);
  377. end;
  378. Consume(AS_RPAREN);
  379. end
  380. { Local Label ? }
  381. else if is_locallabel(actasmpattern) then
  382. begin
  383. CreateLocalLabel(actasmpattern,hl,false);
  384. Consume(AS_ID);
  385. AddLabelOperand(hl);
  386. end
  387. { Check for label }
  388. else if SearchLabel(actasmpattern,hl,false) then
  389. begin
  390. Consume(AS_ID);
  391. AddLabelOperand(hl);
  392. end
  393. else
  394. { probably a variable or normal expression }
  395. { or a procedure (such as in CALL ID) }
  396. Begin
  397. { is it a constant ? }
  398. if SearchIConstant(actasmpattern,l) then
  399. Begin
  400. if not (oper.opr.typ in [OPR_NONE,OPR_CONSTANT]) then
  401. Message(asmr_e_invalid_operand_type);
  402. BuildConstantOperand(oper);
  403. end
  404. else
  405. begin
  406. expr:=actasmpattern;
  407. Consume(AS_ID);
  408. { typecasting? }
  409. if (actasmtoken=AS_LPAREN) and
  410. SearchType(expr,typesize) then
  411. begin
  412. oper.hastype:=true;
  413. Consume(AS_LPAREN);
  414. BuildOperand(oper);
  415. Consume(AS_RPAREN);
  416. if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
  417. oper.SetSize(typesize,true);
  418. end
  419. else
  420. begin
  421. if not(oper.SetupVar(expr,false)) then
  422. Begin
  423. { look for special symbols ... }
  424. if expr= '__HIGH' then
  425. begin
  426. consume(AS_LPAREN);
  427. if not oper.setupvar('high'+actasmpattern,false) then
  428. Message1(sym_e_unknown_id,'high'+actasmpattern);
  429. consume(AS_ID);
  430. consume(AS_RPAREN);
  431. end
  432. else
  433. if expr = '__RESULT' then
  434. oper.SetUpResult
  435. else
  436. if expr = '__SELF' then
  437. oper.SetupSelf
  438. else
  439. if expr = '__OLDEBP' then
  440. oper.SetupOldEBP
  441. else
  442. Message1(sym_e_unknown_id,expr);
  443. end;
  444. end;
  445. end;
  446. if actasmtoken=AS_DOT then
  447. MaybeRecordOffset;
  448. { add a constant expression? }
  449. if (actasmtoken=AS_PLUS) then
  450. begin
  451. l:=BuildConstExpression(true,false);
  452. case oper.opr.typ of
  453. OPR_CONSTANT :
  454. inc(oper.opr.val,l);
  455. OPR_LOCAL :
  456. inc(oper.opr.localsymofs,l);
  457. OPR_REFERENCE :
  458. inc(oper.opr.ref.offset,l);
  459. else
  460. internalerror(200309202);
  461. end;
  462. end
  463. end;
  464. { Do we have a indexing reference, then parse it also }
  465. if actasmtoken=AS_LPAREN then
  466. BuildReference(oper);
  467. end;
  468. { Register, a variable reference or a constant reference }
  469. AS_REGISTER:
  470. Begin
  471. { save the type of register used. }
  472. tempreg:=actasmregister;
  473. Consume(AS_REGISTER);
  474. if (actasmtoken=AS_PLUS) then
  475. begin
  476. oper.opr.typ:=OPR_REFERENCE;
  477. reference_reset_base(oper.opr.ref,tempreg,0,ctempposinvalid,1,[]);
  478. { add a constant expression? }
  479. if actasmtoken=AS_PLUS then
  480. begin
  481. consume(AS_PLUS);
  482. if actasmtoken in [AS_INTNUM,AS_ID] then
  483. begin
  484. l:=BuildConstExpression(true,false);
  485. inc(oper.opr.ref.offset,l);
  486. end
  487. else
  488. oper.opr.ref.addressmode:=AM_POSTINCREMENT;
  489. end;
  490. end
  491. else if (actasmtoken in [AS_END,AS_SEPARATOR,AS_COMMA]) then
  492. Begin
  493. if not (oper.opr.typ in [OPR_NONE,OPR_REGISTER]) then
  494. Message(asmr_e_invalid_operand_type);
  495. oper.opr.typ:=OPR_REGISTER;
  496. oper.opr.reg:=tempreg;
  497. end
  498. else
  499. Message(asmr_e_syn_operand);
  500. end;
  501. AS_END,
  502. AS_SEPARATOR,
  503. AS_COMMA: ;
  504. else
  505. Begin
  506. Message(asmr_e_syn_operand);
  507. Consume(actasmtoken);
  508. end;
  509. end; { end case }
  510. end;
  511. {*****************************************************************************
  512. tavrattreader
  513. *****************************************************************************}
  514. procedure tavrattreader.BuildOpCode(instr : tavrinstruction);
  515. var
  516. operandnum : longint;
  517. Begin
  518. { opcode }
  519. if (actasmtoken<>AS_OPCODE) then
  520. Begin
  521. Message(asmr_e_invalid_or_missing_opcode);
  522. RecoverConsume(true);
  523. exit;
  524. end;
  525. { Fill the instr object with the current state }
  526. with instr do
  527. begin
  528. Opcode:=ActOpcode;
  529. condition:=ActCondition;
  530. end;
  531. { We are reading operands, so opcode will be an AS_ID }
  532. operandnum:=1;
  533. Consume(AS_OPCODE);
  534. { Zero operand opcode ? }
  535. if actasmtoken in [AS_SEPARATOR,AS_END] then
  536. begin
  537. operandnum:=0;
  538. exit;
  539. end;
  540. { Read the operands }
  541. repeat
  542. case actasmtoken of
  543. AS_COMMA: { Operand delimiter }
  544. Begin
  545. if operandnum>Max_Operands then
  546. Message(asmr_e_too_many_operands)
  547. else
  548. Inc(operandnum);
  549. Consume(AS_COMMA);
  550. end;
  551. AS_SEPARATOR,
  552. AS_END : { End of asm operands for this opcode }
  553. begin
  554. break;
  555. end;
  556. else
  557. BuildOperand(instr.Operands[operandnum] as tavroperand);
  558. end; { end case }
  559. until false;
  560. instr.Ops:=operandnum;
  561. end;
  562. function tavrattreader.is_asmopcode(const s: string):boolean;
  563. const
  564. { sorted by length so longer postfixes will match first }
  565. postfix2strsorted : array[1..19] of string[2] = (
  566. 'EP','SB','BT','SH',
  567. 'IA','IB','DA','DB','FD','FA','ED','EA',
  568. 'B','D','E','P','T','H','S');
  569. var
  570. len,
  571. j,
  572. sufidx : longint;
  573. hs : string;
  574. maxlen : longint;
  575. icond : tasmcond;
  576. Begin
  577. { making s a value parameter would break other assembler readers }
  578. hs:=s;
  579. is_asmopcode:=false;
  580. { clear op code }
  581. actopcode:=A_None;
  582. actcondition:=C_None;
  583. { first, handle B else BLS is read wrong }
  584. if ((copy(hs,1,2)='BR') and (length(hs)=4)) then
  585. begin
  586. for icond:=low(tasmcond) to high(tasmcond) do
  587. begin
  588. if copy(hs,2,3)=uppercond2str[icond] then
  589. begin
  590. actopcode:=A_BRxx;
  591. actasmtoken:=AS_OPCODE;
  592. actcondition:=icond;
  593. is_asmopcode:=true;
  594. exit;
  595. end;
  596. end;
  597. end;
  598. maxlen:=max(length(hs),5);
  599. actopcode:=A_NONE;
  600. for j:=maxlen downto 1 do
  601. begin
  602. actopcode:=tasmop(PtrUInt(iasmops.Find(copy(hs,1,j))));
  603. if actopcode<>A_NONE then
  604. begin
  605. actasmtoken:=AS_OPCODE;
  606. { strip op code }
  607. delete(hs,1,j);
  608. break;
  609. end;
  610. end;
  611. if actopcode=A_NONE then
  612. exit;
  613. { search for condition, conditions are always 2 chars }
  614. if length(hs)>1 then
  615. begin
  616. for icond:=low(tasmcond) to high(tasmcond) do
  617. begin
  618. if copy(hs,1,2)=uppercond2str[icond] then
  619. begin
  620. actcondition:=icond;
  621. { strip condition }
  622. delete(hs,1,2);
  623. break;
  624. end;
  625. end;
  626. end;
  627. { if we stripped all postfixes, it's a valid opcode }
  628. is_asmopcode:=length(hs)=0;
  629. end;
  630. procedure tavrattreader.ConvertCalljmp(instr : tavrinstruction);
  631. var
  632. newopr : toprrec;
  633. begin
  634. if instr.Operands[1].opr.typ=OPR_REFERENCE then
  635. begin
  636. newopr.typ:=OPR_SYMBOL;
  637. newopr.symbol:=instr.Operands[1].opr.ref.symbol;
  638. newopr.symofs:=instr.Operands[1].opr.ref.offset;
  639. if (instr.Operands[1].opr.ref.base<>NR_NO) or
  640. (instr.Operands[1].opr.ref.index<>NR_NO) then
  641. Message(asmr_e_syn_operand);
  642. instr.Operands[1].opr:=newopr;
  643. end;
  644. end;
  645. procedure tavrattreader.handleopcode;
  646. var
  647. instr : tavrinstruction;
  648. begin
  649. instr:=tavrinstruction.Create(tavroperand);
  650. BuildOpcode(instr);
  651. { if is_calljmp(instr.opcode) then
  652. ConvertCalljmp(instr); }
  653. {
  654. instr.AddReferenceSizes;
  655. instr.SetInstructionOpsize;
  656. instr.CheckOperandSizes;
  657. }
  658. instr.ConcatInstruction(curlist);
  659. instr.Free;
  660. end;
  661. {*****************************************************************************
  662. Initialize
  663. *****************************************************************************}
  664. const
  665. asmmode_avr_att_info : tasmmodeinfo =
  666. (
  667. id : asmmode_avr_gas;
  668. idtxt : 'GAS';
  669. casmreader : tavrattreader;
  670. );
  671. asmmode_avr_standard_info : tasmmodeinfo =
  672. (
  673. id : asmmode_standard;
  674. idtxt : 'STANDARD';
  675. casmreader : tavrattreader;
  676. );
  677. initialization
  678. RegisterAsmMode(asmmode_avr_att_info);
  679. RegisterAsmMode(asmmode_avr_standard_info);
  680. end.