aboutsummaryrefslogtreecommitdiff
path: root/sim/fr30/sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/fr30/sem.c')
-rw-r--r--sim/fr30/sem.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sim/fr30/sem.c b/sim/fr30/sem.c
index 9d05ecd..5889698 100644
--- a/sim/fr30/sem.c
+++ b/sim/fr30/sem.c
@@ -5697,13 +5697,21 @@ SEM_FN_NAME (fr30bf,init_idesc_table) (SIM_CPU *current_cpu)
{
IDESC *idesc_table = CPU_IDESC (current_cpu);
const struct sem_fn_desc *sf;
+ int mach_num = MACH_NUM (CPU_MACH (current_cpu));
for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
{
+ int valid_p = CGEN_INSN_MACH_HAS_P (idesc_table[sf->index].idata, mach_num);
#if FAST_P
- idesc_table[sf->index].sem_fast = sf->fn;
+ if (valid_p)
+ idesc_table[sf->index].sem_fast = sf->fn;
+ else
+ idesc_table[sf->index].sem_fast = SEM_FN_NAME (fr30bf,x_invalid);
#else
- idesc_table[sf->index].sem_full = sf->fn;
+ if (valid_p)
+ idesc_table[sf->index].sem_full = sf->fn;
+ else
+ idesc_table[sf->index].sem_full = SEM_FN_NAME (fr30bf,x_invalid);
#endif
}
}