rappcgas.pas 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Carl Eric Codere and Peter Vreman
  4. Does the parsing for the PowerPC 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 rappcgas;
  19. {$i fpcdefs.inc}
  20. Interface
  21. uses
  22. raatt,rappc;
  23. type
  24. tppcattreader = class(tattreader)
  25. function is_asmopcode(const s: string):boolean;override;
  26. procedure handleopcode;override;
  27. procedure BuildReference(oper : tppcoperand);
  28. procedure BuildOperand(oper : tppcoperand);
  29. procedure BuildOpCode(instr : tppcinstruction);
  30. procedure ReadAt(oper : tppcoperand);
  31. procedure ReadSym(oper : tppcoperand);
  32. procedure ConvertCalljmp(instr : tppcinstruction);
  33. end;
  34. Implementation
  35. uses
  36. { helpers }
  37. cutils,
  38. { global }
  39. globtype,verbose,
  40. systems,
  41. { aasm }
  42. cpubase,aasmbase,aasmtai,aasmcpu,
  43. { symtable }
  44. symconst,symsym,
  45. { parser }
  46. procinfo,
  47. rabase,rautils,
  48. cgbase,cgobj
  49. ;
  50. procedure tppcattreader.ReadSym(oper : tppcoperand);
  51. var
  52. tempstr : string;
  53. typesize,l,k : aint;
  54. begin
  55. tempstr:=actasmpattern;
  56. Consume(AS_ID);
  57. { typecasting? }
  58. if (actasmtoken=AS_LPAREN) and
  59. SearchType(tempstr,typesize) then
  60. begin
  61. oper.hastype:=true;
  62. Consume(AS_LPAREN);
  63. BuildOperand(oper);
  64. Consume(AS_RPAREN);
  65. if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
  66. oper.SetSize(typesize,true);
  67. end
  68. else
  69. if not oper.SetupVar(tempstr,false) then
  70. Message1(sym_e_unknown_id,tempstr);
  71. { record.field ? }
  72. if actasmtoken=AS_DOT then
  73. begin
  74. BuildRecordOffsetSize(tempstr,l,k);
  75. inc(oper.opr.ref.offset,l);
  76. end;
  77. end;
  78. procedure tppcattreader.ReadAt(oper : tppcoperand);
  79. begin
  80. { check for ...@ }
  81. if actasmtoken=AS_AT then
  82. begin
  83. if (oper.opr.ref.symbol=nil) and
  84. (oper.opr.ref.offset = 0) then
  85. Message(asmr_e_invalid_reference_syntax);
  86. Consume(AS_AT);
  87. if actasmtoken=AS_ID then
  88. begin
  89. if upper(actasmpattern)='L' then
  90. oper.opr.ref.refaddr:=addr_lo
  91. else if upper(actasmpattern)='HA' then
  92. oper.opr.ref.refaddr:=addr_hi
  93. else
  94. Message(asmr_e_invalid_reference_syntax);
  95. Consume(AS_ID);
  96. end
  97. else
  98. Message(asmr_e_invalid_reference_syntax);
  99. end;
  100. end;
  101. Procedure tppcattreader.BuildReference(oper : tppcoperand);
  102. procedure Consume_RParen;
  103. begin
  104. if actasmtoken <> AS_RPAREN then
  105. Begin
  106. Message(asmr_e_invalid_reference_syntax);
  107. RecoverConsume(true);
  108. end
  109. else
  110. begin
  111. Consume(AS_RPAREN);
  112. if not (actasmtoken in [AS_COMMA,AS_SEPARATOR,AS_END]) then
  113. Begin
  114. Message(asmr_e_invalid_reference_syntax);
  115. RecoverConsume(true);
  116. end;
  117. end;
  118. end;
  119. var
  120. l : aint;
  121. begin
  122. Consume(AS_LPAREN);
  123. Case actasmtoken of
  124. AS_INTNUM,
  125. AS_MINUS,
  126. AS_PLUS:
  127. Begin
  128. { offset(offset) is invalid }
  129. If oper.opr.Ref.Offset <> 0 Then
  130. Begin
  131. Message(asmr_e_invalid_reference_syntax);
  132. RecoverConsume(true);
  133. End
  134. Else
  135. Begin
  136. oper.opr.Ref.Offset:=BuildConstExpression(false,true);
  137. Consume(AS_RPAREN);
  138. if actasmtoken=AS_AT then
  139. ReadAt(oper);
  140. end;
  141. exit;
  142. End;
  143. AS_REGISTER: { (reg ... }
  144. Begin
  145. if ((oper.opr.typ=OPR_REFERENCE) and (oper.opr.ref.base<>NR_NO)) or
  146. ((oper.opr.typ=OPR_LOCAL) and (oper.opr.localsym.localloc.loc<>LOC_REGISTER)) then
  147. message(asmr_e_cannot_index_relative_var);
  148. oper.opr.ref.base:=actasmregister;
  149. Consume(AS_REGISTER);
  150. { can either be a register or a right parenthesis }
  151. { (reg) }
  152. if actasmtoken=AS_RPAREN then
  153. Begin
  154. Consume_RParen;
  155. exit;
  156. end;
  157. { (reg,reg .. }
  158. Consume(AS_COMMA);
  159. if (actasmtoken=AS_REGISTER) and
  160. (oper.opr.Ref.Offset = 0) then
  161. Begin
  162. oper.opr.ref.index:=actasmregister;
  163. Consume(AS_REGISTER);
  164. Consume_RParen;
  165. end
  166. else
  167. Begin
  168. Message(asmr_e_invalid_reference_syntax);
  169. RecoverConsume(false);
  170. end;
  171. end; {end case }
  172. AS_ID:
  173. Begin
  174. ReadSym(oper);
  175. { add a constant expression? }
  176. if (actasmtoken=AS_PLUS) then
  177. begin
  178. l:=BuildConstExpression(true,true);
  179. case oper.opr.typ of
  180. OPR_CONSTANT :
  181. inc(oper.opr.val,l);
  182. OPR_LOCAL :
  183. inc(oper.opr.localsymofs,l);
  184. OPR_REFERENCE :
  185. inc(oper.opr.ref.offset,l);
  186. else
  187. internalerror(200309202);
  188. end;
  189. end;
  190. Consume(AS_RPAREN);
  191. if actasmtoken=AS_AT then
  192. ReadAt(oper);
  193. End;
  194. AS_COMMA: { (, ... can either be scaling, or index }
  195. Begin
  196. Consume(AS_COMMA);
  197. { Index }
  198. if (actasmtoken=AS_REGISTER) then
  199. Begin
  200. oper.opr.ref.index:=actasmregister;
  201. Consume(AS_REGISTER);
  202. { check for scaling ... }
  203. Consume_RParen;
  204. end
  205. else
  206. begin
  207. Message(asmr_e_invalid_reference_syntax);
  208. RecoverConsume(false);
  209. end;
  210. end;
  211. else
  212. Begin
  213. Message(asmr_e_invalid_reference_syntax);
  214. RecoverConsume(false);
  215. end;
  216. end;
  217. end;
  218. Procedure tppcattreader.BuildOperand(oper : tppcoperand);
  219. var
  220. expr : string;
  221. typesize,l : aint;
  222. procedure AddLabelOperand(hl:tasmlabel);
  223. begin
  224. if not(actasmtoken in [AS_PLUS,AS_MINUS,AS_LPAREN]) and
  225. is_calljmp(actopcode) then
  226. begin
  227. oper.opr.typ:=OPR_SYMBOL;
  228. oper.opr.symbol:=hl;
  229. end
  230. else
  231. begin
  232. oper.InitRef;
  233. oper.opr.ref.symbol:=hl;
  234. end;
  235. end;
  236. procedure MaybeRecordOffset;
  237. var
  238. hasdot : boolean;
  239. l,
  240. toffset,
  241. tsize : aint;
  242. begin
  243. if not(actasmtoken in [AS_DOT,AS_PLUS,AS_MINUS]) then
  244. exit;
  245. l:=0;
  246. hasdot:=(actasmtoken=AS_DOT);
  247. if hasdot then
  248. begin
  249. if expr<>'' then
  250. begin
  251. BuildRecordOffsetSize(expr,toffset,tsize);
  252. inc(l,toffset);
  253. oper.SetSize(tsize,true);
  254. end;
  255. end;
  256. if actasmtoken in [AS_PLUS,AS_MINUS] then
  257. inc(l,BuildConstExpression(true,false));
  258. case oper.opr.typ of
  259. OPR_LOCAL :
  260. begin
  261. { don't allow direct access to fields of parameters, because that
  262. will generate buggy code. Allow it only for explicit typecasting }
  263. if hasdot and
  264. (not oper.hastype) and
  265. (tabstractvarsym(oper.opr.localsym).owner.symtabletype=parasymtable) and
  266. (current_procinfo.procdef.proccalloption<>pocall_register) then
  267. Message(asmr_e_cannot_access_field_directly_for_parameters);
  268. inc(oper.opr.localsymofs,l)
  269. end;
  270. OPR_CONSTANT :
  271. inc(oper.opr.val,l);
  272. OPR_REFERENCE :
  273. inc(oper.opr.ref.offset,l);
  274. else
  275. internalerror(200309221);
  276. end;
  277. end;
  278. function MaybeBuildReference:boolean;
  279. { Try to create a reference, if not a reference is found then false
  280. is returned }
  281. begin
  282. MaybeBuildReference:=true;
  283. case actasmtoken of
  284. AS_INTNUM,
  285. AS_MINUS,
  286. AS_PLUS:
  287. Begin
  288. oper.opr.ref.offset:=BuildConstExpression(True,False);
  289. if actasmtoken<>AS_LPAREN then
  290. Message(asmr_e_invalid_reference_syntax)
  291. else
  292. BuildReference(oper);
  293. end;
  294. AS_LPAREN:
  295. BuildReference(oper);
  296. AS_ID: { only a variable is allowed ... }
  297. Begin
  298. ReadSym(oper);
  299. case actasmtoken of
  300. AS_END,
  301. AS_SEPARATOR,
  302. AS_COMMA: ;
  303. AS_LPAREN:
  304. BuildReference(oper);
  305. else
  306. Begin
  307. Message(asmr_e_invalid_reference_syntax);
  308. Consume(actasmtoken);
  309. end;
  310. end; {end case }
  311. end;
  312. else
  313. MaybeBuildReference:=false;
  314. end; { end case }
  315. end;
  316. var
  317. tempreg : tregister;
  318. hl : tasmlabel;
  319. ofs : aint;
  320. Begin
  321. expr:='';
  322. case actasmtoken of
  323. AS_LPAREN: { Memory reference or constant expression }
  324. Begin
  325. oper.InitRef;
  326. BuildReference(oper);
  327. end;
  328. AS_INTNUM,
  329. AS_MINUS,
  330. AS_PLUS:
  331. Begin
  332. { Constant memory offset }
  333. { This must absolutely be followed by ( }
  334. oper.InitRef;
  335. oper.opr.ref.offset:=BuildConstExpression(True,False);
  336. if actasmtoken<>AS_LPAREN then
  337. begin
  338. ofs:=oper.opr.ref.offset;
  339. BuildConstantOperand(oper);
  340. inc(oper.opr.val,ofs);
  341. end
  342. else
  343. BuildReference(oper);
  344. end;
  345. AS_ID: { A constant expression, or a Variable ref. }
  346. Begin
  347. { Local Label ? }
  348. if is_locallabel(actasmpattern) then
  349. begin
  350. CreateLocalLabel(actasmpattern,hl,false);
  351. Consume(AS_ID);
  352. AddLabelOperand(hl);
  353. end
  354. else
  355. { Check for label }
  356. if SearchLabel(actasmpattern,hl,false) then
  357. begin
  358. Consume(AS_ID);
  359. AddLabelOperand(hl);
  360. end
  361. else
  362. { probably a variable or normal expression }
  363. { or a procedure (such as in CALL ID) }
  364. Begin
  365. { is it a constant ? }
  366. if SearchIConstant(actasmpattern,l) then
  367. Begin
  368. if not (oper.opr.typ in [OPR_NONE,OPR_CONSTANT]) then
  369. Message(asmr_e_invalid_operand_type);
  370. BuildConstantOperand(oper);
  371. end
  372. else
  373. begin
  374. expr:=actasmpattern;
  375. Consume(AS_ID);
  376. { typecasting? }
  377. if (actasmtoken=AS_LPAREN) and
  378. SearchType(expr,typesize) then
  379. begin
  380. oper.hastype:=true;
  381. Consume(AS_LPAREN);
  382. BuildOperand(oper);
  383. Consume(AS_RPAREN);
  384. if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
  385. oper.SetSize(typesize,true);
  386. end
  387. else
  388. begin
  389. if oper.SetupVar(expr,false) then
  390. ReadAt(oper)
  391. else
  392. Begin
  393. { look for special symbols ... }
  394. if expr= '__HIGH' then
  395. begin
  396. consume(AS_LPAREN);
  397. if not oper.setupvar('high'+actasmpattern,false) then
  398. Message1(sym_e_unknown_id,'high'+actasmpattern);
  399. consume(AS_ID);
  400. consume(AS_RPAREN);
  401. end
  402. else
  403. if expr = '__RESULT' then
  404. oper.SetUpResult
  405. else
  406. if expr = '__SELF' then
  407. oper.SetupSelf
  408. else
  409. if expr = '__OLDEBP' then
  410. oper.SetupOldEBP
  411. else
  412. Message1(sym_e_unknown_id,expr);
  413. end;
  414. end;
  415. end;
  416. if actasmtoken=AS_DOT then
  417. MaybeRecordOffset;
  418. { add a constant expression? }
  419. if (actasmtoken=AS_PLUS) then
  420. begin
  421. l:=BuildConstExpression(true,false);
  422. case oper.opr.typ of
  423. OPR_CONSTANT :
  424. inc(oper.opr.val,l);
  425. OPR_LOCAL :
  426. inc(oper.opr.localsymofs,l);
  427. OPR_REFERENCE :
  428. inc(oper.opr.ref.offset,l);
  429. else
  430. internalerror(200309202);
  431. end;
  432. end
  433. end;
  434. { Do we have a indexing reference, then parse it also }
  435. if actasmtoken=AS_LPAREN then
  436. BuildReference(oper);
  437. end;
  438. AS_REGISTER: { Register, a variable reference or a constant reference }
  439. Begin
  440. { save the type of register used. }
  441. tempreg:=actasmregister;
  442. Consume(AS_REGISTER);
  443. if (actasmtoken in [AS_END,AS_SEPARATOR,AS_COMMA]) then
  444. if is_condreg(tempreg) and
  445. ((actopcode = A_BC) or
  446. (actopcode = A_BCCTR) or
  447. (actopcode = A_BCLR) or
  448. (actopcode = A_TW) or
  449. (actopcode = A_TWI)) then
  450. begin
  451. { it isn't a real operand, everything is stored in the condition }
  452. oper.opr.typ:=OPR_NONE;
  453. actcondition.cr := getsupreg(tempreg);
  454. end
  455. else
  456. begin
  457. if not (oper.opr.typ in [OPR_NONE,OPR_REGISTER]) then
  458. Message(asmr_e_invalid_operand_type);
  459. oper.opr.typ:=OPR_REGISTER;
  460. oper.opr.reg:=tempreg;
  461. end
  462. else if is_condreg(tempreg) then
  463. begin
  464. if not(actcondition.cond in [C_T..C_DZF]) then
  465. Message(asmr_e_syn_operand);
  466. if actasmtoken=AS_STAR then
  467. begin
  468. consume(AS_STAR);
  469. if (actasmtoken=AS_INTNUM) then
  470. begin
  471. consume(AS_INTNUM);
  472. if actasmtoken=AS_PLUS then
  473. begin
  474. consume(AS_PLUS);
  475. if (actasmtoken=AS_ID) then
  476. begin
  477. oper.opr.typ:=OPR_NONE;
  478. if actasmpattern='LT' then
  479. actcondition.crbit:=(getsupreg(tempreg)-(RS_CR0))*4
  480. else if actasmpattern='GT' then
  481. actcondition.crbit:=(getsupreg(tempreg)-(RS_CR0))*4+1
  482. else if actasmpattern='EQ' then
  483. actcondition.crbit:=(getsupreg(tempreg)-(RS_CR0))*4+2
  484. else if actasmpattern='SO' then
  485. actcondition.crbit:=(getsupreg(tempreg)-(RS_CR0))*4+3
  486. else
  487. Message(asmr_e_syn_operand);
  488. consume(AS_ID);
  489. end
  490. else
  491. Message(asmr_e_syn_operand);
  492. end
  493. else
  494. Message(asmr_e_syn_operand);
  495. end
  496. else
  497. Message(asmr_e_syn_operand);
  498. end
  499. else
  500. Message(asmr_e_syn_operand);
  501. end
  502. else
  503. Message(asmr_e_syn_operand);
  504. end;
  505. AS_END,
  506. AS_SEPARATOR,
  507. AS_COMMA: ;
  508. else
  509. Begin
  510. Message(asmr_e_syn_operand);
  511. Consume(actasmtoken);
  512. end;
  513. end; { end case }
  514. end;
  515. {*****************************************************************************
  516. tppcattreader
  517. *****************************************************************************}
  518. procedure tppcattreader.BuildOpCode(instr : tppcinstruction);
  519. var
  520. operandnum : longint;
  521. Begin
  522. { opcode }
  523. if (actasmtoken<>AS_OPCODE) then
  524. Begin
  525. Message(asmr_e_invalid_or_missing_opcode);
  526. RecoverConsume(true);
  527. exit;
  528. end;
  529. { Fill the instr object with the current state }
  530. with instr do
  531. begin
  532. Opcode:=ActOpcode;
  533. condition:=ActCondition;
  534. end;
  535. { We are reading operands, so opcode will be an AS_ID }
  536. operandnum:=1;
  537. Consume(AS_OPCODE);
  538. { Zero operand opcode ? }
  539. if actasmtoken in [AS_SEPARATOR,AS_END] then
  540. begin
  541. operandnum:=0;
  542. exit;
  543. end;
  544. { Read the operands }
  545. repeat
  546. case actasmtoken of
  547. AS_COMMA: { Operand delimiter }
  548. Begin
  549. if operandnum>Max_Operands then
  550. Message(asmr_e_too_many_operands)
  551. else
  552. begin
  553. { condition operands doesn't set the operand but write to the
  554. condition field of the instruction
  555. }
  556. if instr.Operands[operandnum].opr.typ<>OPR_NONE then
  557. Inc(operandnum);
  558. end;
  559. Consume(AS_COMMA);
  560. end;
  561. AS_SEPARATOR,
  562. AS_END : { End of asm operands for this opcode }
  563. begin
  564. break;
  565. end;
  566. else
  567. BuildOperand(instr.Operands[operandnum] as tppcoperand);
  568. end; { end case }
  569. until false;
  570. if (operandnum=1) and (instr.Operands[operandnum].opr.typ=OPR_NONE) then
  571. dec(operandnum);
  572. instr.Ops:=operandnum;
  573. end;
  574. function tppcattreader.is_asmopcode(const s: string):boolean;
  575. var
  576. str2opentry: tstr2opentry;
  577. cond : tasmcondflag;
  578. hs : string;
  579. Begin
  580. { making s a value parameter would break other assembler readers }
  581. hs:=s;
  582. is_asmopcode:=false;
  583. { clear op code }
  584. actopcode:=A_None;
  585. { clear condition }
  586. fillchar(actcondition,sizeof(actcondition),0);
  587. { check for direction hint }
  588. if hs[length(s)]='-' then
  589. begin
  590. dec(ord(hs[0]));
  591. actcondition.dirhint:=DH_Minus;
  592. end
  593. else if hs[length(s)]='+' then
  594. begin
  595. dec(ord(hs[0]));
  596. actcondition.dirhint:=DH_Plus;
  597. end;
  598. str2opentry:=tstr2opentry(iasmops.search(hs));
  599. if assigned(str2opentry) then
  600. begin
  601. if actcondition.dirhint<>DH_None then
  602. message1(asmr_e_unknown_opcode,actasmpattern);
  603. actopcode:=str2opentry.op;
  604. actasmtoken:=AS_OPCODE;
  605. is_asmopcode:=true;
  606. exit;
  607. end;
  608. { not found, check branch instructions }
  609. if hs[1]='B' then
  610. begin
  611. { we can search here without an extra table which is sorted by string length
  612. because we take the whole remaining string without the leading B }
  613. if copy(hs,length(s)-1,2)='LR' then
  614. begin
  615. actopcode := A_BCLR;
  616. setlength(hs,length(hs)-2)
  617. end
  618. else if copy(hs,length(s)-2,3)='CTR' then
  619. begin
  620. actopcode := A_BCCTR;
  621. setlength(hs,length(hs)-3)
  622. end
  623. else
  624. actopcode := A_BC;
  625. for cond:=low(TAsmCondFlag) to high(TAsmCondFlag) do
  626. if copy(hs,2,length(s)-1)=UpperAsmCondFlag2Str[cond] then
  627. begin
  628. actcondition.simple:=true;
  629. actcondition.cond:=cond;
  630. if (cond in [C_LT,C_LE,C_EQ,C_GE,C_GT,C_NL,C_NE,C_NG,C_SO,C_NS,C_UN,C_NU]) then
  631. actcondition.cr := RS_CR0;
  632. actasmtoken:=AS_OPCODE;
  633. is_asmopcode:=true;
  634. exit;
  635. end;
  636. end;
  637. end;
  638. procedure tppcattreader.ConvertCalljmp(instr : tppcinstruction);
  639. begin
  640. if instr.Operands[1].opr.typ=OPR_REFERENCE then
  641. begin
  642. instr.Operands[1].opr.ref.refaddr:=addr_full;
  643. if (instr.Operands[1].opr.ref.base<>NR_NO) or
  644. (instr.Operands[1].opr.ref.index<>NR_NO) then
  645. Message(asmr_e_syn_operand);
  646. end;
  647. end;
  648. procedure tppcattreader.handleopcode;
  649. var
  650. instr : tppcinstruction;
  651. begin
  652. instr:=TPPCInstruction.Create(TPPCOperand);
  653. BuildOpcode(instr);
  654. instr.condition := actcondition;
  655. if is_calljmp(instr.opcode) then
  656. ConvertCalljmp(instr);
  657. {
  658. instr.AddReferenceSizes;
  659. instr.SetInstructionOpsize;
  660. instr.CheckOperandSizes;
  661. }
  662. instr.ConcatInstruction(curlist);
  663. instr.Free;
  664. end;
  665. {*****************************************************************************
  666. Initialize
  667. *****************************************************************************}
  668. const
  669. asmmode_ppc_att_info : tasmmodeinfo =
  670. (
  671. id : asmmode_ppc_gas;
  672. idtxt : 'GAS';
  673. casmreader : tppcattreader;
  674. );
  675. asmmode_ppc_standard_info : tasmmodeinfo =
  676. (
  677. id : asmmode_standard;
  678. idtxt : 'STANDARD';
  679. casmreader : tppcattreader;
  680. );
  681. initialization
  682. RegisterAsmMode(asmmode_ppc_att_info);
  683. RegisterAsmMode(asmmode_ppc_standard_info);
  684. end.
  685. {
  686. $Log$
  687. Revision 1.18 2004-11-21 15:35:23 peter
  688. * float routines all use internproc and compilerproc helpers
  689. Revision 1.17 2004/11/11 19:31:33 peter
  690. * fixed compile of powerpc,sparc,arm
  691. Revision 1.16 2004/06/20 08:55:32 florian
  692. * logs truncated
  693. Revision 1.15 2004/06/16 20:07:10 florian
  694. * dwarf branch merged
  695. Revision 1.14.2.1 2004/05/01 23:36:47 peter
  696. * assembler reader 64bit fixes
  697. Revision 1.14 2004/03/02 00:36:33 olle
  698. * big transformation of Tai_[const_]Symbol.Create[data]name*
  699. Revision 1.13 2004/02/28 16:00:45 florian
  700. * fixed make cycle
  701. Revision 1.12 2004/02/28 14:14:44 florian
  702. * fixed syntax error in previous commit
  703. }