Implement objc_msgSend function for the LoongArch CPU architecture#377
Implement objc_msgSend function for the LoongArch CPU architecture#377basilisk-dev wants to merge 4 commits intognustep:masterfrom
Conversation
|
Thanks, this looks correct but I’d like to see it running in CI. I believe there is QEMU user mode support for Loongarch, can you add it to the workflow runner? For this to be useful, we will also need a clang patch that enables the assembly message-dispatch function for message sends. |
ea36e96 to
6a5a9b5
Compare
6a5a9b5 to
f45f097
Compare
|
@davidchisnall I had to make a slight change to allow the implementation to compile on Clang 18 (I used Clang 22 during initial development). I've added logic to the GitHub Actions workflow to allow the tests to run against LoongArch64 as well. Here is a test run I did: https://github.com/basilisk-dev/libobjc2/actions/runs/23605441514/job/68746795969 I had to exclude LLVM 16 and LLVM 17 on LoongArch64. A few of the tests fail because there is no LoongArch64 implementation in
Makes sense, I'm not familiar with Clang/LLVM internals so I didn't realize this wasn't already the case. |
Ported objc_msgSend to the LoongArch64 architecture by adding a native assembly implementation. I basically ported the RISC-V implementation to LoongArch64 assembly. You can read more about the LoongArch architecture here if interested.
I ran the relevant tests and they all passed, and I also tested the implementation manually on LoongArch64 to verify it behaves correctly.
Please let me know if you need any additional info.