From 231e875b5c44db3197d548b8b7c16d1bc3d8a81e Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Thu, 14 Apr 2011 20:06:49 +0000 Subject: Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86. In particular, all library functions should always be AAPCS regardless of floating point ABI used. llvm-svn: 129534 --- clang/test/CodeGen/arm-pcs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 clang/test/CodeGen/arm-pcs.c (limited to 'clang/test/CodeGen/arm-pcs.c') diff --git a/clang/test/CodeGen/arm-pcs.c b/clang/test/CodeGen/arm-pcs.c new file mode 100644 index 00000000000..d722f84cebd --- /dev/null +++ b/clang/test/CodeGen/arm-pcs.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -triple arm-none-linux-gnueabi -emit-llvm -w -o - < %s | FileCheck %s +typedef int __attribute__((pcs("aapcs"))) (*aapcs_fn)(void); +typedef int __attribute__((pcs("aapcs-vfp"))) (*aapcs_vfp_fn)(void); + +aapcs_fn bar; + +int foo(aapcs_vfp_fn baz) { +// CHECK: define i32 @foo +// CHECK: call arm_aapcscc +// CHECK: call arm_aapcs_vfpcc + return bar() + baz(); +} -- cgit v1.2.3