On 1 September 2015 at 06:16, Richard Henderson <r...@twiddle.net> 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