plibsys 0.0.5
pmacroscpu.h File Reference

CPU detection macros. More...

Go to the source code of this file.

Macros

#define P_CPU_ALPHA
 DEC Alpha architecture.
 
#define P_CPU_ARM
 ARM architecture.
 
#define P_CPU_ARM_32
 ARM 32-bit architecture.
 
#define P_CPU_ARM_64
 ARM 64-bit architecture.
 
#define P_CPU_ARM_V2
 ARMv2 architecture revision.
 
#define P_CPU_ARM_V3
 ARMv3 architecture revision.
 
#define P_CPU_ARM_V4
 ARMv4 architecture revision.
 
#define P_CPU_ARM_V5
 ARMv5 architecture revision.
 
#define P_CPU_ARM_V6
 ARMv6 architecture revision.
 
#define P_CPU_ARM_V7
 ARMv7 architecture revision.
 
#define P_CPU_ARM_V8
 ARMv8 architecture revision.
 
#define P_CPU_ARM_V9
 ARMv9 architecture revision.
 
#define P_CPU_X86
 Intel x86 architecture.
 
#define P_CPU_X86_32
 Intel x86 32-bit architecture.
 
#define P_CPU_X86_64
 Intel x86 64-bit architecture.
 
#define P_CPU_IA64
 Intel Itanium (IA-64) architecture.
 
#define P_CPU_MIPS
 MIPS architecture.
 
#define P_CPU_MIPS_I
 MIPS I ISA.
 
#define P_CPU_MIPS_II
 MIPS II ISA.
 
#define P_CPU_MIPS_III
 MIPS III ISA.
 
#define P_CPU_MIPS_IV
 MIPS IV ISA.
 
#define P_CPU_MIPS_V
 MIPS V ISA.
 
#define P_CPU_MIPS_32
 MIPS32 ISA.
 
#define P_CPU_MIPS_64
 MIPS64 ISA.
 
#define P_CPU_POWER
 PowerPC architecture.
 
#define P_CPU_POWER_32
 PowerPC 32-bit architecture.
 
#define P_CPU_POWER_64
 PowerPC 64-bit architecture.
 
#define P_CPU_SPARC
 Sun SPARC architecture.
 
#define P_CPU_SPARC_V8
 Sun SPARC V8 architecture.
 
#define P_CPU_SPARC_V9
 Sun SPARC V9 architecture.
 
#define P_CPU_HPPA
 HP PA-RISC architecture.
 
#define P_CPU_HPPA_32
 HP PA-RISC 32-bit (1.0, 1.1) architecture.
 
#define P_CPU_HPPA_64
 HP PA-RISC 64-bit (2.0) architecture.
 
#define P_CPU_S390
 IBM S/390 architecture.
 
#define P_CPU_S390X
 IBM S/390x architecture.
 
#define P_CPU_RISCV
 RISC-V architecture.
 
#define P_CPU_RISCV_32
 RISC-V 32-bit architecture.
 
#define P_CPU_RISCV_64
 RISC-V 64-bit architecture.
 
#define P_CPU_LOONGARCH
 LoongArch architecture.
 
#define P_CPU_LOONGARCH_32
 LoongArch 32-bit architecture.
 
#define P_CPU_LOONGARCH_64
 LoongArch 64-bit architecture.
 
#define P_CPU_E2K
 Elbrus 2000 architecture.
 

Detailed Description

CPU detection macros.

Author
Alexander Saprykin

All the macros are completely independent of any other platform-specific headers, thus gurantee to work with any compiler under any operating system in the same way as they are used within the library.

This family of macros provides CPU detection and defines one or several of P_CPU_x macros.

Definition in file pmacroscpu.h.

Macro Definition Documentation

◆ P_CPU_ALPHA

#define P_CPU_ALPHA

DEC Alpha architecture.

Since
0.0.3

Definition at line 674 of file pmacroscpu.h.

◆ P_CPU_ARM

#define P_CPU_ARM

ARM architecture.

Since
0.0.3

This macro is defined for any ARM target. It contains an architecture revision number. One of the revision specific macros (P_CPU_ARM_Vx) is also defined, as well as P_CPU_ARM_32 or P_CPU_ARM_64.

