More fixes

Co-Authored-By: joevt <950609+joevt@users.noreply.github.com>
This commit is contained in:
dingusdev
2024-09-30 19:44:11 -07:00
parent 738b40c7b6
commit ce122da984
4 changed files with 17 additions and 6 deletions

View File

@@ -1,3 +1,6 @@
#include "ppcopmacros.h"
#include "ppcemu.h"
POWEROPCODEOVREC (abs,
uint32_t ppc_result_d;
ppc_grab_regsda(instr);

View File

@@ -1,3 +1,6 @@
#include "ppcopmacros.h"
#include "ppcemu.h"
// Floating Point Arithmetic
OPCODEREC (fadd,
ppc_grab_regsfpdab(instr);

View File

@@ -1,9 +1,14 @@
#include "ppcopmacros.h"
#include "ppcemu.h"
OPCODESHIFT (addi,
ppc_grab_regsdasimm(instr);
if (shift)
if (shift){
ppc_state.gpr[reg_d] = (reg_a == 0) ? (simm << 16) : (ppc_result_a + (simm << 16));
else
}
else{
ppc_state.gpr[reg_d] = (reg_a == 0) ? simm : (ppc_result_a + simm);
}
)
OPCODEREC (addic,

View File

@@ -51,10 +51,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
void dppc_interpreter::ppc_##op(uint32_t instr) { \
__VA_ARGS__ \
} \
template void dppc_interpreter::ppc_##op<SHFT0, RC0>(uint32_t instr); \
template void dppc_interpreter::ppc_##op<SHFT1, RC0>(uint32_t instr); \
template void dppc_interpreter::ppc_##op<SHFT0, RC1>(uint32_t instr); \
template void dppc_interpreter::ppc_##op<SHFT1, RC1>(uint32_t instr);
template void dppc_interpreter::ppc_##op<RIGHT0, RC0>(uint32_t instr); \
template void dppc_interpreter::ppc_##op<LEFT1, RC0>(uint32_t instr); \
template void dppc_interpreter::ppc_##op<RIGHT0, RC1>(uint32_t instr); \
template void dppc_interpreter::ppc_##op<LEFT1, RC1>(uint32_t instr);
#undef OPCODECARRY
#define OPCODECARRY(op, ...) \