raavrgas.pas 23 KB

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