Definition at line 677 of file pmacroscpu.h.

◆ P_CPU_ARM_32

#define P_CPU_ARM_32

ARM 32-bit architecture.

Since
0.0.3

This macro is defined for ARM 32-bit target. One of the revision specific macros (P_CPU_ARM_Vx) is also defined, as well as P_CPU_ARM.

Definition at line 680 of file pmacroscpu.h.

◆ P_CPU_ARM_64

#define P_CPU_ARM_64

ARM 64-bit architecture.

Since
0.0.3

This macro is defined for ARM 64-bit target. One of the revision specific macros (P_CPU_ARM_Vx) is also defined, as well as P_CPU_ARM.

Definition at line 683 of file pmacroscpu.h.

◆ P_CPU_ARM_V2

#define P_CPU_ARM_V2

ARMv2 architecture revision.

Since
0.0.3

This macro is defined for ARMv2 target. P_CPU_ARM_32 and P_CPU_ARM macros are also defined.

Definition at line 686 of file pmacroscpu.h.

◆ P_CPU_ARM_V3

#define P_CPU_ARM_V3

ARMv3 architecture revision.

Since
0.0.3

This macro is defined for ARMv3 target. P_CPU_ARM_32 and P_CPU_ARM macros are also defined.

Definition at line 689 of file pmacroscpu.h.

◆ P_CPU_ARM_V4

#define P_CPU_ARM_V4

ARMv4 architecture revision.

Since
0.0.3

This macro is defined for ARMv4 target. P_CPU_ARM_32 and P_CPU_ARM macros are also defined.

Definition at line 692 of file pmacroscpu.h.

◆ P_CPU_ARM_V5

#define P_CPU_ARM_V5

ARMv5 architecture revision.

Since
0.0.3

This macro is defined for ARMv5 target. P_CPU_ARM_32 and P_CPU_ARM macros are also defined.

Definition at line 695 of file pmacroscpu.h.

◆ P_CPU_ARM_V6

#define P_CPU_ARM_V6

ARMv6 architecture revision.

Since
0.0.3

This macro is defined for ARMv6 target. P_CPU_ARM_32 and P_CPU_ARM macros are also defined.

Definition at line 698 of file pmacroscpu.h.

◆ P_CPU_ARM_V7

#define P_CPU_ARM_V7

ARMv7 architecture revision.

Since
0.0.3

This macro is defined for ARMv7 target. P_CPU_ARM_32 and P_CPU_ARM macros are also defined.

Definition at line 701 of file pmacroscpu.h.

◆ P_CPU_ARM_V8

#define P_CPU_ARM_V8

ARMv8 architecture revision.

Since
0.0.3

This macro is defined for ARMv8 target. P_CPU_ARM_32 or P_CPU_ARM_64 macro is defined, as well as P_CPU_ARM.

Definition at line 704 of file pmacroscpu.h.

◆ P_CPU_ARM_V9

#define P_CPU_ARM_V9

ARMv9 architecture revision.

Since
0.0.5

This macro is defined for ARMv9 target. P_CPU_ARM_64 and P_CPU_ARM macros are defined, as well.

Definition at line 707 of file pmacroscpu.h.

◆ P_CPU_E2K

#define P_CPU_E2K

Elbrus 2000 architecture.

Since
0.0.5

This macro is defined for Elbrus 2000 target.

Definition at line 797 of file pmacroscpu.h.

◆ P_CPU_HPPA

#define P_CPU_HPPA

HP PA-RISC architecture.

Since
0.0.3

This macro is defined for any PA-RISC target. One of the architecture specific macros (P_CPU_HPPA_xx) is also defined.

Definition at line 764 of file pmacroscpu.h.

◆ P_CPU_HPPA_32

#define P_CPU_HPPA_32

HP PA-RISC 32-bit (1.0, 1.1) architecture.

Since
0.0.3

This macro is defined for PA-RISC 32-bit target. P_CPU_HPPA macro is also defined.

Definition at line 767 of file pmacroscpu.h.

◆ P_CPU_HPPA_64

#define P_CPU_HPPA_64

