Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSPTables: Separate interpreter and JIT functions from main info table #7138

Merged
merged 1 commit into from Jun 21, 2018

Conversation

lioncash
Copy link
Member

This is one of the last things that needed to be done in order to finally separate the x86-64-specific code from the rest of the common DSP code. This splits the tables up similar to how it's currently done for the PowerPC CPU tables.

Now, the tables are split up and within their own relevant source files, so the main table within the common DSP code acts as the "info" table that provides specifics about a particular instruction, while the other tables contain the actual instruction.

With this out of the way, all that's left is to make a general base for the emitters and we can then replace the x64 JIT pointer in DSPCore with it, getting all x64 out of the common code once and for all.

While shuffling all the code around, the removal of the DSPEmitter includes in some places uncovered indirect inclusions, so this also fixes those as well.

This does have more lingering cleanup that will be done in a follow-up. I've kept it out of this PR, as this is already pushing a 1K line count, which is quite big (mostly due to table modifications). The cleanup mostly consists of renaming and removals, which are fairly trivial to do.

Copy link
Member

@BhaaLseN BhaaLseN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I sincerely hope that those tables are correct; I'm not gonna check them one by one :P


namespace
{
std::array<InterpreterFunction, 65536> s_op_table;

This comment was marked as off-topic.

if (iter == s_opcodes_ext.cend())
continue;

if (s_ext_op_table[i] == nop)

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

if (iter == s_opcodes.cend())
continue;

if (s_op_table[i] == nop)

This comment was marked as off-topic.

@@ -25,10 +26,10 @@ void ExecuteInstruction(const UDSPInstruction inst)

if (opcode_template->extended)
{
GetExtOpTemplate(inst)->intFunc(inst);

This comment was marked as off-topic.

This comment was marked as off-topic.

@degasus
Copy link
Member

degasus commented Jun 21, 2018

With this issues fixed: LGTM

if (iter == s_opcodes_ext.cend())
continue;

if (s_ext_op_table[i] == nullptr)

This comment was marked as off-topic.

This comment was marked as off-topic.

This is one of the last things that needed to be done in order to
finally separate the x86-64-specific code from the rest of the common
DSP code. This splits the tables up similar to how it's currently done
for the PowerPC CPU tables.

Now, the tables are split up and within their own relevant source files,
so the main table within the common DSP code acts as the "info" table
that provides specifics about a particular instruction, while the other
tables contain the actual instruction.

With this out of the way, all that's left is to make a general base for
the emitters and we can then replace the x64 JIT pointer in DSPCore with
it, getting all x64 out of the common code once and for all.

While shuffling all the code around, the removal of the DSPEmitter
includes in some places uncovered indirect inclusions, so this also
fixes those as well.
@degasus degasus merged commit 5f7dc31 into dolphin-emu:master Jun 21, 2018
@lioncash lioncash deleted the dsp-table branch June 21, 2018 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants