summaryrefslogtreecommitdiffstats
path: root/src/test/codegen/bpf-alu32.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/codegen/bpf-alu32.rs')
-rw-r--r--src/test/codegen/bpf-alu32.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/codegen/bpf-alu32.rs b/src/test/codegen/bpf-alu32.rs
new file mode 100644
index 000000000..c68bffd03
--- /dev/null
+++ b/src/test/codegen/bpf-alu32.rs
@@ -0,0 +1,11 @@
+// only-bpf
+#![crate_type = "lib"]
+#![feature(bpf_target_feature)]
+#![no_std]
+
+#[no_mangle]
+#[target_feature(enable = "alu32")]
+// CHECK: define i8 @foo(i8 returned %arg) unnamed_addr #0 {
+pub unsafe fn foo(arg: u8) -> u8 {
+ arg
+}