_info 807 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include "cpuid.h"
  2. /**
  3. * cpuid - a CPUID instruction parser for x86/x86_64 CPUs.
  4. *
  5. * This module tries to keep-it-simple to get information about the CPU
  6. * from the CPU.
  7. *
  8. * Example:
  9. * #include <ccan/cpuid/cpuid.h>
  10. *
  11. * int main()
  12. * {
  13. * int highest;
  14. * cpuid(CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &highest);
  15. * printf ("Highest extended function supported: %d\n", highest);
  16. *
  17. * return 0;
  18. * }
  19. *
  20. * Author: Ahmed Samy <f.fallen45@gmail.com>
  21. * License: MIT
  22. * Version: 0.1
  23. */
  24. int main(int argc, char *argv[])
  25. {
  26. if (argc != 2)
  27. return 1;
  28. if (strcmp(argv[1], "depends") == 0) {
  29. #if defined(__i386__) || defined(__i386) || defined(__x86_64) \
  30. || defined(_M_AMD64) || defined(__M_X64)
  31. /* Nothing. */
  32. #else
  33. printf("ccan/build_assert\n");
  34. #endif
  35. return 0;
  36. }
  37. return 1;
  38. }