summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/cps/cps013.cmm
blob: e92daca223a9a0c178e9f8ce74c58259c82cb66f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Test the calling conventions

// Test the default calling convention
// which is "unsafe" but will change soon to "safe"
foo1() {
  foreign "C--" bar(x, y);
  return (1);
}

// Test the "unsafe" calling convention
foo2() {
  foreign "C--" bar(x, y) "unsafe";
  return (1);
}

// Test the "safe" calling convention
foo3() {
  bits32 x, y, z;
  foreign "C--" bar(x, y, z) "safe";
  return (1);
}