Skip to content

Commit

Permalink
AMD64: use PLT calls for PIC, as required by linker
Browse files Browse the repository at this point in the history
  • Loading branch information
cruvolo committed Jul 11, 2018
1 parent fd503d6 commit f3a766d
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 200 deletions.
16 changes: 8 additions & 8 deletions amd64/fltmark.s
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ floatwr:
movq %rsi, %rbp
/* allocate */
shlq $10, %rdi
call malloc
call malloc@plt
movq %rax, %r12
/* wall time (start) */
leaq 0(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* execute */
movq %rbx, %rcx
movq %r12, %rdi
Expand Down Expand Up @@ -180,10 +180,10 @@ floatwr:
/* wall time (finish) */
leaq 16(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* free */
movq %r12, %rdi
call free
call free@plt
/* calculate */
movq 16(%rsp), %rax
subq 0(%rsp), %rax
Expand All @@ -210,7 +210,7 @@ floatrd:
movq %rsi, %rbp
/* allocate */
shlq $10, %rdi
call malloc
call malloc@plt
movq %rax, %r12
/* prefill */
movq %rbx, %rcx
Expand All @@ -228,7 +228,7 @@ floatrd:
/* wall time (start) */
leaq 0(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* execute */
movq %rbx, %rcx
movq %r12, %rdi
Expand Down Expand Up @@ -502,10 +502,10 @@ floatrd:
/* wall time (finish) */
leaq 16(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* free */
movq %r12, %rdi
call free
call free@plt
/* calculate */
movq 16(%rsp), %rax
subq 0(%rsp), %rax
Expand Down
56 changes: 28 additions & 28 deletions amd64/fltmem.s
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ floatcp:
shlq $10, %rbx
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r12
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r13
/* prefill */
movq %rbx, %rcx
Expand All @@ -52,7 +52,7 @@ floatcp:
/* wall time (start) */
leaq 0(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* execute */
shrq $8, %rbx
movq %rbx, %rcx
Expand Down Expand Up @@ -138,13 +138,13 @@ floatcp:
/* wall time (finish) */
leaq 16(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* free */
movq %r13, %rdi
call free
call free@plt
/* free */
movq %r12, %rdi
call free
call free@plt
/* calculate */
movq 16(%rsp), %rax
subq 0(%rsp), %rax
Expand Down Expand Up @@ -174,11 +174,11 @@ floatsc:
shlq $10, %rbx
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r12
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r13
/* prefill */
movq %rbx, %rcx
Expand All @@ -197,7 +197,7 @@ floatsc:
/* wall time (start) */
leaq 0(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* execute */
shrq $8, %rbx
movq %rbx, %rcx
Expand Down Expand Up @@ -316,13 +316,13 @@ floatsc:
/* wall time (finish) */
leaq 16(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* free */
movq %r13, %rdi
call free
call free@plt
/* free */
movq %r12, %rdi
call free
call free@plt
/* calculate */
movq 16(%rsp), %rax
subq 0(%rsp), %rax
Expand Down Expand Up @@ -354,15 +354,15 @@ floatad:
shlq $10, %rbx
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r12
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r13
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r14
/* prefill */
movq %rbx, %rcx
Expand All @@ -387,7 +387,7 @@ floatad:
/* wall time (start) */
leaq 0(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* execute */
shrq $8, %rbx
movq %rbx, %rcx
Expand Down Expand Up @@ -508,16 +508,16 @@ floatad:
/* wall time (finish) */
leaq 16(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* free */
movq %r14, %rdi
call free
call free@plt
/* free */
movq %r13, %rdi
call free
call free@plt
/* free */
movq %r12, %rdi
call free
call free@plt
/* calculate */
movq 16(%rsp), %rax
subq 0(%rsp), %rax
Expand Down Expand Up @@ -551,15 +551,15 @@ floattr:
shlq $10, %rbx
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r12
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r13
/* allocate */
movq %rbx, %rdi
call malloc
call malloc@plt
movq %rax, %r14
/* prefill */
movq %rbx, %rcx
Expand All @@ -584,7 +584,7 @@ floattr:
/* wall time (start) */
leaq 0(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* execute */
shrq $8, %rbx
movq %rbx, %rcx
Expand Down Expand Up @@ -738,16 +738,16 @@ floattr:
/* wall time (finish) */
leaq 16(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* free */
movq %r14, %rdi
call free
call free@plt
/* free */
movq %r13, %rdi
call free
call free@plt
/* free */
movq %r12, %rdi
call free
call free@plt
/* calculate */
movq 16(%rsp), %rax
subq 0(%rsp), %rax
Expand Down
16 changes: 8 additions & 8 deletions amd64/intmark.s
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ intwr:
movq %rsi, %rbp
/* allocate */
shlq $10, %rdi
call malloc
call malloc@plt
movq %rax, %r12
/* wall time (start) */
leaq 0(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* execute */
movq %rbx, %rcx
movq %r12, %rdi
Expand Down Expand Up @@ -179,10 +179,10 @@ intwr:
/* wall time (finish) */
leaq 16(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* free */
movq %r12, %rdi
call free
call free@plt
/* calculate */
movq 16(%rsp), %rax
subq 0(%rsp), %rax
Expand Down Expand Up @@ -211,7 +211,7 @@ intrd:
movq %rsi, %rbp
/* allocate */
shlq $10, %rdi
call malloc
call malloc@plt
movq %rax, %r12
/* prefill */
movq %rbx, %rcx
Expand All @@ -227,7 +227,7 @@ intrd:
/* wall time (start) */
leaq 0(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* execute */
movq %rbx, %rcx
movq %r12, %rdi
Expand Down Expand Up @@ -373,10 +373,10 @@ intrd:
/* wall time (finish) */
leaq 16(%rsp), %rdi
xorq %rsi, %rsi
call gettimeofday
call gettimeofday@plt
/* free */
movq %r12, %rdi
call free
call free@plt
/* calculate */
movq 16(%rsp), %rax
subq 0(%rsp), %rax
Expand Down

0 comments on commit f3a766d

Please sign in to comment.