sim: signal: mark signal callback funcs as noreturn since they don't return
All funcs already call other funcs that don't return. The mips port is the only exception because its generic exception handler can return in the case of normal exceptions. So while the exceptions its signal handler triggers doesn't return, we can't express that conditional logic. So add some useless abort calls to make the compiler happy.
This commit is contained in:
parent
f184f3a224
commit
d137b254d9
@ -40,7 +40,7 @@ typedef void (SIM_CORE_SIGNAL_FN)
|
||||
(SIM_DESC sd, sim_cpu *cpu, sim_cia cia, unsigned map, int nr_bytes,
|
||||
address_word addr, transfer_type transfer, sim_core_signals sig);
|
||||
|
||||
extern SIM_CORE_SIGNAL_FN sim_core_signal;
|
||||
extern SIM_CORE_SIGNAL_FN sim_core_signal ATTRIBUTE_NORETURN;
|
||||
|
||||
|
||||
/* basic types */
|
||||
|
@ -201,7 +201,7 @@ struct cris_sim_cpu {
|
||||
/* Misc. */
|
||||
|
||||
/* Catch address exceptions. */
|
||||
extern SIM_CORE_SIGNAL_FN cris_core_signal;
|
||||
extern SIM_CORE_SIGNAL_FN cris_core_signal ATTRIBUTE_NORETURN;
|
||||
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
|
||||
cris_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
|
||||
(TRANSFER), (ERROR))
|
||||
|
@ -102,7 +102,7 @@ struct frv_sim_cpu {
|
||||
/* Misc. */
|
||||
|
||||
/* Catch address exceptions. */
|
||||
extern SIM_CORE_SIGNAL_FN frv_core_signal;
|
||||
extern SIM_CORE_SIGNAL_FN frv_core_signal ATTRIBUTE_NORETURN;
|
||||
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
|
||||
frv_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
|
||||
(TRANSFER), (ERROR))
|
||||
|
@ -37,7 +37,7 @@ struct iq2000_sim_cpu {
|
||||
/* Misc. */
|
||||
|
||||
/* Catch address exceptions. */
|
||||
extern SIM_CORE_SIGNAL_FN iq2000_core_signal;
|
||||
extern SIM_CORE_SIGNAL_FN iq2000_core_signal ATTRIBUTE_NORETURN;
|
||||
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
|
||||
iq2000_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
|
||||
(TRANSFER), (ERROR))
|
||||
|
@ -51,7 +51,7 @@ struct lm32_sim_cpu
|
||||
/* Misc. */
|
||||
|
||||
/* Catch address exceptions. */
|
||||
extern SIM_CORE_SIGNAL_FN lm32_core_signal;
|
||||
extern SIM_CORE_SIGNAL_FN lm32_core_signal ATTRIBUTE_NORETURN;
|
||||
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
|
||||
lm32_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
|
||||
(TRANSFER), (ERROR))
|
||||
|
@ -21,7 +21,7 @@
|
||||
/* Misc. */
|
||||
|
||||
/* Catch address exceptions. */
|
||||
extern SIM_CORE_SIGNAL_FN m32r_core_signal;
|
||||
extern SIM_CORE_SIGNAL_FN m32r_core_signal ATTRIBUTE_NORETURN;
|
||||
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
|
||||
m32r_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
|
||||
(TRANSFER), (ERROR))
|
||||
|
@ -45,6 +45,7 @@ dnl C++ -Wno-mismatched-tags
|
||||
-Wno-error=deprecated-register
|
||||
dnl C++ -Wsuggest-override
|
||||
-Wduplicated-cond
|
||||
dnl -Wshadow=local
|
||||
dnl C++ -Wdeprecated-copy
|
||||
dnl C++ -Wdeprecated-copy-dtor
|
||||
dnl C++ -Wredundant-move
|
||||
|
@ -2498,7 +2498,8 @@ mips_core_signal (SIM_DESC sd,
|
||||
(unsigned long) addr, (unsigned long) ip);
|
||||
COP0_BADVADDR = addr;
|
||||
SignalExceptionDataReference();
|
||||
break;
|
||||
/* Shouldn't actually be reached. */
|
||||
abort ();
|
||||
|
||||
case sim_core_unaligned_signal:
|
||||
sim_io_eprintf (sd, "mips-core: %d byte %s to unaligned address 0x%lx at 0x%lx\n",
|
||||
@ -2509,7 +2510,8 @@ mips_core_signal (SIM_DESC sd,
|
||||
SignalExceptionAddressLoad();
|
||||
else
|
||||
SignalExceptionAddressStore();
|
||||
break;
|
||||
/* Shouldn't actually be reached. */
|
||||
abort ();
|
||||
|
||||
default:
|
||||
sim_engine_abort (sd, cpu, cia,
|
||||
|
@ -1038,7 +1038,7 @@ extern int DSPLO_REGNUM[4];
|
||||
extern int DSPHI_REGNUM[4];
|
||||
|
||||
INLINE_SIM_MAIN (void) pending_tick (SIM_DESC sd, sim_cpu *cpu, address_word cia);
|
||||
extern SIM_CORE_SIGNAL_FN mips_core_signal;
|
||||
extern SIM_CORE_SIGNAL_FN mips_core_signal ATTRIBUTE_NORETURN;
|
||||
|
||||
char* pr_addr (address_word addr);
|
||||
char* pr_uword64 (uword64 addr);
|
||||
|
@ -196,7 +196,8 @@ INLINE_SIM_MAIN (void) genericOr (uint32_t source, uint32_t destReg);
|
||||
INLINE_SIM_MAIN (void) genericXor (uint32_t source, uint32_t destReg);
|
||||
INLINE_SIM_MAIN (void) genericBtst (uint32_t leftOpnd, uint32_t rightOpnd);
|
||||
INLINE_SIM_MAIN (void) do_syscall (SIM_DESC sd);
|
||||
void program_interrupt (SIM_DESC sd, sim_cpu *cpu, sim_cia cia, SIM_SIGNAL sig);
|
||||
void program_interrupt (SIM_DESC sd, sim_cpu *cpu, sim_cia cia, SIM_SIGNAL sig)
|
||||
ATTRIBUTE_NORETURN;
|
||||
|
||||
void mn10300_cpu_exception_trigger(SIM_DESC sd, sim_cpu* cpu, address_word pc);
|
||||
void mn10300_cpu_exception_suspend(SIM_DESC sd, sim_cpu* cpu, int exception);
|
||||
|
@ -48,6 +48,6 @@ mn10300_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER),
|
||||
#include "mn10300-sim.h"
|
||||
#endif
|
||||
|
||||
extern SIM_CORE_SIGNAL_FN mn10300_core_signal;
|
||||
extern SIM_CORE_SIGNAL_FN mn10300_core_signal ATTRIBUTE_NORETURN;
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user