summaryrefslogtreecommitdiff
path: root/zap/source/amd64/mem/memfor.S
diff options
context:
space:
mode:
Diffstat (limited to 'zap/source/amd64/mem/memfor.S')
-rw-r--r--zap/source/amd64/mem/memfor.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/zap/source/amd64/mem/memfor.S b/zap/source/amd64/mem/memfor.S
index be705b9..e9cfe6b 100644
--- a/zap/source/amd64/mem/memfor.S
+++ b/zap/source/amd64/mem/memfor.S
@@ -25,10 +25,10 @@ zap_memfor:
# Move registers into place:
movq %rdi,addr
movq %rsi,sz
+ movq %rdx,afterbuf
movq %rcx,fn
# Get the one-past-the-end address:
- movq %rdx,afterbuf
imulq sz,afterbuf # afterbuf *= sz // Calculate the array size in bytes (sz * num). We're using signed multiply because the equivalent using the unsigned instruction would use more instructions.
addq addr,afterbuf # afterbuf += addr