mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rollup merge of #134436 - taiki-e:assembly-asm-minicore, r=jieyouxu
tests/assembly/asm: Remove uses of rustc_attrs and lang_items features by using minicore Similar to https://github.com/rust-lang/rust/pull/134385 (for tests/ui/asm), but for tests/assembly/asm. r? jieyouxu
This commit is contained in:
commit
af96692372
@ -1,18 +1,14 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target aarch64-unknown-linux-gnu
|
||||
//@ needs-llvm-components: aarch64
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs)]
|
||||
#![feature(no_core)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
// CHECK-LABEL: ttbr0_el2:
|
||||
#[no_mangle]
|
||||
|
@ -1,29 +1,17 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: -O -C panic=abort
|
||||
//@ compile-flags: --target aarch64-unknown-linux-gnu
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
//@ needs-llvm-components: aarch64
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs)]
|
||||
#![feature(no_core)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
impl Copy for i32 {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
macro_rules! check {
|
||||
($func:ident $reg:ident $code:literal) => {
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: aarch64 arm64ec
|
||||
//@ assembly-output: emit-asm
|
||||
//@ [aarch64] compile-flags: --target aarch64-unknown-linux-gnu
|
||||
@ -6,33 +7,15 @@
|
||||
//@ [arm64ec] needs-llvm-components: aarch64
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd, f16, f128)]
|
||||
#![feature(no_core, repr_simd, f16, f128)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
// FIXME(f16_f128): Only needed for FIXME in check! and check_reg!
|
||||
#![feature(auto_traits)]
|
||||
#![feature(auto_traits, lang_items)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
// Do we really need to use no_core for this?!?
|
||||
impl<T: Copy, const N: usize> Copy for [T; N] {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *mut u8;
|
||||
|
||||
@ -65,15 +48,6 @@ pub struct f32x4([f32; 4]);
|
||||
#[repr(simd)]
|
||||
pub struct f64x2([f64; 2]);
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for f16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for f128 {}
|
||||
impl Copy for ptr {}
|
||||
impl Copy for i8x8 {}
|
||||
impl Copy for i16x4 {}
|
||||
impl Copy for i32x2 {}
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: -O -C panic=abort
|
||||
//@ compile-flags: --target armv7-unknown-linux-gnueabihf
|
||||
@ -5,38 +6,17 @@
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
//@ needs-llvm-components: arm
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd)]
|
||||
#![feature(no_core, repr_simd)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
// Do we really need to use no_core for this?!?
|
||||
impl<T: Copy, const N: usize> Copy for [T; N] {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
#[repr(simd)]
|
||||
pub struct f32x4([f32; 4]);
|
||||
|
||||
impl Copy for i32 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for f32x4 {}
|
||||
|
||||
macro_rules! check {
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: base d32 neon
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target armv7-unknown-linux-gnueabihf
|
||||
@ -8,31 +9,13 @@
|
||||
//@[neon] filecheck-flags: --check-prefix d32
|
||||
//@ needs-llvm-components: arm
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd, f16)]
|
||||
#![feature(no_core, repr_simd, f16)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
// Do we really need to use no_core for this?!?
|
||||
impl<T: Copy, const N: usize> Copy for [T; N] {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *mut u8;
|
||||
|
||||
@ -61,14 +44,6 @@ pub struct f16x8([f16; 8]);
|
||||
#[repr(simd)]
|
||||
pub struct f32x4([f32; 4]);
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for f16 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for ptr {}
|
||||
impl Copy for i8x8 {}
|
||||
impl Copy for i16x4 {}
|
||||
impl Copy for i32x2 {}
|
||||
|
@ -1,34 +1,18 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target avr-unknown-gnu-atmega328
|
||||
//@ needs-llvm-components: avr
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const u64;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for ptr {}
|
||||
|
||||
macro_rules! check {
|
||||
($func:ident $hi:literal $lo:literal $reg:tt) => {
|
||||
#[no_mangle]
|
||||
|
@ -1,34 +1,18 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target avr-unknown-gnu-atmega328
|
||||
//@ needs-llvm-components: avr
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const u64;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for ptr {}
|
||||
|
||||
macro_rules! check {
|
||||
($func:ident $ty:ident $class:ident) => {
|
||||
#[no_mangle]
|
||||
|
@ -1,38 +1,18 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target bpfel-unknown-none -C target_feature=+alu32
|
||||
//@ needs-llvm-components: bpf
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const u64;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for ptr {}
|
||||
|
||||
macro_rules! check {
|
||||
($func:ident $ty:ident $class:ident) => {
|
||||
#[no_mangle]
|
||||
|
@ -1,38 +1,19 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target hexagon-unknown-linux-musl
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
//@ needs-llvm-components: hexagon
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const i32;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for ptr {}
|
||||
extern "C" {
|
||||
fn extern_func();
|
||||
static extern_static: u8;
|
||||
|
@ -1,40 +1,19 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target loongarch64-unknown-linux-gnu
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
//@ needs-llvm-components: loongarch
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs)]
|
||||
#![feature(no_core)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const i32;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for ptr {}
|
||||
extern "C" {
|
||||
fn extern_func();
|
||||
static extern_static: u8;
|
||||
|
@ -1,34 +1,18 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target m68k-unknown-linux-gnu
|
||||
//@ needs-llvm-components: m68k
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const u64;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for ptr {}
|
||||
|
||||
macro_rules! check {
|
||||
($func:ident $ty:ident $class:ident $mov:literal) => {
|
||||
#[no_mangle]
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: mips32 mips64
|
||||
//@ assembly-output: emit-asm
|
||||
//@[mips32] compile-flags: --target mips-unknown-linux-gnu
|
||||
@ -6,39 +7,16 @@
|
||||
//@[mips64] needs-llvm-components: mips
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const i32;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for u8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for ptr {}
|
||||
extern "C" {
|
||||
fn extern_func();
|
||||
static extern_static: u8;
|
||||
|
@ -1,34 +1,18 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target msp430-none-elf
|
||||
//@ needs-llvm-components: msp430
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const i16;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for ptr {}
|
||||
|
||||
macro_rules! check {
|
||||
($func:ident $ty:ident $class:ident) => {
|
||||
#[no_mangle]
|
||||
|
@ -1,35 +1,17 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target nvptx64-nvidia-cuda
|
||||
//@ compile-flags: --crate-type cdylib
|
||||
//@ needs-llvm-components: nvptx
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *mut u8;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for ptr {}
|
||||
|
||||
// NVPTX does not support static variables
|
||||
#[no_mangle]
|
||||
fn extern_func() {}
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: powerpc powerpc_altivec powerpc_vsx powerpc64 powerpc64_vsx
|
||||
//@ assembly-output: emit-asm
|
||||
//@[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
|
||||
@ -12,11 +13,14 @@
|
||||
//@[powerpc64_vsx] needs-llvm-components: powerpc
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)]
|
||||
#![feature(no_core, repr_simd, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
#[cfg_attr(altivec, cfg(not(target_feature = "altivec")))]
|
||||
#[cfg_attr(not(altivec), cfg(target_feature = "altivec"))]
|
||||
compile_error!("altivec cfg and target feature mismatch");
|
||||
@ -24,26 +28,6 @@ compile_error!("altivec cfg and target feature mismatch");
|
||||
#[cfg_attr(not(vsx), cfg(target_feature = "vsx"))]
|
||||
compile_error!("vsx cfg and target feature mismatch");
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
impl<T: Copy, const N: usize> Copy for [T; N] {}
|
||||
|
||||
type ptr = *const i32;
|
||||
|
||||
#[repr(simd)]
|
||||
@ -59,14 +43,6 @@ pub struct f32x4([f32; 4]);
|
||||
#[repr(simd)]
|
||||
pub struct f64x2([f64; 2]);
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for u8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for ptr {}
|
||||
impl Copy for i8x16 {}
|
||||
impl Copy for i16x8 {}
|
||||
impl Copy for i32x4 {}
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: riscv64 riscv32 riscv64-zfhmin riscv32-zfhmin riscv64-zfh riscv32-zfh
|
||||
//@ assembly-output: emit-asm
|
||||
|
||||
@ -29,40 +30,16 @@
|
||||
//@ compile-flags: -C target-feature=+d
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, f16)]
|
||||
#![feature(no_core, f16)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *mut u8;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for f16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for ptr {}
|
||||
|
||||
extern "C" {
|
||||
fn extern_func();
|
||||
static extern_static: u8;
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: s390x s390x_vector
|
||||
//@ assembly-output: emit-asm
|
||||
//@[s390x] compile-flags: --target s390x-unknown-linux-gnu
|
||||
@ -6,31 +7,14 @@
|
||||
//@[s390x_vector] needs-llvm-components: systemz
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd, f128)]
|
||||
#![feature(no_core, repr_simd, f128)]
|
||||
#![cfg_attr(s390x_vector, feature(asm_experimental_reg))]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
impl<T: Copy, const N: usize> Copy for [T; N] {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const i32;
|
||||
|
||||
@ -47,16 +31,6 @@ pub struct f32x4([f32; 4]);
|
||||
#[repr(simd)]
|
||||
pub struct f64x2([f64; 2]);
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for u8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for i128 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for f128 {}
|
||||
impl Copy for ptr {}
|
||||
impl Copy for i8x16 {}
|
||||
impl Copy for i16x8 {}
|
||||
impl Copy for i32x4 {}
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: sparc sparcv8plus sparc64
|
||||
//@ assembly-output: emit-asm
|
||||
//@[sparc] compile-flags: --target sparc-unknown-none-elf
|
||||
@ -8,40 +9,16 @@
|
||||
//@[sparc64] needs-llvm-components: sparc
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *const i32;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for u8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for ptr {}
|
||||
|
||||
extern "C" {
|
||||
fn extern_func();
|
||||
static extern_static: u8;
|
||||
|
@ -1,35 +1,17 @@
|
||||
//@ add-core-stubs
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: --target wasm32-unknown-unknown
|
||||
//@ compile-flags: --crate-type cdylib
|
||||
//@ needs-llvm-components: webassembly
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)]
|
||||
#![feature(no_core, asm_experimental_arch)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *mut u8;
|
||||
|
||||
impl Copy for i8 {}
|
||||
impl Copy for i16 {}
|
||||
impl Copy for i32 {}
|
||||
impl Copy for f32 {}
|
||||
impl Copy for i64 {}
|
||||
impl Copy for f64 {}
|
||||
impl Copy for ptr {}
|
||||
|
||||
extern "C" {
|
||||
fn extern_func();
|
||||
static extern_static: u8;
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: x86_64 i686
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: -O -C panic=abort
|
||||
@ -9,30 +10,13 @@
|
||||
//@ compile-flags: -C target-feature=+avx512bw
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs)]
|
||||
#![feature(no_core)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
impl Copy for i32 {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
macro_rules! check {
|
||||
($func:ident $modifier:literal $reg:ident $mov:literal) => {
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: x86_64 i686
|
||||
//@ assembly-output: emit-asm
|
||||
//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
|
||||
@ -8,31 +9,13 @@
|
||||
//@ compile-flags: -C target-feature=+avx512bw
|
||||
//@ compile-flags: -Zmerge-functions=disabled
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, repr_simd, f16, f128)]
|
||||
#![feature(no_core, repr_simd, f16, f128)]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_core]
|
||||
#![allow(asm_sub_register, non_camel_case_types)]
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! asm {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {
|
||||
() => {};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! stringify {
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
// Do we really need to use no_core for this?!?
|
||||
impl<T: Copy, const N: usize> Copy for [T; N] {}
|
||||
extern crate minicore;
|
||||
use minicore::*;
|
||||
|
||||
type ptr = *mut u8;
|
||||
|
||||
@ -90,7 +73,6 @@ macro_rules! impl_copy {
|
||||
}
|
||||
|
||||
impl_copy!(
|
||||
i8 i16 f16 i32 f32 i64 f64 f128 ptr
|
||||
i8x16 i16x8 i32x4 i64x2 f16x8 f32x4 f64x2
|
||||
i8x32 i16x16 i32x8 i64x4 f16x16 f32x8 f64x4
|
||||
i8x64 i16x32 i32x16 i64x8 f16x32 f32x16 f64x8
|
||||
|
@ -14,7 +14,7 @@
|
||||
//! <https://github.com/rust-lang/rust/blob/c0b5cc9003f6464c11ae1c0662c6a7e06f6f5cab/compiler/rustc_codegen_cranelift/example/mini_core.rs>.
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![feature(no_core, lang_items, rustc_attrs, decl_macro, naked_functions)]
|
||||
#![feature(no_core, lang_items, rustc_attrs, decl_macro, naked_functions, f16, f128)]
|
||||
#![allow(unused, improper_ctypes_definitions, internal_features)]
|
||||
#![feature(asm_experimental_arch)]
|
||||
#![no_std]
|
||||
@ -40,7 +40,12 @@ impl<T: ?Sized> LegacyReceiver for &mut T {}
|
||||
pub trait Copy: Sized {}
|
||||
|
||||
impl_marker_trait!(
|
||||
Copy => [ bool, char, isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64 ]
|
||||
Copy => [
|
||||
bool, char,
|
||||
isize, i8, i16, i32, i64, i128,
|
||||
usize, u8, u16, u32, u64, u128,
|
||||
f16, f32, f64, f128,
|
||||
]
|
||||
);
|
||||
impl<'a, T: ?Sized> Copy for &'a T {}
|
||||
impl<T: ?Sized> Copy for *const T {}
|
||||
@ -88,3 +93,18 @@ pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?)
|
||||
pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) {
|
||||
/* compiler built-in */
|
||||
}
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
#[macro_export]
|
||||
macro_rules! concat {
|
||||
($($e:expr),* $(,)?) => {
|
||||
/* compiler built-in */
|
||||
};
|
||||
}
|
||||
#[rustc_builtin_macro]
|
||||
#[macro_export]
|
||||
macro_rules! stringify {
|
||||
($($t:tt)*) => {
|
||||
/* compiler built-in */
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user