HP PA-RISC 64-bit (2.0) architecture.

Since
0.0.3

This macro is defined for PA-RISC 64-bit target. P_CPU_HPPA macro is also defined.

Definition at line 770 of file pmacroscpu.h.

◆ P_CPU_IA64

#define P_CPU_IA64

Intel Itanium (IA-64) architecture.

Since
0.0.3

This macro is defined for Intel Itanium (IA-64) target.

Definition at line 719 of file pmacroscpu.h.

◆ P_CPU_LOONGARCH

#define P_CPU_LOONGARCH

LoongArch architecture.

Since
0.0.5

This macro is defined for any LoongArch target. One of the architecture specific macros (P_CPU_LOONGARCH_xx) is also defined.

Definition at line 788 of file pmacroscpu.h.

◆ P_CPU_LOONGARCH_32

#define P_CPU_LOONGARCH_32

LoongArch 32-bit architecture.

Since
0.0.5

This macro is defined for LoongArch 32-bit target. P_CPU_LOONGARCH macro is also defined.

Definition at line 791 of file pmacroscpu.h.

◆ P_CPU_LOONGARCH_64

#define P_CPU_LOONGARCH_64

LoongArch 64-bit architecture.

Since
0.0.5

This macro is defined for LoongArch 64-bit target. P_CPU_LOONGARCH macro is also defined.

Definition at line 794 of file pmacroscpu.h.

◆ P_CPU_MIPS

#define P_CPU_MIPS

MIPS architecture.

Since
0.0.3

This macro is defined for any MIPS target. Some other specific macros (P_CPU_MIPS_xx) for different MIPS ISAs may be defined.

Definition at line 722 of file pmacroscpu.h.

◆ P_CPU_MIPS_32

#define P_CPU_MIPS_32

MIPS32 ISA.

Since
0.0.3

This macro is defined for MIPS32 target. P_CPU_MIPS, P_CPU_MIPS_I and P_CPU_MIPS_II.

Definition at line 740 of file pmacroscpu.h.

◆ P_CPU_MIPS_64

#define P_CPU_MIPS_64

MIPS64 ISA.

Since
0.0.3

This macro is defined for MIPS64 target. P_CPU_MIPS, P_CPU_MIPS_I, P_CPU_MIPS_II, P_CPU_MIPS_III, P_CPU_MIPS_IV and are also defined.

Definition at line 743 of file pmacroscpu.h.

◆ P_CPU_MIPS_I

#define P_CPU_MIPS_I

MIPS I ISA.

Since
0.0.3

This macro is defined for MIPS I target. P_CPU_MIPS is also defined, as well as probably some other ISA macros (P_CPU_MIPS_xx).

Definition at line 725 of file pmacroscpu.h.

◆ P_CPU_MIPS_II

#define P_CPU_MIPS_II

MIPS II ISA.

Since
0.0.3

This macro is defined for MIPS II target. P_CPU_MIPS and P_CPU_MIPS_I are also defined, as well as probably some other ISA macros (P_CPU_MIPS_xx).

Definition at line 728 of file pmacroscpu.h.

◆ P_CPU_MIPS_III

#define P_CPU_MIPS_III

MIPS III ISA.

Since
0.0.3

This macro is defined for MIPS III target. P_CPU_MIPS, P_CPU_MIPS_I and P_CPU_MIPS_II are also defined, as well as probably some other ISA macros (P_CPU_MIPS_xx).

Definition at line 731 of file pmacroscpu.h.

◆ P_CPU_MIPS_IV

#define P_CPU_MIPS_IV

MIPS IV ISA.

Since
0.0.3

This macro is defined for MIPS IV target. P_CPU_MIPS, P_CPU_MIPS_I, P_CPU_MIPS_II and P_CPU_MIPS_III are also defined, as well as probably some other ISA macros (P_CPU_MIPS_xx).

Definition at line 734 of file pmacroscpu.h.

◆ P_CPU_MIPS_V

#define P_CPU_MIPS_V

MIPS V ISA.

Since
0.0.5

