all repos — mgba @ e1963c6e60b006179284590f16373e972590e2d7

mGBA Game Boy Advance Emulator

Implement SMULL
Jeffrey Pfau jeffrey@endrift.com
Tue, 30 Apr 2013 01:42:11 -0700
commit

e1963c6e60b006179284590f16373e972590e2d7

parent

698bc0ada5ade172a618014f2054fdd597f659f7

1 files changed, 5 insertions(+), 2 deletions(-)

jump to
M src/arm/isa-arm.csrc/arm/isa-arm.c

@@ -522,8 +522,11 @@ DEFINE_MULTIPLY_INSTRUCTION_ARM(MLA, cpu->gprs[rdHi] = cpu->gprs[rm] * cpu->gprs[rs] + cpu->gprs[rd], ARM_NEUTRAL_S(, , cpu->gprs[rdHi]))

DEFINE_MULTIPLY_INSTRUCTION_ARM(MUL, cpu->gprs[rdHi] = cpu->gprs[rm] * cpu->gprs[rs], ARM_NEUTRAL_S(cpu->gprs[rm], cpu->gprs[rs], cpu->gprs[rd])) DEFINE_INSTRUCTION_ARM(SMLAL, ARM_STUB) DEFINE_INSTRUCTION_ARM(SMLALS, ARM_STUB) -DEFINE_INSTRUCTION_ARM(SMULL, ARM_STUB) -DEFINE_INSTRUCTION_ARM(SMULLS, ARM_STUB) +DEFINE_MULTIPLY_INSTRUCTION_ARM(SMULL, + int64_t d = ((int64_t) cpu->gprs[rm]) * ((int64_t) cpu->gprs[rs]); + cpu->gprs[rd] = d; + cpu->gprs[rdHi] = d >> 32;, + ARM_NEUTRAL_HI_S(cpu->gprs[rd], cpu->gprs[rdHi])) DEFINE_INSTRUCTION_ARM(UMLAL, ARM_STUB) DEFINE_INSTRUCTION_ARM(UMLALS, ARM_STUB) DEFINE_MULTIPLY_INSTRUCTION_ARM(UMULL,