Implement UMLAL
Jeffrey Pfau jeffrey@endrift.com
Wed, 01 May 2013 23:11:00 -0700
1 files changed,
9 insertions(+),
2 deletions(-)
jump to
M
src/arm/isa-arm.c
→
src/arm/isa-arm.c
@@ -594,8 +594,15 @@ 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(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;