/* Copyright (c) 2018 ZAO "MCST". All rights reserved. */

#if !defined _X86INTRIN_H_INCLUDED
# error "Never use <rdseedintrin.h> directly; include <x86intrin.h> instead."
#endif

#ifndef _RDSEEDINTRIN_H_INCLUDED
#define _RDSEEDINTRIN_H_INCLUDED

#ifdef __RDSEED__

/* Define the default attributes for the functions in this file */
#define __DEFAULT_FUNCS_ATTRS __attribute__((/*__gnu_inline__,*/ __always_inline__, __artificial__))

__E2K_INLINE int __DEFAULT_FUNCS_ATTRS
_rdseed16_step (unsigned short *__p)
{
  return __builtin_ia32_rdseed_hi_step (__p);
}

__E2K_INLINE int __DEFAULT_FUNCS_ATTRS
_rdseed32_step (unsigned int *__p)
{
  return __builtin_ia32_rdseed_si_step (__p);
}

__E2K_INLINE int __DEFAULT_FUNCS_ATTRS
_rdseed64_step (unsigned long long *__p)
{
  return __builtin_ia32_rdseed_di_step (__p);
}

#undef __DEFAULT_FUNCS_ATTRS

#endif /* __RDSEED__ */

#endif /* _RDSEEDINTRIN_H_INCLUDED */
