|
Ran
|
Jobs
1
|
Files
89
|
Run time
1min
|
Badge
README BADGES
|
push
github
FFI: Various ABI and calling convention fixes. Thanks to Sergey Kaplun. (cherry picked from commit 5b2e51db2) This patch fixes several issues at once: 1) On x64, the structure pass-by-value on the stack for the small argument size lacks the alignment check. This patch fixes that. 2 ) According to the AAPCS64, the alignment of the argument to be passed by value is determined by its natural alignment [1] instead of the alignment of the type (see B.6 [2]). Not applicable to OSX. For fixing this, we need to store the field alignment for `CT_FIELD` ctype since field alignment determines natural alignment. On OSX the "packed" stack rules [3] applied for non-variadic functions too. This patch fixes that. 3) The x64 ABI allows reordering of arguments. The structures that should be passed on the stack due to lack of the corresponding check may be placed in registers anyway. This patch fixes that by adding the corresponding flag in `ccall_set_args()`. 4) Also, this patch fixes the zero-sized bitfield behaviour to be intact with GCC (after 12.1 [4]) and Clang. Be aware that the alignment of zero-sized fields is not applied to each field of the structure. 5) It fixes handling for multidimensional HFA structures on arm64. Structures with zero-sized arrays are considered non-HFA. Also, this commit adds tests for vector arguments and empty structures to be sure that their behaviour still valid after changes. [1]: https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#510composite-types [2]: https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#682parameter-passing-rules [3]: https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Pass-arguments-to-functions-correctly [4]: https://gcc.gnu.org/gcc-12/changes.html Sergey Kaplun: * added the description and the test for the problem Part of tarantool/tarantool#12480
5731 of 6058 branches covered (94.6%)
Branch coverage included in aggregate %.
12 of 12 new or added lines in 2 files covered. (100.0%)
43 existing lines in 5 files now uncovered.21866 of 23555 relevant lines covered (92.83%)
3971494.91 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 24 |
89.18 |
-1.82% | src/lj_crecord.c |
| 10 |
77.88 |
-1.01% | src/lj_api.c |
| 6 |
94.74 |
-4.31% | src/lj_str.c |
| 2 |
92.0 |
-0.44% | src/luajit.c |
| 1 |
77.58 |
0.47% | src/lj_opt_fold.c |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 26639774283.1 | 89 |
93.19 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|