Commit d8a4e1f
committed
Fix Clang error when disabling BLOCK_CHAINING
When using 'make ENABLE_MBLOCK_CHAINING=0 CC=clang', the following
errors are observed:
src/emulate.c:555:19: error: unused function 'insn_is_unconditional_branch' [-Werror,-Wunused-function]
555 | FORCE_INLINE bool insn_is_unconditional_branch(uint8_t opcode)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/emulate.c:582:19: error: unused function 'insn_is_direct_branch' [-Werror,-Wunused-function]
582 | FORCE_INLINE bool insn_is_direct_branch(uint8_t opcode)
| ^~~~~~~~~~~~~~~~~~~~~
Fix this by guarding the 'insn_is_unconditional_branch' and
'insn_is_direct_branch' function definition with
RV32_HAS(BLOCK_CHAINING) macro. This ensures the functions are only
defined when the BLOCK_CHAINING is enabled.1 parent c533b99 commit d8a4e1f
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
553 | 554 | | |
554 | 555 | | |
555 | 556 | | |
| |||
590 | 591 | | |
591 | 592 | | |
592 | 593 | | |
| 594 | + | |
593 | 595 | | |
594 | 596 | | |
595 | 597 | | |
| |||
0 commit comments