-
Notifications
You must be signed in to change notification settings - Fork 141
Add MIPS CP1 instructions to disassembler #235
Comments
@DavidRabbitson
Then you can implement the code in TDD manner. |
Ok. Now I'm learning FPU's instructions structure. First enhancements will be on these weekends. |
How do I add instructions to |
For example, you can add different tables for different formats |
How do I add tables to the decoder if instructions with mipt-mips/simulator/mips/mips_instr.cpp Lines 378 to 385 in 0d6542a
I mean instruction add.s is defined by the funct field and bc1f is defined by the fmt /rs field.
|
I think it may be handled in a separate method where you can check functors etc. switch ( instr.opcode)
{
case 0x0: return get_table_entry( isaMapR<I>, instr.funct);
case 0x1: return get_table_entry( isaMapRI<I>, instr.rt);
case 0x10: return get_table_entry( isaMapCOP0<I>, instr.rs);
case 0x11: return get_cp1_entry( instr);
case 0x1C: return get_table_entry( isaMapMIPS32<I>, instr.funct);
default: return get_table_entry( isaMapIJ<I>, instr.opcode);
} By the way, may you check-in the tests, even if they are disabled for now? |
|
Instructions mipt-mips/simulator/mips/t/unit_test.cpp Line 2056 in ea14ec1
mipt-mips/simulator/mips/t/unit_test.cpp Line 2180 in ea14ec1
|
I prefer to stick to our conventions where destination always goes first, and sources follow it. |
|
Oh, thats better. |
How can I add mipt-mips/simulator/mips/mips_instr.cpp Lines 228 to 230 in 8d9569a
|
Ouch. Let's put these instructions aside for now. |
Do I need to implement 3rd source print? |
Yes, I think that would be useful |
FPU instructions are part of MIPS ISA (see part B). We want to start with instruction decoding only.
http://math-atlas.sourceforge.net/devel/assembly/mips-iv.pdf
Use our current MIPS disassembler code to introduce the floating point instructions.
The text was updated successfully, but these errors were encountered: