Simon Atanasyan | e471d87 | 2012-07-08 09:10:14 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple mips-unknown-linux-gnu -fsyntax-only -verify %s |
| 2 | |
| 3 | void 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 Atanasyan | fad0a32 | 2012-07-08 09:30:00 +0000 | [diff] [blame^] | 9 | __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 Atanasyan | e471d87 | 2012-07-08 09:10:14 +0000 | [diff] [blame] | 13 | } |