stream_buffer.c.060i.targetclone 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479
  1. xStreamBufferSpacesAvailable.part.0 ()
  2. {
  3. const struct StreamBuffer_t * const pxStreamBuffer;
  4. size_t xSpace;
  5. size_t xOriginalTail;
  6. uint32_t ulNewBASEPRI;
  7. struct StreamBufferDef_t * xStreamBuffer;
  8. <bb 5> [local count: 107374]:
  9. # DEBUG D#2 s=> xStreamBuffer
  10. # DEBUG xStreamBuffer => D#2
  11. <bb 2> [local count: 107374]:
  12. # DEBUG BEGIN_STMT
  13. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  14. # DEBUG BEGIN_STMT
  15. # DEBUG BEGIN_STMT
  16. __asm__ __volatile__(" mov %0, %1
  17. msr basepri, %0
  18. isb
  19. dsb
  20. " : "=r" ulNewBASEPRI_1 : "i" 16 : "memory");
  21. # DEBUG ulNewBASEPRI => ulNewBASEPRI_1
  22. <bb 3> [local count: 1073741824]:
  23. # DEBUG ulNewBASEPRI => NULL
  24. # DEBUG BEGIN_STMT
  25. # DEBUG BEGIN_STMT
  26. # DEBUG BEGIN_STMT
  27. <bb 4> [local count: 1073741824]:
  28. goto <bb 3>; [100.00%]
  29. }
  30. prvReadBytesFromBuffer.part.0 (struct StreamBuffer_t * pxStreamBuffer, uint8_t * pucData, size_t xCount, size_t xTail)
  31. {
  32. size_t xFirstLength;
  33. uint32_t ulNewBASEPRI;
  34. uint32_t ulNewBASEPRI;
  35. uint32_t ulNewBASEPRI;
  36. unsigned int _2;
  37. unsigned int _4;
  38. unsigned int _8;
  39. uint8_t * _10;
  40. uint8_t * _11;
  41. uint8_t * _13;
  42. uint8_t * _14;
  43. unsigned int _15;
  44. unsigned int _17;
  45. <bb 15> [local count: 214748]:
  46. <bb 2> [local count: 214748]:
  47. # DEBUG BEGIN_STMT
  48. # DEBUG BEGIN_STMT
  49. _2 = pxStreamBuffer_1(D)->xLength;
  50. _4 = _2 - xTail_3(D);
  51. xFirstLength_6 = MIN_EXPR <_4, xCount_5(D)>;
  52. # DEBUG xFirstLength => xFirstLength_6
  53. # DEBUG BEGIN_STMT
  54. if (xCount_5(D) < xFirstLength_6)
  55. goto <bb 3>; [50.00%]
  56. else
  57. goto <bb 6>; [50.00%]
  58. <bb 3> [local count: 107374]:
  59. # DEBUG BEGIN_STMT
  60. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  61. # DEBUG BEGIN_STMT
  62. # DEBUG BEGIN_STMT
  63. __asm__ __volatile__(" mov %0, %1
  64. msr basepri, %0
  65. isb
  66. dsb
  67. " : "=r" ulNewBASEPRI_7 : "i" 16 : "memory");
  68. # DEBUG ulNewBASEPRI => ulNewBASEPRI_7
  69. <bb 4> [local count: 1073741824]:
  70. # DEBUG ulNewBASEPRI => NULL
  71. # DEBUG BEGIN_STMT
  72. # DEBUG BEGIN_STMT
  73. # DEBUG BEGIN_STMT
  74. <bb 5> [local count: 1073741824]:
  75. goto <bb 4>; [100.00%]
  76. <bb 6> [local count: 107374]:
  77. # DEBUG BEGIN_STMT
  78. # DEBUG BEGIN_STMT
  79. _8 = xTail_3(D) + xFirstLength_6;
  80. if (_2 < _8)
  81. goto <bb 7>; [67.00%]
  82. else
  83. goto <bb 10>; [33.00%]
  84. <bb 7> [local count: 71941]:
  85. # DEBUG BEGIN_STMT
  86. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  87. # DEBUG BEGIN_STMT
  88. # DEBUG BEGIN_STMT
  89. __asm__ __volatile__(" mov %0, %1
  90. msr basepri, %0
  91. isb
  92. dsb
  93. " : "=r" ulNewBASEPRI_9 : "i" 16 : "memory");
  94. # DEBUG ulNewBASEPRI => ulNewBASEPRI_9
  95. <bb 8> [local count: 719407023]:
  96. # DEBUG ulNewBASEPRI => NULL
  97. # DEBUG BEGIN_STMT
  98. # DEBUG BEGIN_STMT
  99. # DEBUG BEGIN_STMT
  100. <bb 9> [local count: 719407023]:
  101. goto <bb 8>; [100.00%]
  102. <bb 10> [local count: 35433]:
  103. # DEBUG BEGIN_STMT
  104. # DEBUG BEGIN_STMT
  105. _10 = pxStreamBuffer_1(D)->pucBuffer;
  106. _11 = _10 + xTail_3(D);
  107. memcpy (pucData_12(D), _11, xFirstLength_6);
  108. # DEBUG BEGIN_STMT
  109. if (xCount_5(D) > xFirstLength_6)
  110. goto <bb 11>; [33.00%]
  111. else
  112. goto <bb 12>; [67.00%]
  113. <bb 11> [local count: 11693]:
  114. # DEBUG BEGIN_STMT
  115. _13 = pucData_12(D) + xFirstLength_6;
  116. _14 = pxStreamBuffer_1(D)->pucBuffer;
  117. _15 = xCount_5(D) - xFirstLength_6;
  118. memcpy (_13, _14, _15);
  119. <bb 12> [local count: 35433]:
  120. # DEBUG BEGIN_STMT
  121. # DEBUG BEGIN_STMT
  122. xTail_16 = xTail_3(D) + xCount_5(D);
  123. # DEBUG xTail => xTail_16
  124. # DEBUG BEGIN_STMT
  125. _17 = pxStreamBuffer_1(D)->xLength;
  126. if (xTail_16 >= _17)
  127. goto <bb 13>; [50.00%]
  128. else
  129. goto <bb 14>; [50.00%]
  130. <bb 13> [local count: 17717]:
  131. # DEBUG BEGIN_STMT
  132. xTail_18 = xTail_16 - _17;
  133. # DEBUG xTail => xTail_18
  134. <bb 14> [local count: 35433]:
  135. # xTail_19 = PHI <xTail_16(12), xTail_18(13)>
  136. # DEBUG xTail => xTail_19
  137. # DEBUG BEGIN_STMT
  138. return xTail_19;
  139. }
  140. prvWriteBytesToBuffer.part.0 (struct StreamBuffer_t * const pxStreamBuffer, const uint8_t * pucData, size_t xCount, size_t xHead)
  141. {
  142. size_t xFirstLength;
  143. uint32_t ulNewBASEPRI;
  144. uint32_t ulNewBASEPRI;
  145. uint32_t ulNewBASEPRI;
  146. unsigned int _2;
  147. unsigned int _4;
  148. unsigned int _7;
  149. uint8_t * _9;
  150. uint8_t * _10;
  151. unsigned int _12;
  152. unsigned int _13;
  153. uint8_t * _15;
  154. const uint8_t * _16;
  155. unsigned int _18;
  156. <bb 15> [local count: 160260]:
  157. <bb 2> [local count: 160260]:
  158. # DEBUG BEGIN_STMT
  159. # DEBUG BEGIN_STMT
  160. _2 = pxStreamBuffer_1(D)->xLength;
  161. _4 = _2 - xHead_3(D);
  162. xFirstLength_6 = MIN_EXPR <_4, xCount_5(D)>;
  163. # DEBUG xFirstLength => xFirstLength_6
  164. # DEBUG BEGIN_STMT
  165. _7 = xHead_3(D) + xFirstLength_6;
  166. if (_2 < _7)
  167. goto <bb 3>; [67.00%]
  168. else
  169. goto <bb 6>; [33.00%]
  170. <bb 3> [local count: 107374]:
  171. # DEBUG BEGIN_STMT
  172. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  173. # DEBUG BEGIN_STMT
  174. # DEBUG BEGIN_STMT
  175. __asm__ __volatile__(" mov %0, %1
  176. msr basepri, %0
  177. isb
  178. dsb
  179. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  180. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  181. <bb 4> [local count: 1073741824]:
  182. # DEBUG ulNewBASEPRI => NULL
  183. # DEBUG BEGIN_STMT
  184. # DEBUG BEGIN_STMT
  185. # DEBUG BEGIN_STMT
  186. <bb 5> [local count: 1073741824]:
  187. goto <bb 4>; [100.00%]
  188. <bb 6> [local count: 52886]:
  189. # DEBUG BEGIN_STMT
  190. # DEBUG BEGIN_STMT
  191. _9 = pxStreamBuffer_1(D)->pucBuffer;
  192. _10 = _9 + xHead_3(D);
  193. memcpy (_10, pucData_11(D), xFirstLength_6);
  194. # DEBUG BEGIN_STMT
  195. if (xCount_5(D) > xFirstLength_6)
  196. goto <bb 7>; [50.00%]
  197. else
  198. goto <bb 12>; [50.00%]
  199. <bb 7> [local count: 26443]:
  200. # DEBUG BEGIN_STMT
  201. _12 = xCount_5(D) - xFirstLength_6;
  202. _13 = pxStreamBuffer_1(D)->xLength;
  203. if (_12 > _13)
  204. goto <bb 8>; [67.00%]
  205. else
  206. goto <bb 11>; [33.00%]
  207. <bb 8> [local count: 17717]:
  208. # DEBUG BEGIN_STMT
  209. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  210. # DEBUG BEGIN_STMT
  211. # DEBUG BEGIN_STMT
  212. __asm__ __volatile__(" mov %0, %1
  213. msr basepri, %0
  214. isb
  215. dsb
  216. " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory");
  217. # DEBUG ulNewBASEPRI => ulNewBASEPRI_14
  218. <bb 9> [local count: 177167401]:
  219. # DEBUG ulNewBASEPRI => NULL
  220. # DEBUG BEGIN_STMT
  221. # DEBUG BEGIN_STMT
  222. # DEBUG BEGIN_STMT
  223. <bb 10> [local count: 177167401]:
  224. goto <bb 9>; [100.00%]
  225. <bb 11> [local count: 8726]:
  226. # DEBUG BEGIN_STMT
  227. # DEBUG BEGIN_STMT
  228. _15 = pxStreamBuffer_1(D)->pucBuffer;
  229. _16 = pucData_11(D) + xFirstLength_6;
  230. memcpy (_15, _16, _12);
  231. <bb 12> [local count: 35169]:
  232. # DEBUG BEGIN_STMT
  233. # DEBUG BEGIN_STMT
  234. xHead_17 = xHead_3(D) + xCount_5(D);
  235. # DEBUG xHead => xHead_17
  236. # DEBUG BEGIN_STMT
  237. _18 = pxStreamBuffer_1(D)->xLength;
  238. if (xHead_17 >= _18)
  239. goto <bb 13>; [50.00%]
  240. else
  241. goto <bb 14>; [50.00%]
  242. <bb 13> [local count: 17584]:
  243. # DEBUG BEGIN_STMT
  244. xHead_19 = xHead_17 - _18;
  245. # DEBUG xHead => xHead_19
  246. <bb 14> [local count: 35169]:
  247. # xHead_20 = PHI <xHead_17(12), xHead_19(13)>
  248. # DEBUG xHead => xHead_20
  249. # DEBUG BEGIN_STMT
  250. # DEBUG BEGIN_STMT
  251. return xHead_20;
  252. }
  253. prvInitialiseNewStreamBuffer.part.0 (struct StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags)
  254. {
  255. const BaseType_t xWriteValue;
  256. uint32_t ulNewBASEPRI;
  257. <bb 3> [local count: 1073741824]:
  258. <bb 2> [local count: 1073741824]:
  259. # DEBUG BEGIN_STMT
  260. # DEBUG BEGIN_STMT
  261. memset (pxStreamBuffer_1(D), 0, 36);
  262. # DEBUG BEGIN_STMT
  263. pxStreamBuffer_1(D)->pucBuffer = pucBuffer_2(D);
  264. # DEBUG BEGIN_STMT
  265. pxStreamBuffer_1(D)->xLength = xBufferSizeBytes_3(D);
  266. # DEBUG BEGIN_STMT
  267. pxStreamBuffer_1(D)->xTriggerLevelBytes = xTriggerLevelBytes_4(D);
  268. # DEBUG BEGIN_STMT
  269. pxStreamBuffer_1(D)->ucFlags = ucFlags_5(D);
  270. return;
  271. }
  272. ucStreamBufferGetStreamBufferType (struct StreamBufferDef_t * xStreamBuffer)
  273. {
  274. unsigned char _1;
  275. uint8_t _4;
  276. <bb 2> [local count: 1073741824]:
  277. # DEBUG BEGIN_STMT
  278. _1 = xStreamBuffer_3(D)->ucFlags;
  279. _4 = _1 & 1;
  280. return _4;
  281. }
  282. vStreamBufferSetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer, UBaseType_t uxStreamBufferNumber)
  283. {
  284. <bb 2> [local count: 1073741824]:
  285. # DEBUG BEGIN_STMT
  286. xStreamBuffer_2(D)->uxStreamBufferNumber = uxStreamBufferNumber_3(D);
  287. return;
  288. }
  289. uxStreamBufferGetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer)
  290. {
  291. UBaseType_t _3;
  292. <bb 2> [local count: 1073741824]:
  293. # DEBUG BEGIN_STMT
  294. _3 = xStreamBuffer_2(D)->uxStreamBufferNumber;
  295. return _3;
  296. }
  297. prvInitialiseNewStreamBuffer (struct StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags)
  298. {
  299. uint32_t ulNewBASEPRI;
  300. void * _1;
  301. <bb 2> [local count: 130040]:
  302. # DEBUG BEGIN_STMT
  303. # DEBUG xWriteValue => 85
  304. # DEBUG BEGIN_STMT
  305. _1 = memset (pucBuffer_4(D), 85, xBufferSizeBytes_5(D));
  306. if (_1 != pucBuffer_4(D))
  307. goto <bb 3>; [82.57%]
  308. else
  309. goto <bb 5>; [17.43%]
  310. <bb 3> [local count: 107374]:
  311. # DEBUG BEGIN_STMT
  312. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  313. # DEBUG BEGIN_STMT
  314. # DEBUG BEGIN_STMT
  315. __asm__ __volatile__(" mov %0, %1
  316. msr basepri, %0
  317. isb
  318. dsb
  319. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  320. # DEBUG ulNewBASEPRI => ulNewBASEPRI_10
  321. <bb 4> [local count: 1073741824]:
  322. # DEBUG ulNewBASEPRI => NULL
  323. # DEBUG BEGIN_STMT
  324. # DEBUG BEGIN_STMT
  325. # DEBUG BEGIN_STMT
  326. goto <bb 4>; [100.00%]
  327. <bb 5> [local count: 22666]:
  328. prvInitialiseNewStreamBuffer.part.0 (pxStreamBuffer_7(D), pucBuffer_4(D), xBufferSizeBytes_5(D), xTriggerLevelBytes_8(D), ucFlags_9(D));
  329. return;
  330. }
  331. prvBytesInBuffer (const struct StreamBuffer_t * const pxStreamBuffer)
  332. {
  333. size_t xCount;
  334. unsigned int _1;
  335. unsigned int _2;
  336. unsigned int _7;
  337. <bb 2> [local count: 1073741824]:
  338. # DEBUG BEGIN_STMT
  339. # DEBUG BEGIN_STMT
  340. _1 = pxStreamBuffer_5(D)->xLength;
  341. _2 ={v} pxStreamBuffer_5(D)->xHead;
  342. xCount_6 = _1 + _2;
  343. # DEBUG xCount => xCount_6
  344. # DEBUG BEGIN_STMT
  345. _7 ={v} pxStreamBuffer_5(D)->xTail;
  346. xCount_8 = xCount_6 - _7;
  347. # DEBUG xCount => xCount_8
  348. # DEBUG BEGIN_STMT
  349. if (_1 <= xCount_8)
  350. goto <bb 3>; [50.00%]
  351. else
  352. goto <bb 4>; [50.00%]
  353. <bb 3> [local count: 536870913]:
  354. # DEBUG BEGIN_STMT
  355. xCount_9 = xCount_8 - _1;
  356. # DEBUG xCount => xCount_9
  357. <bb 4> [local count: 1073741824]:
  358. # xCount_3 = PHI <xCount_8(2), xCount_9(3)>
  359. # DEBUG xCount => xCount_3
  360. # DEBUG BEGIN_STMT
  361. # DEBUG BEGIN_STMT
  362. return xCount_3;
  363. }
  364. prvReadBytesFromBuffer (struct StreamBuffer_t * pxStreamBuffer, uint8_t * pucData, size_t xCount, size_t xTail)
  365. {
  366. uint32_t ulNewBASEPRI;
  367. <bb 2> [local count: 214748]:
  368. # DEBUG BEGIN_STMT
  369. # DEBUG BEGIN_STMT
  370. if (xCount_3(D) == 0)
  371. goto <bb 3>; [50.00%]
  372. else
  373. goto <bb 5>; [50.00%]
  374. <bb 3> [local count: 107374]:
  375. # DEBUG BEGIN_STMT
  376. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  377. # DEBUG BEGIN_STMT
  378. # DEBUG BEGIN_STMT
  379. __asm__ __volatile__(" mov %0, %1
  380. msr basepri, %0
  381. isb
  382. dsb
  383. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  384. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  385. <bb 4> [local count: 1073741824]:
  386. # DEBUG ulNewBASEPRI => NULL
  387. # DEBUG BEGIN_STMT
  388. # DEBUG BEGIN_STMT
  389. # DEBUG BEGIN_STMT
  390. goto <bb 4>; [100.00%]
  391. <bb 5> [local count: 107374]:
  392. xTail_1 = prvReadBytesFromBuffer.part.0 (pxStreamBuffer_5(D), pucData_7(D), xCount_3(D), xTail_6(D));
  393. # DEBUG xTail => xTail_1
  394. # DEBUG BEGIN_STMT
  395. return xTail_1;
  396. }
  397. prvWriteBytesToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const uint8_t * pucData, size_t xCount, size_t xHead)
  398. {
  399. uint32_t ulNewBASEPRI;
  400. <bb 2> [local count: 214748]:
  401. # DEBUG BEGIN_STMT
  402. # DEBUG BEGIN_STMT
  403. if (xCount_3(D) == 0)
  404. goto <bb 3>; [50.00%]
  405. else
  406. goto <bb 5>; [50.00%]
  407. <bb 3> [local count: 107374]:
  408. # DEBUG BEGIN_STMT
  409. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  410. # DEBUG BEGIN_STMT
  411. # DEBUG BEGIN_STMT
  412. __asm__ __volatile__(" mov %0, %1
  413. msr basepri, %0
  414. isb
  415. dsb
  416. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  417. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  418. <bb 4> [local count: 1073741824]:
  419. # DEBUG ulNewBASEPRI => NULL
  420. # DEBUG BEGIN_STMT
  421. # DEBUG BEGIN_STMT
  422. # DEBUG BEGIN_STMT
  423. goto <bb 4>; [100.00%]
  424. <bb 5> [local count: 107374]:
  425. xHead_1 = prvWriteBytesToBuffer.part.0 (pxStreamBuffer_5(D), pucData_7(D), xCount_3(D), xHead_6(D));
  426. # DEBUG xHead => xHead_1
  427. # DEBUG BEGIN_STMT
  428. # DEBUG BEGIN_STMT
  429. return xHead_1;
  430. }
  431. xStreamBufferReceiveCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
  432. {
  433. uint32_t ulOriginalBASEPRI;
  434. uint32_t ulNewBASEPRI;
  435. uint32_t ulNewBASEPRI;
  436. BaseType_t xReturn;
  437. struct tskTaskControlBlock * _1;
  438. struct tskTaskControlBlock * _2;
  439. <bb 2> [local count: 357913]:
  440. # DEBUG BEGIN_STMT
  441. # DEBUG pxStreamBuffer => xStreamBuffer_5(D)
  442. # DEBUG BEGIN_STMT
  443. # DEBUG BEGIN_STMT
  444. # DEBUG BEGIN_STMT
  445. if (xStreamBuffer_5(D) == 0B)
  446. goto <bb 3>; [30.00%]
  447. else
  448. goto <bb 5>; [70.00%]
  449. <bb 3> [local count: 107374]:
  450. # DEBUG BEGIN_STMT
  451. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  452. # DEBUG BEGIN_STMT
  453. # DEBUG BEGIN_STMT
  454. __asm__ __volatile__(" mov %0, %1
  455. msr basepri, %0
  456. isb
  457. dsb
  458. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  459. # DEBUG ulNewBASEPRI => ulNewBASEPRI_10
  460. <bb 4> [local count: 1073741824]:
  461. # DEBUG ulNewBASEPRI => NULL
  462. # DEBUG BEGIN_STMT
  463. # DEBUG BEGIN_STMT
  464. # DEBUG BEGIN_STMT
  465. <bb 8> [local count: 1073741824]:
  466. goto <bb 4>; [100.00%]
  467. <bb 5> [local count: 250539]:
  468. # DEBUG BEGIN_STMT
  469. # DEBUG BEGIN_STMT
  470. # DEBUG INLINE_ENTRY ulPortRaiseBASEPRI
  471. # DEBUG BEGIN_STMT
  472. # DEBUG BEGIN_STMT
  473. __asm__ __volatile__(" mrs %0, basepri
  474. mov %1, %2
  475. msr basepri, %1
  476. isb
  477. dsb
  478. " : "=r" ulOriginalBASEPRI_11, "=r" ulNewBASEPRI_12 : "i" 16 : "memory");
  479. # DEBUG ulNewBASEPRI => ulNewBASEPRI_12
  480. # DEBUG ulOriginalBASEPRI => ulOriginalBASEPRI_11
  481. # DEBUG BEGIN_STMT
  482. # DEBUG ulNewBASEPRI => NULL
  483. # DEBUG ulOriginalBASEPRI => NULL
  484. # DEBUG uxSavedInterruptStatus => ulOriginalBASEPRI_11
  485. # DEBUG BEGIN_STMT
  486. _1 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToSend;
  487. if (_1 != 0B)
  488. goto <bb 6>; [53.47%]
  489. else
  490. goto <bb 7>; [46.53%]
  491. <bb 6> [local count: 133963]:
  492. # DEBUG BEGIN_STMT
  493. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToSend;
  494. xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_7(D));
  495. # DEBUG BEGIN_STMT
  496. MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToSend ={v} 0B;
  497. # DEBUG BEGIN_STMT
  498. # DEBUG xReturn => 1
  499. <bb 7> [local count: 250539]:
  500. # xReturn_3 = PHI <1(6), 0(5)>
  501. # DEBUG xReturn => xReturn_3
  502. # DEBUG BEGIN_STMT
  503. # DEBUG ulNewMaskValue => ulOriginalBASEPRI_11
  504. # DEBUG INLINE_ENTRY vPortSetBASEPRI
  505. # DEBUG BEGIN_STMT
  506. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulOriginalBASEPRI_11 : "memory");
  507. # DEBUG ulNewMaskValue => NULL
  508. # DEBUG BEGIN_STMT
  509. return xReturn_3;
  510. }
  511. xStreamBufferSendCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
  512. {
  513. uint32_t ulOriginalBASEPRI;
  514. uint32_t ulNewBASEPRI;
  515. uint32_t ulNewBASEPRI;
  516. BaseType_t xReturn;
  517. struct tskTaskControlBlock * _1;
  518. struct tskTaskControlBlock * _2;
  519. <bb 2> [local count: 357913]:
  520. # DEBUG BEGIN_STMT
  521. # DEBUG pxStreamBuffer => xStreamBuffer_5(D)
  522. # DEBUG BEGIN_STMT
  523. # DEBUG BEGIN_STMT
  524. # DEBUG BEGIN_STMT
  525. if (xStreamBuffer_5(D) == 0B)
  526. goto <bb 3>; [30.00%]
  527. else
  528. goto <bb 5>; [70.00%]
  529. <bb 3> [local count: 107374]:
  530. # DEBUG BEGIN_STMT
  531. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  532. # DEBUG BEGIN_STMT
  533. # DEBUG BEGIN_STMT
  534. __asm__ __volatile__(" mov %0, %1
  535. msr basepri, %0
  536. isb
  537. dsb
  538. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  539. # DEBUG ulNewBASEPRI => ulNewBASEPRI_10
  540. <bb 4> [local count: 1073741824]:
  541. # DEBUG ulNewBASEPRI => NULL
  542. # DEBUG BEGIN_STMT
  543. # DEBUG BEGIN_STMT
  544. # DEBUG BEGIN_STMT
  545. <bb 8> [local count: 1073741824]:
  546. goto <bb 4>; [100.00%]
  547. <bb 5> [local count: 250539]:
  548. # DEBUG BEGIN_STMT
  549. # DEBUG BEGIN_STMT
  550. # DEBUG INLINE_ENTRY ulPortRaiseBASEPRI
  551. # DEBUG BEGIN_STMT
  552. # DEBUG BEGIN_STMT
  553. __asm__ __volatile__(" mrs %0, basepri
  554. mov %1, %2
  555. msr basepri, %1
  556. isb
  557. dsb
  558. " : "=r" ulOriginalBASEPRI_11, "=r" ulNewBASEPRI_12 : "i" 16 : "memory");
  559. # DEBUG ulNewBASEPRI => ulNewBASEPRI_12
  560. # DEBUG ulOriginalBASEPRI => ulOriginalBASEPRI_11
  561. # DEBUG BEGIN_STMT
  562. # DEBUG ulNewBASEPRI => NULL
  563. # DEBUG ulOriginalBASEPRI => NULL
  564. # DEBUG uxSavedInterruptStatus => ulOriginalBASEPRI_11
  565. # DEBUG BEGIN_STMT
  566. _1 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToReceive;
  567. if (_1 != 0B)
  568. goto <bb 6>; [53.47%]
  569. else
  570. goto <bb 7>; [46.53%]
  571. <bb 6> [local count: 133963]:
  572. # DEBUG BEGIN_STMT
  573. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToReceive;
  574. xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_7(D));
  575. # DEBUG BEGIN_STMT
  576. MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToReceive ={v} 0B;
  577. # DEBUG BEGIN_STMT
  578. # DEBUG xReturn => 1
  579. <bb 7> [local count: 250539]:
  580. # xReturn_3 = PHI <1(6), 0(5)>
  581. # DEBUG xReturn => xReturn_3
  582. # DEBUG BEGIN_STMT
  583. # DEBUG ulNewMaskValue => ulOriginalBASEPRI_11
  584. # DEBUG INLINE_ENTRY vPortSetBASEPRI
  585. # DEBUG BEGIN_STMT
  586. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulOriginalBASEPRI_11 : "memory");
  587. # DEBUG ulNewMaskValue => NULL
  588. # DEBUG BEGIN_STMT
  589. return xReturn_3;
  590. }
  591. xStreamBufferIsFull (struct StreamBufferDef_t * xStreamBuffer)
  592. {
  593. uint32_t ulNewBASEPRI;
  594. size_t xBytesToStoreMessageLength;
  595. BaseType_t xReturn;
  596. unsigned char _1;
  597. unsigned int _2;
  598. unsigned char _6;
  599. <bb 2> [local count: 357913]:
  600. # DEBUG BEGIN_STMT
  601. # DEBUG BEGIN_STMT
  602. # DEBUG BEGIN_STMT
  603. # DEBUG pxStreamBuffer => xStreamBuffer_5(D)
  604. # DEBUG BEGIN_STMT
  605. if (xStreamBuffer_5(D) == 0B)
  606. goto <bb 3>; [30.00%]
  607. else
  608. goto <bb 5>; [70.00%]
  609. <bb 3> [local count: 107374]:
  610. # DEBUG BEGIN_STMT
  611. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  612. # DEBUG BEGIN_STMT
  613. # DEBUG BEGIN_STMT
  614. __asm__ __volatile__(" mov %0, %1
  615. msr basepri, %0
  616. isb
  617. dsb
  618. " : "=r" ulNewBASEPRI_9 : "i" 16 : "memory");
  619. # DEBUG ulNewBASEPRI => ulNewBASEPRI_9
  620. <bb 4> [local count: 1073741824]:
  621. # DEBUG ulNewBASEPRI => NULL
  622. # DEBUG BEGIN_STMT
  623. # DEBUG BEGIN_STMT
  624. # DEBUG BEGIN_STMT
  625. <bb 10> [local count: 1073741824]:
  626. goto <bb 4>; [100.00%]
  627. <bb 5> [local count: 250539]:
  628. # DEBUG BEGIN_STMT
  629. # DEBUG BEGIN_STMT
  630. _1 = MEM[(const struct StreamBuffer_t *)xStreamBuffer_5(D)].ucFlags;
  631. _6 = _1 & 1;
  632. if (_6 != 0)
  633. goto <bb 7>; [50.00%]
  634. else
  635. goto <bb 6>; [50.00%]
  636. <bb 6> [local count: 125270]:
  637. # DEBUG BEGIN_STMT
  638. # DEBUG xBytesToStoreMessageLength => 0
  639. <bb 7> [local count: 250539]:
  640. # xBytesToStoreMessageLength_4 = PHI <4(5), 0(6)>
  641. # DEBUG xBytesToStoreMessageLength => xBytesToStoreMessageLength_4
  642. # DEBUG BEGIN_STMT
  643. _2 = xStreamBufferSpacesAvailable (xStreamBuffer_5(D));
  644. if (_2 <= xBytesToStoreMessageLength_4)
  645. goto <bb 9>; [50.00%]
  646. else
  647. goto <bb 8>; [50.00%]
  648. <bb 8> [local count: 125270]:
  649. # DEBUG BEGIN_STMT
  650. # DEBUG xReturn => 0
  651. <bb 9> [local count: 250539]:
  652. # xReturn_3 = PHI <1(7), 0(8)>
  653. # DEBUG xReturn => xReturn_3
  654. # DEBUG BEGIN_STMT
  655. return xReturn_3;
  656. }
  657. xStreamBufferIsEmpty (struct StreamBufferDef_t * xStreamBuffer)
  658. {
  659. uint32_t ulNewBASEPRI;
  660. size_t xTail;
  661. BaseType_t xReturn;
  662. unsigned int _1;
  663. <bb 2> [local count: 357913]:
  664. # DEBUG BEGIN_STMT
  665. # DEBUG pxStreamBuffer => xStreamBuffer_3(D)
  666. # DEBUG BEGIN_STMT
  667. # DEBUG BEGIN_STMT
  668. # DEBUG BEGIN_STMT
  669. if (xStreamBuffer_3(D) == 0B)
  670. goto <bb 3>; [30.00%]
  671. else
  672. goto <bb 5>; [70.00%]
  673. <bb 3> [local count: 107374]:
  674. # DEBUG BEGIN_STMT
  675. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  676. # DEBUG BEGIN_STMT
  677. # DEBUG BEGIN_STMT
  678. __asm__ __volatile__(" mov %0, %1
  679. msr basepri, %0
  680. isb
  681. dsb
  682. " : "=r" ulNewBASEPRI_6 : "i" 16 : "memory");
  683. # DEBUG ulNewBASEPRI => ulNewBASEPRI_6
  684. <bb 4> [local count: 1073741824]:
  685. # DEBUG ulNewBASEPRI => NULL
  686. # DEBUG BEGIN_STMT
  687. # DEBUG BEGIN_STMT
  688. # DEBUG BEGIN_STMT
  689. <bb 8> [local count: 1073741824]:
  690. goto <bb 4>; [100.00%]
  691. <bb 5> [local count: 250539]:
  692. # DEBUG BEGIN_STMT
  693. # DEBUG BEGIN_STMT
  694. xTail_5 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_3(D)].xTail;
  695. # DEBUG xTail => xTail_5
  696. # DEBUG BEGIN_STMT
  697. _1 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_3(D)].xHead;
  698. if (_1 == xTail_5)
  699. goto <bb 7>; [34.00%]
  700. else
  701. goto <bb 6>; [66.00%]
  702. <bb 6> [local count: 165356]:
  703. # DEBUG BEGIN_STMT
  704. # DEBUG xReturn => 0
  705. <bb 7> [local count: 250539]:
  706. # xReturn_2 = PHI <1(5), 0(6)>
  707. # DEBUG xReturn => xReturn_2
  708. # DEBUG BEGIN_STMT
  709. return xReturn_2;
  710. }
  711. prvReadMessageFromBuffer (struct StreamBuffer_t * pxStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, size_t xBytesAvailable)
  712. {
  713. size_t xTail;
  714. size_t xNextTail;
  715. size_t xTempNextMessageLength;
  716. size_t xNextMessageLength;
  717. size_t xCount;
  718. unsigned char _1;
  719. unsigned int _2;
  720. unsigned char _12;
  721. <bb 2> [local count: 1073741824]:
  722. # DEBUG BEGIN_STMT
  723. # DEBUG BEGIN_STMT
  724. # DEBUG BEGIN_STMT
  725. xNextTail_10 ={v} pxStreamBuffer_9(D)->xTail;
  726. # DEBUG xNextTail => xNextTail_10
  727. # DEBUG BEGIN_STMT
  728. _1 = pxStreamBuffer_9(D)->ucFlags;
  729. _12 = _1 & 1;
  730. if (_12 != 0)
  731. goto <bb 3>; [33.00%]
  732. else
  733. goto <bb 5>; [67.00%]
  734. <bb 3> [local count: 354334802]:
  735. # DEBUG BEGIN_STMT
  736. # DEBUG pxStreamBuffer => pxStreamBuffer_9(D)
  737. # DEBUG pucData => &xTempNextMessageLength
  738. # DEBUG xCount => 4
  739. # DEBUG xTail => xNextTail_10
  740. # DEBUG INLINE_ENTRY prvReadBytesFromBuffer
  741. # DEBUG BEGIN_STMT
  742. # DEBUG BEGIN_STMT
  743. xTail_21 = prvReadBytesFromBuffer.part.0 (pxStreamBuffer_9(D), &xTempNextMessageLength, 4, xNextTail_10);
  744. # DEBUG xTail => xTail_21
  745. # DEBUG BEGIN_STMT
  746. # DEBUG pxStreamBuffer => NULL
  747. # DEBUG pucData => NULL
  748. # DEBUG xCount => NULL
  749. # DEBUG xTail => NULL
  750. # DEBUG ulNewBASEPRI => NULL
  751. # DEBUG xNextTail => xTail_21
  752. # DEBUG BEGIN_STMT
  753. xNextMessageLength_14 = xTempNextMessageLength;
  754. # DEBUG xNextMessageLength => xNextMessageLength_14
  755. # DEBUG BEGIN_STMT
  756. xBytesAvailable_15 = xBytesAvailable_13(D) + 4294967292;
  757. # DEBUG xBytesAvailable => xBytesAvailable_15
  758. # DEBUG BEGIN_STMT
  759. if (xBufferLengthBytes_11(D) < xNextMessageLength_14)
  760. goto <bb 4>; [50.00%]
  761. else
  762. goto <bb 5>; [50.00%]
  763. <bb 4> [local count: 177167401]:
  764. # DEBUG BEGIN_STMT
  765. # DEBUG xNextMessageLength => 0
  766. <bb 5> [local count: 1073741824]:
  767. # xBytesAvailable_3 = PHI <xBytesAvailable_15(4), xBytesAvailable_13(D)(2), xBytesAvailable_15(3)>
  768. # xNextMessageLength_4 = PHI <0(4), xBufferLengthBytes_11(D)(2), xNextMessageLength_14(3)>
  769. # xNextTail_5 = PHI <xTail_21(4), xNextTail_10(2), xTail_21(3)>
  770. # DEBUG xNextTail => xNextTail_5
  771. # DEBUG xNextMessageLength => xNextMessageLength_4
  772. # DEBUG xBytesAvailable => xBytesAvailable_3
  773. # DEBUG BEGIN_STMT
  774. xCount_16 = MIN_EXPR <xBytesAvailable_3, xNextMessageLength_4>;
  775. # DEBUG xCount => xCount_16
  776. # DEBUG BEGIN_STMT
  777. if (xCount_16 != 0)
  778. goto <bb 6>; [33.00%]
  779. else
  780. goto <bb 7>; [67.00%]
  781. <bb 6> [local count: 354334802]:
  782. # DEBUG BEGIN_STMT
  783. _2 = prvReadBytesFromBuffer (pxStreamBuffer_9(D), pvRxData_17(D), xCount_16, xNextTail_5);
  784. pxStreamBuffer_9(D)->xTail ={v} _2;
  785. <bb 7> [local count: 1073741824]:
  786. # DEBUG BEGIN_STMT
  787. xTempNextMessageLength ={v} {CLOBBER};
  788. return xCount_16;
  789. }
  790. xStreamBufferReceiveFromISR (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
  791. {
  792. uint32_t ulOriginalBASEPRI;
  793. uint32_t ulNewBASEPRI;
  794. uint32_t ulNewBASEPRI;
  795. uint32_t ulNewBASEPRI;
  796. size_t xBytesToStoreMessageLength;
  797. size_t xBytesAvailable;
  798. size_t xReceivedLength;
  799. unsigned char _1;
  800. struct tskTaskControlBlock * _2;
  801. struct tskTaskControlBlock * _3;
  802. unsigned char _9;
  803. <bb 2> [local count: 357913]:
  804. # DEBUG BEGIN_STMT
  805. # DEBUG pxStreamBuffer => xStreamBuffer_8(D)
  806. # DEBUG BEGIN_STMT
  807. # DEBUG xReceivedLength => 0
  808. # DEBUG BEGIN_STMT
  809. if (pvRxData_10(D) == 0B)
  810. goto <bb 3>; [30.00%]
  811. else
  812. goto <bb 5>; [70.00%]
  813. <bb 3> [local count: 107374]:
  814. # DEBUG BEGIN_STMT
  815. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  816. # DEBUG BEGIN_STMT
  817. # DEBUG BEGIN_STMT
  818. __asm__ __volatile__(" mov %0, %1
  819. msr basepri, %0
  820. isb
  821. dsb
  822. " : "=r" ulNewBASEPRI_20 : "i" 16 : "memory");
  823. # DEBUG ulNewBASEPRI => ulNewBASEPRI_20
  824. <bb 4> [local count: 1073741824]:
  825. # DEBUG ulNewBASEPRI => NULL
  826. # DEBUG BEGIN_STMT
  827. # DEBUG BEGIN_STMT
  828. # DEBUG BEGIN_STMT
  829. <bb 16> [local count: 1073741824]:
  830. goto <bb 4>; [100.00%]
  831. <bb 5> [local count: 250539]:
  832. # DEBUG BEGIN_STMT
  833. # DEBUG BEGIN_STMT
  834. if (xStreamBuffer_8(D) == 0B)
  835. goto <bb 6>; [30.00%]
  836. else
  837. goto <bb 8>; [70.00%]
  838. <bb 6> [local count: 75162]:
  839. # DEBUG BEGIN_STMT
  840. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  841. # DEBUG BEGIN_STMT
  842. # DEBUG BEGIN_STMT
  843. __asm__ __volatile__(" mov %0, %1
  844. msr basepri, %0
  845. isb
  846. dsb
  847. " : "=r" ulNewBASEPRI_21 : "i" 16 : "memory");
  848. # DEBUG ulNewBASEPRI => ulNewBASEPRI_21
  849. <bb 7> [local count: 751619279]:
  850. # DEBUG ulNewBASEPRI => NULL
  851. # DEBUG BEGIN_STMT
  852. # DEBUG BEGIN_STMT
  853. # DEBUG BEGIN_STMT
  854. <bb 17> [local count: 751619279]:
  855. goto <bb 7>; [100.00%]
  856. <bb 8> [local count: 175378]:
  857. # DEBUG BEGIN_STMT
  858. # DEBUG BEGIN_STMT
  859. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_8(D)].ucFlags;
  860. _9 = _1 & 1;
  861. if (_9 != 0)
  862. goto <bb 10>; [50.00%]
  863. else
  864. goto <bb 9>; [50.00%]
  865. <bb 9> [local count: 87689]:
  866. # DEBUG BEGIN_STMT
  867. # DEBUG xBytesToStoreMessageLength => 0
  868. <bb 10> [local count: 175378]:
  869. # xBytesToStoreMessageLength_5 = PHI <4(8), 0(9)>
  870. # DEBUG xBytesToStoreMessageLength => xBytesToStoreMessageLength_5
  871. # DEBUG BEGIN_STMT
  872. xBytesAvailable_13 = prvBytesInBuffer (xStreamBuffer_8(D));
  873. # DEBUG xBytesAvailable => xBytesAvailable_13
  874. # DEBUG BEGIN_STMT
  875. if (xBytesToStoreMessageLength_5 < xBytesAvailable_13)
  876. goto <bb 11>; [33.00%]
  877. else
  878. goto <bb 15>; [67.00%]
  879. <bb 11> [local count: 57875]:
  880. # DEBUG BEGIN_STMT
  881. xReceivedLength_16 = prvReadMessageFromBuffer (xStreamBuffer_8(D), pvRxData_10(D), xBufferLengthBytes_14(D), xBytesAvailable_13);
  882. # DEBUG xReceivedLength => xReceivedLength_16
  883. # DEBUG BEGIN_STMT
  884. if (xReceivedLength_16 != 0)
  885. goto <bb 12>; [50.00%]
  886. else
  887. goto <bb 15>; [50.00%]
  888. <bb 12> [local count: 28937]:
  889. # DEBUG BEGIN_STMT
  890. # DEBUG BEGIN_STMT
  891. # DEBUG INLINE_ENTRY ulPortRaiseBASEPRI
  892. # DEBUG BEGIN_STMT
  893. # DEBUG BEGIN_STMT
  894. __asm__ __volatile__(" mrs %0, basepri
  895. mov %1, %2
  896. msr basepri, %1
  897. isb
  898. dsb
  899. " : "=r" ulOriginalBASEPRI_22, "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  900. # DEBUG ulNewBASEPRI => ulNewBASEPRI_23
  901. # DEBUG ulOriginalBASEPRI => ulOriginalBASEPRI_22
  902. # DEBUG BEGIN_STMT
  903. # DEBUG ulNewBASEPRI => NULL
  904. # DEBUG ulOriginalBASEPRI => NULL
  905. # DEBUG uxSavedInterruptStatus => ulOriginalBASEPRI_22
  906. # DEBUG BEGIN_STMT
  907. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_8(D)].xTaskWaitingToSend;
  908. if (_2 != 0B)
  909. goto <bb 13>; [53.47%]
  910. else
  911. goto <bb 14>; [46.53%]
  912. <bb 13> [local count: 15473]:
  913. # DEBUG BEGIN_STMT
  914. _3 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_8(D)].xTaskWaitingToSend;
  915. xTaskGenericNotifyFromISR (_3, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_17(D));
  916. # DEBUG BEGIN_STMT
  917. MEM[(struct StreamBuffer_t *)xStreamBuffer_8(D)].xTaskWaitingToSend ={v} 0B;
  918. <bb 14> [local count: 28937]:
  919. # DEBUG BEGIN_STMT
  920. # DEBUG ulNewMaskValue => ulOriginalBASEPRI_22
  921. # DEBUG INLINE_ENTRY vPortSetBASEPRI
  922. # DEBUG BEGIN_STMT
  923. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulOriginalBASEPRI_22 : "memory");
  924. <bb 15> [local count: 175378]:
  925. # xReceivedLength_4 = PHI <0(10), xReceivedLength_16(14), xReceivedLength_16(11)>
  926. # DEBUG ulNewMaskValue => NULL
  927. # DEBUG xReceivedLength => xReceivedLength_4
  928. # DEBUG BEGIN_STMT
  929. # DEBUG BEGIN_STMT
  930. # DEBUG BEGIN_STMT
  931. return xReceivedLength_4;
  932. }
  933. xStreamBufferNextMessageLengthBytes (struct StreamBufferDef_t * xStreamBuffer)
  934. {
  935. uint32_t ulNewBASEPRI;
  936. uint32_t ulNewBASEPRI;
  937. size_t xTempReturn;
  938. size_t xBytesAvailable;
  939. size_t xReturn;
  940. unsigned char _1;
  941. unsigned int _2;
  942. unsigned char _6;
  943. <bb 2> [local count: 357913]:
  944. # DEBUG BEGIN_STMT
  945. # DEBUG pxStreamBuffer => xStreamBuffer_5(D)
  946. # DEBUG BEGIN_STMT
  947. # DEBUG BEGIN_STMT
  948. # DEBUG BEGIN_STMT
  949. if (xStreamBuffer_5(D) == 0B)
  950. goto <bb 3>; [30.00%]
  951. else
  952. goto <bb 5>; [70.00%]
  953. <bb 3> [local count: 107374]:
  954. # DEBUG BEGIN_STMT
  955. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  956. # DEBUG BEGIN_STMT
  957. # DEBUG BEGIN_STMT
  958. __asm__ __volatile__(" mov %0, %1
  959. msr basepri, %0
  960. isb
  961. dsb
  962. " : "=r" ulNewBASEPRI_13 : "i" 16 : "memory");
  963. # DEBUG ulNewBASEPRI => ulNewBASEPRI_13
  964. <bb 4> [local count: 1073741824]:
  965. # DEBUG ulNewBASEPRI => NULL
  966. # DEBUG BEGIN_STMT
  967. # DEBUG BEGIN_STMT
  968. # DEBUG BEGIN_STMT
  969. <bb 12> [local count: 1073741824]:
  970. goto <bb 4>; [100.00%]
  971. <bb 5> [local count: 250539]:
  972. # DEBUG BEGIN_STMT
  973. # DEBUG BEGIN_STMT
  974. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].ucFlags;
  975. _6 = _1 & 1;
  976. if (_6 != 0)
  977. goto <bb 6>; [33.00%]
  978. else
  979. goto <bb 11>; [67.00%]
  980. <bb 6> [local count: 82678]:
  981. # DEBUG BEGIN_STMT
  982. xBytesAvailable_9 = prvBytesInBuffer (xStreamBuffer_5(D));
  983. # DEBUG xBytesAvailable => xBytesAvailable_9
  984. # DEBUG BEGIN_STMT
  985. if (xBytesAvailable_9 > 4)
  986. goto <bb 7>; [33.00%]
  987. else
  988. goto <bb 8>; [67.00%]
  989. <bb 7> [local count: 27284]:
  990. # DEBUG BEGIN_STMT
  991. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTail;
  992. prvReadBytesFromBuffer (xStreamBuffer_5(D), &xTempReturn, 4, _2);
  993. # DEBUG BEGIN_STMT
  994. xReturn_11 = xTempReturn;
  995. # DEBUG xReturn => xReturn_11
  996. goto <bb 11>; [100.00%]
  997. <bb 8> [local count: 55394]:
  998. # DEBUG BEGIN_STMT
  999. if (xBytesAvailable_9 != 0)
  1000. goto <bb 9>; [50.00%]
  1001. else
  1002. goto <bb 11>; [50.00%]
  1003. <bb 9> [local count: 27697]:
  1004. # DEBUG BEGIN_STMT
  1005. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1006. # DEBUG BEGIN_STMT
  1007. # DEBUG BEGIN_STMT
  1008. __asm__ __volatile__(" mov %0, %1
  1009. msr basepri, %0
  1010. isb
  1011. dsb
  1012. " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory");
  1013. # DEBUG ulNewBASEPRI => ulNewBASEPRI_14
  1014. <bb 10> [local count: 276971704]:
  1015. # DEBUG ulNewBASEPRI => NULL
  1016. # DEBUG BEGIN_STMT
  1017. # DEBUG BEGIN_STMT
  1018. # DEBUG BEGIN_STMT
  1019. <bb 13> [local count: 276971704]:
  1020. goto <bb 10>; [100.00%]
  1021. <bb 11> [local count: 222842]:
  1022. # xReturn_3 = PHI <0(8), 0(5), xReturn_11(7)>
  1023. # DEBUG xReturn => xReturn_3
  1024. # DEBUG BEGIN_STMT
  1025. xTempReturn ={v} {CLOBBER};
  1026. return xReturn_3;
  1027. }
  1028. xStreamBufferReceive (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait)
  1029. {
  1030. uint32_t ulNewBASEPRI;
  1031. uint32_t ulNewBASEPRI;
  1032. uint32_t ulNewBASEPRI;
  1033. size_t xBytesToStoreMessageLength;
  1034. size_t xBytesAvailable;
  1035. size_t xReceivedLength;
  1036. unsigned char _1;
  1037. struct tskTaskControlBlock * _2;
  1038. struct tskTaskControlBlock * _3;
  1039. struct tskTaskControlBlock * _4;
  1040. struct tskTaskControlBlock * _5;
  1041. unsigned char _14;
  1042. <bb 2> [local count: 357913]:
  1043. # DEBUG BEGIN_STMT
  1044. # DEBUG pxStreamBuffer => xStreamBuffer_13(D)
  1045. # DEBUG BEGIN_STMT
  1046. # DEBUG xReceivedLength => 0
  1047. # DEBUG BEGIN_STMT
  1048. if (pvRxData_15(D) == 0B)
  1049. goto <bb 3>; [30.00%]
  1050. else
  1051. goto <bb 5>; [70.00%]
  1052. <bb 3> [local count: 107374]:
  1053. # DEBUG BEGIN_STMT
  1054. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1055. # DEBUG BEGIN_STMT
  1056. # DEBUG BEGIN_STMT
  1057. __asm__ __volatile__(" mov %0, %1
  1058. msr basepri, %0
  1059. isb
  1060. dsb
  1061. " : "=r" ulNewBASEPRI_38 : "i" 16 : "memory");
  1062. # DEBUG ulNewBASEPRI => ulNewBASEPRI_38
  1063. <bb 4> [local count: 1073741824]:
  1064. # DEBUG ulNewBASEPRI => NULL
  1065. # DEBUG BEGIN_STMT
  1066. # DEBUG BEGIN_STMT
  1067. # DEBUG BEGIN_STMT
  1068. <bb 25> [local count: 1073741824]:
  1069. goto <bb 4>; [100.00%]
  1070. <bb 5> [local count: 250539]:
  1071. # DEBUG BEGIN_STMT
  1072. # DEBUG BEGIN_STMT
  1073. if (xStreamBuffer_13(D) == 0B)
  1074. goto <bb 6>; [30.00%]
  1075. else
  1076. goto <bb 8>; [70.00%]
  1077. <bb 6> [local count: 75162]:
  1078. # DEBUG BEGIN_STMT
  1079. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1080. # DEBUG BEGIN_STMT
  1081. # DEBUG BEGIN_STMT
  1082. __asm__ __volatile__(" mov %0, %1
  1083. msr basepri, %0
  1084. isb
  1085. dsb
  1086. " : "=r" ulNewBASEPRI_39 : "i" 16 : "memory");
  1087. # DEBUG ulNewBASEPRI => ulNewBASEPRI_39
  1088. <bb 7> [local count: 751619279]:
  1089. # DEBUG ulNewBASEPRI => NULL
  1090. # DEBUG BEGIN_STMT
  1091. # DEBUG BEGIN_STMT
  1092. # DEBUG BEGIN_STMT
  1093. <bb 26> [local count: 751619279]:
  1094. goto <bb 7>; [100.00%]
  1095. <bb 8> [local count: 175378]:
  1096. # DEBUG BEGIN_STMT
  1097. # DEBUG BEGIN_STMT
  1098. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].ucFlags;
  1099. _14 = _1 & 1;
  1100. if (_14 != 0)
  1101. goto <bb 10>; [50.00%]
  1102. else
  1103. goto <bb 9>; [50.00%]
  1104. <bb 9> [local count: 87689]:
  1105. # DEBUG BEGIN_STMT
  1106. # DEBUG xBytesToStoreMessageLength => 0
  1107. <bb 10> [local count: 175378]:
  1108. # xBytesToStoreMessageLength_8 = PHI <4(8), 0(9)>
  1109. # DEBUG xBytesToStoreMessageLength => xBytesToStoreMessageLength_8
  1110. # DEBUG BEGIN_STMT
  1111. if (xTicksToWait_17(D) != 0)
  1112. goto <bb 11>; [50.00%]
  1113. else
  1114. goto <bb 18>; [50.00%]
  1115. <bb 11> [local count: 87689]:
  1116. # DEBUG BEGIN_STMT
  1117. vPortEnterCritical ();
  1118. # DEBUG BEGIN_STMT
  1119. xBytesAvailable_22 = prvBytesInBuffer (xStreamBuffer_13(D));
  1120. # DEBUG xBytesAvailable => xBytesAvailable_22
  1121. # DEBUG BEGIN_STMT
  1122. if (xBytesToStoreMessageLength_8 >= xBytesAvailable_22)
  1123. goto <bb 12>; [50.00%]
  1124. else
  1125. goto <bb 16>; [50.00%]
  1126. <bb 12> [local count: 43844]:
  1127. # DEBUG BEGIN_STMT
  1128. xTaskGenericNotifyStateClear (0B, 0);
  1129. # DEBUG BEGIN_STMT
  1130. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToReceive;
  1131. if (_2 != 0B)
  1132. goto <bb 13>; [82.57%]
  1133. else
  1134. goto <bb 15>; [17.43%]
  1135. <bb 13> [local count: 36202]:
  1136. # DEBUG BEGIN_STMT
  1137. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1138. # DEBUG BEGIN_STMT
  1139. # DEBUG BEGIN_STMT
  1140. __asm__ __volatile__(" mov %0, %1
  1141. msr basepri, %0
  1142. isb
  1143. dsb
  1144. " : "=r" ulNewBASEPRI_40 : "i" 16 : "memory");
  1145. # DEBUG ulNewBASEPRI => ulNewBASEPRI_40
  1146. <bb 14> [local count: 362023689]:
  1147. # DEBUG ulNewBASEPRI => NULL
  1148. # DEBUG BEGIN_STMT
  1149. # DEBUG BEGIN_STMT
  1150. # DEBUG BEGIN_STMT
  1151. <bb 27> [local count: 362023689]:
  1152. goto <bb 14>; [100.00%]
  1153. <bb 15> [local count: 7642]:
  1154. # DEBUG BEGIN_STMT
  1155. # DEBUG BEGIN_STMT
  1156. _3 = xTaskGetCurrentTaskHandle ();
  1157. MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToReceive ={v} _3;
  1158. <bb 16> [local count: 51486]:
  1159. # DEBUG BEGIN_STMT
  1160. # DEBUG BEGIN_STMT
  1161. vPortExitCritical ();
  1162. # DEBUG BEGIN_STMT
  1163. if (xBytesToStoreMessageLength_8 >= xBytesAvailable_22)
  1164. goto <bb 17>; [33.00%]
  1165. else
  1166. goto <bb 19>; [67.00%]
  1167. <bb 17> [local count: 16991]:
  1168. # DEBUG BEGIN_STMT
  1169. # DEBUG BEGIN_STMT
  1170. xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait_17(D));
  1171. # DEBUG BEGIN_STMT
  1172. MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToReceive ={v} 0B;
  1173. # DEBUG BEGIN_STMT
  1174. xBytesAvailable_30 = prvBytesInBuffer (xStreamBuffer_13(D));
  1175. # DEBUG xBytesAvailable => xBytesAvailable_30
  1176. goto <bb 19>; [100.00%]
  1177. <bb 18> [local count: 87689]:
  1178. # DEBUG BEGIN_STMT
  1179. xBytesAvailable_19 = prvBytesInBuffer (xStreamBuffer_13(D));
  1180. # DEBUG xBytesAvailable => xBytesAvailable_19
  1181. <bb 19> [local count: 139175]:
  1182. # xBytesAvailable_7 = PHI <xBytesAvailable_30(17), xBytesAvailable_19(18), xBytesAvailable_22(16)>
  1183. # DEBUG xBytesAvailable => xBytesAvailable_7
  1184. # DEBUG BEGIN_STMT
  1185. if (xBytesAvailable_7 > xBytesToStoreMessageLength_8)
  1186. goto <bb 20>; [33.00%]
  1187. else
  1188. goto <bb 24>; [67.00%]
  1189. <bb 20> [local count: 45928]:
  1190. # DEBUG BEGIN_STMT
  1191. xReceivedLength_33 = prvReadMessageFromBuffer (xStreamBuffer_13(D), pvRxData_15(D), xBufferLengthBytes_31(D), xBytesAvailable_7);
  1192. # DEBUG xReceivedLength => xReceivedLength_33
  1193. # DEBUG BEGIN_STMT
  1194. if (xReceivedLength_33 != 0)
  1195. goto <bb 21>; [33.00%]
  1196. else
  1197. goto <bb 24>; [67.00%]
  1198. <bb 21> [local count: 15156]:
  1199. # DEBUG BEGIN_STMT
  1200. # DEBUG BEGIN_STMT
  1201. vTaskSuspendAll ();
  1202. # DEBUG BEGIN_STMT
  1203. _4 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToSend;
  1204. if (_4 != 0B)
  1205. goto <bb 22>; [53.47%]
  1206. else
  1207. goto <bb 23>; [46.53%]
  1208. <bb 22> [local count: 8104]:
  1209. # DEBUG BEGIN_STMT
  1210. _5 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToSend;
  1211. xTaskGenericNotify (_5, 0, 0, 0, 0B);
  1212. # DEBUG BEGIN_STMT
  1213. MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToSend ={v} 0B;
  1214. <bb 23> [local count: 15156]:
  1215. # DEBUG BEGIN_STMT
  1216. xTaskResumeAll ();
  1217. # DEBUG BEGIN_STMT
  1218. <bb 24> [local count: 139175]:
  1219. # xReceivedLength_6 = PHI <0(19), xReceivedLength_33(23), xReceivedLength_33(20)>
  1220. # DEBUG xReceivedLength => xReceivedLength_6
  1221. # DEBUG BEGIN_STMT
  1222. # DEBUG BEGIN_STMT
  1223. # DEBUG BEGIN_STMT
  1224. return xReceivedLength_6;
  1225. }
  1226. prvWriteMessageToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, size_t xSpace, size_t xRequiredSpace)
  1227. {
  1228. size_t xHead;
  1229. size_t xNextHead;
  1230. unsigned char _1;
  1231. unsigned int xDataLengthBytes.2_2;
  1232. unsigned int _3;
  1233. unsigned int xDataLengthBytes.3_4;
  1234. unsigned int _5;
  1235. size_t _19;
  1236. unsigned char _22;
  1237. <bb 2> [local count: 1073741824]:
  1238. # DEBUG BEGIN_STMT
  1239. xNextHead_11 ={v} pxStreamBuffer_10(D)->xHead;
  1240. # DEBUG xNextHead => xNextHead_11
  1241. # DEBUG BEGIN_STMT
  1242. _1 = pxStreamBuffer_10(D)->ucFlags;
  1243. _22 = _1 & 1;
  1244. if (_22 != 0)
  1245. goto <bb 3>; [50.00%]
  1246. else
  1247. goto <bb 6>; [50.00%]
  1248. <bb 3> [local count: 536870913]:
  1249. # DEBUG BEGIN_STMT
  1250. if (xSpace_12(D) >= xRequiredSpace_14(D))
  1251. goto <bb 4>; [33.00%]
  1252. else
  1253. goto <bb 5>; [67.00%]
  1254. <bb 4> [local count: 177167401]:
  1255. # DEBUG BEGIN_STMT
  1256. # DEBUG pxStreamBuffer => pxStreamBuffer_10(D)
  1257. # DEBUG pucData => &xDataLengthBytes
  1258. # DEBUG xCount => 4
  1259. # DEBUG xHead => xNextHead_11
  1260. # DEBUG INLINE_ENTRY prvWriteBytesToBuffer
  1261. # DEBUG BEGIN_STMT
  1262. # DEBUG BEGIN_STMT
  1263. xHead_20 = prvWriteBytesToBuffer.part.0 (pxStreamBuffer_10(D), &xDataLengthBytes, 4, xNextHead_11);
  1264. # DEBUG xHead => xHead_20
  1265. # DEBUG BEGIN_STMT
  1266. # DEBUG BEGIN_STMT
  1267. # DEBUG pxStreamBuffer => NULL
  1268. # DEBUG pucData => NULL
  1269. # DEBUG xCount => NULL
  1270. # DEBUG xHead => NULL
  1271. # DEBUG ulNewBASEPRI => NULL
  1272. # DEBUG xNextHead => xHead_20
  1273. goto <bb 7>; [100.00%]
  1274. <bb 5> [local count: 359703511]:
  1275. # DEBUG BEGIN_STMT
  1276. xDataLengthBytes = 0;
  1277. goto <bb 7>; [100.00%]
  1278. <bb 6> [local count: 536870913]:
  1279. # DEBUG BEGIN_STMT
  1280. xDataLengthBytes.2_2 = xDataLengthBytes;
  1281. _3 = MIN_EXPR <xDataLengthBytes.2_2, xSpace_12(D)>;
  1282. xDataLengthBytes = _3;
  1283. <bb 7> [local count: 1073741824]:
  1284. # xNextHead_6 = PHI <xNextHead_11(5), xNextHead_11(6), xHead_20(4)>
  1285. # DEBUG xNextHead => xNextHead_6
  1286. # DEBUG BEGIN_STMT
  1287. xDataLengthBytes.3_4 = xDataLengthBytes;
  1288. if (xDataLengthBytes.3_4 != 0)
  1289. goto <bb 8>; [33.00%]
  1290. else
  1291. goto <bb 9>; [67.00%]
  1292. <bb 8> [local count: 354334802]:
  1293. # DEBUG BEGIN_STMT
  1294. _5 = prvWriteBytesToBuffer (pxStreamBuffer_10(D), pvTxData_16(D), xDataLengthBytes.3_4, xNextHead_6);
  1295. pxStreamBuffer_10(D)->xHead ={v} _5;
  1296. <bb 9> [local count: 1073741824]:
  1297. # DEBUG BEGIN_STMT
  1298. _19 = xDataLengthBytes;
  1299. return _19;
  1300. }
  1301. xStreamBufferSendFromISR (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
  1302. {
  1303. uint32_t ulOriginalBASEPRI;
  1304. uint32_t ulNewBASEPRI;
  1305. uint32_t ulNewBASEPRI;
  1306. uint32_t ulNewBASEPRI;
  1307. size_t xRequiredSpace;
  1308. size_t xSpace;
  1309. size_t xReturn;
  1310. unsigned char _1;
  1311. unsigned int _2;
  1312. unsigned int _3;
  1313. struct tskTaskControlBlock * _4;
  1314. struct tskTaskControlBlock * _5;
  1315. unsigned char _10;
  1316. <bb 2> [local count: 357913]:
  1317. # DEBUG BEGIN_STMT
  1318. # DEBUG pxStreamBuffer => xStreamBuffer_9(D)
  1319. # DEBUG BEGIN_STMT
  1320. # DEBUG BEGIN_STMT
  1321. # DEBUG xRequiredSpace => xDataLengthBytes_11(D)
  1322. # DEBUG BEGIN_STMT
  1323. if (pvTxData_12(D) == 0B)
  1324. goto <bb 3>; [30.00%]
  1325. else
  1326. goto <bb 5>; [70.00%]
  1327. <bb 3> [local count: 107374]:
  1328. # DEBUG BEGIN_STMT
  1329. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1330. # DEBUG BEGIN_STMT
  1331. # DEBUG BEGIN_STMT
  1332. __asm__ __volatile__(" mov %0, %1
  1333. msr basepri, %0
  1334. isb
  1335. dsb
  1336. " : "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  1337. # DEBUG ulNewBASEPRI => ulNewBASEPRI_23
  1338. <bb 4> [local count: 1073741824]:
  1339. # DEBUG ulNewBASEPRI => NULL
  1340. # DEBUG BEGIN_STMT
  1341. # DEBUG BEGIN_STMT
  1342. # DEBUG BEGIN_STMT
  1343. <bb 16> [local count: 1073741824]:
  1344. goto <bb 4>; [100.00%]
  1345. <bb 5> [local count: 250539]:
  1346. # DEBUG BEGIN_STMT
  1347. # DEBUG BEGIN_STMT
  1348. if (xStreamBuffer_9(D) == 0B)
  1349. goto <bb 6>; [30.00%]
  1350. else
  1351. goto <bb 8>; [70.00%]
  1352. <bb 6> [local count: 75162]:
  1353. # DEBUG BEGIN_STMT
  1354. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1355. # DEBUG BEGIN_STMT
  1356. # DEBUG BEGIN_STMT
  1357. __asm__ __volatile__(" mov %0, %1
  1358. msr basepri, %0
  1359. isb
  1360. dsb
  1361. " : "=r" ulNewBASEPRI_24 : "i" 16 : "memory");
  1362. # DEBUG ulNewBASEPRI => ulNewBASEPRI_24
  1363. <bb 7> [local count: 751619279]:
  1364. # DEBUG ulNewBASEPRI => NULL
  1365. # DEBUG BEGIN_STMT
  1366. # DEBUG BEGIN_STMT
  1367. # DEBUG BEGIN_STMT
  1368. <bb 17> [local count: 751619279]:
  1369. goto <bb 7>; [100.00%]
  1370. <bb 8> [local count: 175378]:
  1371. # DEBUG BEGIN_STMT
  1372. # DEBUG BEGIN_STMT
  1373. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].ucFlags;
  1374. _10 = _1 & 1;
  1375. if (_10 != 0)
  1376. goto <bb 9>; [50.00%]
  1377. else
  1378. goto <bb 10>; [50.00%]
  1379. <bb 9> [local count: 87689]:
  1380. # DEBUG BEGIN_STMT
  1381. xRequiredSpace_14 = xDataLengthBytes_11(D) + 4;
  1382. # DEBUG xRequiredSpace => xRequiredSpace_14
  1383. <bb 10> [local count: 175378]:
  1384. # xRequiredSpace_6 = PHI <xDataLengthBytes_11(D)(8), xRequiredSpace_14(9)>
  1385. # DEBUG xRequiredSpace => xRequiredSpace_6
  1386. # DEBUG BEGIN_STMT
  1387. # DEBUG BEGIN_STMT
  1388. xSpace_16 = xStreamBufferSpacesAvailable (xStreamBuffer_9(D));
  1389. # DEBUG xSpace => xSpace_16
  1390. # DEBUG BEGIN_STMT
  1391. xReturn_18 = prvWriteMessageToBuffer (xStreamBuffer_9(D), pvTxData_12(D), xDataLengthBytes_11(D), xSpace_16, xRequiredSpace_6);
  1392. # DEBUG xReturn => xReturn_18
  1393. # DEBUG BEGIN_STMT
  1394. if (xReturn_18 != 0)
  1395. goto <bb 11>; [33.00%]
  1396. else
  1397. goto <bb 15>; [67.00%]
  1398. <bb 11> [local count: 57875]:
  1399. # DEBUG BEGIN_STMT
  1400. _2 = prvBytesInBuffer (xStreamBuffer_9(D));
  1401. _3 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTriggerLevelBytes;
  1402. if (_2 >= _3)
  1403. goto <bb 12>; [50.00%]
  1404. else
  1405. goto <bb 15>; [50.00%]
  1406. <bb 12> [local count: 28937]:
  1407. # DEBUG BEGIN_STMT
  1408. # DEBUG BEGIN_STMT
  1409. # DEBUG INLINE_ENTRY ulPortRaiseBASEPRI
  1410. # DEBUG BEGIN_STMT
  1411. # DEBUG BEGIN_STMT
  1412. __asm__ __volatile__(" mrs %0, basepri
  1413. mov %1, %2
  1414. msr basepri, %1
  1415. isb
  1416. dsb
  1417. " : "=r" ulOriginalBASEPRI_25, "=r" ulNewBASEPRI_26 : "i" 16 : "memory");
  1418. # DEBUG ulNewBASEPRI => ulNewBASEPRI_26
  1419. # DEBUG ulOriginalBASEPRI => ulOriginalBASEPRI_25
  1420. # DEBUG BEGIN_STMT
  1421. # DEBUG ulNewBASEPRI => NULL
  1422. # DEBUG ulOriginalBASEPRI => NULL
  1423. # DEBUG uxSavedInterruptStatus => ulOriginalBASEPRI_25
  1424. # DEBUG BEGIN_STMT
  1425. _4 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToReceive;
  1426. if (_4 != 0B)
  1427. goto <bb 13>; [53.47%]
  1428. else
  1429. goto <bb 14>; [46.53%]
  1430. <bb 13> [local count: 15473]:
  1431. # DEBUG BEGIN_STMT
  1432. _5 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToReceive;
  1433. xTaskGenericNotifyFromISR (_5, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_20(D));
  1434. # DEBUG BEGIN_STMT
  1435. MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToReceive ={v} 0B;
  1436. <bb 14> [local count: 28937]:
  1437. # DEBUG BEGIN_STMT
  1438. # DEBUG ulNewMaskValue => ulOriginalBASEPRI_25
  1439. # DEBUG INLINE_ENTRY vPortSetBASEPRI
  1440. # DEBUG BEGIN_STMT
  1441. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulOriginalBASEPRI_25 : "memory");
  1442. <bb 15> [local count: 175378]:
  1443. # DEBUG ulNewMaskValue => NULL
  1444. # DEBUG BEGIN_STMT
  1445. # DEBUG BEGIN_STMT
  1446. # DEBUG BEGIN_STMT
  1447. return xReturn_18;
  1448. }
  1449. xStreamBufferSend (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait)
  1450. {
  1451. uint32_t ulNewBASEPRI;
  1452. uint32_t ulNewBASEPRI;
  1453. uint32_t ulNewBASEPRI;
  1454. uint32_t ulNewBASEPRI;
  1455. size_t xMaxReportedSpace;
  1456. struct TimeOut_t xTimeOut;
  1457. size_t xRequiredSpace;
  1458. size_t xSpace;
  1459. size_t xReturn;
  1460. unsigned int _1;
  1461. unsigned char _2;
  1462. unsigned int _3;
  1463. long unsigned int xTicksToWait.0_4;
  1464. struct tskTaskControlBlock * _5;
  1465. struct tskTaskControlBlock * _6;
  1466. long unsigned int xTicksToWait.1_7;
  1467. long int _8;
  1468. unsigned int _9;
  1469. unsigned int _10;
  1470. struct tskTaskControlBlock * _11;
  1471. struct tskTaskControlBlock * _12;
  1472. unsigned char _23;
  1473. <bb 2> [local count: 357913]:
  1474. # DEBUG BEGIN_STMT
  1475. # DEBUG pxStreamBuffer => xStreamBuffer_22(D)
  1476. # DEBUG BEGIN_STMT
  1477. # DEBUG xSpace => 0
  1478. # DEBUG BEGIN_STMT
  1479. # DEBUG xRequiredSpace => xDataLengthBytes_25(D)
  1480. # DEBUG BEGIN_STMT
  1481. # DEBUG BEGIN_STMT
  1482. # DEBUG xMaxReportedSpace => 0
  1483. # DEBUG BEGIN_STMT
  1484. if (pvTxData_27(D) == 0B)
  1485. goto <bb 3>; [30.00%]
  1486. else
  1487. goto <bb 5>; [70.00%]
  1488. <bb 3> [local count: 107374]:
  1489. # DEBUG BEGIN_STMT
  1490. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1491. # DEBUG BEGIN_STMT
  1492. # DEBUG BEGIN_STMT
  1493. __asm__ __volatile__(" mov %0, %1
  1494. msr basepri, %0
  1495. isb
  1496. dsb
  1497. " : "=r" ulNewBASEPRI_54 : "i" 16 : "memory");
  1498. # DEBUG ulNewBASEPRI => ulNewBASEPRI_54
  1499. <bb 4> [local count: 1073741824]:
  1500. # DEBUG ulNewBASEPRI => NULL
  1501. # DEBUG BEGIN_STMT
  1502. # DEBUG BEGIN_STMT
  1503. # DEBUG BEGIN_STMT
  1504. <bb 31> [local count: 1073741824]:
  1505. goto <bb 4>; [100.00%]
  1506. <bb 5> [local count: 250539]:
  1507. # DEBUG BEGIN_STMT
  1508. # DEBUG BEGIN_STMT
  1509. if (xStreamBuffer_22(D) == 0B)
  1510. goto <bb 6>; [30.00%]
  1511. else
  1512. goto <bb 8>; [70.00%]
  1513. <bb 6> [local count: 75162]:
  1514. # DEBUG BEGIN_STMT
  1515. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1516. # DEBUG BEGIN_STMT
  1517. # DEBUG BEGIN_STMT
  1518. __asm__ __volatile__(" mov %0, %1
  1519. msr basepri, %0
  1520. isb
  1521. dsb
  1522. " : "=r" ulNewBASEPRI_55 : "i" 16 : "memory");
  1523. # DEBUG ulNewBASEPRI => ulNewBASEPRI_55
  1524. <bb 7> [local count: 751619279]:
  1525. # DEBUG ulNewBASEPRI => NULL
  1526. # DEBUG BEGIN_STMT
  1527. # DEBUG BEGIN_STMT
  1528. # DEBUG BEGIN_STMT
  1529. <bb 32> [local count: 751619279]:
  1530. goto <bb 7>; [100.00%]
  1531. <bb 8> [local count: 175378]:
  1532. # DEBUG BEGIN_STMT
  1533. # DEBUG BEGIN_STMT
  1534. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xLength;
  1535. xMaxReportedSpace_29 = _1 + 4294967295;
  1536. # DEBUG xMaxReportedSpace => xMaxReportedSpace_29
  1537. # DEBUG BEGIN_STMT
  1538. _2 = MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].ucFlags;
  1539. _23 = _2 & 1;
  1540. if (_23 != 0)
  1541. goto <bb 9>; [50.00%]
  1542. else
  1543. goto <bb 14>; [50.00%]
  1544. <bb 9> [local count: 87689]:
  1545. # DEBUG BEGIN_STMT
  1546. xRequiredSpace_30 = xDataLengthBytes_25(D) + 4;
  1547. # DEBUG xRequiredSpace => xRequiredSpace_30
  1548. # DEBUG BEGIN_STMT
  1549. if (xDataLengthBytes_25(D) >= xRequiredSpace_30)
  1550. goto <bb 10>; [50.00%]
  1551. else
  1552. goto <bb 12>; [50.00%]
  1553. <bb 10> [local count: 43844]:
  1554. # DEBUG BEGIN_STMT
  1555. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1556. # DEBUG BEGIN_STMT
  1557. # DEBUG BEGIN_STMT
  1558. __asm__ __volatile__(" mov %0, %1
  1559. msr basepri, %0
  1560. isb
  1561. dsb
  1562. " : "=r" ulNewBASEPRI_56 : "i" 16 : "memory");
  1563. # DEBUG ulNewBASEPRI => ulNewBASEPRI_56
  1564. <bb 11> [local count: 438444579]:
  1565. # DEBUG ulNewBASEPRI => NULL
  1566. # DEBUG BEGIN_STMT
  1567. # DEBUG BEGIN_STMT
  1568. # DEBUG BEGIN_STMT
  1569. <bb 33> [local count: 438444579]:
  1570. goto <bb 11>; [100.00%]
  1571. <bb 12> [local count: 43844]:
  1572. # DEBUG BEGIN_STMT
  1573. # DEBUG BEGIN_STMT
  1574. if (xMaxReportedSpace_29 < xRequiredSpace_30)
  1575. goto <bb 13>; [50.00%]
  1576. else
  1577. goto <bb 15>; [50.00%]
  1578. <bb 13> [local count: 21922]:
  1579. # DEBUG BEGIN_STMT
  1580. xTicksToWait = 0;
  1581. goto <bb 15>; [100.00%]
  1582. <bb 14> [local count: 87689]:
  1583. # DEBUG BEGIN_STMT
  1584. _3 = MIN_EXPR <xMaxReportedSpace_29, xDataLengthBytes_25(D)>;
  1585. <bb 15> [local count: 131533]:
  1586. # xRequiredSpace_15 = PHI <xRequiredSpace_30(13), _3(14), xRequiredSpace_30(12)>
  1587. # DEBUG xRequiredSpace => xRequiredSpace_15
  1588. # DEBUG BEGIN_STMT
  1589. # DEBUG BEGIN_STMT
  1590. xTicksToWait.0_4 = xTicksToWait;
  1591. if (xTicksToWait.0_4 != 0)
  1592. goto <bb 16>; [50.00%]
  1593. else
  1594. goto <bb 24>; [50.00%]
  1595. <bb 16> [local count: 65767]:
  1596. # DEBUG BEGIN_STMT
  1597. vTaskSetTimeOutState (&xTimeOut);
  1598. <bb 17> [local count: 621434]:
  1599. # DEBUG BEGIN_STMT
  1600. # DEBUG BEGIN_STMT
  1601. vPortEnterCritical ();
  1602. # DEBUG BEGIN_STMT
  1603. xSpace_35 = xStreamBufferSpacesAvailable (xStreamBuffer_22(D));
  1604. # DEBUG xSpace => xSpace_35
  1605. # DEBUG BEGIN_STMT
  1606. if (xRequiredSpace_15 > xSpace_35)
  1607. goto <bb 18>; [96.34%]
  1608. else
  1609. goto <bb 22>; [3.66%]
  1610. <bb 18> [local count: 598690]:
  1611. # DEBUG BEGIN_STMT
  1612. xTaskGenericNotifyStateClear (0B, 0);
  1613. # DEBUG BEGIN_STMT
  1614. _5 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToSend;
  1615. if (_5 != 0B)
  1616. goto <bb 19>; [3.66%]
  1617. else
  1618. goto <bb 21>; [96.34%]
  1619. <bb 19> [local count: 21912]:
  1620. # DEBUG BEGIN_STMT
  1621. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1622. # DEBUG BEGIN_STMT
  1623. # DEBUG BEGIN_STMT
  1624. __asm__ __volatile__(" mov %0, %1
  1625. msr basepri, %0
  1626. isb
  1627. dsb
  1628. " : "=r" ulNewBASEPRI_57 : "i" 16 : "memory");
  1629. # DEBUG ulNewBASEPRI => ulNewBASEPRI_57
  1630. <bb 20> [local count: 219120732]:
  1631. # DEBUG ulNewBASEPRI => NULL
  1632. # DEBUG BEGIN_STMT
  1633. # DEBUG BEGIN_STMT
  1634. # DEBUG BEGIN_STMT
  1635. <bb 34> [local count: 219120732]:
  1636. goto <bb 20>; [100.00%]
  1637. <bb 21> [local count: 576777]:
  1638. # DEBUG BEGIN_STMT
  1639. # DEBUG BEGIN_STMT
  1640. _6 = xTaskGetCurrentTaskHandle ();
  1641. MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToSend ={v} _6;
  1642. # DEBUG BEGIN_STMT
  1643. vPortExitCritical ();
  1644. # DEBUG BEGIN_STMT
  1645. # DEBUG BEGIN_STMT
  1646. xTicksToWait.1_7 = xTicksToWait;
  1647. xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait.1_7);
  1648. # DEBUG BEGIN_STMT
  1649. MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToSend ={v} 0B;
  1650. # DEBUG BEGIN_STMT
  1651. _8 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait);
  1652. if (_8 == 0)
  1653. goto <bb 35>; [96.34%]
  1654. else
  1655. goto <bb 23>; [3.66%]
  1656. <bb 35> [local count: 555667]:
  1657. goto <bb 17>; [100.00%]
  1658. <bb 22> [local count: 22744]:
  1659. # xSpace_24 = PHI <xSpace_35(17)>
  1660. # DEBUG BEGIN_STMT
  1661. vPortExitCritical ();
  1662. # DEBUG BEGIN_STMT
  1663. <bb 23> [local count: 43855]:
  1664. # xSpace_13 = PHI <xSpace_24(22), xSpace_35(21)>
  1665. # DEBUG xSpace => xSpace_13
  1666. # DEBUG BEGIN_STMT
  1667. # DEBUG BEGIN_STMT
  1668. if (xSpace_13 == 0)
  1669. goto <bb 24>; [50.00%]
  1670. else
  1671. goto <bb 25>; [50.00%]
  1672. <bb 24> [local count: 87694]:
  1673. # DEBUG xSpace => NULL
  1674. # DEBUG BEGIN_STMT
  1675. xSpace_45 = xStreamBufferSpacesAvailable (xStreamBuffer_22(D));
  1676. # DEBUG xSpace => xSpace_45
  1677. <bb 25> [local count: 109621]:
  1678. # xSpace_14 = PHI <xSpace_13(23), xSpace_45(24)>
  1679. # DEBUG xSpace => xSpace_14
  1680. # DEBUG BEGIN_STMT
  1681. # DEBUG BEGIN_STMT
  1682. xReturn_47 = prvWriteMessageToBuffer (xStreamBuffer_22(D), pvTxData_27(D), xDataLengthBytes_25(D), xSpace_14, xRequiredSpace_15);
  1683. # DEBUG xReturn => xReturn_47
  1684. # DEBUG BEGIN_STMT
  1685. if (xReturn_47 != 0)
  1686. goto <bb 26>; [33.00%]
  1687. else
  1688. goto <bb 30>; [67.00%]
  1689. <bb 26> [local count: 36175]:
  1690. # DEBUG BEGIN_STMT
  1691. # DEBUG BEGIN_STMT
  1692. _9 = prvBytesInBuffer (xStreamBuffer_22(D));
  1693. _10 = MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTriggerLevelBytes;
  1694. if (_9 >= _10)
  1695. goto <bb 27>; [33.00%]
  1696. else
  1697. goto <bb 30>; [67.00%]
  1698. <bb 27> [local count: 11938]:
  1699. # DEBUG BEGIN_STMT
  1700. vTaskSuspendAll ();
  1701. # DEBUG BEGIN_STMT
  1702. _11 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToReceive;
  1703. if (_11 != 0B)
  1704. goto <bb 28>; [53.47%]
  1705. else
  1706. goto <bb 29>; [46.53%]
  1707. <bb 28> [local count: 6383]:
  1708. # DEBUG BEGIN_STMT
  1709. _12 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToReceive;
  1710. xTaskGenericNotify (_12, 0, 0, 0, 0B);
  1711. # DEBUG BEGIN_STMT
  1712. MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToReceive ={v} 0B;
  1713. <bb 29> [local count: 11938]:
  1714. # DEBUG BEGIN_STMT
  1715. xTaskResumeAll ();
  1716. # DEBUG BEGIN_STMT
  1717. <bb 30> [local count: 109621]:
  1718. # DEBUG BEGIN_STMT
  1719. # DEBUG BEGIN_STMT
  1720. # DEBUG BEGIN_STMT
  1721. xTimeOut ={v} {CLOBBER};
  1722. return xReturn_47;
  1723. }
  1724. xStreamBufferBytesAvailable (struct StreamBufferDef_t * xStreamBuffer)
  1725. {
  1726. uint32_t ulNewBASEPRI;
  1727. size_t xReturn;
  1728. <bb 2> [local count: 230763]:
  1729. # DEBUG BEGIN_STMT
  1730. # DEBUG pxStreamBuffer => xStreamBuffer_1(D)
  1731. # DEBUG BEGIN_STMT
  1732. # DEBUG BEGIN_STMT
  1733. if (xStreamBuffer_1(D) == 0B)
  1734. goto <bb 3>; [46.53%]
  1735. else
  1736. goto <bb 5>; [53.47%]
  1737. <bb 3> [local count: 107374]:
  1738. # DEBUG BEGIN_STMT
  1739. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1740. # DEBUG BEGIN_STMT
  1741. # DEBUG BEGIN_STMT
  1742. __asm__ __volatile__(" mov %0, %1
  1743. msr basepri, %0
  1744. isb
  1745. dsb
  1746. " : "=r" ulNewBASEPRI_5 : "i" 16 : "memory");
  1747. # DEBUG ulNewBASEPRI => ulNewBASEPRI_5
  1748. <bb 4> [local count: 1073741824]:
  1749. # DEBUG ulNewBASEPRI => NULL
  1750. # DEBUG BEGIN_STMT
  1751. # DEBUG BEGIN_STMT
  1752. # DEBUG BEGIN_STMT
  1753. <bb 6> [local count: 1073741824]:
  1754. goto <bb 4>; [100.00%]
  1755. <bb 5> [local count: 123389]:
  1756. # DEBUG BEGIN_STMT
  1757. # DEBUG BEGIN_STMT
  1758. xReturn_4 = prvBytesInBuffer (xStreamBuffer_1(D));
  1759. # DEBUG xReturn => xReturn_4
  1760. # DEBUG BEGIN_STMT
  1761. return xReturn_4;
  1762. }
  1763. xStreamBufferSpacesAvailable (struct StreamBufferDef_t * xStreamBuffer)
  1764. {
  1765. size_t xOriginalTail;
  1766. size_t xSpace;
  1767. unsigned int _1;
  1768. unsigned int _2;
  1769. unsigned int _3;
  1770. unsigned int _4;
  1771. unsigned int _12;
  1772. <bb 2> [local count: 357913]:
  1773. # DEBUG BEGIN_STMT
  1774. # DEBUG pxStreamBuffer => xStreamBuffer_7(D)
  1775. # DEBUG BEGIN_STMT
  1776. # DEBUG BEGIN_STMT
  1777. # DEBUG BEGIN_STMT
  1778. if (xStreamBuffer_7(D) == 0B)
  1779. goto <bb 3>; [30.00%]
  1780. else
  1781. goto <bb 4>; [70.00%]
  1782. <bb 3> [local count: 107374]:
  1783. # DEBUG D#1 => xStreamBuffer_7(D)
  1784. xStreamBufferSpacesAvailable.part.0 ();
  1785. <bb 4> [local count: 2277630]:
  1786. # DEBUG BEGIN_STMT
  1787. # DEBUG BEGIN_STMT
  1788. # DEBUG BEGIN_STMT
  1789. xOriginalTail_10 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xTail;
  1790. # DEBUG xOriginalTail => xOriginalTail_10
  1791. # DEBUG BEGIN_STMT
  1792. _1 = MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xLength;
  1793. _2 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xTail;
  1794. xSpace_11 = _1 + _2;
  1795. # DEBUG xSpace => xSpace_11
  1796. # DEBUG BEGIN_STMT
  1797. _12 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xHead;
  1798. xSpace_13 = xSpace_11 - _12;
  1799. # DEBUG xSpace => xSpace_13
  1800. # DEBUG BEGIN_STMT
  1801. _3 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xTail;
  1802. if (_3 != xOriginalTail_10)
  1803. goto <bb 4>; [89.00%]
  1804. else
  1805. goto <bb 5>; [11.00%]
  1806. <bb 5> [local count: 250539]:
  1807. # _4 = PHI <_1(4)>
  1808. # xSpace_5 = PHI <xSpace_13(4)>
  1809. # DEBUG BEGIN_STMT
  1810. xSpace_14 = xSpace_5 + 4294967295;
  1811. # DEBUG xSpace => xSpace_14
  1812. # DEBUG BEGIN_STMT
  1813. if (_4 <= xSpace_14)
  1814. goto <bb 6>; [50.00%]
  1815. else
  1816. goto <bb 7>; [50.00%]
  1817. <bb 6> [local count: 125270]:
  1818. # DEBUG BEGIN_STMT
  1819. xSpace_15 = xSpace_14 - _4;
  1820. # DEBUG xSpace => xSpace_15
  1821. <bb 7> [local count: 250539]:
  1822. # xSpace_6 = PHI <xSpace_14(5), xSpace_15(6)>
  1823. # DEBUG xSpace => xSpace_6
  1824. # DEBUG BEGIN_STMT
  1825. # DEBUG BEGIN_STMT
  1826. return xSpace_6;
  1827. }
  1828. xStreamBufferSetTriggerLevel (struct StreamBufferDef_t * xStreamBuffer, size_t xTriggerLevel)
  1829. {
  1830. uint32_t ulNewBASEPRI;
  1831. BaseType_t xReturn;
  1832. unsigned int _1;
  1833. <bb 2> [local count: 357913]:
  1834. # DEBUG BEGIN_STMT
  1835. # DEBUG pxStreamBuffer => xStreamBuffer_4(D)
  1836. # DEBUG BEGIN_STMT
  1837. # DEBUG BEGIN_STMT
  1838. if (xStreamBuffer_4(D) == 0B)
  1839. goto <bb 3>; [30.00%]
  1840. else
  1841. goto <bb 5>; [70.00%]
  1842. <bb 3> [local count: 107374]:
  1843. # DEBUG BEGIN_STMT
  1844. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1845. # DEBUG BEGIN_STMT
  1846. # DEBUG BEGIN_STMT
  1847. __asm__ __volatile__(" mov %0, %1
  1848. msr basepri, %0
  1849. isb
  1850. dsb
  1851. " : "=r" ulNewBASEPRI_9 : "i" 16 : "memory");
  1852. # DEBUG ulNewBASEPRI => ulNewBASEPRI_9
  1853. <bb 4> [local count: 1073741824]:
  1854. # DEBUG ulNewBASEPRI => NULL
  1855. # DEBUG BEGIN_STMT
  1856. # DEBUG BEGIN_STMT
  1857. # DEBUG BEGIN_STMT
  1858. <bb 8> [local count: 1073741824]:
  1859. goto <bb 4>; [100.00%]
  1860. <bb 5> [local count: 250539]:
  1861. # DEBUG BEGIN_STMT
  1862. # DEBUG BEGIN_STMT
  1863. xTriggerLevel_8 = MAX_EXPR <1, xTriggerLevel_5(D)>;
  1864. # DEBUG xTriggerLevel => xTriggerLevel_8
  1865. # DEBUG BEGIN_STMT
  1866. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_4(D)].xLength;
  1867. if (_1 > xTriggerLevel_8)
  1868. goto <bb 6>; [50.00%]
  1869. else
  1870. goto <bb 7>; [50.00%]
  1871. <bb 6> [local count: 125270]:
  1872. # DEBUG BEGIN_STMT
  1873. MEM[(struct StreamBuffer_t *)xStreamBuffer_4(D)].xTriggerLevelBytes = xTriggerLevel_8;
  1874. # DEBUG BEGIN_STMT
  1875. # DEBUG xReturn => 1
  1876. <bb 7> [local count: 250539]:
  1877. # xReturn_2 = PHI <1(6), 0(5)>
  1878. # DEBUG xReturn => xReturn_2
  1879. # DEBUG BEGIN_STMT
  1880. return xReturn_2;
  1881. }
  1882. xStreamBufferReset (struct StreamBufferDef_t * xStreamBuffer)
  1883. {
  1884. uint32_t ulNewBASEPRI;
  1885. UBaseType_t uxStreamBufferNumber;
  1886. BaseType_t xReturn;
  1887. struct tskTaskControlBlock * _1;
  1888. struct tskTaskControlBlock * _2;
  1889. uint8_t * _3;
  1890. unsigned int _4;
  1891. unsigned int _5;
  1892. unsigned char _6;
  1893. <bb 2> [local count: 230763]:
  1894. # DEBUG BEGIN_STMT
  1895. # DEBUG pxStreamBuffer => xStreamBuffer_9(D)
  1896. # DEBUG BEGIN_STMT
  1897. # DEBUG xReturn => 0
  1898. # DEBUG BEGIN_STMT
  1899. # DEBUG BEGIN_STMT
  1900. if (xStreamBuffer_9(D) == 0B)
  1901. goto <bb 3>; [46.53%]
  1902. else
  1903. goto <bb 5>; [53.47%]
  1904. <bb 3> [local count: 107374]:
  1905. # DEBUG BEGIN_STMT
  1906. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1907. # DEBUG BEGIN_STMT
  1908. # DEBUG BEGIN_STMT
  1909. __asm__ __volatile__(" mov %0, %1
  1910. msr basepri, %0
  1911. isb
  1912. dsb
  1913. " : "=r" ulNewBASEPRI_16 : "i" 16 : "memory");
  1914. # DEBUG ulNewBASEPRI => ulNewBASEPRI_16
  1915. <bb 4> [local count: 1073741824]:
  1916. # DEBUG ulNewBASEPRI => NULL
  1917. # DEBUG BEGIN_STMT
  1918. # DEBUG BEGIN_STMT
  1919. # DEBUG BEGIN_STMT
  1920. <bb 9> [local count: 1073741824]:
  1921. goto <bb 4>; [100.00%]
  1922. <bb 5> [local count: 123389]:
  1923. # DEBUG BEGIN_STMT
  1924. # DEBUG BEGIN_STMT
  1925. uxStreamBufferNumber_11 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].uxStreamBufferNumber;
  1926. # DEBUG uxStreamBufferNumber => uxStreamBufferNumber_11
  1927. # DEBUG BEGIN_STMT
  1928. vPortEnterCritical ();
  1929. # DEBUG BEGIN_STMT
  1930. _1 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToReceive;
  1931. if (_1 == 0B)
  1932. goto <bb 6>; [30.00%]
  1933. else
  1934. goto <bb 8>; [70.00%]
  1935. <bb 6> [local count: 37017]:
  1936. # DEBUG BEGIN_STMT
  1937. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToSend;
  1938. if (_2 == 0B)
  1939. goto <bb 7>; [17.43%]
  1940. else
  1941. goto <bb 8>; [82.57%]
  1942. <bb 7> [local count: 6452]:
  1943. # DEBUG BEGIN_STMT
  1944. _3 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].pucBuffer;
  1945. _4 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xLength;
  1946. _5 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTriggerLevelBytes;
  1947. _6 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].ucFlags;
  1948. prvInitialiseNewStreamBuffer (xStreamBuffer_9(D), _3, _4, _5, _6);
  1949. # DEBUG BEGIN_STMT
  1950. # DEBUG xReturn => 1
  1951. # DEBUG BEGIN_STMT
  1952. MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].uxStreamBufferNumber = uxStreamBufferNumber_11;
  1953. <bb 8> [local count: 123389]:
  1954. # xReturn_7 = PHI <0(5), 0(6), 1(7)>
  1955. # DEBUG xReturn => xReturn_7
  1956. # DEBUG BEGIN_STMT
  1957. # DEBUG BEGIN_STMT
  1958. vPortExitCritical ();
  1959. # DEBUG BEGIN_STMT
  1960. return xReturn_7;
  1961. }
  1962. vStreamBufferDelete (struct StreamBufferDef_t * xStreamBuffer)
  1963. {
  1964. uint32_t ulNewBASEPRI;
  1965. unsigned char _1;
  1966. unsigned char _4;
  1967. <bb 2> [local count: 357913]:
  1968. # DEBUG BEGIN_STMT
  1969. # DEBUG pxStreamBuffer => xStreamBuffer_3(D)
  1970. # DEBUG BEGIN_STMT
  1971. if (xStreamBuffer_3(D) == 0B)
  1972. goto <bb 3>; [30.00%]
  1973. else
  1974. goto <bb 5>; [70.00%]
  1975. <bb 3> [local count: 107374]:
  1976. # DEBUG BEGIN_STMT
  1977. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1978. # DEBUG BEGIN_STMT
  1979. # DEBUG BEGIN_STMT
  1980. __asm__ __volatile__(" mov %0, %1
  1981. msr basepri, %0
  1982. isb
  1983. dsb
  1984. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  1985. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  1986. <bb 4> [local count: 1073741824]:
  1987. # DEBUG ulNewBASEPRI => NULL
  1988. # DEBUG BEGIN_STMT
  1989. # DEBUG BEGIN_STMT
  1990. # DEBUG BEGIN_STMT
  1991. <bb 9> [local count: 1073741824]:
  1992. goto <bb 4>; [100.00%]
  1993. <bb 5> [local count: 250539]:
  1994. # DEBUG BEGIN_STMT
  1995. # DEBUG BEGIN_STMT
  1996. # DEBUG BEGIN_STMT
  1997. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_3(D)].ucFlags;
  1998. _4 = _1 & 2;
  1999. if (_4 == 0)
  2000. goto <bb 6>; [50.00%]
  2001. else
  2002. goto <bb 7>; [50.00%]
  2003. <bb 6> [local count: 125270]:
  2004. # DEBUG BEGIN_STMT
  2005. vPortFree (xStreamBuffer_3(D));
  2006. goto <bb 8>; [100.00%]
  2007. <bb 7> [local count: 125270]:
  2008. # DEBUG BEGIN_STMT
  2009. memset (xStreamBuffer_3(D), 0, 36);
  2010. <bb 8> [local count: 250539]:
  2011. return;
  2012. }
  2013. xStreamBufferGenericCreate (size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer)
  2014. {
  2015. uint32_t ulNewBASEPRI;
  2016. uint32_t ulNewBASEPRI;
  2017. uint32_t ulNewBASEPRI;
  2018. uint8_t ucFlags;
  2019. uint8_t * pucAllocatedMemory;
  2020. unsigned int _1;
  2021. uint8_t * _2;
  2022. <bb 2> [local count: 325376]:
  2023. # DEBUG BEGIN_STMT
  2024. # DEBUG BEGIN_STMT
  2025. # DEBUG BEGIN_STMT
  2026. if (xIsMessageBuffer_5(D) == 1)
  2027. goto <bb 3>; [34.00%]
  2028. else
  2029. goto <bb 6>; [66.00%]
  2030. <bb 3> [local count: 110628]:
  2031. # DEBUG BEGIN_STMT
  2032. # DEBUG ucFlags => 1
  2033. # DEBUG BEGIN_STMT
  2034. if (xBufferSizeBytes_6(D) <= 4)
  2035. goto <bb 4>; [50.00%]
  2036. else
  2037. goto <bb 9>; [50.00%]
  2038. <bb 4> [local count: 55314]:
  2039. # DEBUG BEGIN_STMT
  2040. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  2041. # DEBUG BEGIN_STMT
  2042. # DEBUG BEGIN_STMT
  2043. __asm__ __volatile__(" mov %0, %1
  2044. msr basepri, %0
  2045. isb
  2046. dsb
  2047. " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
  2048. # DEBUG ulNewBASEPRI => ulNewBASEPRI_15
  2049. <bb 5> [local count: 553139728]:
  2050. # DEBUG ulNewBASEPRI => NULL
  2051. # DEBUG BEGIN_STMT
  2052. # DEBUG BEGIN_STMT
  2053. # DEBUG BEGIN_STMT
  2054. <bb 16> [local count: 553139728]:
  2055. goto <bb 5>; [100.00%]
  2056. <bb 6> [local count: 214748]:
  2057. # DEBUG BEGIN_STMT
  2058. # DEBUG ucFlags => 0
  2059. # DEBUG BEGIN_STMT
  2060. if (xBufferSizeBytes_6(D) == 0)
  2061. goto <bb 7>; [50.00%]
  2062. else
  2063. goto <bb 9>; [50.00%]
  2064. <bb 7> [local count: 107374]:
  2065. # DEBUG BEGIN_STMT
  2066. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  2067. # DEBUG BEGIN_STMT
  2068. # DEBUG BEGIN_STMT
  2069. __asm__ __volatile__(" mov %0, %1
  2070. msr basepri, %0
  2071. isb
  2072. dsb
  2073. " : "=r" ulNewBASEPRI_16 : "i" 16 : "memory");
  2074. # DEBUG ulNewBASEPRI => ulNewBASEPRI_16
  2075. <bb 8> [local count: 1073741824]:
  2076. # DEBUG ulNewBASEPRI => NULL
  2077. # DEBUG BEGIN_STMT
  2078. # DEBUG BEGIN_STMT
  2079. # DEBUG BEGIN_STMT
  2080. <bb 18> [local count: 1073741824]:
  2081. goto <bb 8>; [100.00%]
  2082. <bb 9> [local count: 162688]:
  2083. # ucFlags_3 = PHI <1(3), 0(6)>
  2084. # DEBUG ucFlags => ucFlags_3
  2085. # DEBUG BEGIN_STMT
  2086. # DEBUG BEGIN_STMT
  2087. if (xBufferSizeBytes_6(D) < xTriggerLevelBytes_8(D))
  2088. goto <bb 10>; [50.00%]
  2089. else
  2090. goto <bb 12>; [50.00%]
  2091. <bb 10> [local count: 81344]:
  2092. # DEBUG BEGIN_STMT
  2093. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  2094. # DEBUG BEGIN_STMT
  2095. # DEBUG BEGIN_STMT
  2096. __asm__ __volatile__(" mov %0, %1
  2097. msr basepri, %0
  2098. isb
  2099. dsb
  2100. " : "=r" ulNewBASEPRI_17 : "i" 16 : "memory");
  2101. # DEBUG ulNewBASEPRI => ulNewBASEPRI_17
  2102. <bb 11> [local count: 813440776]:
  2103. # DEBUG ulNewBASEPRI => NULL
  2104. # DEBUG BEGIN_STMT
  2105. # DEBUG BEGIN_STMT
  2106. # DEBUG BEGIN_STMT
  2107. <bb 17> [local count: 813440776]:
  2108. goto <bb 11>; [100.00%]
  2109. <bb 12> [local count: 81344]:
  2110. # DEBUG BEGIN_STMT
  2111. # DEBUG BEGIN_STMT
  2112. xTriggerLevelBytes_9 = MAX_EXPR <1, xTriggerLevelBytes_8(D)>;
  2113. # DEBUG xTriggerLevelBytes => xTriggerLevelBytes_9
  2114. # DEBUG BEGIN_STMT
  2115. if (xBufferSizeBytes_6(D) <= 4294967258)
  2116. goto <bb 13>; [54.67%]
  2117. else
  2118. goto <bb 15>; [45.33%]
  2119. <bb 13> [local count: 44471]:
  2120. # DEBUG BEGIN_STMT
  2121. xBufferSizeBytes_11 = xBufferSizeBytes_6(D) + 1;
  2122. # DEBUG xBufferSizeBytes => xBufferSizeBytes_11
  2123. # DEBUG BEGIN_STMT
  2124. _1 = xBufferSizeBytes_6(D) + 37;
  2125. pucAllocatedMemory_13 = pvPortMalloc (_1);
  2126. # DEBUG pucAllocatedMemory => pucAllocatedMemory_13
  2127. # DEBUG xBufferSizeBytes => xBufferSizeBytes_11
  2128. # DEBUG BEGIN_STMT
  2129. if (pucAllocatedMemory_13 != 0B)
  2130. goto <bb 14>; [53.47%]
  2131. else
  2132. goto <bb 15>; [46.53%]
  2133. <bb 14> [local count: 23779]:
  2134. # DEBUG BEGIN_STMT
  2135. _2 = pucAllocatedMemory_13 + 36;
  2136. prvInitialiseNewStreamBuffer (pucAllocatedMemory_13, _2, xBufferSizeBytes_11, xTriggerLevelBytes_9, ucFlags_3);
  2137. # DEBUG BEGIN_STMT
  2138. <bb 15> [local count: 81344]:
  2139. # pucAllocatedMemory_10 = PHI <pucAllocatedMemory_13(13), pucAllocatedMemory_13(14), 0B(12)>
  2140. # DEBUG pucAllocatedMemory => NULL
  2141. # DEBUG xBufferSizeBytes => NULL
  2142. # DEBUG BEGIN_STMT
  2143. # DEBUG BEGIN_STMT
  2144. return pucAllocatedMemory_10;
  2145. }