From 61c6b7186e6889ad6e3250c7dd83678f775e6150 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 1 May 2013 23:11:00 -0700 Subject: [PATCH] Implement UMLAL --- src/arm/isa-arm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/arm/isa-arm.c b/src/arm/isa-arm.c index b1a4a7dd0..6c4b8cdbe 100644 --- a/src/arm/isa-arm.c +++ b/src/arm/isa-arm.c @@ -594,8 +594,15 @@ DEFINE_MULTIPLY_INSTRUCTION_ARM(SMULL, 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(UMLAL, + uint64_t d = ((uint64_t) cpu->gprs[rm]) * ((uint64_t) cpu->gprs[rs]); + int32_t dm = cpu->gprs[rd]; + int32_t dn = d; + cpu->gprs[rd] = dm + dn; + cpu->gprs[rdHi] = cpu->gprs[rdHi] + (d >> 32) + ARM_CARRY_FROM(dm, dn, cpu->gprs[rd]);, + ARM_NEUTRAL_HI_S(cpu->gprs[rd], cpu->gprs[rdHi])) + DEFINE_MULTIPLY_INSTRUCTION_ARM(UMULL, uint64_t d = ((uint64_t) cpu->gprs[rm]) * ((uint64_t) cpu->gprs[rs]); cpu->gprs[rd] = d;