You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Odin: dev-2024-05:e1c4b9b06
OS: Debian GNU/Linux 12 (bookworm), Linux 6.1.0-21-armmp-lpae
CPU: ARM
RAM: 992 MiB
Backend: LLVM 14.0.6
Expected Behavior
Correct values are passed to, and returned from, foreign functions.
Current Behavior
Argument values are incorrect when printed in foreign functions and return values are incorrect when printed on the odin-side.
Failure Information (for bugs)
The Odin compiler is currently not conforming to the arm32 ABI homogeneous aggregates section.
There are 3 issues that need fixing:
Homogeneous aggregates passed as an argument where the aggregate doesn't exceed 4 elements.
Homogeneous aggregates returned from a procedure where the aggregate doesn't exceed 4 elements.
Homogeneous aggregates passed as an argument where the aggregate EXCEEDS 4 elements.
For the first and the second points, the same issue was happening on arm64 and was reported in #2561 and fixed by f3a4630 .
I've confirmed that same code fixes 1 and 2 but 3 still happens, I haven't been able to test to see if it's an issue on arm64 too but I suspect it is.
Steps to Reproduce
Simple C code compiled with gcc -c -o main.o main.c and made into a static lib with ar rcs libodintest.a main.o
The current ABI for arm32 is mostly a placeholder, and will need correcting for aggregates. The problem is reverse engineering how LLVM does things more than anything.
Context
Expected Behavior
Correct values are passed to, and returned from, foreign functions.
Current Behavior
Argument values are incorrect when printed in foreign functions and return values are incorrect when printed on the odin-side.
Failure Information (for bugs)
The Odin compiler is currently not conforming to the arm32 ABI homogeneous aggregates section.
There are 3 issues that need fixing:
For the first and the second points, the same issue was happening on arm64 and was reported in #2561 and fixed by f3a4630 .
I've confirmed that same code fixes 1 and 2 but 3 still happens, I haven't been able to test to see if it's an issue on arm64 too but I suspect it is.
Steps to Reproduce
Simple C code compiled with
gcc -c -o main.o main.c
and made into a static lib withar rcs libodintest.a main.o
And the odin code that calls the C library
And this is what gets printed to the terminal
Failure Logs
N/A
The text was updated successfully, but these errors were encountered: