1 // REQUIRES: bpf-registered-target
2 // RUN: %clang_cc1 -triple bpf -emit-llvm -target-feature +alu32 %s -o - | FileCheck %s
3 // RUN: %clang_cc1 -triple bpf -emit-llvm -target-cpu v3 %s -o - | FileCheck %s
5 void test_generic_constraints(int var32
, long var64
) {
9 // CHECK: [[R32_ARG:%[a-zA-Z0-9]+]] = load i32, ptr
10 // CHECK: call i32 asm "$0 = $1", "=r,0"(i32 [[R32_ARG]])
15 // CHECK: [[R64_ARG:%[a-zA-Z0-9]+]] = load i64, ptr
16 // CHECK: call i64 asm "$0 = $1", "=r,0"(i64 [[R64_ARG]])
21 // CHECK: [[R64_ARG:%[a-zA-Z0-9]+]] = load i64, ptr
22 // CHECK: call i64 asm "$0 = $1", "=r,r"(i64 [[R64_ARG]])
25 void test_constraint_w(int a
) {
29 // CHECK: [[R32_ARG:%[a-zA-Z0-9]+]] = load i32, ptr
30 // CHECK: call i32 asm "$0 = $1", "=w,w"(i32 [[R32_ARG]])