Sha256: d2ae3dfee9c55e6c4eb91c2a740e84fea94421ca73adea61683f810410cc586a

Contents?: true

Size: 338 Bytes

Versions: 3

Compression:

Stored size: 338 Bytes

Contents

#include <stdio.h>
#include <sys/types.h>
#include "osfreq.c"

long long cpucycles_sparc32cpuinfo(void)
{
  long long result;
  asm volatile(".word 2202075136; .word 2570088480; srl %%g1,0,%L0; mov %%o4,%H0"
    : "=r" (result) : : "g1","o4");
  return result;
}

long long cpucycles_sparc32cpuinfo_persecond(void)
{
  return osfreq();
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_nacl-0.1.2 ext/ruby_nacl/NaCl/cpucycles/sparc32cpuinfo.c
ruby_nacl-0.1.1 ext/ruby_nacl/NaCl/cpucycles/sparc32cpuinfo.c
ruby_nacl-0.1.0 ext/ruby_nacl/NaCl/cpucycles/sparc32cpuinfo.c