2
0

aasmcpu.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  1. {
  2. Copyright (c) 1999-2009 by Mazen Neifer and David Zhang
  3. Contains the assembler object for the MIPSEL
  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 aasmcpu;
  18. {$i fpcdefs.inc}
  19. interface
  20. uses
  21. cclasses,
  22. globtype, globals, verbose,
  23. aasmbase, aasmdata, aasmsym, aasmtai,
  24. cgbase, cgutils, cpubase, cpuinfo;
  25. const
  26. { "mov reg,reg" source operand number }
  27. O_MOV_SOURCE = 1;
  28. { "mov reg,reg" source operand number }
  29. O_MOV_DEST = 0;
  30. type
  31. { taicpu }
  32. taicpu = class(tai_cpu_abstract_sym)
  33. constructor op_none(op: tasmop);
  34. constructor op_reg(op: tasmop; _op1: tregister);
  35. constructor op_const(op: tasmop; _op1: longint);
  36. constructor op_ref(op: tasmop; const _op1: treference);
  37. constructor op_reg_reg(op: tasmop; _op1, _op2: tregister);
  38. constructor op_reg_ref(op: tasmop; _op1: tregister; const _op2: treference);
  39. constructor op_reg_const(op: tasmop; _op1: tregister; _op2: longint);
  40. constructor op_const_const(op: tasmop; _op1: aint; _op2: aint);
  41. constructor op_reg_reg_reg(op: tasmop; _op1, _op2, _op3: tregister);
  42. constructor op_reg_reg_ref(op: tasmop; _op1, _op2: tregister; const _op3: treference);
  43. constructor op_reg_reg_const(op: tasmop; _op1, _op2: tregister; _op3: aint);
  44. { INS and EXT }
  45. constructor op_reg_reg_const_const(op: tasmop; _op1,_op2: tregister; _op3,_op4: aint);
  46. constructor op_reg_const_reg(op: tasmop; _op1: tregister; _op2: aint; _op3: tregister);
  47. { this is for Jmp instructions }
  48. constructor op_sym(op: tasmop; _op1: tasmsymbol);
  49. constructor op_reg_reg_sym(op: tasmop; _op1, _op2: tregister; _op3: tasmsymbol);
  50. constructor op_reg_sym(op: tasmop; _op1: tregister; _op2: tasmsymbol);
  51. constructor op_sym_ofs(op: tasmop; _op1: tasmsymbol; _op1ofs: longint);
  52. { register allocation }
  53. function is_same_reg_move(regtype: Tregistertype): boolean; override;
  54. { register spilling code }
  55. function spilling_get_operation_type(opnr: longint): topertype; override;
  56. function is_macro: boolean;
  57. end;
  58. tai_align = class(tai_align_abstract)
  59. { nothing to add }
  60. end;
  61. procedure InitAsm;
  62. procedure DoneAsm;
  63. procedure fixup_jmps(list: TAsmList);
  64. function spilling_create_load(const ref: treference; r: tregister): taicpu;
  65. function spilling_create_store(r: tregister; const ref: treference): taicpu;
  66. implementation
  67. uses
  68. cutils;
  69. {*****************************************************************************
  70. taicpu Constructors
  71. *****************************************************************************}
  72. constructor taicpu.op_none(op: tasmop);
  73. begin
  74. inherited Create(op);
  75. end;
  76. constructor taicpu.op_reg(op: tasmop; _op1: tregister);
  77. begin
  78. inherited Create(op);
  79. ops := 1;
  80. loadreg(0, _op1);
  81. end;
  82. constructor taicpu.op_ref(op: tasmop; const _op1: treference);
  83. begin
  84. inherited Create(op);
  85. ops := 1;
  86. loadref(0, _op1);
  87. end;
  88. constructor taicpu.op_const(op: tasmop; _op1: longint);
  89. begin
  90. inherited Create(op);
  91. ops := 1;
  92. loadconst(0, _op1);
  93. end;
  94. constructor taicpu.op_reg_reg(op: tasmop; _op1, _op2: tregister);
  95. begin
  96. inherited Create(op);
  97. ops := 2;
  98. loadreg(0, _op1);
  99. loadreg(1, _op2);
  100. end;
  101. constructor taicpu.op_reg_const(op: tasmop; _op1: tregister; _op2: longint);
  102. begin
  103. inherited Create(op);
  104. ops := 2;
  105. loadreg(0, _op1);
  106. loadconst(1, _op2);
  107. end;
  108. constructor taicpu.op_const_const(op: tasmop; _op1: aint; _op2: aint);
  109. begin
  110. inherited Create(op);
  111. ops := 2;
  112. loadconst(0, _op1);
  113. loadconst(1, _op2);
  114. end;
  115. constructor taicpu.op_reg_ref(op: tasmop; _op1: tregister; const _op2: treference);
  116. begin
  117. inherited Create(op);
  118. ops := 2;
  119. loadreg(0, _op1);
  120. loadref(1, _op2);
  121. end;
  122. constructor taicpu.op_reg_reg_reg(op: tasmop; _op1, _op2, _op3: tregister);
  123. begin
  124. inherited Create(op);
  125. ops := 3;
  126. loadreg(0, _op1);
  127. loadreg(1, _op2);
  128. loadreg(2, _op3);
  129. end;
  130. constructor taicpu.op_reg_reg_ref(op: tasmop; _op1, _op2: tregister; const _op3: treference);
  131. begin
  132. inherited create(op);
  133. ops := 3;
  134. loadreg(0, _op1);
  135. loadreg(1, _op2);
  136. loadref(2, _op3);
  137. end;
  138. constructor taicpu.op_reg_reg_const(op: tasmop; _op1, _op2: tregister; _op3: aint);
  139. begin
  140. inherited create(op);
  141. ops := 3;
  142. loadreg(0, _op1);
  143. loadreg(1, _op2);
  144. loadconst(2, _op3);
  145. end;
  146. constructor taicpu.op_reg_reg_const_const(op: tasmop; _op1, _op2: tregister; _op3, _op4: aint);
  147. begin
  148. inherited create(op);
  149. ops := 4;
  150. loadreg(0, _op1);
  151. loadreg(1, _op2);
  152. loadconst(2, _op3);
  153. loadconst(3, _op4);
  154. end;
  155. constructor taicpu.op_reg_const_reg(op: tasmop; _op1: tregister; _op2: aint;
  156. _op3: tregister);
  157. begin
  158. inherited create(op);
  159. ops := 3;
  160. loadreg(0, _op1);
  161. loadconst(1, _op2);
  162. loadreg(2, _op3);
  163. end;
  164. constructor taicpu.op_sym(op: tasmop; _op1: tasmsymbol);
  165. begin
  166. inherited Create(op);
  167. is_jmp := op in [A_BC, A_BA];
  168. ops := 1;
  169. loadsymbol(0, _op1, 0);
  170. end;
  171. constructor taicpu.op_reg_reg_sym(op: tasmop; _op1, _op2: tregister; _op3: tasmsymbol);
  172. begin
  173. inherited create(op);
  174. is_jmp := op in [A_BC, A_BA];
  175. ops := 3;
  176. loadreg(0, _op1);
  177. loadreg(1, _op2);
  178. loadsymbol(2, _op3, 0);
  179. end;
  180. constructor taicpu.op_reg_sym(op: tasmop; _op1: tregister; _op2: tasmsymbol);
  181. begin
  182. inherited create(op);
  183. is_jmp := op in [A_BC, A_BA];
  184. ops := 2;
  185. loadreg(0, _op1);
  186. loadsymbol(1, _op2, 0);
  187. end;
  188. constructor taicpu.op_sym_ofs(op: tasmop; _op1: tasmsymbol; _op1ofs: longint);
  189. begin
  190. inherited Create(op);
  191. ops := 1;
  192. loadsymbol(0, _op1, _op1ofs);
  193. end;
  194. function taicpu.is_same_reg_move(regtype: Tregistertype): boolean;
  195. begin
  196. Result := (
  197. ((opcode = A_MOVE) and (regtype = R_INTREGISTER)) or
  198. ((regtype = R_FPUREGISTER) and (opcode in [A_MOV_S, A_MOV_D]))
  199. ) and
  200. (oper[0]^.reg = oper[1]^.reg);
  201. end;
  202. function taicpu.is_macro: boolean;
  203. begin
  204. result :=
  205. { 'seq', 'sge', 'sgeu', 'sgt', 'sgtu', 'sle', 'sleu', 'sne', }
  206. (opcode=A_SEQ) or (opcode=A_SGE) or (opcode=A_SGEU) or (opcode=A_SGT) or
  207. (opcode=A_SGTU) or (opcode=A_SLE) or (opcode=A_SLEU) or (opcode=A_SNE)
  208. { JAL is a macro in pic code mode }
  209. or ((opcode=A_JAL) and (cs_create_pic in current_settings.moduleswitches))
  210. or (opcode=A_LA) or ((opcode=A_BC) and
  211. not (condition in [C_EQ,C_NE,C_GTZ,C_GEZ,C_LTZ,C_LEZ,C_COP1TRUE,C_COP1FALSE]))
  212. or (opcode=A_REM) or (opcode=A_REMU)
  213. { DIV and DIVU are normally macros, but use $zero as first arg to generate a CPU instruction. }
  214. or (((opcode=A_DIV) or (opcode=A_DIVU)) and
  215. ((ops<>3) or (oper[0]^.typ<>top_reg) or (oper[0]^.reg<>NR_R0)))
  216. or (opcode=A_MULO) or (opcode=A_MULOU)
  217. { A_LI is only a macro if the immediate is not in thez 16-bit range }
  218. or (opcode=A_LI);
  219. end;
  220. function taicpu.spilling_get_operation_type(opnr: longint): topertype;
  221. type
  222. op_write_set_type = set of TAsmOp;
  223. const
  224. op_write_set: op_write_set_type =
  225. [A_NEG,
  226. A_NEGU,
  227. A_LI,
  228. A_DLI,
  229. A_LA,
  230. A_MOVE,
  231. A_LB,
  232. A_LBU,
  233. A_LH,
  234. A_LHU,
  235. A_LW,
  236. A_LWU,
  237. A_LWL,
  238. A_LWR,
  239. A_LD,
  240. A_LDL,
  241. A_LDR,
  242. A_LL,
  243. A_LLD,
  244. A_ADDI,
  245. A_DADDI,
  246. A_ADDIU,
  247. A_DADDIU,
  248. A_SLTI,
  249. A_SLTIU,
  250. A_ANDI,
  251. A_ORI,
  252. A_XORI,
  253. A_LUI,
  254. A_DNEG,
  255. A_DNEGU,
  256. A_ADD,
  257. A_DADD,
  258. A_ADDU,
  259. A_DADDU,
  260. A_SUB,
  261. A_DSUB,
  262. A_SUBU,
  263. A_DSUBU,
  264. A_SLT,
  265. A_SLTU,
  266. A_AND,
  267. A_OR,
  268. A_XOR,
  269. A_NOR,
  270. { We can get into trouble if an instruction can be interpreted as
  271. macros with different operands. The following commented out ones
  272. refer to elementary instructions: DIV[U], MULT[U] do not modify
  273. first operand. Rest are subject to check. }
  274. A_MUL,
  275. A_MULO,
  276. A_MULOU,
  277. A_DMUL,
  278. A_DMULO,
  279. A_DMULOU,
  280. // A_DIV,
  281. // A_DIVU,
  282. A_DDIV,
  283. A_DDIVU,
  284. A_REM,
  285. A_REMU,
  286. A_DREM,
  287. A_DREMU,
  288. // A_MULT,
  289. A_DMULT,
  290. // A_MULTU,
  291. A_DMULTU,
  292. A_MFHI,
  293. A_MFLO,
  294. A_SLL,
  295. A_SRL,
  296. A_SRA,
  297. A_SLLV,
  298. A_SRLV,
  299. A_SRAV,
  300. A_DSLL,
  301. A_DSRL,
  302. A_DSRA,
  303. A_DSLLV,
  304. A_DSRLV,
  305. A_DSRAV,
  306. A_DSLL32,
  307. A_DSRL32,
  308. A_DSRA32,
  309. A_LWC1,
  310. A_LDC1,
  311. A_ADD_S,
  312. A_ADD_D,
  313. A_SUB_S,
  314. A_SUB_D,
  315. A_MUL_S,
  316. A_MUL_D,
  317. A_DIV_S,
  318. A_DIV_D,
  319. A_ABS_S,
  320. A_ABS_D,
  321. A_NEG_S,
  322. A_NEG_D,
  323. A_SQRT_S,
  324. A_SQRT_D,
  325. A_MOV_S,
  326. A_MOV_D,
  327. A_CVT_S_D,
  328. A_CVT_S_W,
  329. A_CVT_S_L,
  330. A_CVT_D_S,
  331. A_CVT_D_W,
  332. A_CVT_D_L,
  333. A_CVT_W_S,
  334. A_CVT_W_D,
  335. A_CVT_L_S,
  336. A_CVT_L_D,
  337. A_ROUND_W_S,
  338. A_ROUND_W_D,
  339. A_ROUND_L_S,
  340. A_ROUND_L_D,
  341. A_TRUNC_W_S,
  342. A_TRUNC_W_D,
  343. A_TRUNC_L_S,
  344. A_TRUNC_L_D,
  345. A_CEIL_W_S,
  346. A_CEIL_W_D,
  347. A_CEIL_L_S,
  348. A_CEIL_L_D,
  349. A_FLOOR_W_S,
  350. A_FLOOR_W_D,
  351. A_FLOOR_L_S,
  352. A_FLOOR_L_D,
  353. A_SEQ,
  354. A_SGE,
  355. A_SGEU,
  356. A_SGT,
  357. A_SGTU,
  358. A_SLE,
  359. A_SLEU,
  360. A_SNE,
  361. A_EXT,
  362. A_INS,
  363. A_MFC0,
  364. A_SEB,
  365. A_SEH];
  366. begin
  367. result := operand_read;
  368. case opcode of
  369. A_DIV, { these have 3 operands if used as macros }
  370. A_DIVU:
  371. if (ops=3) and (opnr=0) then
  372. result:=operand_write;
  373. else
  374. if opcode in op_write_set then
  375. if opnr = 0 then
  376. result := operand_write;
  377. end;
  378. end;
  379. function spilling_create_load(const ref: treference; r: tregister): taicpu;
  380. begin
  381. case getregtype(r) of
  382. R_INTREGISTER :
  383. result:=taicpu.op_reg_ref(A_LW,r,ref);
  384. R_FPUREGISTER :
  385. begin
  386. case getsubreg(r) of
  387. R_SUBFS :
  388. result:=taicpu.op_reg_ref(A_LWC1,r,ref);
  389. R_SUBFD :
  390. result:=taicpu.op_reg_ref(A_LDC1,r,ref);
  391. else
  392. internalerror(2004010418);
  393. end;
  394. end
  395. else
  396. internalerror(2004010408);
  397. end;
  398. end;
  399. function spilling_create_store(r: tregister; const ref: treference): taicpu;
  400. begin
  401. case getregtype(r) of
  402. R_INTREGISTER :
  403. result:=taicpu.op_reg_ref(A_SW,r,ref);
  404. R_FPUREGISTER :
  405. begin
  406. case getsubreg(r) of
  407. R_SUBFS :
  408. result:=taicpu.op_reg_ref(A_SWC1,r,ref);
  409. R_SUBFD :
  410. result:=taicpu.op_reg_ref(A_SDC1,r,ref);
  411. else
  412. internalerror(2004010419);
  413. end;
  414. end
  415. else
  416. internalerror(2004010409);
  417. end;
  418. end;
  419. procedure InitAsm;
  420. begin
  421. end;
  422. procedure DoneAsm;
  423. begin
  424. end;
  425. procedure fixup_jmps(list: TAsmList);
  426. var
  427. p,pdelayslot: tai;
  428. newjmp,newnoop: taicpu;
  429. labelpositions: TFPList;
  430. instrpos: ptrint;
  431. l: tasmlabel;
  432. again: boolean;
  433. insai: tai;
  434. procedure create_pic_load(ai: taicpu; insloc: tai);
  435. var
  436. href: treference;
  437. newins: taicpu;
  438. begin
  439. { validity of operand has been checked by caller }
  440. href:=ai.oper[ai.ops-1]^.ref^;
  441. href.refaddr:=addr_pic;
  442. href.base:=NR_GP;
  443. newins:=taicpu.op_reg_ref(A_LW,NR_PIC_FUNC,href);
  444. newins.fileinfo:=ai.fileinfo;
  445. list.insertbefore(newins,insloc);
  446. inc(instrpos,2);
  447. if (href.symbol.bind=AB_LOCAL) then
  448. begin
  449. href.refaddr:=addr_low;
  450. href.base:=NR_NO;
  451. newins:=taicpu.op_reg_reg_ref(A_ADDIU,NR_PIC_FUNC,NR_PIC_FUNC,href);
  452. newins.fileinfo:=ai.fileinfo;
  453. list.insertbefore(newins,insloc);
  454. inc(instrpos,2);
  455. end;
  456. end;
  457. begin
  458. // MIPS relative branch range is +-32K instructions, i.e +-128 kBytes
  459. // if certainly not enough instructions to cause an overflow, dont bother
  460. if (list.count<high(smallint)) then
  461. exit;
  462. labelpositions := TFPList.create;
  463. p := tai(list.first);
  464. instrpos := 1;
  465. // record label positions
  466. while assigned(p) do
  467. begin
  468. if p.typ = ait_label then
  469. begin
  470. if (tai_label(p).labsym.labelnr >= labelpositions.count) then
  471. labelpositions.count := tai_label(p).labsym.labelnr * 2;
  472. labelpositions[tai_label(p).labsym.labelnr] := pointer(instrpos);
  473. end;
  474. { ait_const is for jump tables }
  475. case p.typ of
  476. ait_instruction:
  477. { probleim here: pseudo-instructions can translate into
  478. several CPU instructions, possibly depending on assembler options,
  479. to obe on safe side, let's assume a mean of two. }
  480. inc(instrpos,2);
  481. ait_const:
  482. begin
  483. if (tai_const(p).consttype<>aitconst_32bit) then
  484. internalerror(2008052101);
  485. inc(instrpos);
  486. end;
  487. else
  488. ;
  489. end;
  490. p := tai(p.next);
  491. end;
  492. { If the number of instructions is below limit, we can't overflow either }
  493. if (instrpos<high(smallint)) then
  494. exit;
  495. // check and fix distances
  496. repeat
  497. again := false;
  498. p := tai(list.first);
  499. instrpos := 1;
  500. while assigned(p) do
  501. begin
  502. case p.typ of
  503. ait_label:
  504. // update labelposition in case it changed due to insertion
  505. // of jumps
  506. begin
  507. // can happen because of newly inserted labels
  508. if (tai_label(p).labsym.labelnr > labelpositions.count) then
  509. labelpositions.count := tai_label(p).labsym.labelnr * 2;
  510. labelpositions[tai_label(p).labsym.labelnr] := pointer(instrpos);
  511. end;
  512. ait_instruction:
  513. begin
  514. inc(instrpos,2);
  515. case taicpu(p).opcode of
  516. A_BA,A_BC:
  517. if (taicpu(p).ops>0) and (taicpu(p).oper[taicpu(p).ops-1]^.typ=top_ref) and
  518. assigned(taicpu(p).oper[taicpu(p).ops-1]^.ref^.symbol) and
  519. (taicpu(p).oper[taicpu(p).ops-1]^.ref^.symbol is tasmlabel) and
  520. (labelpositions[tasmlabel(taicpu(p).oper[taicpu(p).ops-1]^.ref^.symbol).labelnr] <> NIL) and
  521. {$push}
  522. {$q-}
  523. (ptruint(abs(ptrint(labelpositions[tasmlabel(taicpu(p).oper[taicpu(p).ops-1]^.ref^.symbol).labelnr]-instrpos)) - low(smallint)) > ptruint((high(smallint) - low(smallint)))) then
  524. {$pop}
  525. begin
  526. if (taicpu(p).opcode=A_BC) then
  527. begin
  528. { we're adding a new label together with the only branch to it;
  529. providing exact label position is not necessary }
  530. current_asmdata.getjumplabel(l);
  531. pdelayslot:=tai(p.next);
  532. { We need to insert the new instruction after the delay slot instruction ! }
  533. while assigned(pdelayslot) and (pdelayslot.typ<>ait_instruction) do
  534. pdelayslot:=tai(pdelayslot.next);
  535. insai:=tai_label.create(l);
  536. list.insertafter(insai,pdelayslot);
  537. // add a new unconditional jump between this jump and the label
  538. list.insertbefore(tai_comment.create(strpnew('fixup_jmps, A_BXX changed into A_BNOTXX label;A_J;label:')),p);
  539. if (cs_create_pic in current_settings.moduleswitches) then
  540. begin
  541. create_pic_load(taicpu(p),insai);
  542. newjmp:=taicpu.op_reg(A_JR,NR_PIC_FUNC);
  543. end
  544. else
  545. begin
  546. newjmp:=taicpu.op_sym(A_J,taicpu(p).oper[2]^.ref^.symbol);
  547. newjmp.is_jmp := true;
  548. end;
  549. newjmp.fileinfo:=taicpu(p).fileinfo;
  550. list.insertbefore(newjmp,insai);
  551. inc(instrpos,2);
  552. { Add a delay slot for new A_J instruction }
  553. newnoop:=taicpu.op_none(A_NOP);
  554. newnoop.fileinfo := taicpu(p).fileinfo;
  555. list.insertbefore(newnoop,insai);
  556. inc(instrpos,2);
  557. // change the conditional jump to point to the newly inserted label
  558. tasmlabel(taicpu(p).oper[taicpu(p).ops-1]^.ref^.symbol).decrefs;
  559. taicpu(p).oper[taicpu(p).ops-1]^.ref^.symbol := l;
  560. l.increfs;
  561. // and invert its condition code
  562. taicpu(p).condition := inverse_cond(taicpu(p).condition);
  563. { skip inserted stuff and continue processing from 'pdelayslot' }
  564. p:=pdelayslot;
  565. again:=true;
  566. end
  567. else // opcode=A_BA
  568. begin
  569. if (cs_create_pic in current_settings.moduleswitches) then
  570. begin
  571. list.insertbefore(tai_comment.create(strpnew('fixup_jmps, A_BA changed into PIC sequence')),p);
  572. create_pic_load(taicpu(p),p);
  573. taicpu(p).opcode:=A_JR;
  574. taicpu(p).loadreg(0,NR_PIC_FUNC);
  575. again:=true;
  576. { inserted stuff before 'p', continue processing from 'p' on }
  577. end
  578. else
  579. begin
  580. list.insertbefore(tai_comment.create(strpnew('fixup_jmps, A_BA changed into A_J')),p);
  581. taicpu(p).opcode:=A_J;
  582. end;
  583. end;
  584. end;
  585. else
  586. ;
  587. end;
  588. end;
  589. ait_const:
  590. inc(instrpos);
  591. else
  592. ;
  593. end;
  594. p := tai(p.next);
  595. end;
  596. until not again;
  597. labelpositions.free;
  598. end;
  599. begin
  600. cai_cpu := taicpu;
  601. cai_align := tai_align;
  602. end.