n386flw.pas 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 by Florian Klaempfl
  4. Generate i386 assembler for nodes that influence the flow
  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 n386flw;
  19. {$i defines.inc}
  20. interface
  21. uses
  22. node,nflw;
  23. type
  24. ti386whilerepeatnode = class(twhilerepeatnode)
  25. procedure pass_2;override;
  26. end;
  27. ti386ifnode = class(tifnode)
  28. procedure pass_2;override;
  29. end;
  30. ti386fornode = class(tfornode)
  31. procedure pass_2;override;
  32. end;
  33. ti386exitnode = class(texitnode)
  34. procedure pass_2;override;
  35. end;
  36. ti386breaknode = class(tbreaknode)
  37. procedure pass_2;override;
  38. end;
  39. ti386continuenode = class(tcontinuenode)
  40. procedure pass_2;override;
  41. end;
  42. ti386gotonode = class(tgotonode)
  43. procedure pass_2;override;
  44. end;
  45. ti386labelnode = class(tlabelnode)
  46. procedure pass_2;override;
  47. end;
  48. ti386raisenode = class(traisenode)
  49. procedure pass_2;override;
  50. end;
  51. ti386tryexceptnode = class(ttryexceptnode)
  52. procedure pass_2;override;
  53. end;
  54. ti386tryfinallynode = class(ttryfinallynode)
  55. procedure pass_2;override;
  56. end;
  57. ti386onnode = class(tonnode)
  58. procedure pass_2;override;
  59. end;
  60. ti386failnode = class(tfailnode)
  61. procedure pass_2;override;
  62. end;
  63. implementation
  64. uses
  65. verbose,globtype,globals,systems,
  66. symconst,symdef,symsym,aasm,types,
  67. hcodegen,temp_gen,pass_2,
  68. cpubase,cpuasm,
  69. pass_1,nld,ncon,
  70. cgai386,tgcpu,n386util,regvars;
  71. {*****************************************************************************
  72. Second_While_RepeatN
  73. *****************************************************************************}
  74. procedure ti386whilerepeatnode.pass_2;
  75. var
  76. lcont,lbreak,lloop,
  77. oldclabel,oldblabel : pasmlabel;
  78. otlabel,oflabel : pasmlabel;
  79. //start_regvars_loaded,
  80. //then_regvars_loaded: regvar_booleanarray;
  81. begin
  82. getlabel(lloop);
  83. getlabel(lcont);
  84. getlabel(lbreak);
  85. { arrange continue and breaklabels: }
  86. oldclabel:=aktcontinuelabel;
  87. oldblabel:=aktbreaklabel;
  88. load_all_regvars(exprasmlist);
  89. { handling code at the end as it is much more efficient, and makes
  90. while equal to repeat loop, only the end true/false is swapped (PFV) }
  91. if nodetype=whilen then
  92. emitjmp(C_None,lcont);
  93. emitlab(lloop);
  94. aktcontinuelabel:=lcont;
  95. aktbreaklabel:=lbreak;
  96. cleartempgen;
  97. if assigned(right) then
  98. secondpass(right);
  99. load_all_regvars(exprasmlist);
  100. emitlab(lcont);
  101. otlabel:=truelabel;
  102. oflabel:=falselabel;
  103. if nodetype=whilen then
  104. begin
  105. truelabel:=lloop;
  106. falselabel:=lbreak;
  107. end
  108. { repeatn }
  109. else
  110. begin
  111. truelabel:=lbreak;
  112. falselabel:=lloop;
  113. end;
  114. cleartempgen;
  115. secondpass(left);
  116. load_all_regvars(exprasmlist);
  117. maketojumpbool(left);
  118. emitlab(lbreak);
  119. truelabel:=otlabel;
  120. falselabel:=oflabel;
  121. aktcontinuelabel:=oldclabel;
  122. aktbreaklabel:=oldblabel;
  123. { a break/continue in a while/repeat block can't be seen outside }
  124. flowcontrol:=flowcontrol-[fc_break,fc_continue];
  125. end;
  126. {*****************************************************************************
  127. TI386IFNODE
  128. *****************************************************************************}
  129. procedure ti386ifnode.pass_2;
  130. var
  131. hl,otlabel,oflabel : pasmlabel;
  132. begin
  133. otlabel:=truelabel;
  134. oflabel:=falselabel;
  135. getlabel(truelabel);
  136. getlabel(falselabel);
  137. cleartempgen;
  138. secondpass(left);
  139. load_all_regvars(exprasmlist);
  140. maketojumpbool(left);
  141. if assigned(right) then
  142. begin
  143. emitlab(truelabel);
  144. cleartempgen;
  145. secondpass(right);
  146. { automatically done for blocks, but not for statements (JM) }
  147. load_all_regvars(exprasmlist);
  148. end;
  149. if assigned(t1) then
  150. begin
  151. if assigned(right) then
  152. begin
  153. getlabel(hl);
  154. { do go back to if line !! }
  155. aktfilepos:=exprasmList.getlasttaifilepos^;
  156. emitjmp(C_None,hl);
  157. end;
  158. emitlab(falselabel);
  159. cleartempgen;
  160. secondpass(t1);
  161. load_all_regvars(exprasmlist);
  162. if assigned(right) then
  163. emitlab(hl);
  164. end
  165. else
  166. begin
  167. emitlab(falselabel);
  168. end;
  169. if not(assigned(right)) then
  170. begin
  171. emitlab(truelabel);
  172. end;
  173. truelabel:=otlabel;
  174. falselabel:=oflabel;
  175. end;
  176. {*****************************************************************************
  177. SecondFor
  178. *****************************************************************************}
  179. procedure ti386fornode.pass_2;
  180. var
  181. l3,oldclabel,oldblabel : pasmlabel;
  182. omitfirstcomp,temptovalue : boolean;
  183. hs : byte;
  184. temp1 : treference;
  185. hop : tasmop;
  186. hcond : tasmcond;
  187. cmpreg,cmp32 : tregister;
  188. opsize : topsize;
  189. count_var_is_signed : boolean;
  190. begin
  191. oldclabel:=aktcontinuelabel;
  192. oldblabel:=aktbreaklabel;
  193. getlabel(aktcontinuelabel);
  194. getlabel(aktbreaklabel);
  195. getlabel(l3);
  196. { could we spare the first comparison ? }
  197. omitfirstcomp:=false;
  198. if right.nodetype=ordconstn then
  199. if tassignmentnode(left).right.nodetype=ordconstn then
  200. omitfirstcomp:=((nf_backward in flags) and
  201. (tordconstnode(tassignmentnode(left).right).value>=tordconstnode(right).value))
  202. or (not(nf_backward in flags) and
  203. (tordconstnode(tassignmentnode(left).right).value<=tordconstnode(right).value));
  204. { only calculate reference }
  205. cleartempgen;
  206. secondpass(t2);
  207. hs:=t2.resulttype^.size;
  208. if t2.location.loc <> LOC_CREGISTER then
  209. cmp32:=getregister32;
  210. case hs of
  211. 1 : begin
  212. opsize:=S_B;
  213. if t2.location.loc <> LOC_CREGISTER then
  214. cmpreg:=reg32toreg8(cmp32);
  215. end;
  216. 2 : begin
  217. opsize:=S_W;
  218. if t2.location.loc <> LOC_CREGISTER then
  219. cmpreg:=reg32toreg16(cmp32);
  220. end;
  221. 4 : begin
  222. opsize:=S_L;
  223. if t2.location.loc <> LOC_CREGISTER then
  224. cmpreg:=cmp32;
  225. end;
  226. end;
  227. { first set the to value
  228. because the count var can be in the expression !! }
  229. cleartempgen;
  230. secondpass(right);
  231. { calculate pointer value and check if changeable and if so }
  232. { load into temporary variable }
  233. if right.nodetype<>ordconstn then
  234. begin
  235. temp1.symbol:=nil;
  236. gettempofsizereference(hs,temp1);
  237. temptovalue:=true;
  238. if (right.location.loc=LOC_REGISTER) or
  239. (right.location.loc=LOC_CREGISTER) then
  240. begin
  241. emit_reg_ref(A_MOV,opsize,right.location.register,
  242. newreference(temp1));
  243. end
  244. else
  245. concatcopy(right.location.reference,temp1,hs,false,false);
  246. end
  247. else
  248. temptovalue:=false;
  249. { produce start assignment }
  250. cleartempgen;
  251. secondpass(left);
  252. count_var_is_signed:=is_signed(porddef(t2.resulttype));
  253. if temptovalue then
  254. begin
  255. if t2.location.loc=LOC_CREGISTER then
  256. begin
  257. emit_ref_reg(A_CMP,opsize,newreference(temp1),
  258. t2.location.register);
  259. end
  260. else
  261. begin
  262. emit_ref_reg(A_MOV,opsize,newreference(t2.location.reference),
  263. cmpreg);
  264. emit_ref_reg(A_CMP,opsize,newreference(temp1),
  265. cmpreg);
  266. { temp register not necessary anymore currently (JM) }
  267. ungetregister32(cmp32);
  268. end;
  269. end
  270. else
  271. begin
  272. if not(omitfirstcomp) then
  273. begin
  274. if t2.location.loc=LOC_CREGISTER then
  275. emit_const_reg(A_CMP,opsize,tordconstnode(right).value,
  276. t2.location.register)
  277. else
  278. emit_const_ref(A_CMP,opsize,tordconstnode(right).value,
  279. newreference(t2.location.reference));
  280. end;
  281. end;
  282. if nf_backward in flags then
  283. if count_var_is_signed then
  284. hcond:=C_L
  285. else
  286. hcond:=C_B
  287. else
  288. if count_var_is_signed then
  289. hcond:=C_G
  290. else
  291. hcond:=C_A;
  292. load_all_regvars(exprasmlist);
  293. if not(omitfirstcomp) or temptovalue then
  294. emitjmp(hcond,aktbreaklabel);
  295. { align loop target }
  296. if not(cs_littlesize in aktglobalswitches) then
  297. exprasmList.concat(Tai_align.Create_op(4,$90));
  298. emitlab(l3);
  299. { help register must not be in instruction block }
  300. cleartempgen;
  301. if assigned(t1) then
  302. begin
  303. secondpass(t1);
  304. load_all_regvars(exprasmlist);
  305. end;
  306. emitlab(aktcontinuelabel);
  307. { makes no problems there }
  308. cleartempgen;
  309. if (t2.location.loc <> LOC_CREGISTER) then
  310. begin
  311. { demand help register again }
  312. cmp32:=getregister32;
  313. case hs of
  314. 1 : cmpreg:=reg32toreg8(cmp32);
  315. 2 : cmpreg:=reg32toreg16(cmp32);
  316. 4 : cmpreg:=cmp32;
  317. end;
  318. end;
  319. { produce comparison and the corresponding }
  320. { jump }
  321. if temptovalue then
  322. begin
  323. if t2.location.loc=LOC_CREGISTER then
  324. begin
  325. emit_ref_reg(A_CMP,opsize,newreference(temp1),
  326. t2.location.register);
  327. end
  328. else
  329. begin
  330. emit_ref_reg(A_MOV,opsize,newreference(t2.location.reference),
  331. cmpreg);
  332. emit_ref_reg(A_CMP,opsize,newreference(temp1),
  333. cmpreg);
  334. end;
  335. end
  336. else
  337. begin
  338. if t2.location.loc=LOC_CREGISTER then
  339. emit_const_reg(A_CMP,opsize,tordconstnode(right).value,
  340. t2.location.register)
  341. else
  342. emit_const_ref(A_CMP,opsize,tordconstnode(right).value,
  343. newreference(t2.location.reference));
  344. end;
  345. if nf_backward in flags then
  346. if count_var_is_signed then
  347. hcond:=C_LE
  348. else
  349. hcond:=C_BE
  350. else
  351. if count_var_is_signed then
  352. hcond:=C_GE
  353. else
  354. hcond:=C_AE;
  355. load_all_regvars(exprasmlist);
  356. emitjmp(hcond,aktbreaklabel);
  357. { according to count direction DEC or INC... }
  358. { must be after the test because of 0 to 255 for bytes !! }
  359. if nf_backward in flags then
  360. hop:=A_DEC
  361. else
  362. hop:=A_INC;
  363. if t2.location.loc=LOC_CREGISTER then
  364. emit_reg(hop,opsize,t2.location.register)
  365. else
  366. emit_ref(hop,opsize,newreference(t2.location.reference));
  367. emitjmp(C_None,l3);
  368. if (t2.location.loc <> LOC_CREGISTER) then
  369. ungetregister32(cmp32);
  370. if temptovalue then
  371. ungetiftemp(temp1);
  372. { this is the break label: }
  373. emitlab(aktbreaklabel);
  374. aktcontinuelabel:=oldclabel;
  375. aktbreaklabel:=oldblabel;
  376. { a break/continue in a for block can't be seen outside }
  377. flowcontrol:=flowcontrol-[fc_break,fc_continue];
  378. end;
  379. {*****************************************************************************
  380. SecondExitN
  381. *****************************************************************************}
  382. procedure ti386exitnode.pass_2;
  383. var
  384. is_mem : boolean;
  385. {op : tasmop;
  386. s : topsize;}
  387. otlabel,oflabel : pasmlabel;
  388. r : preference;
  389. label
  390. do_jmp;
  391. begin
  392. load_all_regvars(exprasmlist);
  393. include(flowcontrol,fc_exit);
  394. if assigned(left) then
  395. if left.nodetype=assignn then
  396. begin
  397. { just do a normal assignment followed by exit }
  398. secondpass(left);
  399. emitjmp(C_None,aktexitlabel);
  400. end
  401. else
  402. begin
  403. otlabel:=truelabel;
  404. oflabel:=falselabel;
  405. getlabel(truelabel);
  406. getlabel(falselabel);
  407. secondpass(left);
  408. case left.location.loc of
  409. LOC_FPU : goto do_jmp;
  410. LOC_MEM,
  411. LOC_REFERENCE : is_mem:=true;
  412. LOC_CREGISTER,
  413. LOC_REGISTER : is_mem:=false;
  414. LOC_FLAGS : begin
  415. emit_flag2reg(left.location.resflags,R_AL);
  416. goto do_jmp;
  417. end;
  418. LOC_JUMP : begin
  419. emitlab(truelabel);
  420. emit_const_reg(A_MOV,S_B,1,R_AL);
  421. emitjmp(C_None,aktexit2label);
  422. emitlab(falselabel);
  423. emit_reg_reg(A_XOR,S_B,R_AL,R_AL);
  424. goto do_jmp;
  425. end;
  426. else
  427. internalerror(2001);
  428. end;
  429. case procinfo^.returntype.def^.deftype of
  430. pointerdef,
  431. procvardef : begin
  432. if is_mem then
  433. emit_ref_reg(A_MOV,S_L,
  434. newreference(left.location.reference),R_EAX)
  435. else
  436. emit_reg_reg(A_MOV,S_L,
  437. left.location.register,R_EAX);
  438. end;
  439. floatdef : begin
  440. if pfloatdef(procinfo^.returntype.def)^.typ=f32bit then
  441. begin
  442. if is_mem then
  443. emit_ref_reg(A_MOV,S_L,
  444. newreference(left.location.reference),R_EAX)
  445. else
  446. emit_reg_reg(A_MOV,S_L,left.location.register,R_EAX);
  447. end
  448. else
  449. if is_mem then
  450. floatload(pfloatdef(procinfo^.returntype.def)^.typ,left.location.reference);
  451. end;
  452. { orddef,
  453. enumdef : }
  454. else
  455. { it can be anything shorter than 4 bytes PM
  456. this caused form bug 711 }
  457. begin
  458. case procinfo^.returntype.def^.size of
  459. { it can be a qword/int64 too ... }
  460. 8 : if is_mem then
  461. begin
  462. emit_ref_reg(A_MOV,S_L,
  463. newreference(left.location.reference),R_EAX);
  464. r:=newreference(left.location.reference);
  465. inc(r^.offset,4);
  466. emit_ref_reg(A_MOV,S_L,r,R_EDX);
  467. end
  468. else
  469. begin
  470. emit_reg_reg(A_MOV,S_L,left.location.registerlow,R_EAX);
  471. emit_reg_reg(A_MOV,S_L,left.location.registerhigh,R_EDX);
  472. end;
  473. { if its 3 bytes only we can still
  474. copy one of garbage ! PM }
  475. 4,3 : if is_mem then
  476. emit_ref_reg(A_MOV,S_L,
  477. newreference(left.location.reference),R_EAX)
  478. else
  479. emit_reg_reg(A_MOV,S_L,left.location.register,R_EAX);
  480. 2 : if is_mem then
  481. emit_ref_reg(A_MOV,S_W,
  482. newreference(left.location.reference),R_AX)
  483. else
  484. emit_reg_reg(A_MOV,S_W,makereg16(left.location.register),R_AX);
  485. 1 : if is_mem then
  486. emit_ref_reg(A_MOV,S_B,
  487. newreference(left.location.reference),R_AL)
  488. else
  489. emit_reg_reg(A_MOV,S_B,makereg8(left.location.register),R_AL);
  490. else internalerror(605001);
  491. end;
  492. end;
  493. end;
  494. do_jmp:
  495. truelabel:=otlabel;
  496. falselabel:=oflabel;
  497. emitjmp(C_None,aktexit2label);
  498. end
  499. else
  500. emitjmp(C_None,aktexitlabel);
  501. end;
  502. {*****************************************************************************
  503. SecondBreakN
  504. *****************************************************************************}
  505. procedure ti386breaknode.pass_2;
  506. begin
  507. include(flowcontrol,fc_break);
  508. if aktbreaklabel<>nil then
  509. begin
  510. load_all_regvars(exprasmlist);
  511. emitjmp(C_None,aktbreaklabel)
  512. end
  513. else
  514. CGMessage(cg_e_break_not_allowed);
  515. end;
  516. {*****************************************************************************
  517. SecondContinueN
  518. *****************************************************************************}
  519. procedure ti386continuenode.pass_2;
  520. begin
  521. include(flowcontrol,fc_continue);
  522. if aktcontinuelabel<>nil then
  523. begin
  524. load_all_regvars(exprasmlist);
  525. emitjmp(C_None,aktcontinuelabel)
  526. end
  527. else
  528. CGMessage(cg_e_continue_not_allowed);
  529. end;
  530. {*****************************************************************************
  531. SecondGoto
  532. *****************************************************************************}
  533. procedure ti386gotonode.pass_2;
  534. begin
  535. load_all_regvars(exprasmlist);
  536. emitjmp(C_None,labelnr);
  537. { the assigned avoids only crashes if the label isn't defined }
  538. if assigned(labsym) and
  539. assigned(labsym^.code) and
  540. (aktexceptblock<>tlabelnode(labsym^.code).exceptionblock) then
  541. CGMessage(cg_e_goto_inout_of_exception_block);
  542. end;
  543. {*****************************************************************************
  544. SecondLabel
  545. *****************************************************************************}
  546. procedure ti386labelnode.pass_2;
  547. begin
  548. load_all_regvars(exprasmlist);
  549. emitlab(labelnr);
  550. cleartempgen;
  551. secondpass(left);
  552. end;
  553. {*****************************************************************************
  554. SecondRaise
  555. *****************************************************************************}
  556. procedure ti386raisenode.pass_2;
  557. var
  558. a : pasmlabel;
  559. begin
  560. if assigned(left) then
  561. begin
  562. { multiple parameters? }
  563. if assigned(right) then
  564. begin
  565. { push frame }
  566. if assigned(frametree) then
  567. begin
  568. secondpass(frametree);
  569. if codegenerror then
  570. exit;
  571. emit_push_loc(frametree.location);
  572. end
  573. else
  574. emit_const(A_PUSH,S_L,0);
  575. { push address }
  576. secondpass(right);
  577. if codegenerror then
  578. exit;
  579. emit_push_loc(right.location);
  580. end
  581. else
  582. begin
  583. getaddrlabel(a);
  584. emitlab(a);
  585. emit_reg(A_PUSH,S_L,R_EBP);
  586. emit_sym(A_PUSH,S_L,a);
  587. end;
  588. { push object }
  589. secondpass(left);
  590. if codegenerror then
  591. exit;
  592. emit_push_loc(left.location);
  593. emitcall('FPC_RAISEEXCEPTION');
  594. end
  595. else
  596. begin
  597. emitcall('FPC_POPADDRSTACK');
  598. emitcall('FPC_RERAISE');
  599. end;
  600. end;
  601. {*****************************************************************************
  602. SecondTryExcept
  603. *****************************************************************************}
  604. var
  605. endexceptlabel : pasmlabel;
  606. { does the necessary things to clean up the object stack }
  607. { in the except block }
  608. procedure cleanupobjectstack;
  609. begin
  610. emitcall('FPC_POPOBJECTSTACK');
  611. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  612. emit_reg(A_PUSH,S_L,R_EAX);
  613. emitcall('FPC_DESTROYEXCEPTION');
  614. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  615. maybe_loadesi;
  616. end;
  617. { pops one element from the exception address stack }
  618. { and removes the flag }
  619. procedure cleanupaddrstack;
  620. begin
  621. emitcall('FPC_POPADDRSTACK');
  622. { allocate eax }
  623. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  624. emit_reg(A_POP,S_L,R_EAX);
  625. { deallocate eax }
  626. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  627. end;
  628. procedure ti386tryexceptnode.pass_2;
  629. var
  630. exceptlabel,doexceptlabel,oldendexceptlabel,
  631. lastonlabel,
  632. exitexceptlabel,
  633. continueexceptlabel,
  634. breakexceptlabel,
  635. exittrylabel,
  636. continuetrylabel,
  637. breaktrylabel,
  638. doobjectdestroy,
  639. doobjectdestroyandreraise,
  640. oldaktexitlabel,
  641. oldaktexit2label,
  642. oldaktcontinuelabel,
  643. oldaktbreaklabel : pasmlabel;
  644. oldexceptblock : tnode;
  645. oldflowcontrol,tryflowcontrol,
  646. exceptflowcontrol : tflowcontrol;
  647. label
  648. errorexit;
  649. begin
  650. oldflowcontrol:=flowcontrol;
  651. flowcontrol:=[];
  652. { this can be called recursivly }
  653. oldendexceptlabel:=endexceptlabel;
  654. { we modify EAX }
  655. usedinproc:=usedinproc or ($80 shr byte(R_EAX));
  656. { save the old labels for control flow statements }
  657. oldaktexitlabel:=aktexitlabel;
  658. oldaktexit2label:=aktexit2label;
  659. if assigned(aktbreaklabel) then
  660. begin
  661. oldaktcontinuelabel:=aktcontinuelabel;
  662. oldaktbreaklabel:=aktbreaklabel;
  663. end;
  664. { get new labels for the control flow statements }
  665. getlabel(exittrylabel);
  666. getlabel(exitexceptlabel);
  667. if assigned(aktbreaklabel) then
  668. begin
  669. getlabel(breaktrylabel);
  670. getlabel(continuetrylabel);
  671. getlabel(breakexceptlabel);
  672. getlabel(continueexceptlabel);
  673. end;
  674. getlabel(exceptlabel);
  675. getlabel(doexceptlabel);
  676. getlabel(endexceptlabel);
  677. getlabel(lastonlabel);
  678. push_int (1); { push type of exceptionframe }
  679. emitcall('FPC_PUSHEXCEPTADDR');
  680. { allocate eax }
  681. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  682. emit_reg(A_PUSH,S_L,R_EAX);
  683. emitcall('FPC_SETJMP');
  684. emit_reg(A_PUSH,S_L,R_EAX);
  685. emit_reg_reg(A_TEST,S_L,R_EAX,R_EAX);
  686. { deallocate eax }
  687. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  688. emitjmp(C_NE,exceptlabel);
  689. { try block }
  690. { set control flow labels for the try block }
  691. aktexitlabel:=exittrylabel;
  692. aktexit2label:=exittrylabel;
  693. if assigned(oldaktbreaklabel) then
  694. begin
  695. aktcontinuelabel:=continuetrylabel;
  696. aktbreaklabel:=breaktrylabel;
  697. end;
  698. oldexceptblock:=aktexceptblock;
  699. aktexceptblock:=left;
  700. flowcontrol:=[];
  701. secondpass(left);
  702. tryflowcontrol:=flowcontrol;
  703. aktexceptblock:=oldexceptblock;
  704. if codegenerror then
  705. goto errorexit;
  706. emitlab(exceptlabel);
  707. emitcall('FPC_POPADDRSTACK');
  708. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  709. emit_reg(A_POP,S_L,R_EAX);
  710. emit_reg_reg(A_TEST,S_L,R_EAX,R_EAX);
  711. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  712. emitjmp(C_E,endexceptlabel);
  713. emitlab(doexceptlabel);
  714. { set control flow labels for the except block }
  715. { and the on statements }
  716. aktexitlabel:=exitexceptlabel;
  717. aktexit2label:=exitexceptlabel;
  718. if assigned(oldaktbreaklabel) then
  719. begin
  720. aktcontinuelabel:=continueexceptlabel;
  721. aktbreaklabel:=breakexceptlabel;
  722. end;
  723. flowcontrol:=[];
  724. { on statements }
  725. if assigned(right) then
  726. begin
  727. oldexceptblock:=aktexceptblock;
  728. aktexceptblock:=right;
  729. secondpass(right);
  730. aktexceptblock:=oldexceptblock;
  731. end;
  732. emitlab(lastonlabel);
  733. { default handling except handling }
  734. if assigned(t1) then
  735. begin
  736. { FPC_CATCHES must be called with
  737. 'default handler' flag (=-1)
  738. }
  739. push_int (-1);
  740. emitcall('FPC_CATCHES');
  741. maybe_loadesi;
  742. { the destruction of the exception object must be also }
  743. { guarded by an exception frame }
  744. getlabel(doobjectdestroy);
  745. getlabel(doobjectdestroyandreraise);
  746. exprasmList.concat(Taicpu.Op_const(A_PUSH,S_L,1));
  747. emitcall('FPC_PUSHEXCEPTADDR');
  748. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  749. exprasmList.concat(Taicpu.op_reg(A_PUSH,S_L,R_EAX));
  750. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  751. emitcall('FPC_SETJMP');
  752. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  753. exprasmList.concat(Taicpu.op_reg(A_PUSH,S_L,R_EAX));
  754. exprasmList.concat(Taicpu.op_reg_reg(A_TEST,S_L,R_EAX,R_EAX));
  755. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  756. emitjmp(C_NE,doobjectdestroyandreraise);
  757. oldexceptblock:=aktexceptblock;
  758. aktexceptblock:=t1;
  759. { here we don't have to reset flowcontrol }
  760. { the default and on flowcontrols are handled equal }
  761. secondpass(t1);
  762. exceptflowcontrol:=flowcontrol;
  763. aktexceptblock:=oldexceptblock;
  764. emitlab(doobjectdestroyandreraise);
  765. emitcall('FPC_POPADDRSTACK');
  766. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  767. exprasmList.concat(Taicpu.op_reg(A_POP,S_L,R_EAX));
  768. exprasmList.concat(Taicpu.op_reg_reg(A_TEST,S_L,R_EAX,R_EAX));
  769. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  770. emitjmp(C_E,doobjectdestroy);
  771. emitcall('FPC_POPSECONDOBJECTSTACK');
  772. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  773. emit_reg(A_PUSH,S_L,R_EAX);
  774. emitcall('FPC_DESTROYEXCEPTION');
  775. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  776. { we don't need to restore esi here because reraise never }
  777. { returns }
  778. emitcall('FPC_RERAISE');
  779. emitlab(doobjectdestroy);
  780. cleanupobjectstack;
  781. emitjmp(C_None,endexceptlabel);
  782. end
  783. else
  784. begin
  785. emitcall('FPC_RERAISE');
  786. exceptflowcontrol:=flowcontrol;
  787. end;
  788. if fc_exit in exceptflowcontrol then
  789. begin
  790. { do some magic for exit in the try block }
  791. emitlab(exitexceptlabel);
  792. { we must also destroy the address frame which guards }
  793. { exception object }
  794. cleanupaddrstack;
  795. cleanupobjectstack;
  796. emitjmp(C_None,oldaktexitlabel);
  797. end;
  798. if fc_break in exceptflowcontrol then
  799. begin
  800. emitlab(breakexceptlabel);
  801. { we must also destroy the address frame which guards }
  802. { exception object }
  803. cleanupaddrstack;
  804. cleanupobjectstack;
  805. emitjmp(C_None,oldaktbreaklabel);
  806. end;
  807. if fc_continue in exceptflowcontrol then
  808. begin
  809. emitlab(continueexceptlabel);
  810. { we must also destroy the address frame which guards }
  811. { exception object }
  812. cleanupaddrstack;
  813. cleanupobjectstack;
  814. emitjmp(C_None,oldaktcontinuelabel);
  815. end;
  816. if fc_exit in tryflowcontrol then
  817. begin
  818. { do some magic for exit in the try block }
  819. emitlab(exittrylabel);
  820. cleanupaddrstack;
  821. emitjmp(C_None,oldaktexitlabel);
  822. end;
  823. if fc_break in tryflowcontrol then
  824. begin
  825. emitlab(breaktrylabel);
  826. cleanupaddrstack;
  827. emitjmp(C_None,oldaktbreaklabel);
  828. end;
  829. if fc_continue in tryflowcontrol then
  830. begin
  831. emitlab(continuetrylabel);
  832. cleanupaddrstack;
  833. emitjmp(C_None,oldaktcontinuelabel);
  834. end;
  835. emitlab(endexceptlabel);
  836. errorexit:
  837. { restore all saved labels }
  838. endexceptlabel:=oldendexceptlabel;
  839. { restore the control flow labels }
  840. aktexitlabel:=oldaktexitlabel;
  841. aktexit2label:=oldaktexit2label;
  842. if assigned(oldaktbreaklabel) then
  843. begin
  844. aktcontinuelabel:=oldaktcontinuelabel;
  845. aktbreaklabel:=oldaktbreaklabel;
  846. end;
  847. { return all used control flow statements }
  848. flowcontrol:=oldflowcontrol+exceptflowcontrol+
  849. tryflowcontrol;
  850. end;
  851. procedure ti386onnode.pass_2;
  852. var
  853. nextonlabel,
  854. exitonlabel,
  855. continueonlabel,
  856. breakonlabel,
  857. oldaktexitlabel,
  858. oldaktexit2label,
  859. oldaktcontinuelabel,
  860. doobjectdestroyandreraise,
  861. doobjectdestroy,
  862. oldaktbreaklabel : pasmlabel;
  863. ref : treference;
  864. oldexceptblock : tnode;
  865. oldflowcontrol : tflowcontrol;
  866. begin
  867. oldflowcontrol:=flowcontrol;
  868. flowcontrol:=[];
  869. getlabel(nextonlabel);
  870. { push the vmt }
  871. emit_sym(A_PUSH,S_L,
  872. newasmsymbol(excepttype^.vmt_mangledname));
  873. emitcall('FPC_CATCHES');
  874. { allocate eax }
  875. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  876. emit_reg_reg(A_TEST,S_L,R_EAX,R_EAX);
  877. emitjmp(C_E,nextonlabel);
  878. ref.symbol:=nil;
  879. gettempofsizereference(4,ref);
  880. { what a hack ! }
  881. if assigned(exceptsymtable) then
  882. pvarsym(exceptsymtable^.symindex^.first)^.address:=ref.offset;
  883. emit_reg_ref(A_MOV,S_L,
  884. R_EAX,newreference(ref));
  885. { deallocate eax }
  886. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  887. { in the case that another exception is risen }
  888. { we've to destroy the old one }
  889. getlabel(doobjectdestroyandreraise);
  890. exprasmList.concat(Taicpu.Op_const(A_PUSH,S_L,1));
  891. emitcall('FPC_PUSHEXCEPTADDR');
  892. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  893. exprasmList.concat(Taicpu.op_reg(A_PUSH,S_L,R_EAX));
  894. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  895. emitcall('FPC_SETJMP');
  896. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  897. exprasmList.concat(Taicpu.op_reg(A_PUSH,S_L,R_EAX));
  898. exprasmList.concat(Taicpu.op_reg_reg(A_TEST,S_L,R_EAX,R_EAX));
  899. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  900. emitjmp(C_NE,doobjectdestroyandreraise);
  901. if assigned(right) then
  902. begin
  903. oldaktexitlabel:=aktexitlabel;
  904. oldaktexit2label:=aktexit2label;
  905. getlabel(exitonlabel);
  906. aktexitlabel:=exitonlabel;
  907. aktexit2label:=exitonlabel;
  908. if assigned(aktbreaklabel) then
  909. begin
  910. oldaktcontinuelabel:=aktcontinuelabel;
  911. oldaktbreaklabel:=aktbreaklabel;
  912. getlabel(breakonlabel);
  913. getlabel(continueonlabel);
  914. aktcontinuelabel:=continueonlabel;
  915. aktbreaklabel:=breakonlabel;
  916. end;
  917. { esi is destroyed by FPC_CATCHES }
  918. maybe_loadesi;
  919. oldexceptblock:=aktexceptblock;
  920. aktexceptblock:=right;
  921. secondpass(right);
  922. aktexceptblock:=oldexceptblock;
  923. end;
  924. getlabel(doobjectdestroy);
  925. emitlab(doobjectdestroyandreraise);
  926. emitcall('FPC_POPADDRSTACK');
  927. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  928. exprasmList.concat(Taicpu.op_reg(A_POP,S_L,R_EAX));
  929. exprasmList.concat(Taicpu.op_reg_reg(A_TEST,S_L,R_EAX,R_EAX));
  930. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  931. emitjmp(C_E,doobjectdestroy);
  932. emitcall('FPC_POPSECONDOBJECTSTACK');
  933. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  934. emit_reg(A_PUSH,S_L,R_EAX);
  935. emitcall('FPC_DESTROYEXCEPTION');
  936. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  937. { we don't need to restore esi here because reraise never }
  938. { returns }
  939. emitcall('FPC_RERAISE');
  940. emitlab(doobjectdestroy);
  941. cleanupobjectstack;
  942. { clear some stuff }
  943. ungetiftemp(ref);
  944. emitjmp(C_None,endexceptlabel);
  945. if assigned(right) then
  946. begin
  947. { special handling for control flow instructions }
  948. if fc_exit in flowcontrol then
  949. begin
  950. { the address and object pop does secondtryexcept }
  951. emitlab(exitonlabel);
  952. emitjmp(C_None,oldaktexitlabel);
  953. end;
  954. if fc_break in flowcontrol then
  955. begin
  956. { the address and object pop does secondtryexcept }
  957. emitlab(breakonlabel);
  958. emitjmp(C_None,oldaktbreaklabel);
  959. end;
  960. if fc_continue in flowcontrol then
  961. begin
  962. { the address and object pop does secondtryexcept }
  963. emitlab(continueonlabel);
  964. emitjmp(C_None,oldaktcontinuelabel);
  965. end;
  966. aktexitlabel:=oldaktexitlabel;
  967. aktexit2label:=oldaktexit2label;
  968. if assigned(oldaktbreaklabel) then
  969. begin
  970. aktcontinuelabel:=oldaktcontinuelabel;
  971. aktbreaklabel:=oldaktbreaklabel;
  972. end;
  973. end;
  974. emitlab(nextonlabel);
  975. flowcontrol:=oldflowcontrol+flowcontrol;
  976. { next on node }
  977. if assigned(left) then
  978. begin
  979. cleartempgen;
  980. secondpass(left);
  981. end;
  982. end;
  983. {*****************************************************************************
  984. SecondTryFinally
  985. *****************************************************************************}
  986. procedure ti386tryfinallynode.pass_2;
  987. var
  988. reraiselabel,
  989. finallylabel,
  990. endfinallylabel,
  991. exitfinallylabel,
  992. continuefinallylabel,
  993. breakfinallylabel,
  994. oldaktexitlabel,
  995. oldaktexit2label,
  996. oldaktcontinuelabel,
  997. oldaktbreaklabel : pasmlabel;
  998. oldexceptblock : tnode;
  999. oldflowcontrol,tryflowcontrol : tflowcontrol;
  1000. decconst : longint;
  1001. begin
  1002. { check if child nodes do a break/continue/exit }
  1003. oldflowcontrol:=flowcontrol;
  1004. flowcontrol:=[];
  1005. { we modify EAX }
  1006. usedinproc:=usedinproc or ($80 shr byte(R_EAX));
  1007. getlabel(finallylabel);
  1008. getlabel(endfinallylabel);
  1009. getlabel(reraiselabel);
  1010. { the finally block must catch break, continue and exit }
  1011. { statements }
  1012. oldaktexitlabel:=aktexitlabel;
  1013. oldaktexit2label:=aktexit2label;
  1014. getlabel(exitfinallylabel);
  1015. aktexitlabel:=exitfinallylabel;
  1016. aktexit2label:=exitfinallylabel;
  1017. if assigned(aktbreaklabel) then
  1018. begin
  1019. oldaktcontinuelabel:=aktcontinuelabel;
  1020. oldaktbreaklabel:=aktbreaklabel;
  1021. getlabel(breakfinallylabel);
  1022. getlabel(continuefinallylabel);
  1023. aktcontinuelabel:=continuefinallylabel;
  1024. aktbreaklabel:=breakfinallylabel;
  1025. end;
  1026. push_int(1); { Type of stack-frame must be pushed}
  1027. emitcall('FPC_PUSHEXCEPTADDR');
  1028. { allocate eax }
  1029. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  1030. emit_reg(A_PUSH,S_L,R_EAX);
  1031. emitcall('FPC_SETJMP');
  1032. emit_reg(A_PUSH,S_L,R_EAX);
  1033. emit_reg_reg(A_TEST,S_L,R_EAX,R_EAX);
  1034. { deallocate eax }
  1035. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  1036. emitjmp(C_NE,finallylabel);
  1037. { try code }
  1038. if assigned(left) then
  1039. begin
  1040. oldexceptblock:=aktexceptblock;
  1041. aktexceptblock:=left;
  1042. secondpass(left);
  1043. tryflowcontrol:=flowcontrol;
  1044. if codegenerror then
  1045. exit;
  1046. aktexceptblock:=oldexceptblock;
  1047. end;
  1048. emitlab(finallylabel);
  1049. emitcall('FPC_POPADDRSTACK');
  1050. { finally code }
  1051. oldexceptblock:=aktexceptblock;
  1052. aktexceptblock:=right;
  1053. flowcontrol:=[];
  1054. secondpass(right);
  1055. if flowcontrol<>[] then
  1056. CGMessage(cg_e_control_flow_outside_finally);
  1057. aktexceptblock:=oldexceptblock;
  1058. if codegenerror then
  1059. exit;
  1060. { allocate eax }
  1061. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  1062. emit_reg(A_POP,S_L,R_EAX);
  1063. emit_reg_reg(A_TEST,S_L,R_EAX,R_EAX);
  1064. emitjmp(C_E,endfinallylabel);
  1065. emit_reg(A_DEC,S_L,R_EAX);
  1066. emitjmp(C_Z,reraiselabel);
  1067. if fc_exit in tryflowcontrol then
  1068. begin
  1069. emit_reg(A_DEC,S_L,R_EAX);
  1070. emitjmp(C_Z,oldaktexitlabel);
  1071. decconst:=1;
  1072. end
  1073. else
  1074. decconst:=2;
  1075. if fc_break in tryflowcontrol then
  1076. begin
  1077. emit_const_reg(A_SUB,S_L,decconst,R_EAX);
  1078. emitjmp(C_Z,oldaktbreaklabel);
  1079. decconst:=1;
  1080. end
  1081. else
  1082. inc(decconst);
  1083. if fc_continue in tryflowcontrol then
  1084. begin
  1085. emit_const_reg(A_SUB,S_L,decconst,R_EAX);
  1086. emitjmp(C_Z,oldaktcontinuelabel);
  1087. end;
  1088. { deallocate eax }
  1089. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  1090. emitlab(reraiselabel);
  1091. emitcall('FPC_RERAISE');
  1092. { do some magic for exit,break,continue in the try block }
  1093. if fc_exit in tryflowcontrol then
  1094. begin
  1095. emitlab(exitfinallylabel);
  1096. { allocate eax }
  1097. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  1098. emit_reg(A_POP,S_L,R_EAX);
  1099. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  1100. emit_const(A_PUSH,S_L,2);
  1101. emitjmp(C_NONE,finallylabel);
  1102. end;
  1103. if fc_break in tryflowcontrol then
  1104. begin
  1105. emitlab(breakfinallylabel);
  1106. { allocate eax }
  1107. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  1108. emit_reg(A_POP,S_L,R_EAX);
  1109. { deallocate eax }
  1110. exprasmList.concat(Tairegalloc.DeAlloc(R_EAX));
  1111. emit_const(A_PUSH,S_L,3);
  1112. emitjmp(C_NONE,finallylabel);
  1113. end;
  1114. if fc_continue in tryflowcontrol then
  1115. begin
  1116. emitlab(continuefinallylabel);
  1117. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  1118. emit_reg(A_POP,S_L,R_EAX);
  1119. exprasmList.concat(Tairegalloc.Alloc(R_EAX));
  1120. emit_const(A_PUSH,S_L,4);
  1121. emitjmp(C_NONE,finallylabel);
  1122. end;
  1123. emitlab(endfinallylabel);
  1124. aktexitlabel:=oldaktexitlabel;
  1125. aktexit2label:=oldaktexit2label;
  1126. if assigned(aktbreaklabel) then
  1127. begin
  1128. aktcontinuelabel:=oldaktcontinuelabel;
  1129. aktbreaklabel:=oldaktbreaklabel;
  1130. end;
  1131. flowcontrol:=oldflowcontrol+tryflowcontrol;
  1132. end;
  1133. {*****************************************************************************
  1134. SecondFail
  1135. *****************************************************************************}
  1136. procedure ti386failnode.pass_2;
  1137. begin
  1138. emitjmp(C_None,faillabel);
  1139. end;
  1140. begin
  1141. cwhilerepeatnode:=ti386whilerepeatnode;
  1142. cifnode:=ti386ifnode;
  1143. cfornode:=ti386fornode;
  1144. cexitnode:=ti386exitnode;
  1145. cbreaknode:=ti386breaknode;
  1146. ccontinuenode:=ti386continuenode;
  1147. cgotonode:=ti386gotonode;
  1148. clabelnode:=ti386labelnode;
  1149. craisenode:=ti386raisenode;
  1150. ctryexceptnode:=ti386tryexceptnode;
  1151. ctryfinallynode:=ti386tryfinallynode;
  1152. connode:=ti386onnode;
  1153. cfailnode:=ti386failnode;
  1154. end.
  1155. {
  1156. $Log$
  1157. Revision 1.5 2000-12-25 00:07:32 peter
  1158. + new tlinkedlist class (merge of old tstringqueue,tcontainer and
  1159. tlinkedlist objects)
  1160. Revision 1.4 2000/12/05 11:44:33 jonas
  1161. + new integer regvar handling, should be much more efficient
  1162. Revision 1.3 2000/11/29 00:30:47 florian
  1163. * unused units removed from uses clause
  1164. * some changes for widestrings
  1165. Revision 1.2 2000/10/31 22:02:56 peter
  1166. * symtable splitted, no real code changes
  1167. Revision 1.1 2000/10/15 09:33:31 peter
  1168. * moved n386*.pas to i386/ cpu_target dir
  1169. Revision 1.1 2000/10/14 10:14:48 peter
  1170. * moehrendorf oct 2000 rewrite
  1171. }