BUILTIN(__builtin_mips_extp, "iLLii", "nc")
BUILTIN(__builtin_mips_extpdp, "iLLii", "nc")
-BUILTIN(__builtin_mips_wrdsp, "vii", "nc")
-BUILTIN(__builtin_mips_rddsp, "ii", "nc")
+BUILTIN(__builtin_mips_wrdsp, "viIi", "nc")
+BUILTIN(__builtin_mips_rddsp, "iIi", "nc")
BUILTIN(__builtin_mips_insv, "iii", "nc")
BUILTIN(__builtin_mips_bitrev, "ii", "nc")
BUILTIN(__builtin_mips_packrl_ph, "V2sV2sV2s", "nc")
--- /dev/null
+// 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}}
+}