Go to the documentation of this file.
39#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
40# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
43#ifndef PLIBSYS_HEADER_PMACROSCPU_H
44#define PLIBSYS_HEADER_PMACROSCPU_H
473#if defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
475#elif defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_ARM) || \
476 defined(_M_ARM) || defined(_M_ARM64) || defined(__arm) || defined(__aarch64__) || \
477 defined(__ARM64__) || defined(__arm64__) || defined(__arm64)
478# if defined(__aarch64__) || defined(_M_ARM64) || defined(__ARM64__) || \
479 defined(__arm64__) || defined(__arm64)
484# if defined(__ARM_ARCH) && __ARM_ARCH > 1
485# define P_CPU_ARM __ARM_ARCH
486# elif defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM > 1
487# define P_CPU_ARM __TARGET_ARCH_ARM
488# elif defined(_M_ARM) && _M_ARM > 1
489# define P_CPU_ARM _M_ARM
490# elif defined(__ARM_ARCH_9__)
492# elif defined(__ARM64_ARCH_8__) || \
493 defined(__ARM_ARCH_8__) || \
494 defined(__ARM_ARCH_8A__) || \
495 defined(__aarch64__) || \
496 defined(__ARMv8__) || \
497 defined(__ARMv8_A__) || \
498 defined(_M_ARM64) || \
499 defined(__CORE_CORTEXAV8__)
501# elif defined(__ARM_ARCH_7__) || \
502 defined(__ARM_ARCH_7A__) || \
503 defined(__ARM_ARCH_7R__) || \
504 defined(__ARM_ARCH_7M__) || \
505 defined(__ARM_ARCH_7S__) || \
506 defined(_ARM_ARCH_7) || \
507 defined(__CORE_CORTEXA__)
509# elif defined(__ARM_ARCH_6__) || \
510 defined(__ARM_ARCH_6J__) || \
511 defined(__ARM_ARCH_6T2__) || \
512 defined(__ARM_ARCH_6Z__) || \
513 defined(__ARM_ARCH_6K__) || \
514 defined(__ARM_ARCH_6ZK__) || \
515 defined(__ARM_ARCH_6M__)
517# elif defined(__ARM_ARCH_5__) || \
518 defined(__ARM_ARCH_5E__) || \
519 defined(__ARM_ARCH_5T__) || \
520 defined(__ARM_ARCH_5TE__) || \
521 defined(__ARM_ARCH_5TEJ__)
523# elif defined(__ARM_ARCH_4__) || \
524 defined(__ARM_ARCH_4T__)
526# elif defined(__ARM_ARCH_3__) || \
527 defined(__ARM_ARCH_3M__)
529# elif defined(__ARM_ARCH_2__)
551# error "ARM architecture is uknown or too old"
553#elif defined(__i386__) || defined(__i386) || defined(_M_IX86)
556# if (_M_IX86 >= 300 &&_M_IX86 <= 600)
557# define P_CPU_X86 (_M_IX86 / 100)
561# elif defined(__i686__) || defined(__athlon__) || defined(__SSE__) || defined(__pentiumpro__)
563# elif defined(__i586__) || defined(__k6__) || defined(__pentium__)
565# elif defined(__i486__) || defined(__80486__)
570#elif defined(__x86_64__) || defined(__x86_64) || \
571 defined(__amd64__) || defined(__amd64) || \
572 defined(_M_X64) || defined(_M_AMD64)
575#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
577#elif defined(__mips__) || defined(__mips) || defined(_M_MRX000)
579# if defined(_M_MRX000)
580# if (_M_MRX000 >= 10000)
581# define P_CPU_MIPS_IV
583# define P_CPU_MIPS_III
586# if defined(_MIPS_ARCH_MIPS64) || defined(__mips64) || (defined(__mips) && __mips - 0 >= 64) || \
587 (defined(_MIPS_ISA) && defined(_MIPS_ISA_MIPS64) && __MIPS_ISA - 0 >= _MIPS_ISA_MIPS64)
588# define P_CPU_MIPS_64
589# elif defined(_MIPS_ARCH_MIPS32) || defined(__mips32) || (defined(__mips) && __mips - 0 >= 32) || \
590 (defined(_MIPS_ISA) && defined(_MIPS_ISA_MIPS32) && __MIPS_ISA - 0 >= _MIPS_ISA_MIPS32)
591# define P_CPU_MIPS_32
592# elif defined(_MIPS_ARCH_MIPS5) || (defined(__mips) && __mips - 0 >= 5) || \
593 (defined(_MIPS_ISA) && defined(_MIPS_ISA_MIPS5) && __MIPS_ISA - 0 >= _MIPS_ISA_MIPS5)
595# elif defined(_MIPS_ARCH_MIPS4) || (defined(__mips) && __mips - 0 >= 4) || \
596 (defined(_MIPS_ISA) && defined(_MIPS_ISA_MIPS4) && __MIPS_ISA - 0 >= _MIPS_ISA_MIPS4)
597# define P_CPU_MIPS_IV
598# elif defined(_MIPS_ARCH_MIPS3) || (defined(__mips) && __mips - 0 >= 3) || \
599 (defined(_MIPS_ISA)&& defined(_MIPS_ISA_MIPS3) && __MIPS_ISA - 0 >= _MIPS_ISA_MIPS3)
600# define P_CPU_MIPS_III
601# elif defined(_MIPS_ARCH_MIPS2) || (defined(__mips) && __mips - 0 >= 2) || \
602 (defined(_MIPS_ISA) && defined(_MIPS_ISA_MIPS2) && __MIPS_ISA - 0 >= _MIPS_ISA_MIPS2)
603# define P_CPU_MIPS_II
604# elif defined(_MIPS_ARCH_MIPS1) || (defined(__mips) && __mips - 0 >= 1) || \
605 (defined(_MIPS_ISA) && defined(_MIPS_ISA_MIPS1) && __MIPS_ISA - 0 >= _MIPS_ISA_MIPS1)
608# if defined(P_CPU_MIPS_64)
611# if defined(P_CPU_MIPS_V)
612# define P_CPU_MIPS_IV
614# if defined(P_CPU_MIPS_IV)
615# define P_CPU_MIPS_III
617# if defined(P_CPU_MIPS_32) || defined(P_CPU_MIPS_III)
618# define P_CPU_MIPS_II
620# if defined(P_CPU_MIPS_II)
623#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__ppc) || \
624 defined(_ARCH_PPC) || defined(_ARCH_PWR) || defined(_ARCH_COM) || \
625 defined(_M_PPC) || defined(_M_MPPC)
627# if defined(__powerpc64__) || defined(__powerpc64) || defined(__ppc64__) || defined(__ppc64) || \
628 defined(__64BIT__) || defined(__LP64__) || defined(_LP64)
629# define P_CPU_POWER_64
631# define P_CPU_POWER_32
633#elif defined(__sparc__) || defined(__sparc)
635# if defined(__sparc_v9__) || defined(__sparcv9)
636# define P_CPU_SPARC_V9
637# elif defined(__sparc_v8__) || defined(__sparcv8)
638# define P_CPU_SPARC_V8
640#elif defined(__hppa__) || defined(__hppa)
642# if defined(_PA_RISC2_0) || defined(__RISC2_0__) || defined(__HPPA20__) || defined(__PA8000__)
643# define P_CPU_HPPA_64
645# define P_CPU_HPPA_32
647#elif defined(__s390__)
649# if defined(__s390x__)
652#elif defined(__riscv) || defined(__riscv__)
654# if defined(__riscv64) || (defined(__riscv_xlen) && (__riscv_xlen == 64))
655# define P_CPU_RISCV_64
657# define P_CPU_RISCV_32
659#elif defined(__loongarch__)
660# define P_CPU_LOONGARCH
661# if defined(__loongarch64) || (__loongarch_grlen == 64)
662# define P_CPU_LOONGARCH_64
664# define P_CPU_LOONGARCH_32
666#elif defined(__e2k__)
727# ifndef P_CPU_MIPS_II
728# define P_CPU_MIPS_II
730# ifndef P_CPU_MIPS_III
731# define P_CPU_MIPS_III
733# ifndef P_CPU_MIPS_IV
734# define P_CPU_MIPS_IV
739# ifndef P_CPU_MIPS_32
740# define P_CPU_MIPS_32
742# ifndef P_CPU_MIPS_64
743# define P_CPU_MIPS_64
748# ifndef P_CPU_POWER_32
749# define P_CPU_POWER_32
751# ifndef P_CPU_POWER_64
752# define P_CPU_POWER_64
757# ifndef P_CPU_SPARC_V8
758# define P_CPU_SPARC_V8
760# ifndef P_CPU_SPARC_V9
761# define P_CPU_SPARC_V9
766# ifndef P_CPU_HPPA_32
767# define P_CPU_HPPA_32
769# ifndef P_CPU_HPPA_64
770# define P_CPU_HPPA_64
781# ifndef P_CPU_RISCV_32
782# define P_CPU_RISCV_32
784# ifndef P_CPU_RISCV_64
785# define P_CPU_RISCV_64
787# ifndef P_CPU_LOONGARCH
788# define P_CPU_LOONGARCH
790# ifndef P_CPU_LOONGARCH_32
791# define P_CPU_LOONGARCH_32
793# ifndef P_CPU_LOONGARCH_64
794# define P_CPU_LOONGARCH_64