diff options
| author | Brian J. Tarricone <brian@tarricone.org> | 2021-02-15 23:32:16 -0800 |
|---|---|---|
| committer | Scott Mabin <scott@mabez.dev> | 2024-12-03 10:54:08 +0000 |
| commit | 059f6272c346654dfce7a68a6bb0c0aeb1ed756a (patch) | |
| tree | 2602aef8eb2d28360bc6a86b2369dff11f1a3bde /compiler/rustc_codegen_cranelift/example/std_example.rs | |
| parent | efdd9e802053caeb52103945df858e87f837e59a (diff) | |
| download | rust-059f6272c346654dfce7a68a6bb0c0aeb1ed756a.tar.gz rust-059f6272c346654dfce7a68a6bb0c0aeb1ed756a.zip | |
Teach rust core about Xtensa VaListImpl and add a custom lowering of vaarg for xtensa.
LLVM does not include an implementation of the va_arg instruction for Xtensa. From what I understand, this is a conscious decision and instead language frontends are encouraged to implement it themselves. The rationale seems to be that loading values correctly requires language and ABI-specific knowledge that LLVM lacks. This is true of most architectures, and rustc already provides implementation for a number of them. This commit extends the support to include Xtensa. See https://lists.llvm.org/pipermail/llvm-dev/2017-August/116337.html for some discussion on the topic. Unfortunately there does not seem to be a reference document for the semantics of the va_list and va_arg on Xtensa. The most reliable source is the GCC implementation, which this commit tries to follow. Clang also provides its own compatible implementation. This was tested for all the types that rustc allows in variadics. Co-authored-by: Brian Tarricone <brian@tarricone.org> Co-authored-by: Jonathan Bastien-Filiatrault <joe@x2a.org> Co-authored-by: Paul Lietar <paul@lietar.net>
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions
