summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/inline/inline_instruction_set.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/mir-opt/inline/inline_instruction_set.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/mir-opt/inline/inline_instruction_set.rs')
-rw-r--r--src/test/mir-opt/inline/inline_instruction_set.rs61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/test/mir-opt/inline/inline_instruction_set.rs b/src/test/mir-opt/inline/inline_instruction_set.rs
deleted file mode 100644
index 5dfb04943..000000000
--- a/src/test/mir-opt/inline/inline_instruction_set.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Checks that only functions with the compatible instruction_set attributes are inlined.
-//
-// A function is "compatible" when the *callee* has the same attribute or no attribute.
-//
-// compile-flags: --target thumbv4t-none-eabi
-// needs-llvm-components: arm
-
-#![crate_type = "lib"]
-#![feature(rustc_attrs)]
-#![feature(no_core, lang_items)]
-#![feature(isa_attribute)]
-#![no_core]
-
-#[rustc_builtin_macro]
-#[macro_export]
-macro_rules! asm {
- ("assembly template",
- $(operands,)*
- $(options($(option),*))?
- ) => {
- /* compiler built-in */
- };
-}
-
-#[lang = "sized"]
-trait Sized {}
-#[lang = "copy"]
-trait Copy {}
-
-#[instruction_set(arm::a32)]
-#[inline]
-fn instruction_set_a32() {}
-
-#[instruction_set(arm::t32)]
-#[inline]
-fn instruction_set_t32() {}
-
-#[inline]
-fn instruction_set_default() {}
-
-#[inline(always)]
-fn inline_always_and_using_inline_asm() {
- unsafe { asm!("/* do nothing */") };
-}
-
-// EMIT_MIR inline_instruction_set.t32.Inline.diff
-#[instruction_set(arm::t32)]
-pub fn t32() {
- instruction_set_a32();
- instruction_set_t32();
- instruction_set_default();
- inline_always_and_using_inline_asm();
-}
-
-// EMIT_MIR inline_instruction_set.default.Inline.diff
-pub fn default() {
- instruction_set_a32();
- instruction_set_t32();
- instruction_set_default();
- inline_always_and_using_inline_asm();
-}