summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/builtins-mips-args.c
diff options
context:
space:
mode:
authorSimon Atanasyan <satanasyan@mips.com>2012-07-08 09:10:14 +0000
committerSimon Atanasyan <satanasyan@mips.com>2012-07-08 09:10:14 +0000
commit21861d23f9aad2d377e69efa68e0ac804ce8e7d0 (patch)
treebbc6162ca192cab0750c990e049d89d039ecc843 /clang/test/CodeGen/builtins-mips-args.c
parent7ebb07c87c1648cedf83799fd146b5d469b24c56 (diff)
downloadbcm5719-llvm-21861d23f9aad2d377e69efa68e0ac804ce8e7d0.tar.gz
bcm5719-llvm-21861d23f9aad2d377e69efa68e0ac804ce8e7d0.zip
MIPS: Mark arguments of __builtin_mips_wrdsp / __builtin_mips_rddsp as a constant expression.
llvm-svn: 159910
Diffstat (limited to 'clang/test/CodeGen/builtins-mips-args.c')
-rw-r--r--clang/test/CodeGen/builtins-mips-args.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtins-mips-args.c b/clang/test/CodeGen/builtins-mips-args.c
new file mode 100644
index 00000000000..7dc73776a78
--- /dev/null
+++ b/clang/test/CodeGen/builtins-mips-args.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple mips-unknown-linux-gnu -fsyntax-only -verify %s
+
+void foo() {
+ // MIPS DSP Rev 1
+
+ int a = 3;
+ __builtin_mips_wrdsp(2052, a); // expected-error{{argument to '__builtin_mips_wrdsp' must be a constant integer}}
+ __builtin_mips_rddsp(a); // expected-error{{argument to '__builtin_mips_rddsp' must be a constant integer}}
+}
OpenPOWER on IntegriCloud