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
Conversation
There was a problem hiding this 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.
This comment was marked as off-topic.
Sorry, something went wrong.
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.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
if (iter == s_opcodes.cend()) | ||
continue; | ||
|
||
if (s_op_table[i] == nop) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -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.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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 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.