Rename _test_rdseed to asm_test_rdseed

This commit is contained in:
apio 2022-09-18 15:23:08 +02:00
parent 48fae4a971
commit cbac61d184
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
global _test_rdseed
global asm_test_rdseed
_test_rdseed:
asm_test_rdseed:
mov eax, 7
mov ecx, 0
cpuid

View File

@ -9,10 +9,11 @@
static uint64_t state = 0xf5026f5ae96319e9;
extern "C" int _test_rdseed();
static bool has_rdrand = false;
static bool has_rdseed = false;
extern "C" int asm_test_rdseed();
static uint64_t rdtsc()
{
uint64_t result1;
@ -40,7 +41,7 @@ void Mersenne::init()
kdbgln("Preparing random number generator");
has_rdrand = CPU::has_feature(CPU::Features::RDRAND);
has_rdseed = _test_rdseed();
has_rdseed = asm_test_rdseed();
state ^= (0x45fe1024UL + MOON_MAJOR) * (MOON_MINOR ^ 200UL);