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