ccgo.go 76 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874
  1. // Code generated by 'go generate' - DO NOT EDIT.
  2. package libc // import "modernc.org/libc"
  3. import (
  4. "sync/atomic"
  5. "unsafe"
  6. )
  7. func AtomicStoreNInt32(ptr uintptr, val int32, memorder int32) {
  8. atomic.StoreInt32((*int32)(unsafe.Pointer(ptr)), val)
  9. }
  10. func AtomicStoreNInt64(ptr uintptr, val int64, memorder int32) {
  11. atomic.StoreInt64((*int64)(unsafe.Pointer(ptr)), val)
  12. }
  13. func AtomicStoreNUint32(ptr uintptr, val uint32, memorder int32) {
  14. atomic.StoreUint32((*uint32)(unsafe.Pointer(ptr)), val)
  15. }
  16. func AtomicStoreNUint64(ptr uintptr, val uint64, memorder int32) {
  17. atomic.StoreUint64((*uint64)(unsafe.Pointer(ptr)), val)
  18. }
  19. func AtomicStoreNUintptr(ptr uintptr, val uintptr, memorder int32) {
  20. atomic.StoreUintptr((*uintptr)(unsafe.Pointer(ptr)), val)
  21. }
  22. func AtomicLoadNInt32(ptr uintptr, memorder int32) int32 {
  23. return atomic.LoadInt32((*int32)(unsafe.Pointer(ptr)))
  24. }
  25. func AtomicLoadNInt64(ptr uintptr, memorder int32) int64 {
  26. return atomic.LoadInt64((*int64)(unsafe.Pointer(ptr)))
  27. }
  28. func AtomicLoadNUint32(ptr uintptr, memorder int32) uint32 {
  29. return atomic.LoadUint32((*uint32)(unsafe.Pointer(ptr)))
  30. }
  31. func AtomicLoadNUint64(ptr uintptr, memorder int32) uint64 {
  32. return atomic.LoadUint64((*uint64)(unsafe.Pointer(ptr)))
  33. }
  34. func AtomicLoadNUintptr(ptr uintptr, memorder int32) uintptr {
  35. return atomic.LoadUintptr((*uintptr)(unsafe.Pointer(ptr)))
  36. }
  37. func AssignInt8(p *int8, v int8) int8 { *p = v; return v }
  38. func AssignInt16(p *int16, v int16) int16 { *p = v; return v }
  39. func AssignInt32(p *int32, v int32) int32 { *p = v; return v }
  40. func AssignInt64(p *int64, v int64) int64 { *p = v; return v }
  41. func AssignUint8(p *uint8, v uint8) uint8 { *p = v; return v }
  42. func AssignUint16(p *uint16, v uint16) uint16 { *p = v; return v }
  43. func AssignUint32(p *uint32, v uint32) uint32 { *p = v; return v }
  44. func AssignUint64(p *uint64, v uint64) uint64 { *p = v; return v }
  45. func AssignFloat32(p *float32, v float32) float32 { *p = v; return v }
  46. func AssignFloat64(p *float64, v float64) float64 { *p = v; return v }
  47. func AssignComplex64(p *complex64, v complex64) complex64 { *p = v; return v }
  48. func AssignComplex128(p *complex128, v complex128) complex128 { *p = v; return v }
  49. func AssignUintptr(p *uintptr, v uintptr) uintptr { *p = v; return v }
  50. func AssignPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) = v; return v }
  51. func AssignPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) = v; return v }
  52. func AssignPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) = v; return v }
  53. func AssignPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) = v; return v }
  54. func AssignPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) = v; return v }
  55. func AssignPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) = v; return v }
  56. func AssignPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) = v; return v }
  57. func AssignPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) = v; return v }
  58. func AssignPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) = v; return v }
  59. func AssignPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) = v; return v }
  60. func AssignPtrComplex64(p uintptr, v complex64) complex64 {
  61. *(*complex64)(unsafe.Pointer(p)) = v
  62. return v
  63. }
  64. func AssignPtrComplex128(p uintptr, v complex128) complex128 {
  65. *(*complex128)(unsafe.Pointer(p)) = v
  66. return v
  67. }
  68. func AssignPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) = v; return v }
  69. func AssignMulInt8(p *int8, v int8) int8 { *p *= v; return *p }
  70. func AssignMulInt16(p *int16, v int16) int16 { *p *= v; return *p }
  71. func AssignMulInt32(p *int32, v int32) int32 { *p *= v; return *p }
  72. func AssignMulInt64(p *int64, v int64) int64 { *p *= v; return *p }
  73. func AssignMulUint8(p *uint8, v uint8) uint8 { *p *= v; return *p }
  74. func AssignMulUint16(p *uint16, v uint16) uint16 { *p *= v; return *p }
  75. func AssignMulUint32(p *uint32, v uint32) uint32 { *p *= v; return *p }
  76. func AssignMulUint64(p *uint64, v uint64) uint64 { *p *= v; return *p }
  77. func AssignMulFloat32(p *float32, v float32) float32 { *p *= v; return *p }
  78. func AssignMulFloat64(p *float64, v float64) float64 { *p *= v; return *p }
  79. func AssignMulComplex64(p *complex64, v complex64) complex64 { *p *= v; return *p }
  80. func AssignMulComplex128(p *complex128, v complex128) complex128 { *p *= v; return *p }
  81. func AssignMulUintptr(p *uintptr, v uintptr) uintptr { *p *= v; return *p }
  82. func AssignDivInt8(p *int8, v int8) int8 { *p /= v; return *p }
  83. func AssignDivInt16(p *int16, v int16) int16 { *p /= v; return *p }
  84. func AssignDivInt32(p *int32, v int32) int32 { *p /= v; return *p }
  85. func AssignDivInt64(p *int64, v int64) int64 { *p /= v; return *p }
  86. func AssignDivUint8(p *uint8, v uint8) uint8 { *p /= v; return *p }
  87. func AssignDivUint16(p *uint16, v uint16) uint16 { *p /= v; return *p }
  88. func AssignDivUint32(p *uint32, v uint32) uint32 { *p /= v; return *p }
  89. func AssignDivUint64(p *uint64, v uint64) uint64 { *p /= v; return *p }
  90. func AssignDivFloat32(p *float32, v float32) float32 { *p /= v; return *p }
  91. func AssignDivFloat64(p *float64, v float64) float64 { *p /= v; return *p }
  92. func AssignDivComplex64(p *complex64, v complex64) complex64 { *p /= v; return *p }
  93. func AssignDivComplex128(p *complex128, v complex128) complex128 { *p /= v; return *p }
  94. func AssignDivUintptr(p *uintptr, v uintptr) uintptr { *p /= v; return *p }
  95. func AssignRemInt8(p *int8, v int8) int8 { *p %= v; return *p }
  96. func AssignRemInt16(p *int16, v int16) int16 { *p %= v; return *p }
  97. func AssignRemInt32(p *int32, v int32) int32 { *p %= v; return *p }
  98. func AssignRemInt64(p *int64, v int64) int64 { *p %= v; return *p }
  99. func AssignRemUint8(p *uint8, v uint8) uint8 { *p %= v; return *p }
  100. func AssignRemUint16(p *uint16, v uint16) uint16 { *p %= v; return *p }
  101. func AssignRemUint32(p *uint32, v uint32) uint32 { *p %= v; return *p }
  102. func AssignRemUint64(p *uint64, v uint64) uint64 { *p %= v; return *p }
  103. func AssignRemUintptr(p *uintptr, v uintptr) uintptr { *p %= v; return *p }
  104. func AssignAddInt8(p *int8, v int8) int8 { *p += v; return *p }
  105. func AssignAddInt16(p *int16, v int16) int16 { *p += v; return *p }
  106. func AssignAddInt32(p *int32, v int32) int32 { *p += v; return *p }
  107. func AssignAddInt64(p *int64, v int64) int64 { *p += v; return *p }
  108. func AssignAddUint8(p *uint8, v uint8) uint8 { *p += v; return *p }
  109. func AssignAddUint16(p *uint16, v uint16) uint16 { *p += v; return *p }
  110. func AssignAddUint32(p *uint32, v uint32) uint32 { *p += v; return *p }
  111. func AssignAddUint64(p *uint64, v uint64) uint64 { *p += v; return *p }
  112. func AssignAddFloat32(p *float32, v float32) float32 { *p += v; return *p }
  113. func AssignAddFloat64(p *float64, v float64) float64 { *p += v; return *p }
  114. func AssignAddComplex64(p *complex64, v complex64) complex64 { *p += v; return *p }
  115. func AssignAddComplex128(p *complex128, v complex128) complex128 { *p += v; return *p }
  116. func AssignAddUintptr(p *uintptr, v uintptr) uintptr { *p += v; return *p }
  117. func AssignSubInt8(p *int8, v int8) int8 { *p -= v; return *p }
  118. func AssignSubInt16(p *int16, v int16) int16 { *p -= v; return *p }
  119. func AssignSubInt32(p *int32, v int32) int32 { *p -= v; return *p }
  120. func AssignSubInt64(p *int64, v int64) int64 { *p -= v; return *p }
  121. func AssignSubUint8(p *uint8, v uint8) uint8 { *p -= v; return *p }
  122. func AssignSubUint16(p *uint16, v uint16) uint16 { *p -= v; return *p }
  123. func AssignSubUint32(p *uint32, v uint32) uint32 { *p -= v; return *p }
  124. func AssignSubUint64(p *uint64, v uint64) uint64 { *p -= v; return *p }
  125. func AssignSubFloat32(p *float32, v float32) float32 { *p -= v; return *p }
  126. func AssignSubFloat64(p *float64, v float64) float64 { *p -= v; return *p }
  127. func AssignSubComplex64(p *complex64, v complex64) complex64 { *p -= v; return *p }
  128. func AssignSubComplex128(p *complex128, v complex128) complex128 { *p -= v; return *p }
  129. func AssignSubUintptr(p *uintptr, v uintptr) uintptr { *p -= v; return *p }
  130. func AssignAndInt8(p *int8, v int8) int8 { *p &= v; return *p }
  131. func AssignAndInt16(p *int16, v int16) int16 { *p &= v; return *p }
  132. func AssignAndInt32(p *int32, v int32) int32 { *p &= v; return *p }
  133. func AssignAndInt64(p *int64, v int64) int64 { *p &= v; return *p }
  134. func AssignAndUint8(p *uint8, v uint8) uint8 { *p &= v; return *p }
  135. func AssignAndUint16(p *uint16, v uint16) uint16 { *p &= v; return *p }
  136. func AssignAndUint32(p *uint32, v uint32) uint32 { *p &= v; return *p }
  137. func AssignAndUint64(p *uint64, v uint64) uint64 { *p &= v; return *p }
  138. func AssignAndUintptr(p *uintptr, v uintptr) uintptr { *p &= v; return *p }
  139. func AssignXorInt8(p *int8, v int8) int8 { *p ^= v; return *p }
  140. func AssignXorInt16(p *int16, v int16) int16 { *p ^= v; return *p }
  141. func AssignXorInt32(p *int32, v int32) int32 { *p ^= v; return *p }
  142. func AssignXorInt64(p *int64, v int64) int64 { *p ^= v; return *p }
  143. func AssignXorUint8(p *uint8, v uint8) uint8 { *p ^= v; return *p }
  144. func AssignXorUint16(p *uint16, v uint16) uint16 { *p ^= v; return *p }
  145. func AssignXorUint32(p *uint32, v uint32) uint32 { *p ^= v; return *p }
  146. func AssignXorUint64(p *uint64, v uint64) uint64 { *p ^= v; return *p }
  147. func AssignXorUintptr(p *uintptr, v uintptr) uintptr { *p ^= v; return *p }
  148. func AssignOrInt8(p *int8, v int8) int8 { *p |= v; return *p }
  149. func AssignOrInt16(p *int16, v int16) int16 { *p |= v; return *p }
  150. func AssignOrInt32(p *int32, v int32) int32 { *p |= v; return *p }
  151. func AssignOrInt64(p *int64, v int64) int64 { *p |= v; return *p }
  152. func AssignOrUint8(p *uint8, v uint8) uint8 { *p |= v; return *p }
  153. func AssignOrUint16(p *uint16, v uint16) uint16 { *p |= v; return *p }
  154. func AssignOrUint32(p *uint32, v uint32) uint32 { *p |= v; return *p }
  155. func AssignOrUint64(p *uint64, v uint64) uint64 { *p |= v; return *p }
  156. func AssignOrUintptr(p *uintptr, v uintptr) uintptr { *p |= v; return *p }
  157. func AssignMulPtrInt8(p uintptr, v int8) int8 {
  158. *(*int8)(unsafe.Pointer(p)) *= v
  159. return *(*int8)(unsafe.Pointer(p))
  160. }
  161. func AssignMulPtrInt16(p uintptr, v int16) int16 {
  162. *(*int16)(unsafe.Pointer(p)) *= v
  163. return *(*int16)(unsafe.Pointer(p))
  164. }
  165. func AssignMulPtrInt32(p uintptr, v int32) int32 {
  166. *(*int32)(unsafe.Pointer(p)) *= v
  167. return *(*int32)(unsafe.Pointer(p))
  168. }
  169. func AssignMulPtrInt64(p uintptr, v int64) int64 {
  170. *(*int64)(unsafe.Pointer(p)) *= v
  171. return *(*int64)(unsafe.Pointer(p))
  172. }
  173. func AssignMulPtrUint8(p uintptr, v uint8) uint8 {
  174. *(*uint8)(unsafe.Pointer(p)) *= v
  175. return *(*uint8)(unsafe.Pointer(p))
  176. }
  177. func AssignMulPtrUint16(p uintptr, v uint16) uint16 {
  178. *(*uint16)(unsafe.Pointer(p)) *= v
  179. return *(*uint16)(unsafe.Pointer(p))
  180. }
  181. func AssignMulPtrUint32(p uintptr, v uint32) uint32 {
  182. *(*uint32)(unsafe.Pointer(p)) *= v
  183. return *(*uint32)(unsafe.Pointer(p))
  184. }
  185. func AssignMulPtrUint64(p uintptr, v uint64) uint64 {
  186. *(*uint64)(unsafe.Pointer(p)) *= v
  187. return *(*uint64)(unsafe.Pointer(p))
  188. }
  189. func AssignMulPtrFloat32(p uintptr, v float32) float32 {
  190. *(*float32)(unsafe.Pointer(p)) *= v
  191. return *(*float32)(unsafe.Pointer(p))
  192. }
  193. func AssignMulPtrFloat64(p uintptr, v float64) float64 {
  194. *(*float64)(unsafe.Pointer(p)) *= v
  195. return *(*float64)(unsafe.Pointer(p))
  196. }
  197. func AssignMulPtrComplex64(p uintptr, v complex64) complex64 {
  198. *(*complex64)(unsafe.Pointer(p)) *= v
  199. return *(*complex64)(unsafe.Pointer(p))
  200. }
  201. func AssignMulPtrComplex128(p uintptr, v complex128) complex128 {
  202. *(*complex128)(unsafe.Pointer(p)) *= v
  203. return *(*complex128)(unsafe.Pointer(p))
  204. }
  205. func AssignMulPtrUintptr(p uintptr, v uintptr) uintptr {
  206. *(*uintptr)(unsafe.Pointer(p)) *= v
  207. return *(*uintptr)(unsafe.Pointer(p))
  208. }
  209. func AssignDivPtrInt8(p uintptr, v int8) int8 {
  210. *(*int8)(unsafe.Pointer(p)) /= v
  211. return *(*int8)(unsafe.Pointer(p))
  212. }
  213. func AssignDivPtrInt16(p uintptr, v int16) int16 {
  214. *(*int16)(unsafe.Pointer(p)) /= v
  215. return *(*int16)(unsafe.Pointer(p))
  216. }
  217. func AssignDivPtrInt32(p uintptr, v int32) int32 {
  218. *(*int32)(unsafe.Pointer(p)) /= v
  219. return *(*int32)(unsafe.Pointer(p))
  220. }
  221. func AssignDivPtrInt64(p uintptr, v int64) int64 {
  222. *(*int64)(unsafe.Pointer(p)) /= v
  223. return *(*int64)(unsafe.Pointer(p))
  224. }
  225. func AssignDivPtrUint8(p uintptr, v uint8) uint8 {
  226. *(*uint8)(unsafe.Pointer(p)) /= v
  227. return *(*uint8)(unsafe.Pointer(p))
  228. }
  229. func AssignDivPtrUint16(p uintptr, v uint16) uint16 {
  230. *(*uint16)(unsafe.Pointer(p)) /= v
  231. return *(*uint16)(unsafe.Pointer(p))
  232. }
  233. func AssignDivPtrUint32(p uintptr, v uint32) uint32 {
  234. *(*uint32)(unsafe.Pointer(p)) /= v
  235. return *(*uint32)(unsafe.Pointer(p))
  236. }
  237. func AssignDivPtrUint64(p uintptr, v uint64) uint64 {
  238. *(*uint64)(unsafe.Pointer(p)) /= v
  239. return *(*uint64)(unsafe.Pointer(p))
  240. }
  241. func AssignDivPtrFloat32(p uintptr, v float32) float32 {
  242. *(*float32)(unsafe.Pointer(p)) /= v
  243. return *(*float32)(unsafe.Pointer(p))
  244. }
  245. func AssignDivPtrFloat64(p uintptr, v float64) float64 {
  246. *(*float64)(unsafe.Pointer(p)) /= v
  247. return *(*float64)(unsafe.Pointer(p))
  248. }
  249. func AssignDivPtrComplex64(p uintptr, v complex64) complex64 {
  250. *(*complex64)(unsafe.Pointer(p)) /= v
  251. return *(*complex64)(unsafe.Pointer(p))
  252. }
  253. func AssignDivPtrComplex128(p uintptr, v complex128) complex128 {
  254. *(*complex128)(unsafe.Pointer(p)) /= v
  255. return *(*complex128)(unsafe.Pointer(p))
  256. }
  257. func AssignDivPtrUintptr(p uintptr, v uintptr) uintptr {
  258. *(*uintptr)(unsafe.Pointer(p)) /= v
  259. return *(*uintptr)(unsafe.Pointer(p))
  260. }
  261. func AssignRemPtrInt8(p uintptr, v int8) int8 {
  262. *(*int8)(unsafe.Pointer(p)) %= v
  263. return *(*int8)(unsafe.Pointer(p))
  264. }
  265. func AssignRemPtrInt16(p uintptr, v int16) int16 {
  266. *(*int16)(unsafe.Pointer(p)) %= v
  267. return *(*int16)(unsafe.Pointer(p))
  268. }
  269. func AssignRemPtrInt32(p uintptr, v int32) int32 {
  270. *(*int32)(unsafe.Pointer(p)) %= v
  271. return *(*int32)(unsafe.Pointer(p))
  272. }
  273. func AssignRemPtrInt64(p uintptr, v int64) int64 {
  274. *(*int64)(unsafe.Pointer(p)) %= v
  275. return *(*int64)(unsafe.Pointer(p))
  276. }
  277. func AssignRemPtrUint8(p uintptr, v uint8) uint8 {
  278. *(*uint8)(unsafe.Pointer(p)) %= v
  279. return *(*uint8)(unsafe.Pointer(p))
  280. }
  281. func AssignRemPtrUint16(p uintptr, v uint16) uint16 {
  282. *(*uint16)(unsafe.Pointer(p)) %= v
  283. return *(*uint16)(unsafe.Pointer(p))
  284. }
  285. func AssignRemPtrUint32(p uintptr, v uint32) uint32 {
  286. *(*uint32)(unsafe.Pointer(p)) %= v
  287. return *(*uint32)(unsafe.Pointer(p))
  288. }
  289. func AssignRemPtrUint64(p uintptr, v uint64) uint64 {
  290. *(*uint64)(unsafe.Pointer(p)) %= v
  291. return *(*uint64)(unsafe.Pointer(p))
  292. }
  293. func AssignRemPtrUintptr(p uintptr, v uintptr) uintptr {
  294. *(*uintptr)(unsafe.Pointer(p)) %= v
  295. return *(*uintptr)(unsafe.Pointer(p))
  296. }
  297. func AssignAddPtrInt8(p uintptr, v int8) int8 {
  298. *(*int8)(unsafe.Pointer(p)) += v
  299. return *(*int8)(unsafe.Pointer(p))
  300. }
  301. func AssignAddPtrInt16(p uintptr, v int16) int16 {
  302. *(*int16)(unsafe.Pointer(p)) += v
  303. return *(*int16)(unsafe.Pointer(p))
  304. }
  305. func AssignAddPtrInt32(p uintptr, v int32) int32 {
  306. *(*int32)(unsafe.Pointer(p)) += v
  307. return *(*int32)(unsafe.Pointer(p))
  308. }
  309. func AssignAddPtrInt64(p uintptr, v int64) int64 {
  310. *(*int64)(unsafe.Pointer(p)) += v
  311. return *(*int64)(unsafe.Pointer(p))
  312. }
  313. func AssignAddPtrUint8(p uintptr, v uint8) uint8 {
  314. *(*uint8)(unsafe.Pointer(p)) += v
  315. return *(*uint8)(unsafe.Pointer(p))
  316. }
  317. func AssignAddPtrUint16(p uintptr, v uint16) uint16 {
  318. *(*uint16)(unsafe.Pointer(p)) += v
  319. return *(*uint16)(unsafe.Pointer(p))
  320. }
  321. func AssignAddPtrUint32(p uintptr, v uint32) uint32 {
  322. *(*uint32)(unsafe.Pointer(p)) += v
  323. return *(*uint32)(unsafe.Pointer(p))
  324. }
  325. func AssignAddPtrUint64(p uintptr, v uint64) uint64 {
  326. *(*uint64)(unsafe.Pointer(p)) += v
  327. return *(*uint64)(unsafe.Pointer(p))
  328. }
  329. func AssignAddPtrFloat32(p uintptr, v float32) float32 {
  330. *(*float32)(unsafe.Pointer(p)) += v
  331. return *(*float32)(unsafe.Pointer(p))
  332. }
  333. func AssignAddPtrFloat64(p uintptr, v float64) float64 {
  334. *(*float64)(unsafe.Pointer(p)) += v
  335. return *(*float64)(unsafe.Pointer(p))
  336. }
  337. func AssignAddPtrComplex64(p uintptr, v complex64) complex64 {
  338. *(*complex64)(unsafe.Pointer(p)) += v
  339. return *(*complex64)(unsafe.Pointer(p))
  340. }
  341. func AssignAddPtrComplex128(p uintptr, v complex128) complex128 {
  342. *(*complex128)(unsafe.Pointer(p)) += v
  343. return *(*complex128)(unsafe.Pointer(p))
  344. }
  345. func AssignAddPtrUintptr(p uintptr, v uintptr) uintptr {
  346. *(*uintptr)(unsafe.Pointer(p)) += v
  347. return *(*uintptr)(unsafe.Pointer(p))
  348. }
  349. func AssignSubPtrInt8(p uintptr, v int8) int8 {
  350. *(*int8)(unsafe.Pointer(p)) -= v
  351. return *(*int8)(unsafe.Pointer(p))
  352. }
  353. func AssignSubPtrInt16(p uintptr, v int16) int16 {
  354. *(*int16)(unsafe.Pointer(p)) -= v
  355. return *(*int16)(unsafe.Pointer(p))
  356. }
  357. func AssignSubPtrInt32(p uintptr, v int32) int32 {
  358. *(*int32)(unsafe.Pointer(p)) -= v
  359. return *(*int32)(unsafe.Pointer(p))
  360. }
  361. func AssignSubPtrInt64(p uintptr, v int64) int64 {
  362. *(*int64)(unsafe.Pointer(p)) -= v
  363. return *(*int64)(unsafe.Pointer(p))
  364. }
  365. func AssignSubPtrUint8(p uintptr, v uint8) uint8 {
  366. *(*uint8)(unsafe.Pointer(p)) -= v
  367. return *(*uint8)(unsafe.Pointer(p))
  368. }
  369. func AssignSubPtrUint16(p uintptr, v uint16) uint16 {
  370. *(*uint16)(unsafe.Pointer(p)) -= v
  371. return *(*uint16)(unsafe.Pointer(p))
  372. }
  373. func AssignSubPtrUint32(p uintptr, v uint32) uint32 {
  374. *(*uint32)(unsafe.Pointer(p)) -= v
  375. return *(*uint32)(unsafe.Pointer(p))
  376. }
  377. func AssignSubPtrUint64(p uintptr, v uint64) uint64 {
  378. *(*uint64)(unsafe.Pointer(p)) -= v
  379. return *(*uint64)(unsafe.Pointer(p))
  380. }
  381. func AssignSubPtrFloat32(p uintptr, v float32) float32 {
  382. *(*float32)(unsafe.Pointer(p)) -= v
  383. return *(*float32)(unsafe.Pointer(p))
  384. }
  385. func AssignSubPtrFloat64(p uintptr, v float64) float64 {
  386. *(*float64)(unsafe.Pointer(p)) -= v
  387. return *(*float64)(unsafe.Pointer(p))
  388. }
  389. func AssignSubPtrComplex64(p uintptr, v complex64) complex64 {
  390. *(*complex64)(unsafe.Pointer(p)) -= v
  391. return *(*complex64)(unsafe.Pointer(p))
  392. }
  393. func AssignSubPtrComplex128(p uintptr, v complex128) complex128 {
  394. *(*complex128)(unsafe.Pointer(p)) -= v
  395. return *(*complex128)(unsafe.Pointer(p))
  396. }
  397. func AssignSubPtrUintptr(p uintptr, v uintptr) uintptr {
  398. *(*uintptr)(unsafe.Pointer(p)) -= v
  399. return *(*uintptr)(unsafe.Pointer(p))
  400. }
  401. func AssignAndPtrInt8(p uintptr, v int8) int8 {
  402. *(*int8)(unsafe.Pointer(p)) &= v
  403. return *(*int8)(unsafe.Pointer(p))
  404. }
  405. func AssignAndPtrInt16(p uintptr, v int16) int16 {
  406. *(*int16)(unsafe.Pointer(p)) &= v
  407. return *(*int16)(unsafe.Pointer(p))
  408. }
  409. func AssignAndPtrInt32(p uintptr, v int32) int32 {
  410. *(*int32)(unsafe.Pointer(p)) &= v
  411. return *(*int32)(unsafe.Pointer(p))
  412. }
  413. func AssignAndPtrInt64(p uintptr, v int64) int64 {
  414. *(*int64)(unsafe.Pointer(p)) &= v
  415. return *(*int64)(unsafe.Pointer(p))
  416. }
  417. func AssignAndPtrUint8(p uintptr, v uint8) uint8 {
  418. *(*uint8)(unsafe.Pointer(p)) &= v
  419. return *(*uint8)(unsafe.Pointer(p))
  420. }
  421. func AssignAndPtrUint16(p uintptr, v uint16) uint16 {
  422. *(*uint16)(unsafe.Pointer(p)) &= v
  423. return *(*uint16)(unsafe.Pointer(p))
  424. }
  425. func AssignAndPtrUint32(p uintptr, v uint32) uint32 {
  426. *(*uint32)(unsafe.Pointer(p)) &= v
  427. return *(*uint32)(unsafe.Pointer(p))
  428. }
  429. func AssignAndPtrUint64(p uintptr, v uint64) uint64 {
  430. *(*uint64)(unsafe.Pointer(p)) &= v
  431. return *(*uint64)(unsafe.Pointer(p))
  432. }
  433. func AssignAndPtrUintptr(p uintptr, v uintptr) uintptr {
  434. *(*uintptr)(unsafe.Pointer(p)) &= v
  435. return *(*uintptr)(unsafe.Pointer(p))
  436. }
  437. func AssignXorPtrInt8(p uintptr, v int8) int8 {
  438. *(*int8)(unsafe.Pointer(p)) ^= v
  439. return *(*int8)(unsafe.Pointer(p))
  440. }
  441. func AssignXorPtrInt16(p uintptr, v int16) int16 {
  442. *(*int16)(unsafe.Pointer(p)) ^= v
  443. return *(*int16)(unsafe.Pointer(p))
  444. }
  445. func AssignXorPtrInt32(p uintptr, v int32) int32 {
  446. *(*int32)(unsafe.Pointer(p)) ^= v
  447. return *(*int32)(unsafe.Pointer(p))
  448. }
  449. func AssignXorPtrInt64(p uintptr, v int64) int64 {
  450. *(*int64)(unsafe.Pointer(p)) ^= v
  451. return *(*int64)(unsafe.Pointer(p))
  452. }
  453. func AssignXorPtrUint8(p uintptr, v uint8) uint8 {
  454. *(*uint8)(unsafe.Pointer(p)) ^= v
  455. return *(*uint8)(unsafe.Pointer(p))
  456. }
  457. func AssignXorPtrUint16(p uintptr, v uint16) uint16 {
  458. *(*uint16)(unsafe.Pointer(p)) ^= v
  459. return *(*uint16)(unsafe.Pointer(p))
  460. }
  461. func AssignXorPtrUint32(p uintptr, v uint32) uint32 {
  462. *(*uint32)(unsafe.Pointer(p)) ^= v
  463. return *(*uint32)(unsafe.Pointer(p))
  464. }
  465. func AssignXorPtrUint64(p uintptr, v uint64) uint64 {
  466. *(*uint64)(unsafe.Pointer(p)) ^= v
  467. return *(*uint64)(unsafe.Pointer(p))
  468. }
  469. func AssignXorPtrUintptr(p uintptr, v uintptr) uintptr {
  470. *(*uintptr)(unsafe.Pointer(p)) ^= v
  471. return *(*uintptr)(unsafe.Pointer(p))
  472. }
  473. func AssignOrPtrInt8(p uintptr, v int8) int8 {
  474. *(*int8)(unsafe.Pointer(p)) |= v
  475. return *(*int8)(unsafe.Pointer(p))
  476. }
  477. func AssignOrPtrInt16(p uintptr, v int16) int16 {
  478. *(*int16)(unsafe.Pointer(p)) |= v
  479. return *(*int16)(unsafe.Pointer(p))
  480. }
  481. func AssignOrPtrInt32(p uintptr, v int32) int32 {
  482. *(*int32)(unsafe.Pointer(p)) |= v
  483. return *(*int32)(unsafe.Pointer(p))
  484. }
  485. func AssignOrPtrInt64(p uintptr, v int64) int64 {
  486. *(*int64)(unsafe.Pointer(p)) |= v
  487. return *(*int64)(unsafe.Pointer(p))
  488. }
  489. func AssignOrPtrUint8(p uintptr, v uint8) uint8 {
  490. *(*uint8)(unsafe.Pointer(p)) |= v
  491. return *(*uint8)(unsafe.Pointer(p))
  492. }
  493. func AssignOrPtrUint16(p uintptr, v uint16) uint16 {
  494. *(*uint16)(unsafe.Pointer(p)) |= v
  495. return *(*uint16)(unsafe.Pointer(p))
  496. }
  497. func AssignOrPtrUint32(p uintptr, v uint32) uint32 {
  498. *(*uint32)(unsafe.Pointer(p)) |= v
  499. return *(*uint32)(unsafe.Pointer(p))
  500. }
  501. func AssignOrPtrUint64(p uintptr, v uint64) uint64 {
  502. *(*uint64)(unsafe.Pointer(p)) |= v
  503. return *(*uint64)(unsafe.Pointer(p))
  504. }
  505. func AssignOrPtrUintptr(p uintptr, v uintptr) uintptr {
  506. *(*uintptr)(unsafe.Pointer(p)) |= v
  507. return *(*uintptr)(unsafe.Pointer(p))
  508. }
  509. func AssignShlPtrInt8(p uintptr, v int) int8 {
  510. *(*int8)(unsafe.Pointer(p)) <<= v
  511. return *(*int8)(unsafe.Pointer(p))
  512. }
  513. func AssignShlPtrInt16(p uintptr, v int) int16 {
  514. *(*int16)(unsafe.Pointer(p)) <<= v
  515. return *(*int16)(unsafe.Pointer(p))
  516. }
  517. func AssignShlPtrInt32(p uintptr, v int) int32 {
  518. *(*int32)(unsafe.Pointer(p)) <<= v
  519. return *(*int32)(unsafe.Pointer(p))
  520. }
  521. func AssignShlPtrInt64(p uintptr, v int) int64 {
  522. *(*int64)(unsafe.Pointer(p)) <<= v
  523. return *(*int64)(unsafe.Pointer(p))
  524. }
  525. func AssignShlPtrUint8(p uintptr, v int) uint8 {
  526. *(*uint8)(unsafe.Pointer(p)) <<= v
  527. return *(*uint8)(unsafe.Pointer(p))
  528. }
  529. func AssignShlPtrUint16(p uintptr, v int) uint16 {
  530. *(*uint16)(unsafe.Pointer(p)) <<= v
  531. return *(*uint16)(unsafe.Pointer(p))
  532. }
  533. func AssignShlPtrUint32(p uintptr, v int) uint32 {
  534. *(*uint32)(unsafe.Pointer(p)) <<= v
  535. return *(*uint32)(unsafe.Pointer(p))
  536. }
  537. func AssignShlPtrUint64(p uintptr, v int) uint64 {
  538. *(*uint64)(unsafe.Pointer(p)) <<= v
  539. return *(*uint64)(unsafe.Pointer(p))
  540. }
  541. func AssignShlPtrUintptr(p uintptr, v int) uintptr {
  542. *(*uintptr)(unsafe.Pointer(p)) <<= v
  543. return *(*uintptr)(unsafe.Pointer(p))
  544. }
  545. func AssignShrPtrInt8(p uintptr, v int) int8 {
  546. *(*int8)(unsafe.Pointer(p)) >>= v
  547. return *(*int8)(unsafe.Pointer(p))
  548. }
  549. func AssignShrPtrInt16(p uintptr, v int) int16 {
  550. *(*int16)(unsafe.Pointer(p)) >>= v
  551. return *(*int16)(unsafe.Pointer(p))
  552. }
  553. func AssignShrPtrInt32(p uintptr, v int) int32 {
  554. *(*int32)(unsafe.Pointer(p)) >>= v
  555. return *(*int32)(unsafe.Pointer(p))
  556. }
  557. func AssignShrPtrInt64(p uintptr, v int) int64 {
  558. *(*int64)(unsafe.Pointer(p)) >>= v
  559. return *(*int64)(unsafe.Pointer(p))
  560. }
  561. func AssignShrPtrUint8(p uintptr, v int) uint8 {
  562. *(*uint8)(unsafe.Pointer(p)) >>= v
  563. return *(*uint8)(unsafe.Pointer(p))
  564. }
  565. func AssignShrPtrUint16(p uintptr, v int) uint16 {
  566. *(*uint16)(unsafe.Pointer(p)) >>= v
  567. return *(*uint16)(unsafe.Pointer(p))
  568. }
  569. func AssignShrPtrUint32(p uintptr, v int) uint32 {
  570. *(*uint32)(unsafe.Pointer(p)) >>= v
  571. return *(*uint32)(unsafe.Pointer(p))
  572. }
  573. func AssignShrPtrUint64(p uintptr, v int) uint64 {
  574. *(*uint64)(unsafe.Pointer(p)) >>= v
  575. return *(*uint64)(unsafe.Pointer(p))
  576. }
  577. func AssignShrPtrUintptr(p uintptr, v int) uintptr {
  578. *(*uintptr)(unsafe.Pointer(p)) >>= v
  579. return *(*uintptr)(unsafe.Pointer(p))
  580. }
  581. func AssignShlInt8(p *int8, v int) int8 { *p <<= v; return *p }
  582. func AssignShlInt16(p *int16, v int) int16 { *p <<= v; return *p }
  583. func AssignShlInt32(p *int32, v int) int32 { *p <<= v; return *p }
  584. func AssignShlInt64(p *int64, v int) int64 { *p <<= v; return *p }
  585. func AssignShlUint8(p *uint8, v int) uint8 { *p <<= v; return *p }
  586. func AssignShlUint16(p *uint16, v int) uint16 { *p <<= v; return *p }
  587. func AssignShlUint32(p *uint32, v int) uint32 { *p <<= v; return *p }
  588. func AssignShlUint64(p *uint64, v int) uint64 { *p <<= v; return *p }
  589. func AssignShlUintptr(p *uintptr, v int) uintptr { *p <<= v; return *p }
  590. func AssignShrInt8(p *int8, v int) int8 { *p >>= v; return *p }
  591. func AssignShrInt16(p *int16, v int) int16 { *p >>= v; return *p }
  592. func AssignShrInt32(p *int32, v int) int32 { *p >>= v; return *p }
  593. func AssignShrInt64(p *int64, v int) int64 { *p >>= v; return *p }
  594. func AssignShrUint8(p *uint8, v int) uint8 { *p >>= v; return *p }
  595. func AssignShrUint16(p *uint16, v int) uint16 { *p >>= v; return *p }
  596. func AssignShrUint32(p *uint32, v int) uint32 { *p >>= v; return *p }
  597. func AssignShrUint64(p *uint64, v int) uint64 { *p >>= v; return *p }
  598. func AssignShrUintptr(p *uintptr, v int) uintptr { *p >>= v; return *p }
  599. func PreIncInt8(p *int8, d int8) int8 { *p += d; return *p }
  600. func PreIncInt16(p *int16, d int16) int16 { *p += d; return *p }
  601. func PreIncInt32(p *int32, d int32) int32 { *p += d; return *p }
  602. func PreIncInt64(p *int64, d int64) int64 { *p += d; return *p }
  603. func PreIncUint8(p *uint8, d uint8) uint8 { *p += d; return *p }
  604. func PreIncUint16(p *uint16, d uint16) uint16 { *p += d; return *p }
  605. func PreIncUint32(p *uint32, d uint32) uint32 { *p += d; return *p }
  606. func PreIncUint64(p *uint64, d uint64) uint64 { *p += d; return *p }
  607. func PreIncFloat32(p *float32, d float32) float32 { *p += d; return *p }
  608. func PreIncFloat64(p *float64, d float64) float64 { *p += d; return *p }
  609. func PreIncComplex64(p *complex64, d complex64) complex64 { *p += d; return *p }
  610. func PreIncComplex128(p *complex128, d complex128) complex128 { *p += d; return *p }
  611. func PreIncUintptr(p *uintptr, d uintptr) uintptr { *p += d; return *p }
  612. func PreIncAtomicInt32(p *int32, d int32) int32 { return atomic.AddInt32(p, d) }
  613. func PreIncAtomicInt64(p *int64, d int64) int64 { return atomic.AddInt64(p, d) }
  614. func PreIncAtomicUint32(p *uint32, d uint32) uint32 { return atomic.AddUint32(p, d) }
  615. func PreIncAtomicUint64(p *uint64, d uint64) uint64 { return atomic.AddUint64(p, d) }
  616. func PreIncAtomicUintptr(p *uintptr, d uintptr) uintptr { return atomic.AddUintptr(p, d) }
  617. func PreDecInt8(p *int8, d int8) int8 { *p -= d; return *p }
  618. func PreDecInt16(p *int16, d int16) int16 { *p -= d; return *p }
  619. func PreDecInt32(p *int32, d int32) int32 { *p -= d; return *p }
  620. func PreDecInt64(p *int64, d int64) int64 { *p -= d; return *p }
  621. func PreDecUint8(p *uint8, d uint8) uint8 { *p -= d; return *p }
  622. func PreDecUint16(p *uint16, d uint16) uint16 { *p -= d; return *p }
  623. func PreDecUint32(p *uint32, d uint32) uint32 { *p -= d; return *p }
  624. func PreDecUint64(p *uint64, d uint64) uint64 { *p -= d; return *p }
  625. func PreDecFloat32(p *float32, d float32) float32 { *p -= d; return *p }
  626. func PreDecFloat64(p *float64, d float64) float64 { *p -= d; return *p }
  627. func PreDecComplex64(p *complex64, d complex64) complex64 { *p -= d; return *p }
  628. func PreDecComplex128(p *complex128, d complex128) complex128 { *p -= d; return *p }
  629. func PreDecUintptr(p *uintptr, d uintptr) uintptr { *p -= d; return *p }
  630. func PreDecAtomicInt32(p *int32, d int32) int32 { return atomic.AddInt32(p, -d) }
  631. func PreDecAtomicInt64(p *int64, d int64) int64 { return atomic.AddInt64(p, -d) }
  632. func PreDecAtomicUint32(p *uint32, d uint32) uint32 { return atomic.AddUint32(p, -d) }
  633. func PreDecAtomicUint64(p *uint64, d uint64) uint64 { return atomic.AddUint64(p, -d) }
  634. func PreDecAtomicUintptr(p *uintptr, d uintptr) uintptr { return atomic.AddUintptr(p, -d) }
  635. func PostIncInt8(p *int8, d int8) int8 { r := *p; *p += d; return r }
  636. func PostIncInt16(p *int16, d int16) int16 { r := *p; *p += d; return r }
  637. func PostIncInt32(p *int32, d int32) int32 { r := *p; *p += d; return r }
  638. func PostIncInt64(p *int64, d int64) int64 { r := *p; *p += d; return r }
  639. func PostIncUint8(p *uint8, d uint8) uint8 { r := *p; *p += d; return r }
  640. func PostIncUint16(p *uint16, d uint16) uint16 { r := *p; *p += d; return r }
  641. func PostIncUint32(p *uint32, d uint32) uint32 { r := *p; *p += d; return r }
  642. func PostIncUint64(p *uint64, d uint64) uint64 { r := *p; *p += d; return r }
  643. func PostIncFloat32(p *float32, d float32) float32 { r := *p; *p += d; return r }
  644. func PostIncFloat64(p *float64, d float64) float64 { r := *p; *p += d; return r }
  645. func PostIncComplex64(p *complex64, d complex64) complex64 { r := *p; *p += d; return r }
  646. func PostIncComplex128(p *complex128, d complex128) complex128 { r := *p; *p += d; return r }
  647. func PostIncUintptr(p *uintptr, d uintptr) uintptr { r := *p; *p += d; return r }
  648. func PostIncAtomicInt32(p *int32, d int32) int32 { return atomic.AddInt32(p, d) - d }
  649. func PostIncAtomicInt64(p *int64, d int64) int64 { return atomic.AddInt64(p, d) - d }
  650. func PostIncAtomicUint32(p *uint32, d uint32) uint32 { return atomic.AddUint32(p, d) - d }
  651. func PostIncAtomicUint64(p *uint64, d uint64) uint64 { return atomic.AddUint64(p, d) - d }
  652. func PostIncAtomicUintptr(p *uintptr, d uintptr) uintptr { return atomic.AddUintptr(p, d) - d }
  653. func PostDecInt8(p *int8, d int8) int8 { r := *p; *p -= d; return r }
  654. func PostDecInt16(p *int16, d int16) int16 { r := *p; *p -= d; return r }
  655. func PostDecInt32(p *int32, d int32) int32 { r := *p; *p -= d; return r }
  656. func PostDecInt64(p *int64, d int64) int64 { r := *p; *p -= d; return r }
  657. func PostDecUint8(p *uint8, d uint8) uint8 { r := *p; *p -= d; return r }
  658. func PostDecUint16(p *uint16, d uint16) uint16 { r := *p; *p -= d; return r }
  659. func PostDecUint32(p *uint32, d uint32) uint32 { r := *p; *p -= d; return r }
  660. func PostDecUint64(p *uint64, d uint64) uint64 { r := *p; *p -= d; return r }
  661. func PostDecFloat32(p *float32, d float32) float32 { r := *p; *p -= d; return r }
  662. func PostDecFloat64(p *float64, d float64) float64 { r := *p; *p -= d; return r }
  663. func PostDecComplex64(p *complex64, d complex64) complex64 { r := *p; *p -= d; return r }
  664. func PostDecComplex128(p *complex128, d complex128) complex128 { r := *p; *p -= d; return r }
  665. func PostDecUintptr(p *uintptr, d uintptr) uintptr { r := *p; *p -= d; return r }
  666. func PostDecAtomicInt32(p *int32, d int32) int32 { return atomic.AddInt32(p, -d) + d }
  667. func PostDecAtomicInt64(p *int64, d int64) int64 { return atomic.AddInt64(p, -d) + d }
  668. func PostDecAtomicUint32(p *uint32, d uint32) uint32 { return atomic.AddUint32(p, -d) + d }
  669. func PostDecAtomicUint64(p *uint64, d uint64) uint64 { return atomic.AddUint64(p, -d) + d }
  670. func PostDecAtomicUintptr(p *uintptr, d uintptr) uintptr { return atomic.AddUintptr(p, -d) + d }
  671. func Int8FromInt8(n int8) int8 { return int8(n) }
  672. func Int8FromInt16(n int16) int8 { return int8(n) }
  673. func Int8FromInt32(n int32) int8 { return int8(n) }
  674. func Int8FromInt64(n int64) int8 { return int8(n) }
  675. func Int8FromUint8(n uint8) int8 { return int8(n) }
  676. func Int8FromUint16(n uint16) int8 { return int8(n) }
  677. func Int8FromUint32(n uint32) int8 { return int8(n) }
  678. func Int8FromUint64(n uint64) int8 { return int8(n) }
  679. func Int8FromFloat32(n float32) int8 { return int8(n) }
  680. func Int8FromFloat64(n float64) int8 { return int8(n) }
  681. func Int8FromComplex64(n complex64) int8 { return int8(real(n)) }
  682. func Int8FromComplex128(n complex128) int8 { return int8(real(n)) }
  683. func Int8FromUintptr(n uintptr) int8 { return int8(n) }
  684. func Int16FromInt8(n int8) int16 { return int16(n) }
  685. func Int16FromInt16(n int16) int16 { return int16(n) }
  686. func Int16FromInt32(n int32) int16 { return int16(n) }
  687. func Int16FromInt64(n int64) int16 { return int16(n) }
  688. func Int16FromUint8(n uint8) int16 { return int16(n) }
  689. func Int16FromUint16(n uint16) int16 { return int16(n) }
  690. func Int16FromUint32(n uint32) int16 { return int16(n) }
  691. func Int16FromUint64(n uint64) int16 { return int16(n) }
  692. func Int16FromFloat32(n float32) int16 { return int16(n) }
  693. func Int16FromFloat64(n float64) int16 { return int16(n) }
  694. func Int16FromComplex64(n complex64) int16 { return int16(real(n)) }
  695. func Int16FromComplex128(n complex128) int16 { return int16(real(n)) }
  696. func Int16FromUintptr(n uintptr) int16 { return int16(n) }
  697. func Int32FromInt8(n int8) int32 { return int32(n) }
  698. func Int32FromInt16(n int16) int32 { return int32(n) }
  699. func Int32FromInt32(n int32) int32 { return int32(n) }
  700. func Int32FromInt64(n int64) int32 { return int32(n) }
  701. func Int32FromUint8(n uint8) int32 { return int32(n) }
  702. func Int32FromUint16(n uint16) int32 { return int32(n) }
  703. func Int32FromUint32(n uint32) int32 { return int32(n) }
  704. func Int32FromUint64(n uint64) int32 { return int32(n) }
  705. func Int32FromFloat32(n float32) int32 { return int32(n) }
  706. func Int32FromFloat64(n float64) int32 { return int32(n) }
  707. func Int32FromComplex64(n complex64) int32 { return int32(real(n)) }
  708. func Int32FromComplex128(n complex128) int32 { return int32(real(n)) }
  709. func Int32FromUintptr(n uintptr) int32 { return int32(n) }
  710. func Int64FromInt8(n int8) int64 { return int64(n) }
  711. func Int64FromInt16(n int16) int64 { return int64(n) }
  712. func Int64FromInt32(n int32) int64 { return int64(n) }
  713. func Int64FromInt64(n int64) int64 { return int64(n) }
  714. func Int64FromUint8(n uint8) int64 { return int64(n) }
  715. func Int64FromUint16(n uint16) int64 { return int64(n) }
  716. func Int64FromUint32(n uint32) int64 { return int64(n) }
  717. func Int64FromUint64(n uint64) int64 { return int64(n) }
  718. func Int64FromFloat32(n float32) int64 { return int64(n) }
  719. func Int64FromFloat64(n float64) int64 { return int64(n) }
  720. func Int64FromComplex64(n complex64) int64 { return int64(real(n)) }
  721. func Int64FromComplex128(n complex128) int64 { return int64(real(n)) }
  722. func Int64FromUintptr(n uintptr) int64 { return int64(n) }
  723. func Uint8FromInt8(n int8) uint8 { return uint8(n) }
  724. func Uint8FromInt16(n int16) uint8 { return uint8(n) }
  725. func Uint8FromInt32(n int32) uint8 { return uint8(n) }
  726. func Uint8FromInt64(n int64) uint8 { return uint8(n) }
  727. func Uint8FromUint8(n uint8) uint8 { return uint8(n) }
  728. func Uint8FromUint16(n uint16) uint8 { return uint8(n) }
  729. func Uint8FromUint32(n uint32) uint8 { return uint8(n) }
  730. func Uint8FromUint64(n uint64) uint8 { return uint8(n) }
  731. func Uint8FromFloat32(n float32) uint8 { return uint8(n) }
  732. func Uint8FromFloat64(n float64) uint8 { return uint8(n) }
  733. func Uint8FromComplex64(n complex64) uint8 { return uint8(real(n)) }
  734. func Uint8FromComplex128(n complex128) uint8 { return uint8(real(n)) }
  735. func Uint8FromUintptr(n uintptr) uint8 { return uint8(n) }
  736. func Uint16FromInt8(n int8) uint16 { return uint16(n) }
  737. func Uint16FromInt16(n int16) uint16 { return uint16(n) }
  738. func Uint16FromInt32(n int32) uint16 { return uint16(n) }
  739. func Uint16FromInt64(n int64) uint16 { return uint16(n) }
  740. func Uint16FromUint8(n uint8) uint16 { return uint16(n) }
  741. func Uint16FromUint16(n uint16) uint16 { return uint16(n) }
  742. func Uint16FromUint32(n uint32) uint16 { return uint16(n) }
  743. func Uint16FromUint64(n uint64) uint16 { return uint16(n) }
  744. func Uint16FromFloat32(n float32) uint16 { return uint16(n) }
  745. func Uint16FromFloat64(n float64) uint16 { return uint16(n) }
  746. func Uint16FromComplex64(n complex64) uint16 { return uint16(real(n)) }
  747. func Uint16FromComplex128(n complex128) uint16 { return uint16(real(n)) }
  748. func Uint16FromUintptr(n uintptr) uint16 { return uint16(n) }
  749. func Uint32FromInt8(n int8) uint32 { return uint32(n) }
  750. func Uint32FromInt16(n int16) uint32 { return uint32(n) }
  751. func Uint32FromInt32(n int32) uint32 { return uint32(n) }
  752. func Uint32FromInt64(n int64) uint32 { return uint32(n) }
  753. func Uint32FromUint8(n uint8) uint32 { return uint32(n) }
  754. func Uint32FromUint16(n uint16) uint32 { return uint32(n) }
  755. func Uint32FromUint32(n uint32) uint32 { return uint32(n) }
  756. func Uint32FromUint64(n uint64) uint32 { return uint32(n) }
  757. func Uint32FromFloat32(n float32) uint32 { return uint32(n) }
  758. func Uint32FromFloat64(n float64) uint32 { return uint32(n) }
  759. func Uint32FromComplex64(n complex64) uint32 { return uint32(real(n)) }
  760. func Uint32FromComplex128(n complex128) uint32 { return uint32(real(n)) }
  761. func Uint32FromUintptr(n uintptr) uint32 { return uint32(n) }
  762. func Uint64FromInt8(n int8) uint64 { return uint64(n) }
  763. func Uint64FromInt16(n int16) uint64 { return uint64(n) }
  764. func Uint64FromInt32(n int32) uint64 { return uint64(n) }
  765. func Uint64FromInt64(n int64) uint64 { return uint64(n) }
  766. func Uint64FromUint8(n uint8) uint64 { return uint64(n) }
  767. func Uint64FromUint16(n uint16) uint64 { return uint64(n) }
  768. func Uint64FromUint32(n uint32) uint64 { return uint64(n) }
  769. func Uint64FromUint64(n uint64) uint64 { return uint64(n) }
  770. func Uint64FromFloat32(n float32) uint64 { return uint64(n) }
  771. func Uint64FromFloat64(n float64) uint64 { return uint64(n) }
  772. func Uint64FromComplex64(n complex64) uint64 { return uint64(real(n)) }
  773. func Uint64FromComplex128(n complex128) uint64 { return uint64(real(n)) }
  774. func Uint64FromUintptr(n uintptr) uint64 { return uint64(n) }
  775. func Float32FromInt8(n int8) float32 { return float32(n) }
  776. func Float32FromInt16(n int16) float32 { return float32(n) }
  777. func Float32FromInt32(n int32) float32 { return float32(n) }
  778. func Float32FromInt64(n int64) float32 { return float32(n) }
  779. func Float32FromUint8(n uint8) float32 { return float32(n) }
  780. func Float32FromUint16(n uint16) float32 { return float32(n) }
  781. func Float32FromUint32(n uint32) float32 { return float32(n) }
  782. func Float32FromUint64(n uint64) float32 { return float32(n) }
  783. func Float32FromFloat32(n float32) float32 { return float32(n) }
  784. func Float32FromFloat64(n float64) float32 { return float32(n) }
  785. func Float32FromComplex64(n complex64) float32 { return float32(real(n)) }
  786. func Float32FromComplex128(n complex128) float32 { return float32(real(n)) }
  787. func Float32FromUintptr(n uintptr) float32 { return float32(n) }
  788. func Float64FromInt8(n int8) float64 { return float64(n) }
  789. func Float64FromInt16(n int16) float64 { return float64(n) }
  790. func Float64FromInt32(n int32) float64 { return float64(n) }
  791. func Float64FromInt64(n int64) float64 { return float64(n) }
  792. func Float64FromUint8(n uint8) float64 { return float64(n) }
  793. func Float64FromUint16(n uint16) float64 { return float64(n) }
  794. func Float64FromUint32(n uint32) float64 { return float64(n) }
  795. func Float64FromUint64(n uint64) float64 { return float64(n) }
  796. func Float64FromFloat32(n float32) float64 { return float64(n) }
  797. func Float64FromFloat64(n float64) float64 { return float64(n) }
  798. func Float64FromComplex64(n complex64) float64 { return float64(real(n)) }
  799. func Float64FromComplex128(n complex128) float64 { return float64(real(n)) }
  800. func Float64FromUintptr(n uintptr) float64 { return float64(n) }
  801. func Complex64FromInt8(n int8) complex64 { return complex64(complex(float32(n), 0)) }
  802. func Complex64FromInt16(n int16) complex64 { return complex64(complex(float32(n), 0)) }
  803. func Complex64FromInt32(n int32) complex64 { return complex64(complex(float32(n), 0)) }
  804. func Complex64FromInt64(n int64) complex64 { return complex64(complex(float32(n), 0)) }
  805. func Complex64FromUint8(n uint8) complex64 { return complex64(complex(float32(n), 0)) }
  806. func Complex64FromUint16(n uint16) complex64 { return complex64(complex(float32(n), 0)) }
  807. func Complex64FromUint32(n uint32) complex64 { return complex64(complex(float32(n), 0)) }
  808. func Complex64FromUint64(n uint64) complex64 { return complex64(complex(float32(n), 0)) }
  809. func Complex64FromFloat32(n float32) complex64 { return complex64(complex(float32(n), 0)) }
  810. func Complex64FromFloat64(n float64) complex64 { return complex64(complex(float32(n), 0)) }
  811. func Complex64FromComplex64(n complex64) complex64 { return complex64(n) }
  812. func Complex64FromComplex128(n complex128) complex64 { return complex64(n) }
  813. func Complex64FromUintptr(n uintptr) complex64 { return complex64(complex(float32(n), 0)) }
  814. func Complex128FromInt8(n int8) complex128 { return complex128(complex(float64(n), 0)) }
  815. func Complex128FromInt16(n int16) complex128 { return complex128(complex(float64(n), 0)) }
  816. func Complex128FromInt32(n int32) complex128 { return complex128(complex(float64(n), 0)) }
  817. func Complex128FromInt64(n int64) complex128 { return complex128(complex(float64(n), 0)) }
  818. func Complex128FromUint8(n uint8) complex128 { return complex128(complex(float64(n), 0)) }
  819. func Complex128FromUint16(n uint16) complex128 { return complex128(complex(float64(n), 0)) }
  820. func Complex128FromUint32(n uint32) complex128 { return complex128(complex(float64(n), 0)) }
  821. func Complex128FromUint64(n uint64) complex128 { return complex128(complex(float64(n), 0)) }
  822. func Complex128FromFloat32(n float32) complex128 { return complex128(complex(float64(n), 0)) }
  823. func Complex128FromFloat64(n float64) complex128 { return complex128(complex(float64(n), 0)) }
  824. func Complex128FromComplex64(n complex64) complex128 { return complex128(n) }
  825. func Complex128FromComplex128(n complex128) complex128 { return complex128(n) }
  826. func Complex128FromUintptr(n uintptr) complex128 { return complex128(complex(float64(n), 0)) }
  827. func UintptrFromInt8(n int8) uintptr { return uintptr(n) }
  828. func UintptrFromInt16(n int16) uintptr { return uintptr(n) }
  829. func UintptrFromInt32(n int32) uintptr { return uintptr(n) }
  830. func UintptrFromInt64(n int64) uintptr { return uintptr(n) }
  831. func UintptrFromUint8(n uint8) uintptr { return uintptr(n) }
  832. func UintptrFromUint16(n uint16) uintptr { return uintptr(n) }
  833. func UintptrFromUint32(n uint32) uintptr { return uintptr(n) }
  834. func UintptrFromUint64(n uint64) uintptr { return uintptr(n) }
  835. func UintptrFromFloat32(n float32) uintptr { return uintptr(n) }
  836. func UintptrFromFloat64(n float64) uintptr { return uintptr(n) }
  837. func UintptrFromComplex64(n complex64) uintptr { return uintptr(real(n)) }
  838. func UintptrFromComplex128(n complex128) uintptr { return uintptr(real(n)) }
  839. func UintptrFromUintptr(n uintptr) uintptr { return uintptr(n) }
  840. func Int8(n int8) int8 { return n }
  841. func Int16(n int16) int16 { return n }
  842. func Int32(n int32) int32 { return n }
  843. func Int64(n int64) int64 { return n }
  844. func Uint8(n uint8) uint8 { return n }
  845. func Uint16(n uint16) uint16 { return n }
  846. func Uint32(n uint32) uint32 { return n }
  847. func Uint64(n uint64) uint64 { return n }
  848. func Float32(n float32) float32 { return n }
  849. func Float64(n float64) float64 { return n }
  850. func Complex64(n complex64) complex64 { return n }
  851. func Complex128(n complex128) complex128 { return n }
  852. func Uintptr(n uintptr) uintptr { return n }
  853. func NegInt8(n int8) int8 { return -n }
  854. func NegInt16(n int16) int16 { return -n }
  855. func NegInt32(n int32) int32 { return -n }
  856. func NegInt64(n int64) int64 { return -n }
  857. func NegUint8(n uint8) uint8 { return -n }
  858. func NegUint16(n uint16) uint16 { return -n }
  859. func NegUint32(n uint32) uint32 { return -n }
  860. func NegUint64(n uint64) uint64 { return -n }
  861. func NegUintptr(n uintptr) uintptr { return -n }
  862. func CplInt8(n int8) int8 { return ^n }
  863. func CplInt16(n int16) int16 { return ^n }
  864. func CplInt32(n int32) int32 { return ^n }
  865. func CplInt64(n int64) int64 { return ^n }
  866. func CplUint8(n uint8) uint8 { return ^n }
  867. func CplUint16(n uint16) uint16 { return ^n }
  868. func CplUint32(n uint32) uint32 { return ^n }
  869. func CplUint64(n uint64) uint64 { return ^n }
  870. func CplUintptr(n uintptr) uintptr { return ^n }
  871. func BoolInt8(b bool) int8 {
  872. if b {
  873. return 1
  874. }
  875. return 0
  876. }
  877. func BoolInt16(b bool) int16 {
  878. if b {
  879. return 1
  880. }
  881. return 0
  882. }
  883. func BoolInt32(b bool) int32 {
  884. if b {
  885. return 1
  886. }
  887. return 0
  888. }
  889. func BoolInt64(b bool) int64 {
  890. if b {
  891. return 1
  892. }
  893. return 0
  894. }
  895. func BoolUint8(b bool) uint8 {
  896. if b {
  897. return 1
  898. }
  899. return 0
  900. }
  901. func BoolUint16(b bool) uint16 {
  902. if b {
  903. return 1
  904. }
  905. return 0
  906. }
  907. func BoolUint32(b bool) uint32 {
  908. if b {
  909. return 1
  910. }
  911. return 0
  912. }
  913. func BoolUint64(b bool) uint64 {
  914. if b {
  915. return 1
  916. }
  917. return 0
  918. }
  919. func BoolUintptr(b bool) uintptr {
  920. if b {
  921. return 1
  922. }
  923. return 0
  924. }
  925. func SetBitFieldPtr8Int8(p uintptr, v int8, off int, mask uint8) {
  926. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  927. }
  928. func SetBitFieldPtr8Int16(p uintptr, v int16, off int, mask uint8) {
  929. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  930. }
  931. func SetBitFieldPtr8Int32(p uintptr, v int32, off int, mask uint8) {
  932. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  933. }
  934. func SetBitFieldPtr8Int64(p uintptr, v int64, off int, mask uint8) {
  935. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  936. }
  937. func SetBitFieldPtr8Uint8(p uintptr, v uint8, off int, mask uint8) {
  938. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  939. }
  940. func SetBitFieldPtr8Uint16(p uintptr, v uint16, off int, mask uint8) {
  941. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  942. }
  943. func SetBitFieldPtr8Uint32(p uintptr, v uint32, off int, mask uint8) {
  944. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  945. }
  946. func SetBitFieldPtr8Uint64(p uintptr, v uint64, off int, mask uint8) {
  947. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  948. }
  949. func SetBitFieldPtr16Int8(p uintptr, v int8, off int, mask uint16) {
  950. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  951. }
  952. func SetBitFieldPtr16Int16(p uintptr, v int16, off int, mask uint16) {
  953. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  954. }
  955. func SetBitFieldPtr16Int32(p uintptr, v int32, off int, mask uint16) {
  956. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  957. }
  958. func SetBitFieldPtr16Int64(p uintptr, v int64, off int, mask uint16) {
  959. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  960. }
  961. func SetBitFieldPtr16Uint8(p uintptr, v uint8, off int, mask uint16) {
  962. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  963. }
  964. func SetBitFieldPtr16Uint16(p uintptr, v uint16, off int, mask uint16) {
  965. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  966. }
  967. func SetBitFieldPtr16Uint32(p uintptr, v uint32, off int, mask uint16) {
  968. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  969. }
  970. func SetBitFieldPtr16Uint64(p uintptr, v uint64, off int, mask uint16) {
  971. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  972. }
  973. func SetBitFieldPtr32Int8(p uintptr, v int8, off int, mask uint32) {
  974. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  975. }
  976. func SetBitFieldPtr32Int16(p uintptr, v int16, off int, mask uint32) {
  977. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  978. }
  979. func SetBitFieldPtr32Int32(p uintptr, v int32, off int, mask uint32) {
  980. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  981. }
  982. func SetBitFieldPtr32Int64(p uintptr, v int64, off int, mask uint32) {
  983. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  984. }
  985. func SetBitFieldPtr32Uint8(p uintptr, v uint8, off int, mask uint32) {
  986. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  987. }
  988. func SetBitFieldPtr32Uint16(p uintptr, v uint16, off int, mask uint32) {
  989. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  990. }
  991. func SetBitFieldPtr32Uint32(p uintptr, v uint32, off int, mask uint32) {
  992. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  993. }
  994. func SetBitFieldPtr32Uint64(p uintptr, v uint64, off int, mask uint32) {
  995. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  996. }
  997. func SetBitFieldPtr64Int8(p uintptr, v int8, off int, mask uint64) {
  998. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  999. }
  1000. func SetBitFieldPtr64Int16(p uintptr, v int16, off int, mask uint64) {
  1001. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1002. }
  1003. func SetBitFieldPtr64Int32(p uintptr, v int32, off int, mask uint64) {
  1004. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1005. }
  1006. func SetBitFieldPtr64Int64(p uintptr, v int64, off int, mask uint64) {
  1007. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1008. }
  1009. func SetBitFieldPtr64Uint8(p uintptr, v uint8, off int, mask uint64) {
  1010. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1011. }
  1012. func SetBitFieldPtr64Uint16(p uintptr, v uint16, off int, mask uint64) {
  1013. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1014. }
  1015. func SetBitFieldPtr64Uint32(p uintptr, v uint32, off int, mask uint64) {
  1016. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1017. }
  1018. func SetBitFieldPtr64Uint64(p uintptr, v uint64, off int, mask uint64) {
  1019. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1020. }
  1021. func AssignBitFieldPtr8Int8(p uintptr, v int8, w, off int, mask uint8) int8 {
  1022. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  1023. s := 8 - w
  1024. return v << s >> s
  1025. }
  1026. func AssignBitFieldPtr8Int16(p uintptr, v int16, w, off int, mask uint8) int16 {
  1027. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  1028. s := 16 - w
  1029. return v << s >> s
  1030. }
  1031. func AssignBitFieldPtr8Int32(p uintptr, v int32, w, off int, mask uint8) int32 {
  1032. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  1033. s := 32 - w
  1034. return v << s >> s
  1035. }
  1036. func AssignBitFieldPtr8Int64(p uintptr, v int64, w, off int, mask uint8) int64 {
  1037. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  1038. s := 64 - w
  1039. return v << s >> s
  1040. }
  1041. func AssignBitFieldPtr16Int8(p uintptr, v int8, w, off int, mask uint16) int8 {
  1042. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  1043. s := 8 - w
  1044. return v << s >> s
  1045. }
  1046. func AssignBitFieldPtr16Int16(p uintptr, v int16, w, off int, mask uint16) int16 {
  1047. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  1048. s := 16 - w
  1049. return v << s >> s
  1050. }
  1051. func AssignBitFieldPtr16Int32(p uintptr, v int32, w, off int, mask uint16) int32 {
  1052. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  1053. s := 32 - w
  1054. return v << s >> s
  1055. }
  1056. func AssignBitFieldPtr16Int64(p uintptr, v int64, w, off int, mask uint16) int64 {
  1057. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  1058. s := 64 - w
  1059. return v << s >> s
  1060. }
  1061. func AssignBitFieldPtr32Int8(p uintptr, v int8, w, off int, mask uint32) int8 {
  1062. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  1063. s := 8 - w
  1064. return v << s >> s
  1065. }
  1066. func AssignBitFieldPtr32Int16(p uintptr, v int16, w, off int, mask uint32) int16 {
  1067. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  1068. s := 16 - w
  1069. return v << s >> s
  1070. }
  1071. func AssignBitFieldPtr32Int32(p uintptr, v int32, w, off int, mask uint32) int32 {
  1072. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  1073. s := 32 - w
  1074. return v << s >> s
  1075. }
  1076. func AssignBitFieldPtr32Int64(p uintptr, v int64, w, off int, mask uint32) int64 {
  1077. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  1078. s := 64 - w
  1079. return v << s >> s
  1080. }
  1081. func AssignBitFieldPtr64Int8(p uintptr, v int8, w, off int, mask uint64) int8 {
  1082. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1083. s := 8 - w
  1084. return v << s >> s
  1085. }
  1086. func AssignBitFieldPtr64Int16(p uintptr, v int16, w, off int, mask uint64) int16 {
  1087. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1088. s := 16 - w
  1089. return v << s >> s
  1090. }
  1091. func AssignBitFieldPtr64Int32(p uintptr, v int32, w, off int, mask uint64) int32 {
  1092. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1093. s := 32 - w
  1094. return v << s >> s
  1095. }
  1096. func AssignBitFieldPtr64Int64(p uintptr, v int64, w, off int, mask uint64) int64 {
  1097. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1098. s := 64 - w
  1099. return v << s >> s
  1100. }
  1101. func AssignBitFieldPtr8Uint8(p uintptr, v uint8, w, off int, mask uint8) uint8 {
  1102. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  1103. return v & uint8(mask>>off)
  1104. }
  1105. func AssignBitFieldPtr8Uint16(p uintptr, v uint16, w, off int, mask uint8) uint16 {
  1106. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  1107. return v & uint16(mask>>off)
  1108. }
  1109. func AssignBitFieldPtr8Uint32(p uintptr, v uint32, w, off int, mask uint8) uint32 {
  1110. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  1111. return v & uint32(mask>>off)
  1112. }
  1113. func AssignBitFieldPtr8Uint64(p uintptr, v uint64, w, off int, mask uint8) uint64 {
  1114. *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
  1115. return v & uint64(mask>>off)
  1116. }
  1117. func AssignBitFieldPtr16Uint8(p uintptr, v uint8, w, off int, mask uint16) uint8 {
  1118. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  1119. return v & uint8(mask>>off)
  1120. }
  1121. func AssignBitFieldPtr16Uint16(p uintptr, v uint16, w, off int, mask uint16) uint16 {
  1122. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  1123. return v & uint16(mask>>off)
  1124. }
  1125. func AssignBitFieldPtr16Uint32(p uintptr, v uint32, w, off int, mask uint16) uint32 {
  1126. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  1127. return v & uint32(mask>>off)
  1128. }
  1129. func AssignBitFieldPtr16Uint64(p uintptr, v uint64, w, off int, mask uint16) uint64 {
  1130. *(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
  1131. return v & uint64(mask>>off)
  1132. }
  1133. func AssignBitFieldPtr32Uint8(p uintptr, v uint8, w, off int, mask uint32) uint8 {
  1134. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  1135. return v & uint8(mask>>off)
  1136. }
  1137. func AssignBitFieldPtr32Uint16(p uintptr, v uint16, w, off int, mask uint32) uint16 {
  1138. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  1139. return v & uint16(mask>>off)
  1140. }
  1141. func AssignBitFieldPtr32Uint32(p uintptr, v uint32, w, off int, mask uint32) uint32 {
  1142. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  1143. return v & uint32(mask>>off)
  1144. }
  1145. func AssignBitFieldPtr32Uint64(p uintptr, v uint64, w, off int, mask uint32) uint64 {
  1146. *(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
  1147. return v & uint64(mask>>off)
  1148. }
  1149. func AssignBitFieldPtr64Uint8(p uintptr, v uint8, w, off int, mask uint64) uint8 {
  1150. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1151. return v & uint8(mask>>off)
  1152. }
  1153. func AssignBitFieldPtr64Uint16(p uintptr, v uint16, w, off int, mask uint64) uint16 {
  1154. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1155. return v & uint16(mask>>off)
  1156. }
  1157. func AssignBitFieldPtr64Uint32(p uintptr, v uint32, w, off int, mask uint64) uint32 {
  1158. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1159. return v & uint32(mask>>off)
  1160. }
  1161. func AssignBitFieldPtr64Uint64(p uintptr, v uint64, w, off int, mask uint64) uint64 {
  1162. *(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
  1163. return v & uint64(mask>>off)
  1164. }
  1165. func PostDecBitFieldPtr8Int8(p uintptr, d int8, w, off int, mask uint8) (r int8) {
  1166. x0 := *(*uint8)(unsafe.Pointer(p))
  1167. s := 8 - w - off
  1168. r = int8(x0) & int8(mask) << s >> (s + off)
  1169. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
  1170. return r
  1171. }
  1172. func PostDecBitFieldPtr8Int16(p uintptr, d int16, w, off int, mask uint8) (r int16) {
  1173. x0 := *(*uint8)(unsafe.Pointer(p))
  1174. s := 16 - w - off
  1175. r = int16(x0) & int16(mask) << s >> (s + off)
  1176. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
  1177. return r
  1178. }
  1179. func PostDecBitFieldPtr8Int32(p uintptr, d int32, w, off int, mask uint8) (r int32) {
  1180. x0 := *(*uint8)(unsafe.Pointer(p))
  1181. s := 32 - w - off
  1182. r = int32(x0) & int32(mask) << s >> (s + off)
  1183. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
  1184. return r
  1185. }
  1186. func PostDecBitFieldPtr8Int64(p uintptr, d int64, w, off int, mask uint8) (r int64) {
  1187. x0 := *(*uint8)(unsafe.Pointer(p))
  1188. s := 64 - w - off
  1189. r = int64(x0) & int64(mask) << s >> (s + off)
  1190. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
  1191. return r
  1192. }
  1193. func PostDecBitFieldPtr16Int8(p uintptr, d int8, w, off int, mask uint16) (r int8) {
  1194. x0 := *(*uint16)(unsafe.Pointer(p))
  1195. s := 8 - w - off
  1196. r = int8(x0) & int8(mask) << s >> (s + off)
  1197. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
  1198. return r
  1199. }
  1200. func PostDecBitFieldPtr16Int16(p uintptr, d int16, w, off int, mask uint16) (r int16) {
  1201. x0 := *(*uint16)(unsafe.Pointer(p))
  1202. s := 16 - w - off
  1203. r = int16(x0) & int16(mask) << s >> (s + off)
  1204. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
  1205. return r
  1206. }
  1207. func PostDecBitFieldPtr16Int32(p uintptr, d int32, w, off int, mask uint16) (r int32) {
  1208. x0 := *(*uint16)(unsafe.Pointer(p))
  1209. s := 32 - w - off
  1210. r = int32(x0) & int32(mask) << s >> (s + off)
  1211. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
  1212. return r
  1213. }
  1214. func PostDecBitFieldPtr16Int64(p uintptr, d int64, w, off int, mask uint16) (r int64) {
  1215. x0 := *(*uint16)(unsafe.Pointer(p))
  1216. s := 64 - w - off
  1217. r = int64(x0) & int64(mask) << s >> (s + off)
  1218. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
  1219. return r
  1220. }
  1221. func PostDecBitFieldPtr32Int8(p uintptr, d int8, w, off int, mask uint32) (r int8) {
  1222. x0 := *(*uint32)(unsafe.Pointer(p))
  1223. s := 8 - w - off
  1224. r = int8(x0) & int8(mask) << s >> (s + off)
  1225. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
  1226. return r
  1227. }
  1228. func PostDecBitFieldPtr32Int16(p uintptr, d int16, w, off int, mask uint32) (r int16) {
  1229. x0 := *(*uint32)(unsafe.Pointer(p))
  1230. s := 16 - w - off
  1231. r = int16(x0) & int16(mask) << s >> (s + off)
  1232. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
  1233. return r
  1234. }
  1235. func PostDecBitFieldPtr32Int32(p uintptr, d int32, w, off int, mask uint32) (r int32) {
  1236. x0 := *(*uint32)(unsafe.Pointer(p))
  1237. s := 32 - w - off
  1238. r = int32(x0) & int32(mask) << s >> (s + off)
  1239. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
  1240. return r
  1241. }
  1242. func PostDecBitFieldPtr32Int64(p uintptr, d int64, w, off int, mask uint32) (r int64) {
  1243. x0 := *(*uint32)(unsafe.Pointer(p))
  1244. s := 64 - w - off
  1245. r = int64(x0) & int64(mask) << s >> (s + off)
  1246. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
  1247. return r
  1248. }
  1249. func PostDecBitFieldPtr64Int8(p uintptr, d int8, w, off int, mask uint64) (r int8) {
  1250. x0 := *(*uint64)(unsafe.Pointer(p))
  1251. s := 8 - w - off
  1252. r = int8(x0) & int8(mask) << s >> (s + off)
  1253. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
  1254. return r
  1255. }
  1256. func PostDecBitFieldPtr64Int16(p uintptr, d int16, w, off int, mask uint64) (r int16) {
  1257. x0 := *(*uint64)(unsafe.Pointer(p))
  1258. s := 16 - w - off
  1259. r = int16(x0) & int16(mask) << s >> (s + off)
  1260. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
  1261. return r
  1262. }
  1263. func PostDecBitFieldPtr64Int32(p uintptr, d int32, w, off int, mask uint64) (r int32) {
  1264. x0 := *(*uint64)(unsafe.Pointer(p))
  1265. s := 32 - w - off
  1266. r = int32(x0) & int32(mask) << s >> (s + off)
  1267. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
  1268. return r
  1269. }
  1270. func PostDecBitFieldPtr64Int64(p uintptr, d int64, w, off int, mask uint64) (r int64) {
  1271. x0 := *(*uint64)(unsafe.Pointer(p))
  1272. s := 64 - w - off
  1273. r = int64(x0) & int64(mask) << s >> (s + off)
  1274. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
  1275. return r
  1276. }
  1277. func PostDecBitFieldPtr8Uint8(p uintptr, d uint8, w, off int, mask uint8) (r uint8) {
  1278. x0 := *(*uint8)(unsafe.Pointer(p))
  1279. r = uint8(x0) & uint8(mask) >> off
  1280. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
  1281. return r
  1282. }
  1283. func PostDecBitFieldPtr8Uint16(p uintptr, d uint16, w, off int, mask uint8) (r uint16) {
  1284. x0 := *(*uint8)(unsafe.Pointer(p))
  1285. r = uint16(x0) & uint16(mask) >> off
  1286. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
  1287. return r
  1288. }
  1289. func PostDecBitFieldPtr8Uint32(p uintptr, d uint32, w, off int, mask uint8) (r uint32) {
  1290. x0 := *(*uint8)(unsafe.Pointer(p))
  1291. r = uint32(x0) & uint32(mask) >> off
  1292. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
  1293. return r
  1294. }
  1295. func PostDecBitFieldPtr8Uint64(p uintptr, d uint64, w, off int, mask uint8) (r uint64) {
  1296. x0 := *(*uint8)(unsafe.Pointer(p))
  1297. r = uint64(x0) & uint64(mask) >> off
  1298. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
  1299. return r
  1300. }
  1301. func PostDecBitFieldPtr16Uint8(p uintptr, d uint8, w, off int, mask uint16) (r uint8) {
  1302. x0 := *(*uint16)(unsafe.Pointer(p))
  1303. r = uint8(x0) & uint8(mask) >> off
  1304. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
  1305. return r
  1306. }
  1307. func PostDecBitFieldPtr16Uint16(p uintptr, d uint16, w, off int, mask uint16) (r uint16) {
  1308. x0 := *(*uint16)(unsafe.Pointer(p))
  1309. r = uint16(x0) & uint16(mask) >> off
  1310. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
  1311. return r
  1312. }
  1313. func PostDecBitFieldPtr16Uint32(p uintptr, d uint32, w, off int, mask uint16) (r uint32) {
  1314. x0 := *(*uint16)(unsafe.Pointer(p))
  1315. r = uint32(x0) & uint32(mask) >> off
  1316. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
  1317. return r
  1318. }
  1319. func PostDecBitFieldPtr16Uint64(p uintptr, d uint64, w, off int, mask uint16) (r uint64) {
  1320. x0 := *(*uint16)(unsafe.Pointer(p))
  1321. r = uint64(x0) & uint64(mask) >> off
  1322. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
  1323. return r
  1324. }
  1325. func PostDecBitFieldPtr32Uint8(p uintptr, d uint8, w, off int, mask uint32) (r uint8) {
  1326. x0 := *(*uint32)(unsafe.Pointer(p))
  1327. r = uint8(x0) & uint8(mask) >> off
  1328. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
  1329. return r
  1330. }
  1331. func PostDecBitFieldPtr32Uint16(p uintptr, d uint16, w, off int, mask uint32) (r uint16) {
  1332. x0 := *(*uint32)(unsafe.Pointer(p))
  1333. r = uint16(x0) & uint16(mask) >> off
  1334. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
  1335. return r
  1336. }
  1337. func PostDecBitFieldPtr32Uint32(p uintptr, d uint32, w, off int, mask uint32) (r uint32) {
  1338. x0 := *(*uint32)(unsafe.Pointer(p))
  1339. r = uint32(x0) & uint32(mask) >> off
  1340. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
  1341. return r
  1342. }
  1343. func PostDecBitFieldPtr32Uint64(p uintptr, d uint64, w, off int, mask uint32) (r uint64) {
  1344. x0 := *(*uint32)(unsafe.Pointer(p))
  1345. r = uint64(x0) & uint64(mask) >> off
  1346. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
  1347. return r
  1348. }
  1349. func PostDecBitFieldPtr64Uint8(p uintptr, d uint8, w, off int, mask uint64) (r uint8) {
  1350. x0 := *(*uint64)(unsafe.Pointer(p))
  1351. r = uint8(x0) & uint8(mask) >> off
  1352. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
  1353. return r
  1354. }
  1355. func PostDecBitFieldPtr64Uint16(p uintptr, d uint16, w, off int, mask uint64) (r uint16) {
  1356. x0 := *(*uint64)(unsafe.Pointer(p))
  1357. r = uint16(x0) & uint16(mask) >> off
  1358. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
  1359. return r
  1360. }
  1361. func PostDecBitFieldPtr64Uint32(p uintptr, d uint32, w, off int, mask uint64) (r uint32) {
  1362. x0 := *(*uint64)(unsafe.Pointer(p))
  1363. r = uint32(x0) & uint32(mask) >> off
  1364. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
  1365. return r
  1366. }
  1367. func PostDecBitFieldPtr64Uint64(p uintptr, d uint64, w, off int, mask uint64) (r uint64) {
  1368. x0 := *(*uint64)(unsafe.Pointer(p))
  1369. r = uint64(x0) & uint64(mask) >> off
  1370. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
  1371. return r
  1372. }
  1373. func PostIncBitFieldPtr8Int8(p uintptr, d int8, w, off int, mask uint8) (r int8) {
  1374. x0 := *(*uint8)(unsafe.Pointer(p))
  1375. s := 8 - w - off
  1376. r = int8(x0) & int8(mask) << s >> (s + off)
  1377. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
  1378. return r
  1379. }
  1380. func PostIncBitFieldPtr8Int16(p uintptr, d int16, w, off int, mask uint8) (r int16) {
  1381. x0 := *(*uint8)(unsafe.Pointer(p))
  1382. s := 16 - w - off
  1383. r = int16(x0) & int16(mask) << s >> (s + off)
  1384. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
  1385. return r
  1386. }
  1387. func PostIncBitFieldPtr8Int32(p uintptr, d int32, w, off int, mask uint8) (r int32) {
  1388. x0 := *(*uint8)(unsafe.Pointer(p))
  1389. s := 32 - w - off
  1390. r = int32(x0) & int32(mask) << s >> (s + off)
  1391. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
  1392. return r
  1393. }
  1394. func PostIncBitFieldPtr8Int64(p uintptr, d int64, w, off int, mask uint8) (r int64) {
  1395. x0 := *(*uint8)(unsafe.Pointer(p))
  1396. s := 64 - w - off
  1397. r = int64(x0) & int64(mask) << s >> (s + off)
  1398. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
  1399. return r
  1400. }
  1401. func PostIncBitFieldPtr16Int8(p uintptr, d int8, w, off int, mask uint16) (r int8) {
  1402. x0 := *(*uint16)(unsafe.Pointer(p))
  1403. s := 8 - w - off
  1404. r = int8(x0) & int8(mask) << s >> (s + off)
  1405. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
  1406. return r
  1407. }
  1408. func PostIncBitFieldPtr16Int16(p uintptr, d int16, w, off int, mask uint16) (r int16) {
  1409. x0 := *(*uint16)(unsafe.Pointer(p))
  1410. s := 16 - w - off
  1411. r = int16(x0) & int16(mask) << s >> (s + off)
  1412. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
  1413. return r
  1414. }
  1415. func PostIncBitFieldPtr16Int32(p uintptr, d int32, w, off int, mask uint16) (r int32) {
  1416. x0 := *(*uint16)(unsafe.Pointer(p))
  1417. s := 32 - w - off
  1418. r = int32(x0) & int32(mask) << s >> (s + off)
  1419. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
  1420. return r
  1421. }
  1422. func PostIncBitFieldPtr16Int64(p uintptr, d int64, w, off int, mask uint16) (r int64) {
  1423. x0 := *(*uint16)(unsafe.Pointer(p))
  1424. s := 64 - w - off
  1425. r = int64(x0) & int64(mask) << s >> (s + off)
  1426. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
  1427. return r
  1428. }
  1429. func PostIncBitFieldPtr32Int8(p uintptr, d int8, w, off int, mask uint32) (r int8) {
  1430. x0 := *(*uint32)(unsafe.Pointer(p))
  1431. s := 8 - w - off
  1432. r = int8(x0) & int8(mask) << s >> (s + off)
  1433. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
  1434. return r
  1435. }
  1436. func PostIncBitFieldPtr32Int16(p uintptr, d int16, w, off int, mask uint32) (r int16) {
  1437. x0 := *(*uint32)(unsafe.Pointer(p))
  1438. s := 16 - w - off
  1439. r = int16(x0) & int16(mask) << s >> (s + off)
  1440. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
  1441. return r
  1442. }
  1443. func PostIncBitFieldPtr32Int32(p uintptr, d int32, w, off int, mask uint32) (r int32) {
  1444. x0 := *(*uint32)(unsafe.Pointer(p))
  1445. s := 32 - w - off
  1446. r = int32(x0) & int32(mask) << s >> (s + off)
  1447. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
  1448. return r
  1449. }
  1450. func PostIncBitFieldPtr32Int64(p uintptr, d int64, w, off int, mask uint32) (r int64) {
  1451. x0 := *(*uint32)(unsafe.Pointer(p))
  1452. s := 64 - w - off
  1453. r = int64(x0) & int64(mask) << s >> (s + off)
  1454. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
  1455. return r
  1456. }
  1457. func PostIncBitFieldPtr64Int8(p uintptr, d int8, w, off int, mask uint64) (r int8) {
  1458. x0 := *(*uint64)(unsafe.Pointer(p))
  1459. s := 8 - w - off
  1460. r = int8(x0) & int8(mask) << s >> (s + off)
  1461. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
  1462. return r
  1463. }
  1464. func PostIncBitFieldPtr64Int16(p uintptr, d int16, w, off int, mask uint64) (r int16) {
  1465. x0 := *(*uint64)(unsafe.Pointer(p))
  1466. s := 16 - w - off
  1467. r = int16(x0) & int16(mask) << s >> (s + off)
  1468. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
  1469. return r
  1470. }
  1471. func PostIncBitFieldPtr64Int32(p uintptr, d int32, w, off int, mask uint64) (r int32) {
  1472. x0 := *(*uint64)(unsafe.Pointer(p))
  1473. s := 32 - w - off
  1474. r = int32(x0) & int32(mask) << s >> (s + off)
  1475. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
  1476. return r
  1477. }
  1478. func PostIncBitFieldPtr64Int64(p uintptr, d int64, w, off int, mask uint64) (r int64) {
  1479. x0 := *(*uint64)(unsafe.Pointer(p))
  1480. s := 64 - w - off
  1481. r = int64(x0) & int64(mask) << s >> (s + off)
  1482. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
  1483. return r
  1484. }
  1485. func PostIncBitFieldPtr8Uint8(p uintptr, d uint8, w, off int, mask uint8) (r uint8) {
  1486. x0 := *(*uint8)(unsafe.Pointer(p))
  1487. r = uint8(x0) & uint8(mask) >> off
  1488. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
  1489. return r
  1490. }
  1491. func PostIncBitFieldPtr8Uint16(p uintptr, d uint16, w, off int, mask uint8) (r uint16) {
  1492. x0 := *(*uint8)(unsafe.Pointer(p))
  1493. r = uint16(x0) & uint16(mask) >> off
  1494. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
  1495. return r
  1496. }
  1497. func PostIncBitFieldPtr8Uint32(p uintptr, d uint32, w, off int, mask uint8) (r uint32) {
  1498. x0 := *(*uint8)(unsafe.Pointer(p))
  1499. r = uint32(x0) & uint32(mask) >> off
  1500. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
  1501. return r
  1502. }
  1503. func PostIncBitFieldPtr8Uint64(p uintptr, d uint64, w, off int, mask uint8) (r uint64) {
  1504. x0 := *(*uint8)(unsafe.Pointer(p))
  1505. r = uint64(x0) & uint64(mask) >> off
  1506. *(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
  1507. return r
  1508. }
  1509. func PostIncBitFieldPtr16Uint8(p uintptr, d uint8, w, off int, mask uint16) (r uint8) {
  1510. x0 := *(*uint16)(unsafe.Pointer(p))
  1511. r = uint8(x0) & uint8(mask) >> off
  1512. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
  1513. return r
  1514. }
  1515. func PostIncBitFieldPtr16Uint16(p uintptr, d uint16, w, off int, mask uint16) (r uint16) {
  1516. x0 := *(*uint16)(unsafe.Pointer(p))
  1517. r = uint16(x0) & uint16(mask) >> off
  1518. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
  1519. return r
  1520. }
  1521. func PostIncBitFieldPtr16Uint32(p uintptr, d uint32, w, off int, mask uint16) (r uint32) {
  1522. x0 := *(*uint16)(unsafe.Pointer(p))
  1523. r = uint32(x0) & uint32(mask) >> off
  1524. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
  1525. return r
  1526. }
  1527. func PostIncBitFieldPtr16Uint64(p uintptr, d uint64, w, off int, mask uint16) (r uint64) {
  1528. x0 := *(*uint16)(unsafe.Pointer(p))
  1529. r = uint64(x0) & uint64(mask) >> off
  1530. *(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
  1531. return r
  1532. }
  1533. func PostIncBitFieldPtr32Uint8(p uintptr, d uint8, w, off int, mask uint32) (r uint8) {
  1534. x0 := *(*uint32)(unsafe.Pointer(p))
  1535. r = uint8(x0) & uint8(mask) >> off
  1536. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
  1537. return r
  1538. }
  1539. func PostIncBitFieldPtr32Uint16(p uintptr, d uint16, w, off int, mask uint32) (r uint16) {
  1540. x0 := *(*uint32)(unsafe.Pointer(p))
  1541. r = uint16(x0) & uint16(mask) >> off
  1542. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
  1543. return r
  1544. }
  1545. func PostIncBitFieldPtr32Uint32(p uintptr, d uint32, w, off int, mask uint32) (r uint32) {
  1546. x0 := *(*uint32)(unsafe.Pointer(p))
  1547. r = uint32(x0) & uint32(mask) >> off
  1548. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
  1549. return r
  1550. }
  1551. func PostIncBitFieldPtr32Uint64(p uintptr, d uint64, w, off int, mask uint32) (r uint64) {
  1552. x0 := *(*uint32)(unsafe.Pointer(p))
  1553. r = uint64(x0) & uint64(mask) >> off
  1554. *(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
  1555. return r
  1556. }
  1557. func PostIncBitFieldPtr64Uint8(p uintptr, d uint8, w, off int, mask uint64) (r uint8) {
  1558. x0 := *(*uint64)(unsafe.Pointer(p))
  1559. r = uint8(x0) & uint8(mask) >> off
  1560. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
  1561. return r
  1562. }
  1563. func PostIncBitFieldPtr64Uint16(p uintptr, d uint16, w, off int, mask uint64) (r uint16) {
  1564. x0 := *(*uint64)(unsafe.Pointer(p))
  1565. r = uint16(x0) & uint16(mask) >> off
  1566. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
  1567. return r
  1568. }
  1569. func PostIncBitFieldPtr64Uint32(p uintptr, d uint32, w, off int, mask uint64) (r uint32) {
  1570. x0 := *(*uint64)(unsafe.Pointer(p))
  1571. r = uint32(x0) & uint32(mask) >> off
  1572. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
  1573. return r
  1574. }
  1575. func PostIncBitFieldPtr64Uint64(p uintptr, d uint64, w, off int, mask uint64) (r uint64) {
  1576. x0 := *(*uint64)(unsafe.Pointer(p))
  1577. r = uint64(x0) & uint64(mask) >> off
  1578. *(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
  1579. return r
  1580. }