qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v14 22/33] target-tilegx: Implement system and m


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v14 22/33] target-tilegx: Implement system and memory management instructions
Date: Tue, 1 Sep 2015 09:23:40 +0100

On 1 September 2015 at 06:16, Richard Henderson <address@hidden> wrote:
> I'm not really sure what to do with reserved operand fields on this
> architecture.  Raising an exception is what Chen started with, but the
> encoding for brk suggests that they're ignored.

The ISA says "Implementations are permitted, but not required, to take
an Illegal Instruction interrupt when detecting a nonzero value in an
unused instruction field.".

Raising an exception seems like the best option to me.

The description of 'bpt' suggests that it's just "a particular
pattern we guarantee will always generate an illegal instruction
interrupt", and then the kernel figures out that it was a bpt
in particular by looking at the instruction:

http://lxr.free-electrons.com/source/arch/tile/kernel/traps.c#L212

Similarly for 'raise', handled a little further up in that file.

In QEMU, we probably want to deal with this by having the insns
generate an illegal instruction exception in translate.c and
then examine the instruction at PC in the linux-user/main.c
loop to see if it should be special-cased as 'bpt', etc.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]