Sha256: 3ffe8c59621058d3ca0f6f8d51cf64bde688179d9115e86607f05aef8b0bcab5

Contents?: true

Size: 529 Bytes

Versions: 3

Compression:

Stored size: 529 Bytes

Contents

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;
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_nacl-0.1.2 ext/ruby_nacl/NaCl/okcompilers/main.cpp
ruby_nacl-0.1.1 ext/ruby_nacl/NaCl/okcompilers/main.cpp
ruby_nacl-0.1.0 ext/ruby_nacl/NaCl/okcompilers/main.cpp