-
Notifications
You must be signed in to change notification settings - Fork 13.5k
langref updates for aarch64 trampoline #139740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -410,8 +410,8 @@ added in the future: | |
calling convention: on most platforms, they are not preserved and need to | ||
be saved by the caller, but on Windows, xmm6-xmm15 are preserved. | ||
|
||
- On AArch64 the callee preserve all general purpose registers, except X0-X8 | ||
and X16-X18. | ||
- On AArch64 the callee preserve all general purpose registers, except | ||
X0-X8 and X16-X18. Not allowed with ``nest``. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't put "may crash llvm". That's not contractual: it's a bug if we crash instead of printing a proper error message. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd also consider it a bug and a crash if LLVM prints any error messages (llvm_unreachable is supposed to be, um, unreachable in code that passes the verifier, but it is used for trampoline in backends such as X86ISelLowering with the message "Unsupported calling convention"). I guess it is instead currently just an undocumented behavior that calling conventions are allowed to print errors if the backend doesn't support it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't usually add a "not all backends support this construct" disclaimers to LangRef; it would pop up in a lot of places, and it wouldn't really be helpful in most of those places. There is a way to print a proper diagnostic from the backend without crashing, we just don't use it in all the places we should. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I see Would you be willing to review and merge a PR to that section of the manual if I were to add a mention there? (and perhaps we should also delete the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assumed everyone was aware of LLVMContext::diagnose... I did mention it in the discussion (although not by name). For documentation, that doesn't seem like it's quite the right section of the manual; it's describing generic "error handling", not the rules specific to LLVM passes. We probably should have a description somewhere, though. I think the reason diagnose() exits by default is so you don't accidentally forget to write a handler, and then continue processing bogus output. In practice, you almost always want one. |
||
The idea behind this convention is to support calls to runtime functions | ||
that have a hot path and a cold path. The hot path is usually a small piece | ||
|
@@ -447,9 +447,9 @@ added in the future: | |
R11. R11 can be used as a scratch register. Furthermore it also preserves | ||
all floating-point registers (XMMs/YMMs). | ||
|
||
- On AArch64 the callee preserve all general purpose registers, except X0-X8 | ||
and X16-X18. Furthermore it also preserves lower 128 bits of V8-V31 SIMD - | ||
floating point registers. | ||
- On AArch64 the callee preserve all general purpose registers, except | ||
X0-X8 and X16-X18. Furthermore it also preserves lower 128 bits of V8-V31 | ||
SIMD floating point registers. Not allowed with ``nest``. | ||
vtjnash marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The idea behind this convention is to support calls to runtime functions | ||
that don't need to call out to any other functions. | ||
|
@@ -21120,7 +21120,12 @@ sufficiently aligned block of memory; this memory is written to by the | |
intrinsic. Note that the size and the alignment are target-specific - | ||
LLVM currently provides no portable way of determining them, so a | ||
front-end that generates this intrinsic needs to have some | ||
target-specific knowledge. The ``func`` argument must hold a function. | ||
target-specific knowledge. | ||
|
||
The ``func`` argument must be a constant (potentially bitcasted) pointer to a | ||
function declaration or definition, since the calling convention may affect the | ||
content of the trampoline that is created. | ||
|
||
|
||
Semantics: | ||
"""""""""" | ||
|
Uh oh!
There was an error while loading. Please reload this page.