Skip to content

Commit

Permalink
libgloss/riscv: only remove zcmt/zcmp arch when zcmp/zcmt passed
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Apr 12, 2024
1 parent fd5ce70 commit dba3cf3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libgloss/riscv/semihost_syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit dba3cf3

Please sign in to comment.