riscv32: spec compliance and regression test fix - #691
Conversation
Signed-off-by: Akif Ejaz <akifejaz40@gmail.com>
|
This and the following few PRs will be related to RISC-V CI enablement efforts. I'had discussed this in last Weekly meeting. I've started testing the riscv ports with available tests and closely comparing implementations with respect to riscv spec. Once the CI of riscv ports is running cleanly, I'll be processing with Cloud-V setup (RISC-V hardware CI) cc @fdesbiens |
|
@fdesbiens this PR was supposed to be merge before the #698, but anyways. Let me know if you face any conflicts or other issues. |
# Conflicts: # test/tx/cmake/riscv/bsp/tx_initialize_low_level.S
tx_port.h published TX_RISCV_TRAP_FRAME_SIZE for the GNU BSP assembly, but nothing in the port consumed it. Six .S files each rebuilt the same numbers from their own #if, so the interrupt frame size was written out in seven places and the solicited frame size in three. That is the shape that produced the RISC-V64 fault fixed in eclipse-threadx#708, where the port moved to a padded frame and one copy of the constant did not. The sources now include tx_port.h and take both sizes from it, and no literal frame size remains in the port. TX_RISCV_SOL_FRAME_SIZE joins the contract, since the solicited frame was never published at all. The emitted code is unchanged: 400 and 176 bytes for ILP32D, 128 for soft-float, confirmed by disassembly before and after. Two further corrections: _tx_initialize_low_level carried .global immediately followed by .weak, so the symbol stayed weak and the .global did nothing. Weak is what the port wants, because the example and regression BSPs both provide their own definition, so the stray .global is removed rather than the .weak. Verified with nm that the symbol is still W. The QEMU runner seeded fpu_verified from skip_fpu, so a soft-float run satisfied the FPU gate whether or not the script ever reported the skip. It now starts false and is set only when the skip marker is present, so a run that dies before reaching that point fails instead of passing. Assisted-by: Claude Code (Opus 5) <noreply@anthropic.com>
|
Thanks for your patience on this one, @akifejaz — and apologies for the ordering. This was meant to land before the RISC-V64 work, and merging that first is what caused the detour. That was on me, not on you. I have merged VerifiedWith the RISC-V64 fixes now in and the test runner no longer masking incomplete builds, the whole RISC-V regression suite is green on both architectures:
Both Worth calling out: your What I merged
What I changedThe frame sizes now come from one place.
The QEMU runner seeded Nothing needed from you. Merging once CI is green. |
This PR corrects the RISC-V32 GNU port as per spec and its QEMU virt support.
slot*byte-size(base)format.gpand uses valid linker regions.