mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target-tilegx: Decode ill pseudo-instructions
Notice raise and bpt, decoding the constants embedded in the nop addil instruction in the x0 slot. [rth: Generalize TILEGX_EXCP_OPCODE_ILL to TILEGX_EXCP_SIGNAL. Drop validation of signal values.] Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Message-Id: <1443243635-4886-1-git-send-email-gang.chen.5i5j@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
bf0f60a61b
commit
dd8070d865
3 changed files with 85 additions and 15 deletions
|
@ -3436,6 +3436,17 @@ static void gen_sigill_reg(CPUTLGState *env)
|
|||
queue_signal(env, info.si_signo, &info);
|
||||
}
|
||||
|
||||
static void do_signal(CPUTLGState *env)
|
||||
{
|
||||
target_siginfo_t info;
|
||||
|
||||
info.si_signo = env->signo;
|
||||
info.si_errno = 0;
|
||||
info.si_code = env->sigcode;
|
||||
info._sifields._sigfault._addr = env->pc;
|
||||
queue_signal(env, info.si_signo, &info);
|
||||
}
|
||||
|
||||
static void set_regval(CPUTLGState *env, uint8_t reg, uint64_t val)
|
||||
{
|
||||
if (unlikely(reg >= TILEGX_R_COUNT)) {
|
||||
|
@ -3622,6 +3633,9 @@ void cpu_loop(CPUTLGState *env)
|
|||
case TILEGX_EXCP_OPCODE_FETCHOR4:
|
||||
do_fetch(env, trapnr, false);
|
||||
break;
|
||||
case TILEGX_EXCP_SIGNAL:
|
||||
do_signal(env);
|
||||
break;
|
||||
case TILEGX_EXCP_REG_IDN_ACCESS:
|
||||
case TILEGX_EXCP_REG_UDN_ACCESS:
|
||||
gen_sigill_reg(env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue