ncgset.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl and Carl Eric Codere
  4. Generate generic assembler for in set/case 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 ncgset;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. node,nset,cpubase,cginfo,cgbase,cgobj,aasmbase,aasmtai;
  23. type
  24. tcgsetelementnode = class(tsetelementnode)
  25. procedure pass_2;override;
  26. end;
  27. tcginnode = class(tinnode)
  28. procedure pass_2;override;
  29. {# Routine to test bitnumber in bitnumber register on value
  30. in value register. The __result register should be set
  31. to one if the bit is set, otherwise __result register
  32. should be set to zero.
  33. Should be overriden on processors which have specific
  34. instructions to do bit tests.
  35. }
  36. procedure emit_bit_test_reg_reg(list : taasmoutput; bitnumber : tregister;
  37. value : tregister; __result :tregister);virtual;
  38. end;
  39. implementation
  40. uses
  41. globtype,systems,
  42. verbose,globals,
  43. symconst,symdef,defbase,
  44. paramgr,
  45. pass_2,
  46. ncon,
  47. cga,tgobj,ncgutil,regvars,rgobj;
  48. {*****************************************************************************
  49. TCGSETELEMENTNODE
  50. *****************************************************************************}
  51. procedure tcgsetelementnode.pass_2;
  52. var
  53. pushedregs : tmaybesave;
  54. begin
  55. { load first value in 32bit register }
  56. secondpass(left);
  57. if left.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
  58. location_force_reg(exprasmlist,left.location,OS_32,false);
  59. { also a second value ? }
  60. if assigned(right) then
  61. begin
  62. maybe_save(exprasmlist,right.registers32,left.location,pushedregs);
  63. secondpass(right);
  64. if codegenerror then
  65. exit;
  66. maybe_restore(exprasmlist,left.location,pushedregs);
  67. if right.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
  68. location_force_reg(exprasmlist,right.location,OS_32,false);
  69. end;
  70. { we doesn't modify the left side, we check only the type }
  71. location_copy(location,left.location);
  72. end;
  73. {*****************************************************************************
  74. *****************************************************************************}
  75. {**********************************************************************}
  76. { Description: Emit operation to do a bit test, where the bitnumber }
  77. { to test is in the bitnumber register. The value to test against is }
  78. { located in the value register. }
  79. { WARNING: Bitnumber register value is DESTROYED! }
  80. { __Result register is set to 1, if the bit is set otherwise, __Result}
  81. { is set to zero. __RESULT register is also used as scratch. }
  82. {**********************************************************************}
  83. procedure tcginnode.emit_bit_test_reg_reg(list : taasmoutput; bitnumber : tregister; value : tregister; __result :tregister);
  84. begin
  85. { first make sure that the bit number is modulo 32 }
  86. { not necessary, since if it's > 31, we have a range error -> will }
  87. { be caught when range checking is on! (JM) }
  88. { cg.a_op_const_reg(list,OP_AND,31,bitnumber); }
  89. { rotate value register "bitnumber" bits to the right }
  90. cg.a_op_reg_reg_reg(list,OP_SHR,OS_INT,bitnumber,value,__result);
  91. { extract the bit we want }
  92. cg.a_op_const_reg(list,OP_AND,1,__result);
  93. end;
  94. procedure tcginnode.pass_2;
  95. type
  96. Tsetpart=record
  97. range : boolean; {Part is a range.}
  98. start,stop : byte; {Start/stop when range; Stop=element when an element.}
  99. end;
  100. var
  101. genjumps,
  102. use_small,
  103. ranges : boolean;
  104. hr,hr2,hr3,
  105. pleftreg : tregister;
  106. href : treference;
  107. opsize : tcgsize;
  108. setparts : array[1..8] of Tsetpart;
  109. i,numparts : byte;
  110. adjustment : longint;
  111. pushedregs : tmaybesave;
  112. l,l2,l3 : tasmlabel;
  113. function analizeset(const Aset:Tconstset;is_small:boolean):boolean;
  114. var
  115. compares,maxcompares:word;
  116. i:byte;
  117. begin
  118. analizeset:=false;
  119. ranges:=false;
  120. numparts:=0;
  121. compares:=0;
  122. { Lots of comparisions take a lot of time, so do not allow
  123. too much comparisions. 8 comparisions are, however, still
  124. smalller than emitting the set }
  125. if cs_littlesize in aktglobalswitches then
  126. maxcompares:=8
  127. else
  128. maxcompares:=5;
  129. { when smallset is possible allow only 3 compares the smallset
  130. code is for littlesize also smaller when more compares are used }
  131. if is_small then
  132. maxcompares:=3;
  133. for i:=0 to 255 do
  134. if i in Aset then
  135. begin
  136. if (numparts=0) or (i<>setparts[numparts].stop+1) then
  137. begin
  138. {Set element is a separate element.}
  139. inc(compares);
  140. if compares>maxcompares then
  141. exit;
  142. inc(numparts);
  143. setparts[numparts].range:=false;
  144. setparts[numparts].stop:=i;
  145. end
  146. else
  147. {Set element is part of a range.}
  148. if not setparts[numparts].range then
  149. begin
  150. {Transform an element into a range.}
  151. setparts[numparts].range:=true;
  152. setparts[numparts].start:=setparts[numparts].stop;
  153. setparts[numparts].stop:=i;
  154. ranges := true;
  155. { there's only one compare per range anymore. Only a }
  156. { sub is added, but that's much faster than a }
  157. { cmp/jcc combo so neglect its effect }
  158. { inc(compares);
  159. if compares>maxcompares then
  160. exit; }
  161. end
  162. else
  163. begin
  164. {Extend a range.}
  165. setparts[numparts].stop:=i;
  166. end;
  167. end;
  168. analizeset:=true;
  169. end;
  170. begin
  171. { We check first if we can generate jumps, this can be done
  172. because the resulttype.def is already set in firstpass }
  173. { check if we can use smallset operation using btl which is limited
  174. to 32 bits, the left side may also not contain higher values !! }
  175. use_small:=(tsetdef(right.resulttype.def).settype=smallset) and
  176. ((left.resulttype.def.deftype=orddef) and (torddef(left.resulttype.def).high<=32) or
  177. (left.resulttype.def.deftype=enumdef) and (tenumdef(left.resulttype.def).max<=32));
  178. { Can we generate jumps? Possible for all types of sets }
  179. genjumps:=(right.nodetype=setconstn) and
  180. analizeset(Tsetconstnode(right).value_set^,use_small);
  181. { calculate both operators }
  182. { the complex one first }
  183. firstcomplex(self);
  184. secondpass(left);
  185. { Only process the right if we are not generating jumps }
  186. if not genjumps then
  187. begin
  188. maybe_save(exprasmlist,right.registers32,left.location,pushedregs);
  189. secondpass(right);
  190. maybe_restore(exprasmlist,left.location,pushedregs);
  191. end;
  192. if codegenerror then
  193. exit;
  194. { ofcourse not commutative }
  195. if nf_swaped in flags then
  196. swapleftright;
  197. { location is always LOC_JUMP }
  198. location_reset(location,LOC_REGISTER,OS_INT);
  199. { allocate a register for the result }
  200. location.register := rg.getregisterint(exprasmlist);
  201. { Get a label to jump to the end }
  202. getlabel(l);
  203. if genjumps then
  204. begin
  205. { clear the register value, indicating result is FALSE }
  206. cg.a_load_const_reg(exprasmlist,OS_INT,0,location.register);
  207. opsize := def_cgsize(left.resulttype.def);
  208. { If register is used, use only lower 8 bits }
  209. if left.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
  210. begin
  211. { for ranges we always need a 32bit register, because then we }
  212. { use the register as base in a reference (JM) }
  213. if ranges then
  214. begin
  215. pleftreg:=rg.makeregsize(left.location.register,OS_INT);
  216. cg.a_load_reg_reg(exprasmlist,left.location.size,left.location.register,pleftreg);
  217. if opsize <> OS_INT then
  218. cg.a_op_const_reg(exprasmlist,OP_AND,255,pleftreg);
  219. opsize := OS_INT;
  220. end
  221. else
  222. { otherwise simply use the lower 8 bits (no "and" }
  223. { necessary this way) (JM) }
  224. begin
  225. pleftreg:=rg.makeregsize(left.location.register,OS_8);
  226. opsize := OS_8;
  227. end;
  228. end
  229. else
  230. begin
  231. { load the value in a register }
  232. pleftreg := cg.get_scratch_reg_int(exprasmlist);
  233. opsize := OS_INT;
  234. cg.a_load_ref_reg(exprasmlist,def_cgsize(left.resulttype.def),left.location.reference,pleftreg);
  235. end;
  236. { how much have we already substracted from the x in the }
  237. { "x in [y..z]" expression }
  238. adjustment := 0;
  239. hr := R_NO;
  240. for i:=1 to numparts do
  241. if setparts[i].range then
  242. { use fact that a <= x <= b <=> cardinal(x-a) <= cardinal(b-a) }
  243. begin
  244. { is the range different from all legal values? }
  245. if (setparts[i].stop-setparts[i].start <> 255) then
  246. begin
  247. { yes, is the lower bound <> 0? }
  248. if (setparts[i].start <> 0) then
  249. { we're going to substract from the left register, }
  250. { so in case of a LOC_CREGISTER first move the value }
  251. { to edi (not done before because now we can do the }
  252. { move and substract in one instruction with LEA) }
  253. if (left.location.loc = LOC_CREGISTER) and
  254. (hr <> pleftreg) then
  255. begin
  256. hr:=cg.get_scratch_reg_int(exprasmlist);
  257. cg.a_op_const_reg_reg(exprasmlist,OP_SUB,opsize,setparts[i].start,pleftreg,hr);
  258. pleftreg:=hr;
  259. opsize := OS_INT;
  260. end
  261. else
  262. begin
  263. { otherwise, the value is already in a register }
  264. { that can be modified }
  265. cg.a_op_const_reg(exprasmlist,OP_SUB,
  266. setparts[i].start-adjustment,pleftreg)
  267. end;
  268. { new total value substracted from x: }
  269. { adjustment + (setparts[i].start - adjustment) }
  270. adjustment := setparts[i].start;
  271. { check if result < b-a+1 (not "result <= b-a", since }
  272. { we need a carry in case the element is in the range }
  273. { (this will never overflow since we check at the }
  274. { beginning whether stop-start <> 255) }
  275. cg.a_cmp_const_reg_label(exprasmlist, opsize, OC_B,
  276. setparts[i].stop-setparts[i].start+1,pleftreg,l);
  277. end
  278. else
  279. { if setparts[i].start = 0 and setparts[i].stop = 255, }
  280. { it's always true since "in" is only allowed for bytes }
  281. begin
  282. cg.a_jmp_always(exprasmlist,l);
  283. end;
  284. end
  285. else
  286. begin
  287. { Emit code to check if left is an element }
  288. cg.a_cmp_const_reg_label(exprasmlist, opsize, OC_EQ,
  289. setparts[i].stop-adjustment,pleftreg,l);
  290. end;
  291. { To compensate for not doing a second pass }
  292. right.location.reference.symbol:=nil;
  293. getlabel(l3);
  294. cg.a_jmp_always(exprasmlist,l3);
  295. { Now place the end label if IN success }
  296. cg.a_label(exprasmlist,l);
  297. { result register is 1 }
  298. cg.a_load_const_reg(exprasmlist,OS_INT,1,location.register);
  299. { in case value is not found }
  300. cg.a_label(exprasmlist,l3);
  301. case left.location.loc of
  302. LOC_CREGISTER :
  303. cg.free_scratch_reg(exprasmlist,pleftreg);
  304. LOC_REGISTER :
  305. rg.ungetregister(exprasmlist,pleftreg);
  306. else
  307. begin
  308. reference_release(exprasmlist,left.location.reference);
  309. cg.free_scratch_reg(exprasmlist,pleftreg);
  310. end;
  311. end;
  312. end
  313. else
  314. {*****************************************************************}
  315. { NO JUMP TABLE GENERATION }
  316. {*****************************************************************}
  317. begin
  318. { We will now generated code to check the set itself, no jmps,
  319. handle smallsets separate, because it allows faster checks }
  320. if use_small then
  321. begin
  322. {**************************** SMALL SET **********************}
  323. if left.nodetype=ordconstn then
  324. begin
  325. { clear the register value, indicating result is FALSE }
  326. cg.a_load_const_reg(exprasmlist,OS_INT,0,location.register);
  327. hr:=cg.get_scratch_reg_int(exprasmlist);
  328. case right.location.loc of
  329. LOC_REGISTER,
  330. LOC_CREGISTER:
  331. begin
  332. { load set value into register }
  333. cg.a_load_reg_reg(exprasmlist,OS_INT,
  334. right.location.register,hr);
  335. end;
  336. LOC_REFERENCE,
  337. LOC_CREFERENCE :
  338. begin
  339. { load set value into register }
  340. cg.a_load_ref_reg(exprasmlist,OS_INT,
  341. right.location.reference,hr);
  342. end;
  343. else
  344. internalerror(200203312);
  345. end;
  346. { then do AND with constant and register }
  347. cg.a_op_const_reg(exprasmlist,OP_AND,1 shl
  348. (tordconstnode(left).value and 31),hr);
  349. { if the value in the AND register is <> 0 then the value is equal. }
  350. cg.a_cmp_const_reg_label(exprasmlist,OS_32,OC_EQ,1 shl
  351. (tordconstnode(left).value and 31),hr,l);
  352. cg.free_scratch_reg(exprasmlist,hr);
  353. getlabel(l3);
  354. cg.a_jmp_always(exprasmlist,l3);
  355. { Now place the end label if IN success }
  356. cg.a_label(exprasmlist,l);
  357. { result register is 1 : LOC_JUMP }
  358. cg.a_load_const_reg(exprasmlist,OS_INT,1,location.register);
  359. { in case value is not found }
  360. cg.a_label(exprasmlist,l3);
  361. location_release(exprasmlist,right.location);
  362. end
  363. else
  364. begin
  365. case left.location.loc of
  366. LOC_REGISTER,
  367. LOC_CREGISTER:
  368. begin
  369. hr3:=rg.makeregsize(left.location.register,OS_INT);
  370. cg.a_load_reg_reg(exprasmlist,left.location.size,left.location.register,hr3);
  371. hr:=cg.get_scratch_reg_int(exprasmlist);
  372. cg.a_load_reg_reg(exprasmlist,OS_INT,hr3,hr);
  373. end;
  374. else
  375. begin
  376. hr:=cg.get_scratch_reg_int(exprasmlist);
  377. cg.a_load_ref_reg(exprasmlist,def_cgsize(left.resulttype.def),
  378. left.location.reference,hr);
  379. location_release(exprasmlist,left.location);
  380. end;
  381. end;
  382. case right.location.loc of
  383. LOC_REGISTER,
  384. LOC_CREGISTER :
  385. begin
  386. hr2:=right.location.register;
  387. end;
  388. LOC_CONSTANT :
  389. begin
  390. hr2:=rg.getregisterint(exprasmlist);
  391. cg.a_load_const_reg(exprasmlist,OS_32,
  392. right.location.value,hr2);
  393. end;
  394. LOC_CREFERENCE,
  395. LOC_REFERENCE :
  396. begin
  397. location_release(exprasmlist,right.location);
  398. hr2:=rg.getregisterint(exprasmlist);
  399. cg.a_load_ref_reg(exprasmlist, OS_32,
  400. right.location.reference,hr2);
  401. end;
  402. else
  403. internalerror(2002032210);
  404. end;
  405. { emit bit test operation }
  406. emit_bit_test_reg_reg(exprasmlist,hr,hr2,location.register);
  407. { free the resources }
  408. case right.location.loc of
  409. LOC_REGISTER,
  410. LOC_CREGISTER :
  411. rg.ungetregisterint(exprasmlist,right.location.register);
  412. LOC_CONSTANT ,
  413. LOC_CREFERENCE,
  414. LOC_REFERENCE :
  415. rg.ungetregisterint(exprasmlist,hr2);
  416. else
  417. internalerror(2002032210);
  418. end;
  419. { free bitnumber register }
  420. cg.free_scratch_reg(exprasmlist,hr);
  421. end;
  422. end
  423. else
  424. {************************** NOT SMALL SET ********************}
  425. begin
  426. if right.location.loc=LOC_CONSTANT then
  427. begin
  428. { this section has not been tested! }
  429. { can it actually occur currently? CEC }
  430. internalerror(20020610);
  431. getlabel(l);
  432. getlabel(l2);
  433. { Is this treated in firstpass ?? }
  434. if left.nodetype=ordconstn then
  435. begin
  436. hr:=rg.getregisterint(exprasmlist);
  437. left.location.loc:=LOC_REGISTER;
  438. left.location.size:=OS_INT;
  439. left.location.register:=hr;
  440. cg.a_load_const_reg(exprasmlist,OS_INT,
  441. tordconstnode(left).value,hr);
  442. end;
  443. case left.location.loc of
  444. LOC_REGISTER,
  445. LOC_CREGISTER:
  446. begin
  447. hr:=rg.makeregsize(left.location.register,OS_INT);
  448. cg.a_load_reg_reg(exprasmlist,left.location.size,left.location.register,hr);
  449. cg.a_cmp_const_reg_label(exprasmlist,OS_INT,OC_BE,31,hr,l);
  450. { reset of result register is done in routine entry }
  451. cg.a_jmp_always(exprasmlist,l2);
  452. cg.a_label(exprasmlist,l);
  453. { We have to load the value into a register because
  454. btl does not accept values only refs or regs (PFV) }
  455. hr2:=rg.getregisterint(exprasmlist);
  456. cg.a_load_const_reg(exprasmlist,OS_INT,right.location.value,hr2);
  457. end;
  458. else
  459. begin
  460. cg.a_cmp_const_ref_label(exprasmlist,OS_8,OC_BE,31,left.location.reference,l);
  461. cg.a_jmp_always(exprasmlist,l2);
  462. cg.a_label(exprasmlist,l);
  463. location_release(exprasmlist,left.location);
  464. hr:=rg.getregisterint(exprasmlist);
  465. cg.a_load_ref_reg(exprasmlist,OS_32,left.location.reference,hr);
  466. { We have to load the value into a register because
  467. btl does not accept values only refs or regs (PFV) }
  468. hr2:=rg.getregisterint(exprasmlist);
  469. cg.a_load_const_reg(exprasmlist,OS_INT,
  470. right.location.value,hr2);
  471. end;
  472. end;
  473. { emit bit test operation }
  474. emit_bit_test_reg_reg(exprasmlist,hr,hr2,location.register);
  475. rg.ungetregisterint(exprasmlist,hr2);
  476. if not (left.location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
  477. rg.ungetregisterint(exprasmlist,hr);
  478. cg.a_label(exprasmlist,l2);
  479. end { of right.location.loc=LOC_CONSTANT }
  480. { do search in a normal set which could have >32 elementsm
  481. but also used if the left side contains higher values > 32 }
  482. else if left.nodetype=ordconstn then
  483. begin
  484. getlabel(l2);
  485. getlabel(l);
  486. { use location.register as scratch register here }
  487. inc(right.location.reference.offset,tordconstnode(left).value shr 3);
  488. cg.a_load_ref_reg(exprasmlist, OS_8, right.location.reference, location.register);
  489. cg.a_op_const_reg(exprasmlist, OP_AND,1 shl (tordconstnode(left).value and 7),
  490. location.register);
  491. cg.a_cmp_const_reg_label(exprasmlist,OS_8, OC_NE,0,location.register,l2);
  492. cg.a_load_const_reg(exprasmlist, OS_INT,0, location.register);
  493. cg.a_jmp_always(exprasmlist,l);
  494. cg.a_label(exprasmlist,l2);
  495. cg.a_load_const_reg(exprasmlist, OS_INT,1, location.register);
  496. {emit_const_ref(A_TEST,S_B,1 shl (tordconstnode(left).value and 7),right.location.reference);}
  497. cg.a_label(exprasmlist,l);
  498. location_release(exprasmlist,right.location);
  499. end
  500. else
  501. begin
  502. if (left.location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
  503. pleftreg:=rg.makeregsize(left.location.register,OS_INT)
  504. else
  505. pleftreg:=rg.getregisterint(exprasmlist);
  506. cg.a_load_loc_reg(exprasmlist,left.location,pleftreg);
  507. location_freetemp(exprasmlist,left.location);
  508. location_release(exprasmlist,left.location);
  509. cg.a_param_reg(exprasmlist,OS_8,pleftreg,paramanager.getintparaloc(2));
  510. cg.a_param_ref(exprasmlist,OS_ADDR,right.location.reference,paramanager.getintparaloc(1));
  511. cg.a_call_name(exprasmlist,'FPC_SET_IN_BYTE');
  512. { result of value is always one full register }
  513. cg.a_load_reg_reg(exprasmlist,OS_INT,ACCUMULATOR,location.register);
  514. { release the allocated register }
  515. if not (left.location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
  516. rg.ungetregisterint(exprasmlist,pleftreg);
  517. location_release(exprasmlist,right.location);
  518. end;
  519. end;
  520. end;
  521. location_freetemp(exprasmlist,right.location);
  522. end;
  523. begin
  524. csetelementnode:=tcgsetelementnode;
  525. cinnode:=tcginnode;
  526. end.
  527. {
  528. $Log$
  529. Revision 1.8 2002-07-22 11:48:04 daniel
  530. * Sets are now internally sets.
  531. Revision 1.7 2002/07/21 16:58:20 jonas
  532. * fixed some bugs in tcginnode.pass_2() and optimized the bit test
  533. Revision 1.6 2002/07/20 11:57:54 florian
  534. * types.pas renamed to defbase.pas because D6 contains a types
  535. unit so this would conflicts if D6 programms are compiled
  536. + Willamette/SSE2 instructions to assembler added
  537. Revision 1.5 2002/07/11 14:41:28 florian
  538. * start of the new generic parameter handling
  539. Revision 1.4 2002/07/07 10:16:29 florian
  540. * problems with last commit fixed
  541. Revision 1.3 2002/07/06 20:19:25 carl
  542. + generic set handling
  543. Revision 1.2 2002/07/01 16:23:53 peter
  544. * cg64 patch
  545. * basics for currency
  546. * asnode updates for class and interface (not finished)
  547. Revision 1.1 2002/06/16 08:14:56 carl
  548. + generic sets
  549. }