rgcpu.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. {
  2. Copyright (c) 1998-2003 by Florian Klaempfl
  3. This unit implements the arm specific class for the register
  4. allocator
  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 rgcpu;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. aasmbase,aasmtai,aasmdata,aasmcpu,
  23. cgbase,cgutils,
  24. cpubase,
  25. {$ifdef DEBUG_SPILLING}
  26. cutils,
  27. {$endif}
  28. rgobj;
  29. type
  30. trgcpu = class(trgobj)
  31. private
  32. procedure spilling_create_load_store(list: TAsmList; pos: tai; const spilltemp:treference;tempreg:tregister; is_store: boolean);
  33. public
  34. procedure do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);override;
  35. procedure do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);override;
  36. procedure add_constraints(reg:tregister);override;
  37. function get_spill_subreg(r:tregister) : tsubregister;override;
  38. end;
  39. trgcputhumb2 = class(trgobj)
  40. private
  41. procedure SplitITBlock(list:TAsmList;pos:tai);
  42. public
  43. procedure do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);override;
  44. procedure do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);override;
  45. end;
  46. trgintcputhumb2 = class(trgcputhumb2)
  47. procedure add_cpu_interferences(p : tai);override;
  48. end;
  49. trgintcpu = class(trgcpu)
  50. procedure add_cpu_interferences(p : tai);override;
  51. end;
  52. trgcputhumb = class(trgcpu)
  53. end;
  54. trgintcputhumb = class(trgcputhumb)
  55. procedure add_cpu_interferences(p: tai);override;
  56. end;
  57. implementation
  58. uses
  59. verbose,globtype,globals,cpuinfo,
  60. cgobj,
  61. procinfo;
  62. procedure trgintcputhumb2.add_cpu_interferences(p: tai);
  63. var
  64. r : tregister;
  65. hr : longint;
  66. begin
  67. if p.typ=ait_instruction then
  68. begin
  69. case taicpu(p).opcode of
  70. A_CBNZ,
  71. A_CBZ:
  72. begin
  73. for hr := RS_R8 to RS_R15 do
  74. add_edge(getsupreg(taicpu(p).oper[0]^.reg), hr);
  75. end;
  76. A_ADD:
  77. begin
  78. if taicpu(p).ops = 3 then
  79. begin
  80. if (taicpu(p).oper[0]^.typ = top_reg) and
  81. (taicpu(p).oper[1]^.typ = top_reg) and
  82. (taicpu(p).oper[2]^.typ in [top_reg, top_shifterop]) then
  83. begin
  84. { if d == 13 || (d == 15 && S == ‘0’) || n == 15 || m IN [13,15] then UNPREDICTABLE; }
  85. add_edge(getsupreg(taicpu(p).oper[0]^.reg), RS_R13);
  86. if taicpu(p).oppostfix <> PF_S then
  87. add_edge(getsupreg(taicpu(p).oper[0]^.reg), RS_R15);
  88. add_edge(getsupreg(taicpu(p).oper[1]^.reg), RS_R15);
  89. if (taicpu(p).oper[2]^.typ = top_shifterop) and
  90. (taicpu(p).oper[2]^.shifterop^.rs <> NR_NO) then
  91. begin
  92. add_edge(getsupreg(taicpu(p).oper[2]^.shifterop^.rs), RS_R13);
  93. add_edge(getsupreg(taicpu(p).oper[2]^.shifterop^.rs), RS_R15);
  94. end
  95. else if (taicpu(p).oper[2]^.typ = top_reg) then
  96. begin
  97. add_edge(getsupreg(taicpu(p).oper[2]^.reg), RS_R13);
  98. add_edge(getsupreg(taicpu(p).oper[2]^.reg), RS_R15);
  99. end;
  100. end;
  101. end;
  102. end;
  103. A_LDRB,
  104. A_STRB,
  105. A_STR,
  106. A_LDR,
  107. A_LDRH,
  108. A_STRH,
  109. A_LDRSB,
  110. A_LDRSH,
  111. A_LDRD,
  112. A_STRD:
  113. { don't mix up the framepointer and stackpointer with pre/post indexed operations }
  114. if (taicpu(p).oper[1]^.typ=top_ref) and
  115. (taicpu(p).oper[1]^.ref^.addressmode in [AM_PREINDEXED,AM_POSTINDEXED]) then
  116. begin
  117. add_edge(getsupreg(taicpu(p).oper[1]^.ref^.base),getsupreg(current_procinfo.framepointer));
  118. { FIXME: temp variable r is needed here to avoid Internal error 20060521 }
  119. { while compiling the compiler. }
  120. r:=NR_STACK_POINTER_REG;
  121. if current_procinfo.framepointer<>r then
  122. add_edge(getsupreg(taicpu(p).oper[1]^.ref^.base),getsupreg(r));
  123. end;
  124. end;
  125. end;
  126. end;
  127. procedure trgcpu.spilling_create_load_store(list: TAsmList; pos: tai; const spilltemp:treference;tempreg:tregister; is_store: boolean);
  128. var
  129. tmpref : treference;
  130. helplist : TAsmList;
  131. l : tasmlabel;
  132. hreg : tregister;
  133. immshift: byte;
  134. a: aint;
  135. begin
  136. helplist:=TAsmList.create;
  137. { load consts entry }
  138. if getregtype(tempreg)=R_INTREGISTER then
  139. hreg:=getregisterinline(helplist,[R_SUBWHOLE])
  140. else
  141. hreg:=cg.getintregister(helplist,OS_ADDR);
  142. { Lets remove the bits we can fold in later and check if the result can be easily with an add or sub }
  143. a:=abs(spilltemp.offset);
  144. if is_shifter_const(a and not($FFF), immshift) then
  145. if spilltemp.offset > 0 then
  146. begin
  147. {$ifdef DEBUG_SPILLING}
  148. helplist.concat(tai_comment.create(strpnew('Spilling: Use ADD to fix spill offset')));
  149. {$endif}
  150. helplist.concat(taicpu.op_reg_reg_const(A_ADD, hreg, current_procinfo.framepointer,
  151. a and not($FFF)));
  152. reference_reset_base(tmpref, hreg, a and $FFF, sizeof(aint));
  153. end
  154. else
  155. begin
  156. {$ifdef DEBUG_SPILLING}
  157. helplist.concat(tai_comment.create(strpnew('Spilling: Use SUB to fix spill offset')));
  158. {$endif}
  159. helplist.concat(taicpu.op_reg_reg_const(A_SUB, hreg, current_procinfo.framepointer,
  160. a and not($FFF)));
  161. reference_reset_base(tmpref, hreg, -(a and $FFF), sizeof(aint));
  162. end
  163. else
  164. begin
  165. {$ifdef DEBUG_SPILLING}
  166. helplist.concat(tai_comment.create(strpnew('Spilling: Use a_load_const_reg to fix spill offset')));
  167. {$endif}
  168. cg.a_load_const_reg(helplist,OS_ADDR,spilltemp.offset,hreg);
  169. reference_reset_base(tmpref,current_procinfo.framepointer,0,sizeof(aint));
  170. tmpref.index:=hreg;
  171. end;
  172. if spilltemp.index<>NR_NO then
  173. internalerror(200401263);
  174. if is_store then
  175. helplist.concat(spilling_create_store(tempreg,tmpref))
  176. else
  177. helplist.concat(spilling_create_load(tmpref,tempreg));
  178. if getregtype(tempreg)=R_INTREGISTER then
  179. ungetregisterinline(helplist,hreg);
  180. list.insertlistafter(pos,helplist);
  181. helplist.free;
  182. end;
  183. procedure trgcpu.do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
  184. begin
  185. { don't load spilled register between
  186. mov lr,pc
  187. mov pc,r4
  188. but befure the mov lr,pc
  189. }
  190. if assigned(pos.previous) and
  191. (pos.typ=ait_instruction) and
  192. (taicpu(pos).opcode=A_MOV) and
  193. (taicpu(pos).oper[0]^.typ=top_reg) and
  194. (taicpu(pos).oper[0]^.reg=NR_R14) and
  195. (taicpu(pos).oper[1]^.typ=top_reg) and
  196. (taicpu(pos).oper[1]^.reg=NR_PC) then
  197. pos:=tai(pos.previous);
  198. if abs(spilltemp.offset)>4095 then
  199. spilling_create_load_store(list, pos, spilltemp, tempreg, false)
  200. else
  201. inherited do_spill_read(list,pos,spilltemp,tempreg);
  202. end;
  203. procedure trgcpu.do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
  204. begin
  205. if abs(spilltemp.offset)>4095 then
  206. spilling_create_load_store(list, pos, spilltemp, tempreg, true)
  207. else
  208. inherited do_spill_written(list,pos,spilltemp,tempreg);
  209. end;
  210. procedure trgcpu.add_constraints(reg:tregister);
  211. var
  212. supreg,i : Tsuperregister;
  213. begin
  214. case getsubreg(reg) of
  215. { Let 32bit floats conflict with all double precision regs > 15
  216. (since these don't have 32 bit equivalents) }
  217. R_SUBFS:
  218. begin
  219. supreg:=getsupreg(reg);
  220. for i:=RS_D16 to RS_D31 do
  221. add_edge(supreg,i);
  222. end;
  223. end;
  224. end;
  225. function trgcpu.get_spill_subreg(r:tregister) : tsubregister;
  226. begin
  227. if (getregtype(r)<>R_MMREGISTER) then
  228. result:=defaultsub
  229. else
  230. result:=getsubreg(r);
  231. end;
  232. function GetITRemainderOp(originalOp:TAsmOp;remLevels:longint;var newOp: TAsmOp;var NeedsCondSwap:boolean) : TAsmOp;
  233. const
  234. remOps : array[1..3] of array[A_ITE..A_ITTTT] of TAsmOp = (
  235. (A_IT,A_IT, A_IT,A_IT,A_IT,A_IT, A_IT,A_IT,A_IT,A_IT,A_IT,A_IT,A_IT,A_IT),
  236. (A_NONE,A_NONE, A_ITT,A_ITE,A_ITE,A_ITT, A_ITT,A_ITT,A_ITE,A_ITE,A_ITE,A_ITE,A_ITT,A_ITT),
  237. (A_NONE,A_NONE, A_NONE,A_NONE,A_NONE,A_NONE, A_ITTT,A_ITEE,A_ITET,A_ITTE,A_ITTE,A_ITET,A_ITEE,A_ITTT));
  238. newOps : array[1..3] of array[A_ITE..A_ITTTT] of TAsmOp = (
  239. (A_IT,A_IT, A_ITE,A_ITT,A_ITE,A_ITT, A_ITEE,A_ITTE,A_ITET,A_ITTT,A_ITEE,A_ITTE,A_ITET,A_ITTT),
  240. (A_NONE,A_NONE, A_IT,A_IT,A_IT,A_IT, A_ITE,A_ITT,A_ITE,A_ITT,A_ITE,A_ITT,A_ITE,A_ITT),
  241. (A_NONE,A_NONE, A_NONE,A_NONE,A_NONE,A_NONE, A_IT,A_IT,A_IT,A_IT,A_IT,A_IT,A_IT,A_IT));
  242. needsSwap: array[1..3] of array[A_ITE..A_ITTTT] of Boolean = (
  243. (true ,false, true ,true ,false,false, true ,true ,true ,true ,false,false,false,false),
  244. (false,false, true ,false,true ,false, true ,true ,false,false,true ,true ,false,false),
  245. (false,false, false,false,false,false, true ,false,true ,false,true ,false,true ,false));
  246. begin
  247. result:=remOps[remLevels][originalOp];
  248. newOp:=newOps[remLevels][originalOp];
  249. NeedsCondSwap:=needsSwap[remLevels][originalOp];
  250. end;
  251. procedure trgcputhumb2.SplitITBlock(list: TAsmList; pos: tai);
  252. var
  253. hp : tai;
  254. level,itLevel : LongInt;
  255. remOp,newOp : TAsmOp;
  256. needsSwap : boolean;
  257. begin
  258. hp:=pos;
  259. level := 0;
  260. while assigned(hp) do
  261. begin
  262. if IsIT(taicpu(hp).opcode) then
  263. break
  264. else if hp.typ=ait_instruction then
  265. inc(level);
  266. hp:=tai(hp.Previous);
  267. end;
  268. if not assigned(hp) then
  269. internalerror(2012100801); // We are supposed to have found the ITxxx instruction here
  270. if (hp.typ<>ait_instruction) or
  271. (not IsIT(taicpu(hp).opcode)) then
  272. internalerror(2012100802); // Sanity check
  273. itLevel := GetITLevels(taicpu(hp).opcode);
  274. if level=itLevel then
  275. exit; // pos was the last instruction in the IT block anyway
  276. remOp:=GetITRemainderOp(taicpu(hp).opcode,itLevel-level,newOp,needsSwap);
  277. if (remOp=A_NONE) or
  278. (newOp=A_NONE) then
  279. Internalerror(2012100803);
  280. taicpu(hp).opcode:=newOp;
  281. if needsSwap then
  282. list.InsertAfter(taicpu.op_cond(remOp,inverse_cond(taicpu(hp).oper[0]^.cc)), pos)
  283. else
  284. list.InsertAfter(taicpu.op_cond(remOp,taicpu(hp).oper[0]^.cc), pos);
  285. end;
  286. procedure trgcputhumb2.do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
  287. var
  288. tmpref : treference;
  289. helplist : TAsmList;
  290. l : tasmlabel;
  291. hreg : tregister;
  292. begin
  293. { don't load spilled register between
  294. mov lr,pc
  295. mov pc,r4
  296. but before the mov lr,pc
  297. }
  298. if assigned(pos.previous) and
  299. (pos.typ=ait_instruction) and
  300. (taicpu(pos).opcode=A_MOV) and
  301. (taicpu(pos).oper[0]^.typ=top_reg) and
  302. (taicpu(pos).oper[0]^.reg=NR_R14) and
  303. (taicpu(pos).oper[1]^.typ=top_reg) and
  304. (taicpu(pos).oper[1]^.reg=NR_PC) then
  305. pos:=tai(pos.previous);
  306. if (pos.typ=ait_instruction) and
  307. (taicpu(pos).condition<>C_None) and
  308. (taicpu(pos).opcode<>A_B) then
  309. SplitITBlock(list, pos)
  310. else if (pos.typ=ait_instruction) and
  311. IsIT(taicpu(pos).opcode) then
  312. begin
  313. if not assigned(pos.Previous) then
  314. list.InsertBefore(tai_comment.Create('Dummy'), pos);
  315. pos:=tai(pos.Previous);
  316. end;
  317. if (spilltemp.offset>4095) or (spilltemp.offset<-255) then
  318. begin
  319. helplist:=TAsmList.create;
  320. reference_reset(tmpref,sizeof(aint));
  321. { create consts entry }
  322. current_asmdata.getjumplabel(l);
  323. cg.a_label(current_procinfo.aktlocaldata,l);
  324. tmpref.symboldata:=current_procinfo.aktlocaldata.last;
  325. current_procinfo.aktlocaldata.concat(tai_const.Create_32bit(spilltemp.offset));
  326. { load consts entry }
  327. if getregtype(tempreg)=R_INTREGISTER then
  328. hreg:=getregisterinline(helplist,[R_SUBWHOLE])
  329. else
  330. hreg:=cg.getintregister(helplist,OS_ADDR);
  331. tmpref.symbol:=l;
  332. tmpref.base:=NR_R15;
  333. helplist.concat(taicpu.op_reg_ref(A_LDR,hreg,tmpref));
  334. reference_reset_base(tmpref,current_procinfo.framepointer,0,sizeof(aint));
  335. tmpref.index:=hreg;
  336. if spilltemp.index<>NR_NO then
  337. internalerror(200401263);
  338. helplist.concat(spilling_create_load(tmpref,tempreg));
  339. if getregtype(tempreg)=R_INTREGISTER then
  340. ungetregisterinline(helplist,hreg);
  341. list.insertlistafter(pos,helplist);
  342. helplist.free;
  343. end
  344. else
  345. inherited do_spill_read(list,pos,spilltemp,tempreg);
  346. end;
  347. procedure trgcputhumb2.do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
  348. var
  349. tmpref : treference;
  350. helplist : TAsmList;
  351. l : tasmlabel;
  352. hreg : tregister;
  353. begin
  354. if (pos.typ=ait_instruction) and
  355. (taicpu(pos).condition<>C_None) and
  356. (taicpu(pos).opcode<>A_B) then
  357. SplitITBlock(list, pos)
  358. else if (pos.typ=ait_instruction) and
  359. IsIT(taicpu(pos).opcode) then
  360. begin
  361. if not assigned(pos.Previous) then
  362. list.InsertBefore(tai_comment.Create('Dummy'), pos);
  363. pos:=tai(pos.Previous);
  364. end;
  365. if (spilltemp.offset>4095) or (spilltemp.offset<-255) then
  366. begin
  367. helplist:=TAsmList.create;
  368. reference_reset(tmpref,sizeof(aint));
  369. { create consts entry }
  370. current_asmdata.getjumplabel(l);
  371. cg.a_label(current_procinfo.aktlocaldata,l);
  372. tmpref.symboldata:=current_procinfo.aktlocaldata.last;
  373. current_procinfo.aktlocaldata.concat(tai_const.Create_32bit(spilltemp.offset));
  374. { load consts entry }
  375. if getregtype(tempreg)=R_INTREGISTER then
  376. hreg:=getregisterinline(helplist,[R_SUBWHOLE])
  377. else
  378. hreg:=cg.getintregister(helplist,OS_ADDR);
  379. tmpref.symbol:=l;
  380. tmpref.base:=NR_R15;
  381. helplist.concat(taicpu.op_reg_ref(A_LDR,hreg,tmpref));
  382. if spilltemp.index<>NR_NO then
  383. internalerror(200401263);
  384. reference_reset_base(tmpref,current_procinfo.framepointer,0,sizeof(pint));
  385. tmpref.index:=hreg;
  386. helplist.concat(spilling_create_store(tempreg,tmpref));
  387. if getregtype(tempreg)=R_INTREGISTER then
  388. ungetregisterinline(helplist,hreg);
  389. list.insertlistafter(pos,helplist);
  390. helplist.free;
  391. end
  392. else
  393. inherited do_spill_written(list,pos,spilltemp,tempreg);
  394. end;
  395. procedure trgintcpu.add_cpu_interferences(p : tai);
  396. var
  397. r : tregister;
  398. begin
  399. if p.typ=ait_instruction then
  400. begin
  401. case taicpu(p).opcode of
  402. A_MLA,
  403. A_MUL:
  404. if current_settings.cputype<cpu_armv6 then
  405. add_edge(getsupreg(taicpu(p).oper[0]^.reg),getsupreg(taicpu(p).oper[1]^.reg));
  406. A_UMULL,
  407. A_UMLAL,
  408. A_SMULL,
  409. A_SMLAL:
  410. begin
  411. add_edge(getsupreg(taicpu(p).oper[0]^.reg),getsupreg(taicpu(p).oper[1]^.reg));
  412. add_edge(getsupreg(taicpu(p).oper[1]^.reg),getsupreg(taicpu(p).oper[2]^.reg));
  413. add_edge(getsupreg(taicpu(p).oper[0]^.reg),getsupreg(taicpu(p).oper[2]^.reg));
  414. end;
  415. A_LDRB,
  416. A_STRB,
  417. A_STR,
  418. A_LDR,
  419. A_LDRH,
  420. A_STRH:
  421. { don't mix up the framepointer and stackpointer with pre/post indexed operations }
  422. if (taicpu(p).oper[1]^.typ=top_ref) and
  423. (taicpu(p).oper[1]^.ref^.addressmode in [AM_PREINDEXED,AM_POSTINDEXED]) then
  424. begin
  425. add_edge(getsupreg(taicpu(p).oper[1]^.ref^.base),getsupreg(current_procinfo.framepointer));
  426. { FIXME: temp variable r is needed here to avoid Internal error 20060521 }
  427. { while compiling the compiler. }
  428. r:=NR_STACK_POINTER_REG;
  429. if current_procinfo.framepointer<>r then
  430. add_edge(getsupreg(taicpu(p).oper[1]^.ref^.base),getsupreg(r));
  431. end;
  432. end;
  433. end;
  434. end;
  435. procedure trgintcputhumb.add_cpu_interferences(p: tai);
  436. var
  437. r : tregister;
  438. i,
  439. hr : longint;
  440. begin
  441. if p.typ=ait_instruction then
  442. begin
  443. { prevent that the register allocator merges registers with frame/stack pointer
  444. if an instruction writes to the register }
  445. if (taicpu(p).ops>=1) and (taicpu(p).oper[0]^.typ=top_reg) and
  446. (taicpu(p).spilling_get_operation_type(0) in [operand_write,operand_readwrite]) then
  447. begin
  448. { FIXME: temp variable r is needed here to avoid Internal error 20060521 }
  449. { while compiling the compiler. }
  450. r:=NR_STACK_POINTER_REG;
  451. add_edge(getsupreg(taicpu(p).oper[0]^.reg),getsupreg(r));
  452. add_edge(getsupreg(taicpu(p).oper[0]^.reg),getsupreg(current_procinfo.framepointer));
  453. end;
  454. if (taicpu(p).ops>=2) and (taicpu(p).oper[1]^.typ=top_reg) and
  455. (taicpu(p).spilling_get_operation_type(1) in [operand_write,operand_readwrite]) then
  456. begin
  457. { FIXME: temp variable r is needed here to avoid Internal error 20060521 }
  458. { while compiling the compiler. }
  459. r:=NR_STACK_POINTER_REG;
  460. add_edge(getsupreg(taicpu(p).oper[1]^.reg),getsupreg(r));
  461. add_edge(getsupreg(taicpu(p).oper[1]^.reg),getsupreg(current_procinfo.framepointer));
  462. end;
  463. case taicpu(p).opcode of
  464. A_LDRB,
  465. A_STRB,
  466. A_STR,
  467. A_LDR,
  468. A_LDRH,
  469. A_STRH,
  470. A_LDRSB,
  471. A_LDRSH,
  472. A_LDRD,
  473. A_STRD:
  474. begin
  475. { add_edge handles precoloured registers already }
  476. for i:=RS_R8 to RS_R15 do
  477. begin
  478. add_edge(getsupreg(taicpu(p).oper[1]^.ref^.base),i);
  479. add_edge(getsupreg(taicpu(p).oper[1]^.ref^.index),i);
  480. add_edge(getsupreg(taicpu(p).oper[0]^.reg),i);
  481. end;
  482. end;
  483. end;
  484. end;
  485. end;
  486. end.