summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-02 21:22:47 +0100
committerGitHub <noreply@github.com>2022-12-02 21:22:47 +0100
commitdab14348e981a9e660cf8c8d13f7547dbf04c1eb (patch)
tree9798461423ec7876d6b5f017ab6a00be09c77a27 /src/test
parente960b5e7749e95c6a6b2fdec7250a48105664efb (diff)
parent382dba52ee0c6142d9a3774d735962797c043fab (diff)
downloadrust-dab14348e981a9e660cf8c8d13f7547dbf04c1eb.tar.gz
rust-dab14348e981a9e660cf8c8d13f7547dbf04c1eb.zip
Rollup merge of #105026 - oToToT:aarch64-v8a, r=davidtwco
v8a as default aarch64 target

After https://github.com/llvm/llvm-project/commit/8689f5e landed, LLVM takes the intersection of v8a and v8r as default. This commit brings back v8a support by explicitly specifying v8a in the feature list.

This should solve #97724.

p.s. a bit more context can also be found in https://github.com/llvm/llvm-project/issues/57904#issuecomment-1329555590.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/assembly/asm/aarch64-el2vmsa.rs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/test/assembly/asm/aarch64-el2vmsa.rs b/src/test/assembly/asm/aarch64-el2vmsa.rs
new file mode 100644
index 00000000000..1908ffb8ff3
--- /dev/null
+++ b/src/test/assembly/asm/aarch64-el2vmsa.rs
@@ -0,0 +1,37 @@
+// assembly-output: emit-asm
+// compile-flags: --target aarch64-unknown-linux-gnu
+// needs-llvm-components: aarch64
+
+#![feature(no_core, lang_items, rustc_attrs)]
+#![crate_type = "rlib"]
+#![no_core]
+
+#[rustc_builtin_macro]
+macro_rules! asm {
+    () => {};
+}
+
+#[lang = "sized"]
+trait Sized {}
+
+// CHECK-LABEL: ttbr0_el2:
+#[no_mangle]
+pub fn ttbr0_el2() {
+    // CHECK: //APP
+    // CHECK-NEXT: msr TTBR0_EL2, x0
+    // CHECK-NEXT: //NO_APP
+    unsafe {
+        asm!("msr ttbr0_el2, x0");
+    }
+}
+
+// CHECK-LABEL: vttbr_el2:
+#[no_mangle]
+pub fn vttbr_el2() {
+    // CHECK: //APP
+    // CHECK-NEXT: msr VTTBR_EL2, x0
+    // CHECK-NEXT: //NO_APP
+    unsafe {
+        asm!("msr vttbr_el2, x0");
+    }
+}