Re: [hatari-devel] FPU update

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,
 
What about (complex) bonus feature: enable all FPU arithmetic exceptions
and capture and log them too. If instruction causes arithmetic
exception, log the exception number, disable exceptions, restore stack
and execute tested instruction again. Then re-enable exceptions and
execute next instruction and so on..

This would be big help for implementing arithmetic exception emulation.

Over lunch I modified the test to support a 'diagnostic_mode' build flag which changes the test behaviour such that every individual result is recorded (in record mode) and compared (in test mode), without any hashing. If a delta is detected it immediately raises a trapcc which in turn prints a failure message, reporting (approximately) the affected FPU instruction address and then continues execution. I say approximately because its a variable number of program words from the actual exception address - near enough to be useful though.

You can catch these exceptions immediately in Hatari by starting with the following params:

 --debug-except nohandler,trapv

Alternatively you can augment the trap handler ($1c) in the code itself, to do whatever you want.


I did things this way because catching FPU exceptions (as you discuss above) would need to be handled in a similar kind of way. However actually getting it to work might involve a bit more effort. Not sure yet.

I'll post the modified code and binaries later on. The expectd.dat file will need to be recorded on real HW though - I have currently only generated one for Hatari 2.00...

Doug.













Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/