X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fsub_digits_asm.s;h=17d81c19eab4b8a6f69cbaf31d1a4c931fe35323;hp=1a6ee3b46d92e0c314bf809d4cab1e55d63f95e5;hb=319b6b36b1354e944e76246a093f103188746369;hpb=68dfceb76cbc78e1e0dd529dd0c14be116528353 diff --git a/src/sub_digits_asm.s b/src/sub_digits_asm.s index 1a6ee3b..17d81c1 100644 --- a/src/sub_digits_asm.s +++ b/src/sub_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 sub_digits: + subq $0, %rax # Reset the carry/borrow flag loop: movq (%rsi), %rax # Temporarily store digit from second array sbbq %rax, (%rdi) # Subtract digits in second and first array, store in first