Hi Lehua, > This patch fix testcase failed when I build RISC-V GCC with -mcmodel=medany > as default. If set to medany, stack_save_restore.c testcase will fail because > of > the reduced use of s3 registers in assembly (thus calling __riscv_save/store_3 > instead of __riscv_save/store_4). Explicitly add -mcmodel=medlow to solve this > problem.
Wouldn't you rather want to adjust the test to not check for one register number but 3 or 4 instead? There might be future changes in default behavior that would invalidate the test as well. Regards Robin