Re: [hatari-devel] Basic cpu testsuite

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


Am Sun, 27 May 2018 19:35:54 +0200
schrieb Thomas Huth <th.huth@xxxxxxxxx>:

> Am Sat, 26 May 2018 15:44:53 +0200
> schrieb Thorsten Otto <admin@xxxxxxxxxxx>:
> 
> > > - Stuff like the "move sr,d0" vs. "move ccr,d0" ifdeffery of
> > > course won't work if the binary should be used for both, 68000
> > > and 68010+ CPU levels. We'd need to think of a way to solve that
> > > before such a test could be included...  
> >  
> > The attached patch should solve that. It will install exception
> > handlers that immediately terminate the program in tos-less mode,
> > thus solving also the problem of bus-errors jumping to nowhere land.
> > The exception handler for privilege violation will simulate move
> > sr,<ea> by move ccr,<ea>, just like TOS would do.  
> 
> Ok, thanks for the patch! But I think slowly the fake_tos array gets
> to a size where dealing with the hand-crafted binary code is not
> really managable anymore.
> I think we should put all that assembler code into a proper .S file
> instead and handle it like cart_asm.s ... I'll try to do come up with
> something like that in the next few days.

I've now moved the fake-tos to a separate source file, so it can be
easier re-assembled now. I also added code that sets up the exception
handlers to terminate Hatari in case of unexpected exceptions.

However, after having a closer look at that "move SR" stuff, I think
that's already too much for the minimalistic fake-TOS. There are easier
ways to work around this problem:

1) We could simply run such code in supervisor mode.

2) We could set the _longframe (0x59e) system variable in the non-TOS
mode. If it's set, test code must use "move ccr,..." and if it's not
set, test code must use "move sr,...".

 Thomas



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