Replies: 1 comment
-
We also could do it the other way around: Furthermore, it is necessary to support both the full system and user mode mode emulation in QEMU. For the user mode emulation we need to connect the exceptions with QEMU handling routines.
Here also the other direction will work:
An exception is a procedure. We do not want procedures in instructions, only in exceptions and in the processor specification. Another option is to use processes instead of procedures, we will need them anyway. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In VADL, there must be a way to define the behavior in case of exception events. Such events include unknown instructions during decoding and illegal memory accesses.
The most obvious way would be to define such behavior using annotations. The behavior when an unknown instruction occurs during decoding could, for example, be defined with
In the case of an
unknown instructionthis works well as there is no dynamic information that needs to be provided to the raised exception (the failed statement can be read withPCin the exception).However, there are cases where the exception handler needs to know some information about the failed operation. For example, if invalid memory is read, it may be relevant which address was attempted to be read.
With the above approach, we cannot pass the address value to the handler.
Using the lambda syntax would solve this problem
However, it would introduce a new construct that is not yet part of VADL.
If we had something like a
procedurein VADL (like afunctionwith side effects but no return value), we could do something like this:However, it also introduces a new construct into VADL that is very powerful and has a big impact on the whole language.
Therefore, I currently have no real solution for how users can define the behavior for exceptional events.
Beta Was this translation helpful? Give feedback.
All reactions