aboutsummaryrefslogtreecommitdiff
path: root/src/main.s
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main.s4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.s b/src/main.s
index bad6042..9c04823 100644
--- a/src/main.s
+++ b/src/main.s
@@ -15,8 +15,8 @@ _start:
# Sort
movq %rax, %rdi # Select address of array
- movq %r15, %rsi # Select length of array
- decq %rsi
+ leaq -1(%r15), %rcx # Select length of array -1 as high
+ xorq %rsi, %rsi # low = 0
movq $1, %rdx # Sort by key 1
call qsort # Sort the array