Thanks for the detailed explanation :)

Also, do you think that future SMID support can increase performance 
> of emulator? All emulated cpu instructions are emulated one by one, so 
> looks SMID is also useless. 
>
> I did, at least for complete system emulators, but the idea I have is so 
far out that I don't know if I will ever get around tackling that idea.

When you look at complete computer emulation, almost everything that's not 
the actual CPU is about counters or shifting groups of bits from one place 
to another, maybe applying logical operations like bitwise AND/OR/XOR. So 
for each emulated tick in an entire computer system, there's quite a few 
counters counting, and quite a few logical ops happening, and many of those 
could happen in parallel encoded in a single SIMD instruction.

One problem is control flow / conditional stuff. E.g. actions that need to 
happen when counters reach certain values, and so on...

So the crazy idea would be to map the *entire computer system* to a very 
wide SIMD-like bit vector (probably split across several SIMD registers), 
and then run a "tick program" over that very-wide SIMD vector which would 
perform bit twiddling, counting, moving bits from one part of the SIMD 
vector to another etc etc, "as parallel as possible", until the SIMD vector 
represents the new state of the computer system after the current tick.

It's probably also a good idea to code-generate / compile this "tick 
program" from some sort of hardware description language.

TBH I have no idea if that idea is realistic with current SIMD instruction 
sets, or even GPUs, the idea might just be too crazy :D

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/afd04958-ee2c-4a87-bb75-696235e66bb1%40googlegroups.com.

Reply via email to