stream_buffer.c.069i.profile_estimate 64 KB

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