rust/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs

28 lines
543 B
Rust
Raw Normal View History

// ignore-android
// ignore-arm
// ignore-aarch64
Add s390x support This adds support for building the Rust compiler and standard library for s390x-linux, allowing a full cross-bootstrap sequence to complete. This includes: - Makefile/configure changes to allow native s390x builds - Full Rust compiler support for the s390x C ABI (only the non-vector ABI is supported at this point) - Port of the standard library to s390x - Update the liblibc submodule to a version including s390x support - Testsuite fixes to allow clean "make check" on s390x Caveats: - Resets base cpu to "z10" to bring support in sync with the default behaviour of other compilers on the platforms. (Usually, upstream supports all older processors; a distribution build may then chose to require a more recent base version.) (Also, using zEC12 causes failures in the valgrind tests since valgrind doesn't fully support this CPU yet.) - z13 vector ABI is not yet supported. To ensure compatible code generation, the -vector feature is passed to LLVM. Note that this means that even when compiling for z13, no vector instructions will be used. In the future, support for the vector ABI should be added (this will require common code support for different ABIs that need different data_layout strings on the same platform). - Two test cases are (temporarily) ignored on s390x to allow passing the test suite. The underlying issues still need to be fixed: * debuginfo/simd.rs fails because of incorrect debug information. This seems to be a LLVM bug (also seen with C code). * run-pass/union/union-basic.rs simply seems to be incorrect for all big-endian platforms. Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2016-09-09 23:00:23 +02:00
// ignore-s390x
// ignore-emscripten
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-sparc
// ignore-sparc64
// ignore-mips
// ignore-mips64
2021-05-01 13:36:48 +02:00
// ignore-e2k64
2020-02-14 17:54:40 +01:00
#![feature(llvm_asm)]
#[cfg(any(target_arch = "x86",
target_arch = "x86_64"))]
pub fn main() {
unsafe {
// clobber formatted as register input/output
2020-02-14 17:54:40 +01:00
llvm_asm!("xor %eax, %eax" : : : "{eax}");
//~^ ERROR clobber should not be surrounded by braces
}
}