mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-30 07:05:29 +00:00
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>
52 lines
1.5 KiB
TOML
52 lines
1.5 KiB
TOML
[package]
|
|
name = "core"
|
|
version = "0.0.0"
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/rust-lang/rust.git"
|
|
description = "The Rust Core Library"
|
|
autotests = false
|
|
autobenches = false
|
|
# If you update this, be sure to update it in a bunch of other places too!
|
|
# As of 2024, it was src/tools/opt-dist, the core-no-fp-fmt-parse test and
|
|
# the version of the prelude imported in core/lib.rs.
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
test = false
|
|
bench = false
|
|
|
|
[[test]]
|
|
name = "coretests"
|
|
path = "tests/lib.rs"
|
|
|
|
[[bench]]
|
|
name = "corebenches"
|
|
path = "benches/lib.rs"
|
|
test = true
|
|
|
|
[dev-dependencies]
|
|
rand = { version = "0.8.5", default-features = false }
|
|
rand_xorshift = { version = "0.3.0", default-features = false }
|
|
|
|
[features]
|
|
# Make panics and failed asserts immediately abort without formatting any message
|
|
panic_immediate_abort = []
|
|
# Choose algorithms that are optimized for binary size instead of runtime performance
|
|
optimize_for_size = []
|
|
# Make `RefCell` store additional debugging information, which is printed out when
|
|
# a borrow error occurs
|
|
debug_refcell = []
|
|
|
|
[lints.rust.unexpected_cfgs]
|
|
level = "warn"
|
|
check-cfg = [
|
|
'cfg(bootstrap)',
|
|
'cfg(no_fp_fmt_parse)',
|
|
'cfg(stdarch_intel_sde)',
|
|
'cfg(target_arch, values("xtensa"))',
|
|
# core use #[path] imports to portable-simd `core_simd` crate
|
|
# and to stdarch `core_arch` crate which messes-up with Cargo list
|
|
# of declared features, we therefor expect any feature cfg
|
|
'cfg(feature, values(any()))',
|
|
]
|