From dba3cf331a9843930f02a159bb25013b8191f37a Mon Sep 17 00:00:00 2001 From: Huaqi Fang <578567190@qq.com> Date: Fri, 12 Apr 2024 14:37:00 +0800 Subject: [PATCH] libgloss/riscv: only remove zcmt/zcmp arch when zcmp/zcmt passed Signed-off-by: Huaqi Fang <578567190@qq.com> --- libgloss/riscv/semihost_syscall.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libgloss/riscv/semihost_syscall.h b/libgloss/riscv/semihost_syscall.h index 6c054a73a..e17c373ab 100644 --- a/libgloss/riscv/semihost_syscall.h +++ b/libgloss/riscv/semihost_syscall.h @@ -20,7 +20,13 @@ __semihost_syscall (long id, long *data_block) ".option push \n" ".option norvc \n" ".option arch,-c \n" - ".option arch,-zcmt,-zcmp,-zcd,-zcf,-zcb,-zca \n" +#ifdef __riscv_zcmt + ".option arch,-zcmt \n" +#endif +#ifdef __riscv_zcmp + ".option arch,-zcmp \n" +#endif + ".option arch,-zcd,-zcf,-zcb,-zca \n" "slli zero, zero, 0x1f \n" "ebreak \n" "srai zero, zero, 0x7 \n"