File: main.cpp

package info (click to toggle)
nacl 20110221-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,560 kB
  • sloc: asm: 19,669; ansic: 13,434; cpp: 1,125; sh: 933; makefile: 32
file content (22 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
extern "C" {
  extern int not3(int);
  extern int bytes(int);
  extern long long shr32(long long);
  extern double double5(void);
}

int main(int argc,char **argv)
{
  if (not3(3)) return 100;

  /* on ppc32, gcc -mpowerpc64 produces SIGILL for >>32 */
  if (!not3(shr32(1))) return 100;

  /* on pentium 1, gcc -march=pentium2 produces SIGILL for (...+7)/8 */
  if (bytes(not3(1)) != 1) return 100;

  /* on pentium 1, gcc -march=prescott produces SIGILL for double comparison */
  if (double5() < 0) return 100;

  return 0;
}