Skip to content

Commit

Permalink
Merge pull request python#35 from tiran/perf-arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal authored Aug 21, 2022
2 parents daacbf5 + dfecbc5 commit f4a3ea4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
15 changes: 12 additions & 3 deletions Objects/asm_trampoline.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,19 @@ _Py_trampoline_func_start:
pop %rbp
ret
#endif // __x86_64__
#ifdef __aarch64__
TODO
#if defined(__aarch64__) && defined(__AARCH64EL__) && !defined(__ILP32__)
// ARM64 little endian, 64bit ABI
// generate with aarch64-linux-gnu-gcc 12.1
stp x29, x30, [sp, -16]!
mov x29, sp
mov x4, x0
mov x0, x1
mov x1, x2
mov w2, w3
blr x4
ldp x29, x30, [sp], 16
ret
#endif
.globl _Py_trampoline_func_end
_Py_trampoline_func_end:
.section .note.GNU-stack,"",@progbits

6 changes: 4 additions & 2 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3428,8 +3428,9 @@ AC_MSG_RESULT($SHLIBS)
dnl perf trampoline is Linux specific and requires an arch-specific
dnl trampoline in asssembly.
AC_MSG_CHECKING([perf trampoline])
AS_CASE([$host],
[x86_64-*-linux-*], [perf_trampoline=yes],
AS_CASE([$PLATFORM_TRIPLET],
[x86_64-linux-gnu], [perf_trampoline=yes],
[aarch64-linux-gnu], [perf_trampoline=yes],
[perf_trampoline=no]
)
AC_MSG_RESULT([$perf_trampoline])
Expand Down

0 comments on commit f4a3ea4

Please sign in to comment.