From 8f06f2fbbff0e9ff46168dbbd372ef5e51a8cbfd Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Mon, 27 Aug 2012 12:29:20 +0000 Subject: Support MIPS DSP Rev2 intrinsics. The patch reviewed by Akira Hatanaka. llvm-svn: 162669 --- clang/test/CodeGen/builtins-mips-args.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'clang/test/CodeGen/builtins-mips-args.c') diff --git a/clang/test/CodeGen/builtins-mips-args.c b/clang/test/CodeGen/builtins-mips-args.c index a961b36a953..fd3e31443ec 100644 --- a/clang/test/CodeGen/builtins-mips-args.c +++ b/clang/test/CodeGen/builtins-mips-args.c @@ -11,4 +11,27 @@ void foo() { __builtin_mips_rddsp(-1); // expected-error{{argument should be a value from 0 to 63}} __builtin_mips_wrdsp(2052, 64); // expected-error{{argument should be a value from 0 to 63}} __builtin_mips_rddsp(64); // expected-error{{argument should be a value from 0 to 63}} + + // MIPS DSP Rev 2 + + __builtin_mips_append(1, 2, a); // expected-error{{argument to '__builtin_mips_append' must be a constant integer}} + __builtin_mips_balign(1, 2, a); // expected-error{{argument to '__builtin_mips_balign' must be a constant integer}} + __builtin_mips_precr_sra_ph_w(1, 2, a); // expected-error{{argument to '__builtin_mips_precr_sra_ph_w' must be a constant integer}} + __builtin_mips_precr_sra_r_ph_w(1, 2, a); // expected-error{{argument to '__builtin_mips_precr_sra_r_ph_w' must be a constant integer}} + __builtin_mips_prepend(1, 2, a); // expected-error{{argument to '__builtin_mips_prepend' must be a constant integer}} + + __builtin_mips_append(1, 2, -1); // expected-error{{argument should be a value from 0 to 31}} + __builtin_mips_append(1, 2, 32); // expected-error{{argument should be a value from 0 to 31}} + + __builtin_mips_balign(1, 2, -1); // expected-error{{argument should be a value from 0 to 3}} + __builtin_mips_balign(1, 2, 4); // expected-error{{argument should be a value from 0 to 3}} + + __builtin_mips_precr_sra_ph_w(1, 2, -1); // expected-error{{argument should be a value from 0 to 31}} + __builtin_mips_precr_sra_ph_w(1, 2, 32); // expected-error{{argument should be a value from 0 to 31}} + + __builtin_mips_precr_sra_r_ph_w(1, 2, -1); // expected-error{{argument should be a value from 0 to 31}} + __builtin_mips_precr_sra_r_ph_w(1, 2, 32); // expected-error{{argument should be a value from 0 to 31}} + + __builtin_mips_prepend(1, 2, -1); // expected-error{{argument should be a value from 0 to 31}} + __builtin_mips_prepend(1, 2, -1); // expected-error{{argument should be a value from 0 to 31}} } -- cgit v1.2.3