summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/builtins-mips-args.c
blob: a961b36a95334d769e9efd8cbbd6801010c537de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// REQUIRES: mips-registered-target
// 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}}
  __builtin_mips_wrdsp(2052, -1); // expected-error{{argument should be a value from 0 to 63}}
  __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}}
}
OpenPOWER on IntegriCloud