X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fadd_digits_asm.s;h=8144acc0ed8722291df104640c63e1b60e50afdc;hb=319b6b36b1354e944e76246a093f103188746369;hp=39f4af9acf5817eeed0a80cb22be8a09d703461d;hpb=e4c05570709db2718a983c27322942769eab4c86;p=ipdf%2Fcode.git diff --git a/src/add_digits_asm.s b/src/add_digits_asm.s index 39f4af9..8144acc 100644 --- a/src/add_digits_asm.s +++ b/src/add_digits_asm.s @@ -9,6 +9,7 @@ # Result in %rax is the final result in the carry flag # Exploits the fact that inc and dec do not affect the carry flag add_digits: + addq $0, %rax loop: movq (%rsi), %rax # Temporarily store digit from second array adcq %rax, (%rdi) # Add digits in second and first array, store in first