mirror of
https://github.com/google/cpu_features.git
synced 2025-07-01 21:31:15 +02:00
Added some MIPS features. (#241)
Co-authored-by: Michael Roe <michael-roe@users.noreply.github.com>
This commit is contained in:
@ -21,11 +21,20 @@
|
||||
CPU_FEATURES_START_CPP_NAMESPACE
|
||||
|
||||
typedef struct {
|
||||
int msa : 1; // MIPS SIMD Architecture
|
||||
// https://www.mips.com/products/architectures/ase/simd/
|
||||
int eva : 1; // Enhanced Virtual Addressing
|
||||
// https://www.mips.com/products/architectures/mips64/
|
||||
int r6 : 1; // True if is release 6 of the processor.
|
||||
int msa : 1; // MIPS SIMD Architecture
|
||||
// https://www.mips.com/products/architectures/ase/simd/
|
||||
int eva : 1; // Enhanced Virtual Addressing
|
||||
// https://www.mips.com/products/architectures/mips64/
|
||||
int r6 : 1; // True if is release 6 of the processor.
|
||||
int mips16 : 1; // Compressed instructions
|
||||
int mdmx : 1; // MIPS Digital Media Extension
|
||||
int mips3d : 1; // 3D graphics acceleration
|
||||
// MIPS(r) Architecture for Programmers, Volume IV-c
|
||||
int smart : 1; // Smart-card cryptography
|
||||
// MIPS(r) Architecture for Programmers, Volume IV-d
|
||||
int dsp : 1; // Digital Signal Processing
|
||||
// MIPS(r) Architecture for Programmers, Volume IV-e
|
||||
// https://www.mips.com/products/architectures/ase/dsp/
|
||||
|
||||
// Make sure to update MipsFeaturesEnum below if you add a field here.
|
||||
} MipsFeatures;
|
||||
@ -43,6 +52,11 @@ typedef enum {
|
||||
MIPS_MSA,
|
||||
MIPS_EVA,
|
||||
MIPS_R6,
|
||||
MIPS_MIPS16,
|
||||
MIPS_MDMX,
|
||||
MIPS_MIPS3D,
|
||||
MIPS_SMART,
|
||||
MIPS_DSP,
|
||||
MIPS_LAST_,
|
||||
} MipsFeaturesEnum;
|
||||
|
||||
|
@ -117,6 +117,13 @@ CPU_FEATURES_START_CPP_NAMESPACE
|
||||
#define MIPS_HWCAP_R6 (1UL << 0)
|
||||
#define MIPS_HWCAP_MSA (1UL << 1)
|
||||
#define MIPS_HWCAP_CRC32 (1UL << 2)
|
||||
#define MIPS_HWCAP_MIPS16 (1UL << 3)
|
||||
#define MIPS_HWCAP_MDMX (1UL << 4)
|
||||
#define MIPS_HWCAP_MIPS3D (1UL << 5)
|
||||
#define MIPS_HWCAP_SMARTMIPS (1UL << 6)
|
||||
#define MIPS_HWCAP_DSP (1UL << 7)
|
||||
#define MIPS_HWCAP_DSP2 (1UL << 8)
|
||||
#define MIPS_HWCAP_DSP3 (1UL << 9)
|
||||
|
||||
// http://elixir.free-electrons.com/linux/latest/source/arch/powerpc/include/uapi/asm/cputable.h
|
||||
#ifndef _UAPI__ASM_POWERPC_CPUTABLE_H
|
||||
|
Reference in New Issue
Block a user