This macro is defined for MIPS V target. P_CPU_MIPS, P_CPU_MIPS_I, P_CPU_MIPS_II, P_CPU_MIPS_III and P_CPU_MIPS_IV are also defined, as well as probably some other ISA macros (P_CPU_MIPS_xx).

Definition at line 737 of file pmacroscpu.h.

◆ P_CPU_POWER

#define P_CPU_POWER

PowerPC architecture.

Since
0.0.3

This macro is defined for any PowerPC target. One of the architecture specific macros (P_CPU_POWER_xx) is also defined.

Definition at line 746 of file pmacroscpu.h.

◆ P_CPU_POWER_32

#define P_CPU_POWER_32

PowerPC 32-bit architecture.

Since
0.0.3

This macro is defined for PowerPC 32-bit target. P_CPU_POWER macro is also defined.

Definition at line 749 of file pmacroscpu.h.

◆ P_CPU_POWER_64

#define P_CPU_POWER_64

PowerPC 64-bit architecture.

Since
0.0.3

This macro is defined for PowerPC 64-bit target. P_CPU_POWER macro is also defined.

Definition at line 752 of file pmacroscpu.h.

◆ P_CPU_RISCV

#define P_CPU_RISCV

RISC-V architecture.

Since
0.0.5

This macro is defined for any RISC-V target. One of the architecture specific macros (P_CPU_RISCV_xx) is also defined.

Definition at line 779 of file pmacroscpu.h.

◆ P_CPU_RISCV_32

#define P_CPU_RISCV_32

RISC-V 32-bit architecture.

Since
0.0.5

This macro is defined for RISC-V 32-bit target. P_CPU_RISCV macro is also defined.

Definition at line 782 of file pmacroscpu.h.

◆ P_CPU_RISCV_64

#define P_CPU_RISCV_64

RISC-V 64-bit architecture.

Since
0.0.5

This macro is defined for RISC-V 64-bit target. P_CPU_RISCV macro is also defined.

Definition at line 785 of file pmacroscpu.h.

◆ P_CPU_S390

#define P_CPU_S390

IBM S/390 architecture.

Since
0.0.5

This macro is defined for IBM S/390 32-bit target.

Definition at line 773 of file pmacroscpu.h.

◆ P_CPU_S390X

#define P_CPU_S390X

IBM S/390x architecture.

Since
0.0.5

This macro is defined for IBM S/390x 64-bit target. P_CPU_S390 macro is also defined.

Definition at line 776 of file pmacroscpu.h.

◆ P_CPU_SPARC

#define P_CPU_SPARC

Sun SPARC architecture.

Since
0.0.3

This macro is defined for any SPARC target. One of the architecture specific macros (P_CPU_SPARC_xx) is also may be defined.

Definition at line 755 of file pmacroscpu.h.

◆ P_CPU_SPARC_V8

#define P_CPU_SPARC_V8

Sun SPARC V8 architecture.

Since
0.0.3

This macro is defined for SPARC V8 target. P_CPU_SPARC macro is also defined.

Definition at line 758 of file pmacroscpu.h.

◆ P_CPU_SPARC_V9

#define P_CPU_SPARC_V9

Sun SPARC V9 architecture.

Since
0.0.3

This macro is defined for SPARC V9 target. P_CPU_SPARC macro is also defined.

Definition at line 761 of file pmacroscpu.h.

◆ P_CPU_X86

#define P_CPU_X86

Intel x86 architecture.

Since
0.0.3

This macro is defined for any x86 target. It contains an architecture revision number (3 for i386 and lower, 4 for i486, 5 for i586, 6 for i686 and better). One of the architecture specific macros (P_CPU_X86_xx) is also defined.

Definition at line 710 of file pmacroscpu.h.

◆ P_CPU_X86_32

#define P_CPU_X86_32

Intel x86 32-bit architecture.

Since
0.0.3

This macro is defined for x86 32-bit target. P_CPU_X86 macro is also defined.

Definition at line 713 of file pmacroscpu.h.

◆ P_CPU_X86_64

#define P_CPU_X86_64

Intel x86 64-bit architecture.

Since
0.0.3

This macro is defined for x86 64-bit target. P_CPU_X86 macro is also defined.

Definition at line 716 of file pmacroscpu.h.