摘要 |
Precise exception handling relies on a precise subject state including an accurate program counter and register values of a subject processor. Subject code (17) is translated into target code ( 21 ) executable by a target processor ( 13 ). The generated target code (17) includes counterpart target instructions ( 214 ) associated with fault-vulnerable subject code instructions ( 174 ). Further, each of the counterpart target code instruction ( 214 ) is associated with recovery information ( 195 ). When an exception (e.g. a fault) occurs, the recovery information ( 195 ) is retrieved and used to recover a precise subject state, in particular by taking account of optimizations to generate the common-case target code ( 21 ). The precise subject state is then used to precisely handle the exception.
|