[clang] [llvm] [clang][X86] Return Win64 __int128 indirectly (PR #210358)
LIU Hao via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 5 01:57:42 PST 2026
lhmouse wrote:
This is a scan result on my local MSYS2 CLANG64 environment (with 297 packages) for functions that return `__int128`. The scan is based on machine code, and might not include false negatives such as tail calls:
| Surface | `__int128`-returning functions |
|---|---:|
| DLL **exports** | **0** |
| **Imports** (EXE + DLL) | **0** |
| Static library **defined externals** | **204** |
The conclusion is probably that the impact is minor.
<details>
<summary>List of packages</summary>
1. mingw-w64-clang-x86_64-SDL2
2. mingw-w64-clang-x86_64-abseil-cpp
3. mingw-w64-clang-x86_64-aom
4. mingw-w64-clang-x86_64-aws-c-auth
5. mingw-w64-clang-x86_64-aws-c-cal
6. mingw-w64-clang-x86_64-aws-c-common
7. mingw-w64-clang-x86_64-aws-c-compression
8. mingw-w64-clang-x86_64-aws-c-http
9. mingw-w64-clang-x86_64-aws-c-io
10. mingw-w64-clang-x86_64-aws-c-s3
11. mingw-w64-clang-x86_64-aws-c-sdkutils
12. mingw-w64-clang-x86_64-aws-checksums
13. mingw-w64-clang-x86_64-boost
14. mingw-w64-clang-x86_64-boost-libs
15. mingw-w64-clang-x86_64-breeze-icons
16. mingw-w64-clang-x86_64-brotli
17. mingw-w64-clang-x86_64-bullet
18. mingw-w64-clang-x86_64-bzip2
19. mingw-w64-clang-x86_64-c-ares
20. mingw-w64-clang-x86_64-ca-certificates
21. mingw-w64-clang-x86_64-cairo
22. mingw-w64-clang-x86_64-ceres-solver
23. mingw-w64-clang-x86_64-clang
24. mingw-w64-clang-x86_64-clang-libs
25. mingw-w64-clang-x86_64-cmake
26. mingw-w64-clang-x86_64-compiler-rt
27. mingw-w64-clang-x86_64-cppdap
28. mingw-w64-clang-x86_64-crt
29. mingw-w64-clang-x86_64-crypto++
30. mingw-w64-clang-x86_64-curl
31. mingw-w64-clang-x86_64-cvise
32. mingw-w64-clang-x86_64-dav1d
33. mingw-w64-clang-x86_64-dbus
34. mingw-w64-clang-x86_64-devil
35. mingw-w64-clang-x86_64-double-conversion
36. mingw-w64-clang-x86_64-doxygen
37. mingw-w64-clang-x86_64-expat
38. mingw-w64-clang-x86_64-fc-libs
39. mingw-w64-clang-x86_64-ffmpeg
40. mingw-w64-clang-x86_64-fmt
41. mingw-w64-clang-x86_64-fontconfig
42. mingw-w64-clang-x86_64-freeglut
43. mingw-w64-clang-x86_64-freetype
44. mingw-w64-clang-x86_64-frei0r-plugins
45. mingw-w64-clang-x86_64-fribidi
46. mingw-w64-clang-x86_64-gdb
47. mingw-w64-clang-x86_64-gdk-pixbuf2
48. mingw-w64-clang-x86_64-gettext-runtime
49. mingw-w64-clang-x86_64-gflags
50. mingw-w64-clang-x86_64-ggml
51. mingw-w64-clang-x86_64-ghostscript
52. mingw-w64-clang-x86_64-giflib
53. mingw-w64-clang-x86_64-glib2
54. mingw-w64-clang-x86_64-glog
55. mingw-w64-clang-x86_64-glsl-optimizer
56. mingw-w64-clang-x86_64-glslang
57. mingw-w64-clang-x86_64-gmp
58. mingw-w64-clang-x86_64-gnuplot
59. mingw-w64-clang-x86_64-gnutls
60. mingw-w64-clang-x86_64-gperf
61. mingw-w64-clang-x86_64-graphene
62. mingw-w64-clang-x86_64-graphite2
63. mingw-w64-clang-x86_64-graphviz
64. mingw-w64-clang-x86_64-gsm
65. mingw-w64-clang-x86_64-gst-plugins-base
66. mingw-w64-clang-x86_64-gstreamer
67. mingw-w64-clang-x86_64-gts
68. mingw-w64-clang-x86_64-harfbuzz
69. mingw-w64-clang-x86_64-hdf5
70. mingw-w64-clang-x86_64-headers
71. mingw-w64-clang-x86_64-highway
72. mingw-w64-clang-x86_64-hlsl2glsl
73. mingw-w64-clang-x86_64-http-parser
74. mingw-w64-clang-x86_64-hwloc
75. mingw-w64-clang-x86_64-hyperfine
76. mingw-w64-clang-x86_64-iconv
77. mingw-w64-clang-x86_64-icu
78. mingw-w64-clang-x86_64-imath
79. mingw-w64-clang-x86_64-isl
80. mingw-w64-clang-x86_64-iso-codes
81. mingw-w64-clang-x86_64-jasper
82. mingw-w64-clang-x86_64-jbig2dec
83. mingw-w64-clang-x86_64-jbigkit
84. mingw-w64-clang-x86_64-jsoncpp
85. mingw-w64-clang-x86_64-karchive
86. mingw-w64-clang-x86_64-kbookmarks
87. mingw-w64-clang-x86_64-kcachegrind
88. mingw-w64-clang-x86_64-kcodecs
89. mingw-w64-clang-x86_64-kcolorscheme
90. mingw-w64-clang-x86_64-kcompletion
91. mingw-w64-clang-x86_64-kconfig
92. mingw-w64-clang-x86_64-kconfigwidgets
93. mingw-w64-clang-x86_64-kcoreaddons
94. mingw-w64-clang-x86_64-kcrash
95. mingw-w64-clang-x86_64-kdbusaddons
96. mingw-w64-clang-x86_64-kglobalaccel
97. mingw-w64-clang-x86_64-kguiaddons
98. mingw-w64-clang-x86_64-ki18n
99. mingw-w64-clang-x86_64-kiconthemes
100. mingw-w64-clang-x86_64-kio
101. mingw-w64-clang-x86_64-kitemviews
102. mingw-w64-clang-x86_64-kjobwidgets
103. mingw-w64-clang-x86_64-knotifications
104. mingw-w64-clang-x86_64-kservice
105. mingw-w64-clang-x86_64-kvazaar
106. mingw-w64-clang-x86_64-kwidgetsaddons
107. mingw-w64-clang-x86_64-kwindowsystem
108. mingw-w64-clang-x86_64-kxmlgui
109. mingw-w64-clang-x86_64-lame
110. mingw-w64-clang-x86_64-lcms2
111. mingw-w64-clang-x86_64-leptonica
112. mingw-w64-clang-x86_64-lerc
113. mingw-w64-clang-x86_64-libaec
114. mingw-w64-clang-x86_64-libarchive
115. mingw-w64-clang-x86_64-libass
116. mingw-w64-clang-x86_64-libavif
117. mingw-w64-clang-x86_64-libb2
118. mingw-w64-clang-x86_64-libbluray
119. mingw-w64-clang-x86_64-libc++
120. mingw-w64-clang-x86_64-libcaca
121. mingw-w64-clang-x86_64-libcerf
122. mingw-w64-clang-x86_64-libdatrie
123. mingw-w64-clang-x86_64-libde265
124. mingw-w64-clang-x86_64-libdeflate
125. mingw-w64-clang-x86_64-libdovi
126. mingw-w64-clang-x86_64-libexif
127. mingw-w64-clang-x86_64-libffi
128. mingw-w64-clang-x86_64-libgd
129. mingw-w64-clang-x86_64-libgit2
130. mingw-w64-clang-x86_64-libgme
131. mingw-w64-clang-x86_64-libheif
132. mingw-w64-clang-x86_64-libiconv
133. mingw-w64-clang-x86_64-libidn
134. mingw-w64-clang-x86_64-libidn2
135. mingw-w64-clang-x86_64-libimagequant
136. mingw-w64-clang-x86_64-libjpeg-turbo
137. mingw-w64-clang-x86_64-libjxl
138. mingw-w64-clang-x86_64-liblc3
139. mingw-w64-clang-x86_64-libltdl
140. mingw-w64-clang-x86_64-libmng
141. mingw-w64-clang-x86_64-libmodplug
142. mingw-w64-clang-x86_64-libmysofa
143. mingw-w64-clang-x86_64-libogg
144. mingw-w64-clang-x86_64-libpaper
145. mingw-w64-clang-x86_64-libplacebo
146. mingw-w64-clang-x86_64-libpng
147. mingw-w64-clang-x86_64-libpsl
148. mingw-w64-clang-x86_64-libraqm
149. mingw-w64-clang-x86_64-librsvg
150. mingw-w64-clang-x86_64-libsoxr
151. mingw-w64-clang-x86_64-libsquish
152. mingw-w64-clang-x86_64-libssh
153. mingw-w64-clang-x86_64-libssh2
154. mingw-w64-clang-x86_64-libsystre
155. mingw-w64-clang-x86_64-libtasn1
156. mingw-w64-clang-x86_64-libthai
157. mingw-w64-clang-x86_64-libtheora
158. mingw-w64-clang-x86_64-libtiff
159. mingw-w64-clang-x86_64-libtre
160. mingw-w64-clang-x86_64-libunibreak
161. mingw-w64-clang-x86_64-libunistring
162. mingw-w64-clang-x86_64-libunwind
163. mingw-w64-clang-x86_64-libuv
164. mingw-w64-clang-x86_64-libva
165. mingw-w64-clang-x86_64-libvorbis
166. mingw-w64-clang-x86_64-libvpl
167. mingw-w64-clang-x86_64-libvpx
168. mingw-w64-clang-x86_64-libwebp
169. mingw-w64-clang-x86_64-libwinpthread
170. mingw-w64-clang-x86_64-libx264
171. mingw-w64-clang-x86_64-libxml2
172. mingw-w64-clang-x86_64-libyuv
173. mingw-w64-clang-x86_64-llama.cpp
174. mingw-w64-clang-x86_64-lld
175. mingw-w64-clang-x86_64-llvm
176. mingw-w64-clang-x86_64-llvm-libs
177. mingw-w64-clang-x86_64-llvm-openmp
178. mingw-w64-clang-x86_64-llvm-tools
179. mingw-w64-clang-x86_64-lua
180. mingw-w64-clang-x86_64-luajit
181. mingw-w64-clang-x86_64-lz4
182. mingw-w64-clang-x86_64-lzo2
183. mingw-w64-clang-x86_64-make
184. mingw-w64-clang-x86_64-mcfgthread
185. mingw-w64-clang-x86_64-mcfgthread-libs
186. mingw-w64-clang-x86_64-md4c
187. mingw-w64-clang-x86_64-meson
188. mingw-w64-clang-x86_64-mpc
189. mingw-w64-clang-x86_64-mpdecimal
190. mingw-w64-clang-x86_64-mpfr
191. mingw-w64-clang-x86_64-mpg123
192. mingw-w64-clang-x86_64-ncurses
193. mingw-w64-clang-x86_64-nettle
194. mingw-w64-clang-x86_64-nghttp2
195. mingw-w64-clang-x86_64-nghttp3
196. mingw-w64-clang-x86_64-ngtcp2
197. mingw-w64-clang-x86_64-ninja
198. mingw-w64-clang-x86_64-nspr
199. mingw-w64-clang-x86_64-nss
200. mingw-w64-clang-x86_64-ogre3d
201. mingw-w64-clang-x86_64-openal
202. mingw-w64-clang-x86_64-openblas
203. mingw-w64-clang-x86_64-opencl-icd
204. mingw-w64-clang-x86_64-opencore-amr
205. mingw-w64-clang-x86_64-opencv
206. mingw-w64-clang-x86_64-openexr
207. mingw-w64-clang-x86_64-openh264
208. mingw-w64-clang-x86_64-openjpeg2
209. mingw-w64-clang-x86_64-openjph
210. mingw-w64-clang-x86_64-openssl
211. mingw-w64-clang-x86_64-openvr
212. mingw-w64-clang-x86_64-opus
213. mingw-w64-clang-x86_64-orc
214. mingw-w64-clang-x86_64-p11-kit
215. mingw-w64-clang-x86_64-pango
216. mingw-w64-clang-x86_64-pcre2
217. mingw-w64-clang-x86_64-pixman
218. mingw-w64-clang-x86_64-pkgconf
219. mingw-w64-clang-x86_64-poppler
220. mingw-w64-clang-x86_64-poppler-data
221. mingw-w64-clang-x86_64-protobuf
222. mingw-w64-clang-x86_64-python
223. mingw-w64-clang-x86_64-python-chardet
224. mingw-w64-clang-x86_64-python-contourpy
225. mingw-w64-clang-x86_64-python-cycler
226. mingw-w64-clang-x86_64-python-dateutil
227. mingw-w64-clang-x86_64-python-distlib
228. mingw-w64-clang-x86_64-python-fonttools
229. mingw-w64-clang-x86_64-python-kiwisolver
230. mingw-w64-clang-x86_64-python-matplotlib
231. mingw-w64-clang-x86_64-python-msgspec
232. mingw-w64-clang-x86_64-python-numpy
233. mingw-w64-clang-x86_64-python-packaging
234. mingw-w64-clang-x86_64-python-pebble
235. mingw-w64-clang-x86_64-python-pillow
236. mingw-w64-clang-x86_64-python-pip
237. mingw-w64-clang-x86_64-python-psutil
238. mingw-w64-clang-x86_64-python-pyparsing
239. mingw-w64-clang-x86_64-python-setuptools
240. mingw-w64-clang-x86_64-python-six
241. mingw-w64-clang-x86_64-python-tzdata
242. mingw-w64-clang-x86_64-python-zstandard
243. mingw-w64-clang-x86_64-qhull
244. mingw-w64-clang-x86_64-qt6-5compat
245. mingw-w64-clang-x86_64-qt6-base
246. mingw-w64-clang-x86_64-qt6-declarative
247. mingw-w64-clang-x86_64-qt6-svg
248. mingw-w64-clang-x86_64-rav1e
249. mingw-w64-clang-x86_64-readline
250. mingw-w64-clang-x86_64-rhash
251. mingw-w64-clang-x86_64-rtmpdump
252. mingw-w64-clang-x86_64-rust
253. mingw-w64-clang-x86_64-shaderc
254. mingw-w64-clang-x86_64-solid
255. mingw-w64-clang-x86_64-spdlog
256. mingw-w64-clang-x86_64-speex
257. mingw-w64-clang-x86_64-speexdsp
258. mingw-w64-clang-x86_64-spirv-cross
259. mingw-w64-clang-x86_64-spirv-tools
260. mingw-w64-clang-x86_64-sqlite
261. mingw-w64-clang-x86_64-srt
262. mingw-w64-clang-x86_64-suitesparse
263. mingw-w64-clang-x86_64-svt-av1
264. mingw-w64-clang-x86_64-tbb
265. mingw-w64-clang-x86_64-tcl
266. mingw-w64-clang-x86_64-termcap
267. mingw-w64-clang-x86_64-tesseract-ocr
268. mingw-w64-clang-x86_64-tinyxml
269. mingw-w64-clang-x86_64-tk
270. mingw-w64-clang-x86_64-tolua
271. mingw-w64-clang-x86_64-tools
272. mingw-w64-clang-x86_64-tzdata
273. mingw-w64-clang-x86_64-unifdef
274. mingw-w64-clang-x86_64-vid.stab
275. mingw-w64-clang-x86_64-vulkan-headers
276. mingw-w64-clang-x86_64-vulkan-loader
277. mingw-w64-clang-x86_64-wget
278. mingw-w64-clang-x86_64-whisper.cpp
279. mingw-w64-clang-x86_64-windows-default-manifest
280. mingw-w64-clang-x86_64-wineditline
281. mingw-w64-clang-x86_64-winpthreads
282. mingw-w64-clang-x86_64-wxwidgets3.2-common-libs
283. mingw-w64-clang-x86_64-wxwidgets3.2-msw-libs
284. mingw-w64-clang-x86_64-x265
285. mingw-w64-clang-x86_64-xapian-core
286. mingw-w64-clang-x86_64-xmake
287. mingw-w64-clang-x86_64-xpm-nox
288. mingw-w64-clang-x86_64-xvidcore
289. mingw-w64-clang-x86_64-xxhash
290. mingw-w64-clang-x86_64-xz
291. mingw-w64-clang-x86_64-yasm
292. mingw-w64-clang-x86_64-z3
293. mingw-w64-clang-x86_64-zimg
294. mingw-w64-clang-x86_64-zlib-ng
295. mingw-w64-clang-x86_64-zlib-ng-compat
296. mingw-w64-clang-x86_64-zstd
297. mingw-w64-clang-x86_64-zvbi
</details>
<details>
<summary>Complete AI-generated report</summary>
# `__int128` / `unsigned __int128`-returning functions in the clang64 link surface
Scope: `C:\MSYS64\clang64\bin` (762 DLLs + 801 EXEs) and `C:\MSYS64\clang64\lib`
(2,376 static archives plus the compiler-rt archives under `lib\clang\23\lib\windows`).
Toolchain: clang 23.1.5, target `x86_64-w64-windows-gnu`.
## 1. Filter rules applied
| Container | Symbols considered |
|---|---|
| EXE | **import table only** (a function it *imports*); signatures resolved against the exporting DLL |
| DLL | **import table + export table** |
| Static library | **defined external symbols only** (`T` / `W` / `V`), i.e. symbols another object can link against |
Locally defined functions that are neither imported nor exported are excluded.
## 2. ABI under test (old MinGW ABI)
Measured with the installed compiler, not assumed:
| Case | Convention |
|---|---|
| `__int128` **return** | **XMM0** — `movq xmm0,rGPR` + `movq xmm1,rGPR` + `punpcklqdq xmm0,xmm1` |
| `__int128` **argument** | passed **by reference** (pointer in `rcx`/`rdx`/`r8`/`r9`) |
| 16-byte `struct` return | hidden pointer (sret) — a *different* path from i128 |
So "returns `__int128`" is observable as "two 64-bit halves packed from GPRs into XMM0 immediately
before the epilogue".
## 3. Detection pipeline
1. **Byte prefilter** (LuaJIT) over every container for `punpcklqdq xmm0, xmmN`
(`66 [REX] 0F 6C C0..C7`): 505 library candidates + 156 executable candidates.
2. **Disassembly test** — `llvm-objdump -d -Mintel --no-show-raw-insn`, parsed by LuaJIT. A hit requires:
- `punpcklqdq xmm0, xmmN` with **N ≠ 0** (rejects SSE broadcasts `xmm0, xmm0`),
- a preceding `movq xmm*, rGPR` (integer halves),
- **only epilogue instructions** (`pop` / `add rsp` / `nop` / `leave`) between the pack and `ret`
(rejects mid-function 16-byte constant loads and pixel arithmetic).
3. **Link-surface filter** — export table, import table, and defined-external symbol sets.
## 4. Results
| Surface | `__int128`-returning functions |
|---|---:|
| DLL **exports** | **0** |
| **Imports** (EXE + DLL) | **0** |
| Static library **defined externals** | **204** |
### 4.1 Exports: none
The 19 DLLs that contained i128 return sites expose **61,971** exported symbols between them;
none of the i128-returning functions is among them. Every such function is an internal
statically-linked copy:
```
libc++.dll, libboost_charconv-mt.dll, libcairo-2.dll, libcryptopp.dll, libfmt-12.dll,
libgstreamer-1.0-0.dll, libKF6Codecs.dll, libmpdec-4.dll, libopenal-1.dll, libspdlog-1.17.dll,
libz3.dll, Qt6Core.dll -> __udivmodti4 (compiler-rt builtin, local)
swscale-10.dll -> __divti3, __udivmodti4
libshaderc_shared.dll -> __divti3, __udivmodti4
libclang_rt.asan_dynamic-x86_64.dll -> __ubsan::Value::get{SInt,UInt,PositiveInt}Value()
libopenblas.dll -> _FortranAModuloInteger16, __modti3, __fixdfti, __fixsfti, __udivmodti4
libaws-checksums.dll -> aws_checksums_multiply_mod_p_reflected
libmpfr-6.dll -> __addtf3, __multf3, __extenddftf2, __floatunditf (float128, not integer)
```
Example — `Qt6Core.dll` exports 7,328 symbols and the string `__udivmodti4` is not one of them.
### 4.2 Imports: none
28 modules contain i128 symbol names anywhere in the image (they are the statically linked
compiler-rt copies listed above). Their **import tables contain zero** entries matching any of
`__multi3`, `__divti3`, `__udivti3`, `__modti3`, `__umodti3`, `__divmodti4`, `__udivmodti4`,
`__ashlti3`, `__ashrti3`, `__lshrti3`, `__negti2`, `__muloti4`, `__mulvti3`, `__addvti3`,
`__subvti3`, `__negvti2`, `__absvti2`, `__bswapti2`, `__fix*ti`, `__rust_i128*`, `__rust_u128*`,
`__atomic_*_16`, `aws_checksums_multiply_mod_p_reflected`, `_FortranAModuloInteger16`.
Consequently no executable or DLL can call an i128-returning function across a module boundary.
Executables with i128 return sites in their **own** code (excluded by scope, not importable):
`clippy-driver` (4), `cargo` (2), `glslang` (2), `glslangValidator` (2), `glslc` (2),
`hyperfine` (2), `doxygen` (1), `doxyparse` (1), `makemhr` (1), `z3` (1).
### 4.3 Static libraries: 204 defined-external functions
| Archive | Count |
|---|---:|
| `lib/librav1e.a` | 44 |
| `lib/librsvg-2.a` | 43 |
| `lib/libdovi.a` | 43 |
| `lib/libimagequant.a` | 41 |
| `lib/clang/23/lib/windows/libclang_rt.builtins-x86_64.a` | 29 |
| `lib/clang/23/lib/windows/libclang_rt.ubsan_standalone-x86_64.a` | 3 |
| `lib/libaws-checksums.a` | 1 |
All 204 are global (`T`/`W`) definitions — no local symbol survived the filter, so the previously
reported raw set and the linkable set coincide.
#### compiler-rt builtins (29, C ABI)
```
__absvti2 __addvti3 __ashlti3 __ashrti3 __atomic_exchange_16 __atomic_fetch_add_16
__atomic_fetch_and_16 __atomic_fetch_nand_16 __atomic_fetch_or_16 __atomic_fetch_sub_16
__atomic_fetch_xor_16 __atomic_load_16 __divmodti4 __divti3 __fixdfti __fixsfti __fixtfti
__fixunsdfti __fixunssfti __fixunstfti __lshrti3 __modti3 __muloti4 __multi3 __mulvti3
__negti2 __negvti2 __subvti3 __udivmodti4
```
Source: `compiler-rt/lib/builtins/*.c`, signatures in `int_lib.h` / `int_types.h`.
#### Rust archives (44 distinct names, identical set in all four)
```
__absvti2 __addvti3 __ashlti3 __ashrti3 __bswapti2 __divmodti4 __divti3 __fixdfti __fixsfti
__fixtfti __fixunsdfti __fixunssfti __fixunstfti __lshrti3 __modti3 __multi3 __mulvti3 __negti2
__negvti2 __rust_i128_add __rust_i128_sub __rust_u128_add __rust_u128_sub __subvti3 __udivmodti4
__udivti3 __umodti3
compiler_builtins::int::addsub::{__rust_i128_add,__rust_i128_sub,__rust_u128_add,__rust_u128_sub}
compiler_builtins::int::mul::{__multi3,__rust_u128_mulo,...}
compiler_builtins::int::sdiv::{__divti3,__modti3,__divmodti4}
compiler_builtins::int::udiv::{__udivti3,__umodti3,__udivmodti4}
compiler_builtins::int::shift::{__ashlti3,__ashrti3,__lshrti3}
compiler_builtins::int::bswap::__bswapti2
compiler_builtins::float::conv::{__fixdfti,__fixsfti,__fixunsdfti,__fixunssfti}
```
Source: Rust `compiler_builtins` crate (`src/int/addsub.rs`, `mul.rs`, `sdiv.rs`, `udiv.rs`,
`shift.rs`, `bswap.rs`, `src/float/conv.rs`).
#### `libclang_rt.ubsan_standalone-x86_64.a` (3)
`__ubsan::Value::getSIntValue()`, `getUIntValue()`, `getPositiveIntValue()` —
`compiler-rt/lib/ubsan/ubsan_value.h` declares
```c
#if HAVE_INT128_T
typedef s128 SIntMax;
typedef u128 UIntMax;
SIntMax getSIntValue() const;
UIntMax getUIntValue() const;
UIntMax getPositiveIntValue() const;
```
so these genuinely return `__int128` / `unsigned __int128`. Implementation: `ubsan_value.cpp`.
#### `libaws-checksums.a` (1)
`aws_checksums_multiply_mod_p_reflected` — `awslabs/aws-checksums`,
`source/crc_util.c` / `include/aws/checksums/private/crc_util.h`:
```c
#if defined(__SIZEOF_INT128__)
__uint128_t aws_checksums_multiply_mod_p_reflected(const __uint128_t poly, __uint128_t a, __uint128_t b);
#endif
```
Three `__uint128_t` parameters (by reference) and an `unsigned __int128` result in XMM0.
## 5. Known false negatives of the detector
- Constant-valued returns (`movaps` of a constant in `.rdata` + `ret`) — indistinguishable from
`float4` constant returns;
- tail-call forwarding (e.g. `__udivti3` / `__umodti3` jumping to `__udivmodti4`) — these do return
i128 per source but emit no pack sequence;
- direct 16-byte loads (`movaps`/`movdqu`) followed by `ret`;
- `movd xmm0, eax` results of comparisons.
Within `libclang_rt.builtins-x86_64.a` the tail-call cases are `__udivti3` and `__umodti3`;
`__fixxfti` / `__fixunsxfti` also return i128 by source but were not detected.
</details>
https://github.com/llvm/llvm-project/pull/210358
More information about the cfe-commits
mailing list