blob: 4bc6f248c18900f6f566cf7279656a40d1f4aec6 [file] [log] [blame]
Simon Atanasyane471d872012-07-08 09:10:14 +00001// RUN: %clang_cc1 -triple mips-unknown-linux-gnu -fsyntax-only -verify %s
2
3void foo() {
4 // MIPS DSP Rev 1
5
6 int a = 3;
7 __builtin_mips_wrdsp(2052, a); // expected-error{{argument to '__builtin_mips_wrdsp' must be a constant integer}}
8 __builtin_mips_rddsp(a); // expected-error{{argument to '__builtin_mips_rddsp' must be a constant integer}}
Simon Atanasyanfad0a322012-07-08 09:30:00 +00009 __builtin_mips_wrdsp(2052, -1); // expected-error{{argument should be a value from 0 to 63}}
10 __builtin_mips_rddsp(-1); // expected-error{{argument should be a value from 0 to 63}}
11 __builtin_mips_wrdsp(2052, 64); // expected-error{{argument should be a value from 0 to 63}}
12 __builtin_mips_rddsp(64); // expected-error{{argument should be a value from 0 to 63}}
Simon Atanasyane471d872012-07-08 09:10:14 +000013}