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
I am building for linux_arm32 (for a raspberry pi) so I am building to object files on my windows PC using this command: odin build . -target:linux_arm32 -build-mode:obj -microarch:mpcore
Then on the pi, I am compiling those object files in with my c code (which in the real project is raylib) using this CMakeLists.txt:
Operating System & Odin Version:
Odin: dev-2024-10-nightly:af9ae48
OS: Windows 10 Enterprise (version: 22H2), build 19045.5247
CPU: 11th Gen Intel(R) Core(TM) i5-11600KF @ 3.90GHz
RAM: 32645 MiB
Backend: LLVM 18.1.8
Expected Behavior
LLVM IR should use [2 x float] for Vector 2 type
Current Behavior
LLVM IR is using [2 x i32] for Vector2 type, this causes the ARM machine code to use the wrong registers when calling the procedure (It uses r0-r6 but should use s0-s6).
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Context
I am building for linux_arm32 (for a raspberry pi) so I am building to object files on my windows PC using this command:
odin build . -target:linux_arm32 -build-mode:obj -microarch:mpcore
Then on the pi, I am compiling those object files in with my c code (which in the real project is raylib) using this CMakeLists.txt:
Odin: dev-2024-10-nightly:af9ae48
OS: Windows 10 Enterprise (version: 22H2), build 19045.5247
CPU: 11th Gen Intel(R) Core(TM) i5-11600KF @ 3.90GHz
RAM: 32645 MiB
Backend: LLVM 18.1.8
Expected Behavior
LLVM IR should use [2 x float] for Vector 2 type
Current Behavior
LLVM IR is using [2 x i32] for Vector2 type, this causes the ARM machine code to use the wrong registers when calling the procedure (It uses r0-r6 but should use s0-s6).
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
When built to an object file you get this assembly:
Notice that it is loading float values into r registers.
Here is the correct assembly generated by clang (for a functionally identical c file):
The text was updated successfully, but these errors were encountered: