ncginl.pas 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl and Carl Eric Codere
  4. Generate generic inline nodes
  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 ncginl;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. node,ninl;
  23. type
  24. tcginlinenode = class(tinlinenode)
  25. procedure pass_2;override;
  26. procedure second_assert;virtual;
  27. procedure second_sizeoftypeof;virtual;
  28. procedure second_length;virtual;
  29. procedure second_predsucc;virtual;
  30. procedure second_incdec;virtual;
  31. procedure second_typeinfo;virtual;
  32. procedure second_includeexclude;virtual;
  33. procedure second_pi; virtual;
  34. procedure second_arctan_real; virtual;
  35. procedure second_abs_real; virtual;
  36. procedure second_sqr_real; virtual;
  37. procedure second_sqrt_real; virtual;
  38. procedure second_ln_real; virtual;
  39. procedure second_cos_real; virtual;
  40. procedure second_sin_real; virtual;
  41. end;
  42. implementation
  43. uses
  44. globtype,systems,
  45. cutils,verbose,globals,fmodule,
  46. symconst,symdef,defutil,symsym,
  47. aasmbase,aasmtai,aasmcpu,
  48. cginfo,cgbase,pass_1,pass_2,
  49. cpubase,paramgr,
  50. nbas,ncon,ncal,ncnv,nld,
  51. tgobj,ncgutil,cgobj,rgobj,rgcpu
  52. {$ifndef cpu64bit}
  53. ,cg64f32
  54. {$endif cpu64bit}
  55. ;
  56. {*****************************************************************************
  57. TCGINLINENODE
  58. *****************************************************************************}
  59. procedure tcginlinenode.pass_2;
  60. var
  61. asmop : tasmop;
  62. l : longint;
  63. oldpushedparasize : longint;
  64. begin
  65. { save & reset pushedparasize }
  66. oldpushedparasize:=pushedparasize;
  67. pushedparasize:=0;
  68. case inlinenumber of
  69. in_assert_x_y:
  70. begin
  71. second_Assert;
  72. end;
  73. in_sizeof_x,
  74. in_typeof_x :
  75. begin
  76. second_SizeofTypeOf;
  77. end;
  78. in_length_x :
  79. begin
  80. second_Length;
  81. end;
  82. in_pred_x,
  83. in_succ_x:
  84. begin
  85. second_PredSucc;
  86. end;
  87. in_dec_x,
  88. in_inc_x :
  89. begin
  90. second_IncDec;
  91. end;
  92. in_typeinfo_x:
  93. begin
  94. second_TypeInfo;
  95. end;
  96. in_include_x_y,
  97. in_exclude_x_y:
  98. begin
  99. second_IncludeExclude;
  100. end;
  101. in_pi:
  102. begin
  103. second_pi;
  104. end;
  105. in_sin_extended:
  106. begin
  107. second_sin_real;
  108. end;
  109. in_arctan_extended:
  110. begin
  111. second_arctan_real;
  112. end;
  113. in_abs_extended:
  114. begin
  115. second_abs_real;
  116. end;
  117. in_sqr_extended:
  118. begin
  119. second_sqr_real;
  120. end;
  121. in_sqrt_extended:
  122. begin
  123. second_sqrt_real;
  124. end;
  125. in_ln_extended:
  126. begin
  127. second_ln_real;
  128. end;
  129. in_cos_extended:
  130. begin
  131. second_cos_real;
  132. end;
  133. {$ifdef SUPPORT_MMX}
  134. in_mmx_pcmpeqb..in_mmx_pcmpgtw:
  135. begin
  136. location_reset(location,LOC_MMXREGISTER,OS_NO);
  137. if left.location.loc=LOC_REGISTER then
  138. begin
  139. {!!!!!!!}
  140. end
  141. else if tcallparanode(left).left.location.loc=LOC_REGISTER then
  142. begin
  143. {!!!!!!!}
  144. end
  145. else
  146. begin
  147. {!!!!!!!}
  148. end;
  149. end;
  150. {$endif SUPPORT_MMX}
  151. else internalerror(9);
  152. end;
  153. { reset pushedparasize }
  154. pushedparasize:=oldpushedparasize;
  155. end;
  156. {*****************************************************************************
  157. ASSERT GENERIC HANDLING
  158. *****************************************************************************}
  159. procedure tcginlinenode.second_Assert;
  160. var
  161. hp2 : tstringconstnode;
  162. otlabel,oflabel{,l1} : tasmlabel;
  163. r: Tregister;
  164. begin
  165. { the node should be removed in the firstpass }
  166. if not (cs_do_assertion in aktlocalswitches) then
  167. internalerror(7123458);
  168. otlabel:=truelabel;
  169. oflabel:=falselabel;
  170. objectlibrary.getlabel(truelabel);
  171. objectlibrary.getlabel(falselabel);
  172. secondpass(tcallparanode(left).left);
  173. maketojumpbool(exprasmlist,tcallparanode(left).left,lr_load_regvars);
  174. cg.a_label(exprasmlist,falselabel);
  175. { erroraddr }
  176. r.enum:=frame_pointer_reg;
  177. cg.a_param_reg(exprasmlist,OS_ADDR,r,paramanager.getintparaloc(4));
  178. { lineno }
  179. cg.a_param_const(exprasmlist,OS_INT,aktfilepos.line,paramanager.getintparaloc(3));
  180. { filename string }
  181. hp2:=cstringconstnode.createstr(current_module.sourcefiles.get_file_name(aktfilepos.fileindex),st_shortstring);
  182. firstpass(tnode(hp2));
  183. secondpass(tnode(hp2));
  184. if codegenerror then
  185. exit;
  186. cg.a_paramaddr_ref(exprasmlist,hp2.location.reference,paramanager.getintparaloc(2));
  187. hp2.free;
  188. { push msg }
  189. secondpass(tcallparanode(tcallparanode(left).right).left);
  190. cg.a_paramaddr_ref(exprasmlist,tcallparanode(tcallparanode(left).right).left.location.reference,paramanager.getintparaloc(1));
  191. { call }
  192. cg.a_call_name(exprasmlist,'FPC_ASSERT');
  193. cg.a_label(exprasmlist,truelabel);
  194. truelabel:=otlabel;
  195. falselabel:=oflabel;
  196. end;
  197. {*****************************************************************************
  198. SIZEOF / TYPEOF GENERIC HANDLING
  199. *****************************************************************************}
  200. { second_handle_ the sizeof and typeof routines }
  201. procedure tcginlinenode.second_SizeOfTypeOf;
  202. var
  203. href,
  204. hrefvmt : treference;
  205. hregister : tregister;
  206. begin
  207. location_reset(location,LOC_REGISTER,OS_ADDR);
  208. { for both cases load vmt }
  209. if left.nodetype=typen then
  210. begin
  211. hregister:=rg.getaddressregister(exprasmlist);
  212. reference_reset_symbol(href,objectlibrary.newasmsymbol(tobjectdef(left.resulttype.def).vmt_mangledname),0);
  213. cg.a_loadaddr_ref_reg(exprasmlist,href,hregister);
  214. end
  215. else
  216. begin
  217. secondpass(left);
  218. location_release(exprasmlist,left.location);
  219. hregister:=rg.getaddressregister(exprasmlist);
  220. { handle self inside a method of a class }
  221. case left.location.loc of
  222. LOC_CREGISTER,
  223. LOC_REGISTER :
  224. begin
  225. if (left.resulttype.def.deftype=classrefdef) or
  226. (po_staticmethod in aktprocdef.procoptions) then
  227. cg.a_load_reg_reg(exprasmlist,OS_ADDR,OS_ADDR,left.location.register,hregister)
  228. else
  229. begin
  230. { load VMT pointer }
  231. reference_reset_base(hrefvmt,left.location.register,tobjectdef(left.resulttype.def).vmt_offset);
  232. cg.a_load_ref_reg(exprasmlist,OS_ADDR,hrefvmt,hregister);
  233. end
  234. end;
  235. LOC_REFERENCE,
  236. LOC_CREFERENCE :
  237. begin
  238. if is_class(left.resulttype.def) then
  239. begin
  240. { deref class }
  241. cg.a_load_ref_reg(exprasmlist,OS_ADDR,left.location.reference,hregister);
  242. { load VMT pointer }
  243. reference_reset_base(hrefvmt,hregister,tobjectdef(left.resulttype.def).vmt_offset);
  244. cg.a_load_ref_reg(exprasmlist,OS_ADDR,hrefvmt,hregister);
  245. end
  246. else
  247. begin
  248. { load VMT pointer, but not for classrefdefs }
  249. if (left.resulttype.def.deftype=objectdef) then
  250. inc(left.location.reference.offset,tobjectdef(left.resulttype.def).vmt_offset);
  251. cg.a_load_ref_reg(exprasmlist,OS_ADDR,left.location.reference,hregister);
  252. end;
  253. end;
  254. else
  255. internalerror(200301301);
  256. end;
  257. { load VMT pointer }
  258. inc(left.location.reference.offset,tobjectdef(left.resulttype.def).vmt_offset);
  259. cg.a_load_ref_reg(exprasmlist,OS_ADDR,left.location.reference,hregister);
  260. end;
  261. { in sizeof load size }
  262. if inlinenumber=in_sizeof_x then
  263. begin
  264. reference_reset_base(href,hregister,0);
  265. rg.ungetaddressregister(exprasmlist,hregister);
  266. hregister:=rg.getregisterint(exprasmlist);
  267. cg.a_load_ref_reg(exprasmlist,OS_INT,href,hregister);
  268. end;
  269. location.register:=hregister;
  270. end;
  271. {*****************************************************************************
  272. LENGTH GENERIC HANDLING
  273. *****************************************************************************}
  274. procedure tcginlinenode.second_Length;
  275. var
  276. lengthlab : tasmlabel;
  277. hregister : tregister;
  278. href : treference;
  279. begin
  280. secondpass(left);
  281. { length in ansi strings is at offset -8 }
  282. if is_ansistring(left.resulttype.def) or
  283. is_widestring(left.resulttype.def) then
  284. begin
  285. location_force_reg(exprasmlist,left.location,OS_ADDR,false);
  286. hregister:=left.location.register;
  287. objectlibrary.getlabel(lengthlab);
  288. cg.a_cmp_const_reg_label(exprasmlist,OS_ADDR,OC_EQ,0,hregister,lengthlab);
  289. reference_reset_base(href,hregister,-8);
  290. cg.a_load_ref_reg(exprasmlist,OS_32,href,hregister);
  291. cg.a_label(exprasmlist,lengthlab);
  292. location_reset(location,LOC_REGISTER,OS_32);
  293. location.register:=hregister;
  294. end
  295. else
  296. begin
  297. location_copy(location,left.location);
  298. location.size:=OS_8;
  299. end;
  300. end;
  301. {*****************************************************************************
  302. PRED/SUCC GENERIC HANDLING
  303. *****************************************************************************}
  304. procedure tcginlinenode.second_PredSucc;
  305. var
  306. cgsize : TCGSize;
  307. cgop : topcg;
  308. begin
  309. secondpass(left);
  310. if inlinenumber=in_pred_x then
  311. cgop:=OP_SUB
  312. else
  313. cgop:=OP_ADD;
  314. cgsize:=def_cgsize(resulttype.def);
  315. { we need a value in a register }
  316. location_copy(location,left.location);
  317. location_force_reg(exprasmlist,location,cgsize,false);
  318. if cgsize in [OS_64,OS_S64] then
  319. cg64.a_op64_const_reg(exprasmlist,cgop,1,
  320. location.register64)
  321. else
  322. cg.a_op_const_reg(exprasmlist,cgop,1,location.register);
  323. cg.g_overflowcheck(exprasmlist,self);
  324. cg.g_rangecheck(exprasmlist,self,resulttype.def);
  325. end;
  326. {*****************************************************************************
  327. INC/DEC GENERIC HANDLING
  328. *****************************************************************************}
  329. procedure tcginlinenode.second_IncDec;
  330. const
  331. addsubop:array[in_inc_x..in_dec_x] of TOpCG=(OP_ADD,OP_SUB);
  332. var
  333. addvalue : longint;
  334. addconstant : boolean;
  335. hregisterhi,
  336. hregister : tregister;
  337. cgsize : tcgsize;
  338. pushedregs : tmaybesave;
  339. begin
  340. { set defaults }
  341. addconstant:=true;
  342. { load first parameter, must be a reference }
  343. secondpass(tcallparanode(left).left);
  344. cgsize:=def_cgsize(tcallparanode(left).left.resulttype.def);
  345. { get addvalue }
  346. case tcallparanode(left).left.resulttype.def.deftype of
  347. orddef,
  348. enumdef :
  349. addvalue:=1;
  350. pointerdef :
  351. begin
  352. if is_void(tpointerdef(tcallparanode(left).left.resulttype.def).pointertype.def) then
  353. addvalue:=1
  354. else
  355. addvalue:=tpointerdef(tcallparanode(left).left.resulttype.def).pointertype.def.size;
  356. end;
  357. else
  358. internalerror(10081);
  359. end;
  360. { second_ argument specified?, must be a s32bit in register }
  361. if assigned(tcallparanode(left).right) then
  362. begin
  363. maybe_save(exprasmlist,tcallparanode(tcallparanode(left).right).left.registers32,
  364. tcallparanode(left).left.location,pushedregs);
  365. secondpass(tcallparanode(tcallparanode(left).right).left);
  366. maybe_restore(exprasmlist,tcallparanode(left).left.location,pushedregs);
  367. { when constant, just multiply the addvalue }
  368. if is_constintnode(tcallparanode(tcallparanode(left).right).left) then
  369. addvalue:=addvalue*get_ordinal_value(tcallparanode(tcallparanode(left).right).left)
  370. else
  371. begin
  372. location_force_reg(exprasmlist,tcallparanode(tcallparanode(left).right).left.location,cgsize,false);
  373. hregister:=tcallparanode(tcallparanode(left).right).left.location.register;
  374. hregisterhi:=tcallparanode(tcallparanode(left).right).left.location.registerhigh;
  375. { insert multiply with addvalue if its >1 }
  376. if addvalue>1 then
  377. cg.a_op_const_reg(exprasmlist,OP_IMUL,addvalue,hregister);
  378. addconstant:=false;
  379. end;
  380. end;
  381. { write the add instruction }
  382. if addconstant then
  383. begin
  384. if cgsize in [OS_64,OS_S64] then
  385. cg64.a_op64_const_loc(exprasmlist,addsubop[inlinenumber],
  386. addvalue,tcallparanode(left).left.location)
  387. else
  388. cg.a_op_const_loc(exprasmlist,addsubop[inlinenumber],
  389. addvalue,tcallparanode(left).left.location);
  390. end
  391. else
  392. begin
  393. {$ifndef cpu64bit}
  394. if cgsize in [OS_64,OS_S64] then
  395. cg64.a_op64_reg_loc(exprasmlist,addsubop[inlinenumber],
  396. joinreg64(hregister,hregisterhi),tcallparanode(left).left.location)
  397. else
  398. {$endif cpu64bit}
  399. cg.a_op_reg_loc(exprasmlist,addsubop[inlinenumber],
  400. hregister,tcallparanode(left).left.location);
  401. location_release(exprasmlist,tcallparanode(tcallparanode(left).right).left.location);
  402. end;
  403. cg.g_overflowcheck(exprasmlist,tcallparanode(left).left);
  404. cg.g_rangecheck(exprasmlist,tcallparanode(left).left,tcallparanode(left).left.resulttype.def);
  405. end;
  406. {*****************************************************************************
  407. TYPEINFO GENERIC HANDLING
  408. *****************************************************************************}
  409. procedure tcginlinenode.second_typeinfo;
  410. var
  411. href : treference;
  412. begin
  413. location_reset(location,LOC_REGISTER,OS_ADDR);
  414. location.register:=rg.getaddressregister(exprasmlist);
  415. reference_reset_symbol(href,tstoreddef(ttypenode(tcallparanode(left).left).resulttype.def).get_rtti_label(fullrtti),0);
  416. cg.a_loadaddr_ref_reg(exprasmlist,href,location.register);
  417. end;
  418. {*****************************************************************************
  419. INCLUDE/EXCLUDE GENERIC HANDLING
  420. *****************************************************************************}
  421. procedure tcginlinenode.second_IncludeExclude;
  422. var
  423. scratch_reg : boolean;
  424. hregister : tregister;
  425. asmop : tasmop;
  426. L : longint;
  427. pushedregs : TMaybesave;
  428. cgop : topcg;
  429. addrreg, hregister2: tregister;
  430. use_small : boolean;
  431. cgsize : tcgsize;
  432. href : treference;
  433. begin
  434. location_copy(location,left.location);
  435. secondpass(tcallparanode(left).left);
  436. if tcallparanode(tcallparanode(left).right).left.nodetype=ordconstn then
  437. begin
  438. { calculate bit position }
  439. l:=1 shl (tordconstnode(tcallparanode(tcallparanode(left).right).left).value mod 32);
  440. { determine operator }
  441. if inlinenumber=in_include_x_y then
  442. cgop:=OP_OR
  443. else
  444. begin
  445. cgop:=OP_AND;
  446. l:=not(l);
  447. end;
  448. if (tcallparanode(left).left.location.loc=LOC_REFERENCE) then
  449. begin
  450. inc(tcallparanode(left).left.location.reference.offset,
  451. (tordconstnode(tcallparanode(tcallparanode(left).right).left).value div 32)*4);
  452. cg.a_op_const_ref(exprasmlist,cgop,OS_INT,l,tcallparanode(left).left.location.reference);
  453. location_release(exprasmlist,tcallparanode(left).left.location);
  454. end
  455. else
  456. { LOC_CREGISTER }
  457. begin
  458. cg.a_op_const_reg(exprasmlist,cgop,l,tcallparanode(left).left.location.register);
  459. end;
  460. end
  461. else
  462. begin
  463. use_small:=
  464. { set type }
  465. (tsetdef(tcallparanode(left).left.resulttype.def).settype=smallset)
  466. and
  467. { elemenut number between 1 and 32 }
  468. ((tcallparanode(tcallparanode(left).right).left.resulttype.def.deftype=orddef) and
  469. (torddef(tcallparanode(tcallparanode(left).right).left.resulttype.def).high<=32) or
  470. (tcallparanode(tcallparanode(left).right).left.resulttype.def.deftype=enumdef) and
  471. (tenumdef(tcallparanode(tcallparanode(left).right).left.resulttype.def).max<=32));
  472. { generate code for the element to set }
  473. maybe_save(exprasmlist,tcallparanode(tcallparanode(left).right).left.registers32,
  474. tcallparanode(left).left.location,pushedregs);
  475. secondpass(tcallparanode(tcallparanode(left).right).left);
  476. maybe_restore(exprasmlist,tcallparanode(left).left.location,pushedregs);
  477. { bitnumber - which must be loaded into register }
  478. hregister := cg.get_scratch_reg_int(exprasmlist);
  479. hregister2 := rg.getregisterint(exprasmlist);
  480. case tcallparanode(tcallparanode(left).right).left.location.loc of
  481. LOC_CREGISTER,
  482. LOC_REGISTER:
  483. begin
  484. cg.a_load_reg_reg(exprasmlist,OS_INT,OS_INT,
  485. tcallparanode(tcallparanode(left).right).left.location.register,hregister);
  486. end;
  487. LOC_REFERENCE:
  488. begin
  489. cgsize := def_cgsize(tcallparanode(tcallparanode(left).right).left.resulttype.def);
  490. cg.a_load_ref_reg(exprasmlist,cgsize,
  491. tcallparanode(tcallparanode(left).right).left.location.reference,hregister);
  492. end;
  493. else
  494. internalerror(20020727);
  495. end;
  496. { hregister contains the bitnumber to add }
  497. cg.a_load_const_reg(exprasmlist, OS_INT, 1, hregister2);
  498. cg.a_op_reg_reg(exprasmlist, OP_SHL, OS_INT, hregister, hregister2);
  499. if use_small then
  500. begin
  501. { possiblities :
  502. bitnumber : LOC_REFERENCE, LOC_REGISTER, LOC_CREGISTER
  503. set value : LOC_REFERENCE, LOC_REGISTER
  504. }
  505. { location of set }
  506. if (tcallparanode(left).left.location.loc=LOC_REFERENCE) then
  507. begin
  508. if inlinenumber=in_include_x_y then
  509. begin
  510. cg.a_op_reg_ref(exprasmlist, OP_OR, OS_32, hregister2,
  511. tcallparanode(left).left.location.reference);
  512. end
  513. else
  514. begin
  515. cg.a_op_reg_reg(exprasmlist, OP_NOT, OS_32, hregister2,
  516. hregister2);
  517. cg.a_op_reg_ref(exprasmlist, OP_AND, OS_32, hregister2,
  518. tcallparanode(left).left.location.reference);
  519. end;
  520. end
  521. else
  522. internalerror(20020728);
  523. end
  524. else
  525. begin
  526. { possiblities :
  527. bitnumber : LOC_REFERENCE, LOC_REGISTER, LOC_CREGISTER
  528. set value : LOC_REFERENCE
  529. }
  530. { hregister contains the bitnumber (div 32 to get the correct offset) }
  531. cg.a_op_const_reg(exprasmlist, OP_SHR, 5, hregister);
  532. addrreg := cg.get_scratch_reg_address(exprasmlist);
  533. { calculate the correct address of the operand }
  534. cg.a_loadaddr_ref_reg(exprasmlist, tcallparanode(left).left.location.reference,addrreg);
  535. cg.a_op_reg_reg(exprasmlist, OP_ADD, OS_INT, hregister, addrreg);
  536. reference_reset_base(href,addrreg,0);
  537. if inlinenumber=in_include_x_y then
  538. begin
  539. cg.a_op_reg_ref(exprasmlist, OP_OR, OS_32, hregister2, href);
  540. end
  541. else
  542. begin
  543. cg.a_op_reg_reg(exprasmlist, OP_NOT, OS_32, hregister2, hregister2);
  544. cg.a_op_reg_ref(exprasmlist, OP_AND, OS_32, hregister2, href);
  545. end;
  546. cg.free_scratch_reg(exprasmlist, addrreg);
  547. end;
  548. cg.free_scratch_reg(exprasmlist,hregister);
  549. rg.ungetregisterint(exprasmlist,hregister2);
  550. end;
  551. end;
  552. {*****************************************************************************
  553. FLOAT GENERIC HANDLING
  554. *****************************************************************************}
  555. {
  556. These routines all call internal RTL routines, so if they are
  557. called here, they give an internal error
  558. }
  559. procedure tcginlinenode.second_pi;
  560. begin
  561. internalerror(20020718);
  562. end;
  563. procedure tcginlinenode.second_arctan_real;
  564. begin
  565. internalerror(20020718);
  566. end;
  567. procedure tcginlinenode.second_abs_real;
  568. begin
  569. internalerror(20020718);
  570. end;
  571. procedure tcginlinenode.second_sqr_real;
  572. begin
  573. internalerror(20020718);
  574. end;
  575. procedure tcginlinenode.second_sqrt_real;
  576. begin
  577. internalerror(20020718);
  578. end;
  579. procedure tcginlinenode.second_ln_real;
  580. begin
  581. internalerror(20020718);
  582. end;
  583. procedure tcginlinenode.second_cos_real;
  584. begin
  585. internalerror(20020718);
  586. end;
  587. procedure tcginlinenode.second_sin_real;
  588. begin
  589. internalerror(20020718);
  590. end;
  591. begin
  592. cinlinenode:=tcginlinenode;
  593. end.
  594. {
  595. $Log$
  596. Revision 1.19 2003-01-30 21:46:57 peter
  597. * self fixes for static methods (merged)
  598. Revision 1.18 2003/01/08 18:43:56 daniel
  599. * Tregister changed into a record
  600. Revision 1.17 2002/11/25 17:43:18 peter
  601. * splitted defbase in defutil,symutil,defcmp
  602. * merged isconvertable and is_equal into compare_defs(_ext)
  603. * made operator search faster by walking the list only once
  604. Revision 1.16 2002/10/05 12:43:25 carl
  605. * fixes for Delphi 6 compilation
  606. (warning : Some features do not work under Delphi)
  607. Revision 1.15 2002/09/30 07:00:46 florian
  608. * fixes to common code to get the alpha compiler compiled applied
  609. Revision 1.14 2002/09/17 18:54:02 jonas
  610. * a_load_reg_reg() now has two size parameters: source and dest. This
  611. allows some optimizations on architectures that don't encode the
  612. register size in the register name.
  613. Revision 1.13 2002/08/13 18:01:52 carl
  614. * rename swatoperands to swapoperands
  615. + m68k first compilable version (still needs a lot of testing):
  616. assembler generator, system information , inline
  617. assembler reader.
  618. Revision 1.12 2002/08/11 14:32:26 peter
  619. * renamed current_library to objectlibrary
  620. Revision 1.11 2002/08/11 13:24:11 peter
  621. * saving of asmsymbols in ppu supported
  622. * asmsymbollist global is removed and moved into a new class
  623. tasmlibrarydata that will hold the info of a .a file which
  624. corresponds with a single module. Added librarydata to tmodule
  625. to keep the library info stored for the module. In the future the
  626. objectfiles will also be stored to the tasmlibrarydata class
  627. * all getlabel/newasmsymbol and friends are moved to the new class
  628. Revision 1.10 2002/08/05 18:27:48 carl
  629. + more more more documentation
  630. + first version include/exclude (can't test though, not enough scratch for i386 :()...
  631. Revision 1.9 2002/08/04 19:06:41 carl
  632. + added generic exception support (still does not work!)
  633. + more documentation
  634. Revision 1.8 2002/07/31 07:54:59 jonas
  635. * re-enabled second_assigned()
  636. Revision 1.7 2002/07/30 20:50:43 florian
  637. * the code generator knows now if parameters are in registers
  638. Revision 1.6 2002/07/29 21:23:42 florian
  639. * more fixes for the ppc
  640. + wrappers for the tcnvnode.first_* stuff introduced
  641. Revision 1.5 2002/07/28 20:45:22 florian
  642. + added direct assembler reader for PowerPC
  643. Revision 1.4 2002/07/26 09:45:20 florian
  644. * fixed a mistake in yesterday's commit, forgot to commit it
  645. Revision 1.3 2002/07/25 22:58:30 florian
  646. no message
  647. Revision 1.2 2002/07/25 17:55:41 carl
  648. + First working revision
  649. Revision 1.1 2002/07/24 04:07:49 carl
  650. + first revision (incomplete)
  651. }