Skip to content

Commit 024576f

Browse files
committed
langref updates for aarch64 trampoline
Add clarifying comments to the langref from the review of #126743 (split from the functional changes, to follow).
1 parent ac583df commit 024576f

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

llvm/docs/LangRef.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,9 @@ added in the future:
410410
calling convention: on most platforms, they are not preserved and need to
411411
be saved by the caller, but on Windows, xmm6-xmm15 are preserved.
412412

413-
- On AArch64 the callee preserve all general purpose registers, except X0-X8
414-
and X16-X18.
413+
- On AArch64 the callee preserve all general purpose registers, except
414+
X0-X8 and X16-X18. Using this calling convention with nest is forbidden
415+
and may crash llvm.
415416

416417
The idea behind this convention is to support calls to runtime functions
417418
that have a hot path and a cold path. The hot path is usually a small piece
@@ -447,9 +448,10 @@ added in the future:
447448
R11. R11 can be used as a scratch register. Furthermore it also preserves
448449
all floating-point registers (XMMs/YMMs).
449450

450-
- On AArch64 the callee preserve all general purpose registers, except X0-X8
451-
and X16-X18. Furthermore it also preserves lower 128 bits of V8-V31 SIMD -
452-
floating point registers.
451+
- On AArch64 the callee preserve all general purpose registers, except
452+
X0-X8 and X16-X18. Furthermore it also preserves lower 128 bits of V8-V31
453+
SIMD floating point registers. Using this calling convention with nest is
454+
forbidden and may crash llvm.
453455

454456
The idea behind this convention is to support calls to runtime functions
455457
that don't need to call out to any other functions.
@@ -21120,7 +21122,12 @@ sufficiently aligned block of memory; this memory is written to by the
2112021122
intrinsic. Note that the size and the alignment are target-specific -
2112121123
LLVM currently provides no portable way of determining them, so a
2112221124
front-end that generates this intrinsic needs to have some
21123-
target-specific knowledge. The ``func`` argument must hold a function.
21125+
target-specific knowledge.
21126+
21127+
The ``func`` argument must be a constant (potentially bitcasted) pointer to a
21128+
function declaration or definition, since the calling convention may affect the
21129+
content of the trampoline that is created.
21130+
2112421131

2112521132
Semantics:
2112621133
""""""""""

0 commit comments

Comments
 (0)