Vector Optimized Library of Kernels  2.4
Architecture-tuned implementations of math kernels
cpuinfo_mips.h
Go to the documentation of this file.
1 // Copyright 2017 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef CPU_FEATURES_INCLUDE_CPUINFO_MIPS_H_
16 #define CPU_FEATURES_INCLUDE_CPUINFO_MIPS_H_
17 
19 #include "cpu_features_macros.h"
20 
22 
23 typedef struct {
24  int msa : 1; // MIPS SIMD Architecture
25  // https://www.mips.com/products/architectures/ase/simd/
26  int eva : 1; // Enhanced Virtual Addressing
27  // https://www.mips.com/products/architectures/mips64/
28  int r6 : 1; // True if is release 6 of the processor.
29 
30  // Make sure to update MipsFeaturesEnum below if you add a field here.
31 } MipsFeatures;
32 
33 typedef struct {
35 } MipsInfo;
36 
37 MipsInfo GetMipsInfo(void);
38 
40 // Introspection functions
41 
42 typedef enum {
48 
49 int GetMipsFeaturesEnumValue(const MipsFeatures* features,
50  MipsFeaturesEnum value);
51 
53 
55 
56 #if !defined(CPU_FEATURES_ARCH_MIPS)
57 #error "Including cpuinfo_mips.h from a non-mips target."
58 #endif
59 
60 #endif // CPU_FEATURES_INCLUDE_CPUINFO_MIPS_H_
int r6
Definition: cpuinfo_mips.h:28
const char * GetMipsFeaturesEnumName(MipsFeaturesEnum)
Definition: cpuinfo_mips.c:89
Definition: cpuinfo_mips.h:44
Definition: cpuinfo_mips.h:43
Definition: cpuinfo_mips.h:23
#define CPU_FEATURES_END_CPP_NAMESPACE
Definition: cpu_features_macros.h:115
Definition: cpuinfo_mips.h:45
int msa
Definition: cpuinfo_mips.h:24
#define CPU_FEATURES_START_CPP_NAMESPACE
Definition: cpu_features_macros.h:114
MipsFeatures features
Definition: cpuinfo_mips.h:34
MipsInfo GetMipsInfo(void)
Definition: cpuinfo_mips.c:64
MipsFeaturesEnum
Definition: cpuinfo_mips.h:42
int GetMipsFeaturesEnumValue(const MipsFeatures *features, MipsFeaturesEnum value)
Definition: cpuinfo_mips.c:83
Definition: cpuinfo_mips.h:33
Definition: cpuinfo_mips.h:46
int eva
Definition: cpuinfo_mips.h:26