aboutsummaryrefslogtreecommitdiff
path: root/src/array_maker.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/array_maker.s')
-rw-r--r--src/array_maker.s9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/array_maker.s b/src/array_maker.s
index d4c0afc..7586d84 100644
--- a/src/array_maker.s
+++ b/src/array_maker.s
@@ -10,6 +10,7 @@
.type make_array_from_file, @function
make_array_from_file:
+ # save
push %r15
push %r14
push %r13
@@ -47,6 +48,7 @@ end:
movq %r13, %rax # Return pointer to array
movq %r14, %rdx # Return the number of elements in the array
+ # retrieve
pop %r12
pop %r13
pop %r14
@@ -67,6 +69,7 @@ end:
.globl make_pairwise_data
.type make_pairwise_data, @function
make_pairwise_data:
+ # save
push %r15
push %r14
push %r13
@@ -82,7 +85,7 @@ end:
movq %rax, %r13 # Save number of lines (coordinates) in r13
# Allocate space for the pairwise coordinates after parseData
- # The space allocated should be 2*(#coordinates)*8 bytes
+ # The space allocated = 2*(#coordinates)*8 bytes
imulq $16, %r13 # Multiply number of coordinates with 2*8
movq %r13, %rdi # Select the number of coordinates
call allocate
@@ -105,6 +108,7 @@ end:
movq %rax, %rdx # Return number of pairs (the quotient of division)
movq %r12, %rax # Return pointer to pairwise data
+ # retrieve
pop %r12
pop %r13
pop %r14
@@ -124,7 +128,7 @@ end:
.globl create_file_buffer
.type create_file_buffer, @function
create_file_buffer:
-
+ # save
push %r15
push %r14
push %r13
@@ -147,6 +151,7 @@ end:
movq %r13, %rax # Return pointer to start of file
movq %r14, %rdx # Return length of file
+ # retrieve
pop %r13
pop %r14
pop %r15