Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Ahhh! That's genius! Reply to this message
Posted byfinaldave
Posted on12/13/03 05:19 PM



> > I believe that is the way the i960 is emulated in virtua & nebulam2. You could
> > do it dynamically too, although it might not be worth it unless the decode was
> > particularly heavy.
> >
> > smf
> >
>
> it seems a bit different from what I use in nebulam2, it seems that it generates
> a func for each instruction variation (register and flags), while for m2 I only
> generate 1 variation, and use a struct to hold the pointers to the src and dst
> operands, that requires extra work on decoding, I don't know if it's faster or
> slower.
>
> I should work some day on making the DSP alu ops not to compute the flags
> always, actually the code to compute flags is twice as big as the code to just
> compute the result (that will be a very nice speedup).
>

I've found that often too - things like half-carry on z80 for example can take so long to calculate when you don't have an opcode like lahf

Even in assembler though it can be a nasty overhead. Dead flag elimation could go quite far...!
Especially if you replaced the opcode directly with the handler

I'm wondering if (because C makes quite a good job on the register copies but a bad job on the flag calculation) dead flag analysis could bring C emulators very close to Asm ones and possibly even past them!

(Of course the ideal would be a Asm emulator with dead flag analysis as well, but who can be bothered!)




You learn something old everyday...


-
Entire Thread
Subject  Posted byPosted On
*Does Generator have a 68000 Dynarec?  finaldave12/10/03 03:35 PM
.*Re: Does Generator have a 68000 Dynarec?  Bart T.12/10/03 03:48 PM
..*Ahhh! That's genius!  finaldave12/11/03 05:03 AM
...*Re: Ahhh! That's genius!  smf12/12/03 07:56 AM
....*Re: Ahhh! That's genius!  ElSemi12/13/03 07:31 AM
......Re: Ahhh! That's genius!  finaldave12/13/03 05:19 PM
......*Re: Ahhh! That's genius!  Bart T.12/13/03 08:31 PM
.......*Re: Ahhh! That's genius!  ElSemi12/14/03 05:18 AM
........*Re: Ahhh! That's genius!  Riff12/15/03 00:38 AM
.........*Re: Ahhh! That's genius!  Bart T.12/15/03 01:17 AM
..........*Re: Ahhh! That's genius!  Riff12/15/03 02:27 PM
...........*Re: Ahhh! That's genius!  Bart T.12/16/03 03:20 AM
...........*Re: Ahhh! That's genius!  finaldave12/15/03 03:48 PM
............*Re: Ahhh! That's genius!  Bart T.12/15/03 04:30 PM
.............*Re: Ahhh! That's genius!  Kayamon12/18/03 08:56 AM
..............*Re: Ahhh! That's genius!  finaldave12/18/03 09:36 AM
...............*Re: Ahhh! That's genius!  smf12/19/03 04:33 AM
.............*Re: Ahhh! That's genius!  finaldave12/16/03 05:16 AM
..............*Re: Ahhh! That's genius!  Bart T.12/16/03 01:04 PM
...............*Re: Ahhh! That's genius!  finaldave12/16/03 03:40 PM
................*Re: Ahhh! That's genius!  smf12/17/03 06:33 AM
.................*Re: Ahhh! That's genius!  finaldave12/17/03 06:39 AM
..................*Re: Ahhh! That's genius!  smf12/17/03 09:57 AM
...................*Re: Ahhh! That's genius!  finaldave12/17/03 12:39 PM
....................*Re: Ahhh! That's genius!  smf12/17/03 02:59 PM