LCOV - code coverage report
Current view: top level - include/llvm/Support - X86TargetParser.def (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 62 67 92.5 %
Date: 2018-02-23 05:02:05 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- X86TargetParser.def - X86 target parsing defines ---------*- C++ -*-===//
       2             : //
       3             : //                     The LLVM Compiler Infrastructure
       4             : //
       5             : // This file is distributed under the University of Illinois Open Source
       6             : // License. See LICENSE.TXT for details.
       7             : //
       8             : //===----------------------------------------------------------------------===//
       9             : //
      10             : // This file provides defines to build up the X86 target parser's logic.
      11             : //
      12             : //===----------------------------------------------------------------------===//
      13             : 
      14             : // NOTE: NO INCLUDE GUARD DESIRED!
      15             : 
      16             : #ifndef X86_VENDOR
      17             : #define X86_VENDOR(ENUM, STR)
      18             : #endif
      19         315 : X86_VENDOR(VENDOR_INTEL, "intel")
      20         315 : X86_VENDOR(VENDOR_AMD,   "amd")
      21             : #undef X86_VENDOR
      22             : 
      23             : // This macro is used to implement CPU types that have an alias. As of now
      24             : // there is only ever one alias.
      25             : #ifndef X86_CPU_TYPE_COMPAT_WITH_ALIAS
      26             : #define X86_CPU_TYPE_COMPAT_WITH_ALIAS(ARCHNAME, ENUM, STR, ALIAS) X86_CPU_TYPE_COMPAT(ARCHNAME, ENUM, STR)
      27             : #endif
      28             : 
      29             : // This macro is used for cpu types present in compiler-rt/libgcc.
      30             : #ifndef X86_CPU_TYPE_COMPAT
      31             : #define X86_CPU_TYPE_COMPAT(ARCHNAME, ENUM, STR) X86_CPU_TYPE(ARCHNAME, ENUM)
      32             : #endif
      33             : 
      34             : #ifndef X86_CPU_TYPE
      35             : #define X86_CPU_TYPE(ARCHNAME, ENUM)
      36             : #endif
      37         315 : X86_CPU_TYPE_COMPAT_WITH_ALIAS("bonnell",    INTEL_BONNELL,    "bonnell", "atom")
      38         315 : X86_CPU_TYPE_COMPAT           ("core2",      INTEL_CORE2,      "core2")
      39         315 : X86_CPU_TYPE_COMPAT           ("nehalem",    INTEL_COREI7,     "corei7")
      40         315 : X86_CPU_TYPE_COMPAT_WITH_ALIAS("amdfam10",   AMDFAM10H,        "amdfam10h", "amdfam10")
      41         315 : X86_CPU_TYPE_COMPAT_WITH_ALIAS("bdver1",     AMDFAM15H,        "amdfam15h", "amdfam15")
      42         315 : X86_CPU_TYPE_COMPAT_WITH_ALIAS("silvermont", INTEL_SILVERMONT, "silvermont", "slm")
      43         315 : X86_CPU_TYPE_COMPAT           ("knl",        INTEL_KNL,        "knl")
      44         315 : X86_CPU_TYPE_COMPAT           ("btver1",     AMD_BTVER1,       "btver1")
      45         315 : X86_CPU_TYPE_COMPAT           ("btver2",     AMD_BTVER2,       "btver2")
      46         315 : X86_CPU_TYPE_COMPAT           ("znver1",     AMDFAM17H,        "amdfam17h")
      47         315 : X86_CPU_TYPE_COMPAT           ("knm",        INTEL_KNM,        "knm")
      48             : // Entries below this are not in libgcc/compiler-rt.
      49             : X86_CPU_TYPE                  ("i386",        INTEL_i386)
      50             : X86_CPU_TYPE                  ("i486",        INTEL_i486)
      51             : X86_CPU_TYPE                  ("pentium",     INTEL_PENTIUM)
      52             : X86_CPU_TYPE                  ("pentium-mmx", INTEL_PENTIUM_MMX)
      53             : X86_CPU_TYPE                  ("pentiumpro",  INTEL_PENTIUM_PRO)
      54             : X86_CPU_TYPE                  ("pentium2",    INTEL_PENTIUM_II)
      55             : X86_CPU_TYPE                  ("pentium3",    INTEL_PENTIUM_III)
      56             : X86_CPU_TYPE                  ("pentium4",    INTEL_PENTIUM_IV)
      57             : X86_CPU_TYPE                  ("pentium-m",   INTEL_PENTIUM_M)
      58             : X86_CPU_TYPE                  ("yonah",       INTEL_CORE_DUO)
      59             : X86_CPU_TYPE                  ("nocona",      INTEL_NOCONA)
      60             : X86_CPU_TYPE                  ("prescott",    INTEL_PRESCOTT)
      61             : X86_CPU_TYPE                  ("i486",        AMD_i486)
      62             : X86_CPU_TYPE                  ("pentium",     AMDPENTIUM)
      63             : X86_CPU_TYPE                  ("athlon",      AMD_ATHLON)
      64             : X86_CPU_TYPE                  ("athlon-xp",   AMD_ATHLON_XP)
      65             : X86_CPU_TYPE                  ("k8",          AMD_K8)
      66             : X86_CPU_TYPE                  ("k8-sse3",     AMD_K8SSE3)
      67             : X86_CPU_TYPE                  ("goldmont",    INTEL_GOLDMONT)
      68             : #undef X86_CPU_TYPE_COMPAT_WITH_ALIAS
      69             : #undef X86_CPU_TYPE_COMPAT
      70             : #undef X86_CPU_TYPE
      71             : 
      72             : // This macro is used for cpu subtypes present in compiler-rt/libgcc.
      73             : #ifndef X86_CPU_SUBTYPE_COMPAT
      74             : #define X86_CPU_SUBTYPE_COMPAT(ARCHNAME, ENUM, STR) X86_CPU_SUBTYPE(ARCHNAME, ENUM)
      75             : #endif
      76             : 
      77             : #ifndef X86_CPU_SUBTYPE
      78             : #define X86_CPU_SUBTYPE(ARCHNAME, ENUM)
      79             : #endif
      80             : 
      81         348 : X86_CPU_SUBTYPE_COMPAT("nehalem",        INTEL_COREI7_NEHALEM,        "nehalem")
      82         348 : X86_CPU_SUBTYPE_COMPAT("westmere",       INTEL_COREI7_WESTMERE,       "westmere")
      83         348 : X86_CPU_SUBTYPE_COMPAT("sandybridge",    INTEL_COREI7_SANDYBRIDGE,    "sandybridge")
      84         348 : X86_CPU_SUBTYPE_COMPAT("amdfam10",       AMDFAM10H_BARCELONA,         "barcelona")
      85         348 : X86_CPU_SUBTYPE_COMPAT("amdfam10",       AMDFAM10H_SHANGHAI,          "shanghai")
      86         348 : X86_CPU_SUBTYPE_COMPAT("amdfam10",       AMDFAM10H_ISTANBUL,          "istanbul")
      87         348 : X86_CPU_SUBTYPE_COMPAT("bdver1",         AMDFAM15H_BDVER1,            "bdver1")
      88         348 : X86_CPU_SUBTYPE_COMPAT("bdver2",         AMDFAM15H_BDVER2,            "bdver2")
      89         348 : X86_CPU_SUBTYPE_COMPAT("bdver3",         AMDFAM15H_BDVER3,            "bdver3")
      90         348 : X86_CPU_SUBTYPE_COMPAT("bdver4",         AMDFAM15H_BDVER4,            "bdver4")
      91         348 : X86_CPU_SUBTYPE_COMPAT("znver1",         AMDFAM17H_ZNVER1,            "znver1")
      92         348 : X86_CPU_SUBTYPE_COMPAT("ivybridge",      INTEL_COREI7_IVYBRIDGE,      "ivybridge")
      93         348 : X86_CPU_SUBTYPE_COMPAT("haswell",        INTEL_COREI7_HASWELL,        "haswell")
      94         348 : X86_CPU_SUBTYPE_COMPAT("broadwell",      INTEL_COREI7_BROADWELL,      "broadwell")
      95         348 : X86_CPU_SUBTYPE_COMPAT("skylake",        INTEL_COREI7_SKYLAKE,        "skylake")
      96         348 : X86_CPU_SUBTYPE_COMPAT("skylake-avx512", INTEL_COREI7_SKYLAKE_AVX512, "skylake-avx512")
      97         348 : X86_CPU_SUBTYPE_COMPAT("cannonlake",     INTEL_COREI7_CANNONLAKE,     "cannonlake")
      98             : // Entries below this are not in libgcc/compiler-rt.
      99          33 : X86_CPU_SUBTYPE       ("core2",          INTEL_CORE2_65)
     100           0 : X86_CPU_SUBTYPE       ("penryn",         INTEL_CORE2_45)
     101           0 : X86_CPU_SUBTYPE       ("k6",             AMDPENTIUM_K6)
     102           0 : X86_CPU_SUBTYPE       ("k6-2",           AMDPENTIUM_K62)
     103           0 : X86_CPU_SUBTYPE       ("k6-3",           AMDPENTIUM_K63)
     104           0 : X86_CPU_SUBTYPE       ("geode",          AMDPENTIUM_GEODE)
     105             : #undef X86_CPU_SUBTYPE_COMPAT
     106             : #undef X86_CPU_SUBTYPE
     107             : 
     108             : 
     109             : // This macro is used for cpu types present in compiler-rt/libgcc.
     110             : #ifndef X86_FEATURE_COMPAT
     111             : #define X86_FEATURE_COMPAT(VAL, ENUM, STR) X86_FEATURE(VAL, ENUM)
     112             : #endif
     113             : 
     114             : #ifndef X86_FEATURE
     115             : #define X86_FEATURE(VAL, ENUM)
     116             : #endif
     117         378 : X86_FEATURE_COMPAT( 0, FEATURE_CMOV,            "cmov")
     118         378 : X86_FEATURE_COMPAT( 1, FEATURE_MMX,             "mmx")
     119         378 : X86_FEATURE_COMPAT( 2, FEATURE_POPCNT,          "popcnt")
     120         378 : X86_FEATURE_COMPAT( 3, FEATURE_SSE,             "sse")
     121         378 : X86_FEATURE_COMPAT( 4, FEATURE_SSE2,            "sse2")
     122         378 : X86_FEATURE_COMPAT( 5, FEATURE_SSE3,            "sse3")
     123         378 : X86_FEATURE_COMPAT( 6, FEATURE_SSSE3,           "ssse3")
     124         378 : X86_FEATURE_COMPAT( 7, FEATURE_SSE4_1,          "sse4.1")
     125         378 : X86_FEATURE_COMPAT( 8, FEATURE_SSE4_2,          "sse4.2")
     126         378 : X86_FEATURE_COMPAT( 9, FEATURE_AVX,             "avx")
     127         378 : X86_FEATURE_COMPAT(10, FEATURE_AVX2,            "avx2")
     128         378 : X86_FEATURE_COMPAT(11, FEATURE_SSE4_A,          "sse4a")
     129         378 : X86_FEATURE_COMPAT(12, FEATURE_FMA4,            "fma4")
     130         378 : X86_FEATURE_COMPAT(13, FEATURE_XOP,             "xop")
     131         378 : X86_FEATURE_COMPAT(14, FEATURE_FMA,             "fma")
     132         378 : X86_FEATURE_COMPAT(15, FEATURE_AVX512F,         "avx512f")
     133         378 : X86_FEATURE_COMPAT(16, FEATURE_BMI,             "bmi")
     134         378 : X86_FEATURE_COMPAT(17, FEATURE_BMI2,            "bmi2")
     135         378 : X86_FEATURE_COMPAT(18, FEATURE_AES,             "aes")
     136         378 : X86_FEATURE_COMPAT(19, FEATURE_PCLMUL,          "pclmul")
     137         378 : X86_FEATURE_COMPAT(20, FEATURE_AVX512VL,        "avx512vl")
     138         378 : X86_FEATURE_COMPAT(21, FEATURE_AVX512BW,        "avx512bw")
     139         378 : X86_FEATURE_COMPAT(22, FEATURE_AVX512DQ,        "avx512dq")
     140         378 : X86_FEATURE_COMPAT(23, FEATURE_AVX512CD,        "avx512cd")
     141         378 : X86_FEATURE_COMPAT(24, FEATURE_AVX512ER,        "avx512er")
     142         378 : X86_FEATURE_COMPAT(25, FEATURE_AVX512PF,        "avx512pf")
     143         378 : X86_FEATURE_COMPAT(26, FEATURE_AVX512VBMI,      "avx512vbmi")
     144         378 : X86_FEATURE_COMPAT(27, FEATURE_AVX512IFMA,      "avx512ifma")
     145         378 : X86_FEATURE_COMPAT(28, FEATURE_AVX5124VNNIW,    "avx5124vnniw")
     146         378 : X86_FEATURE_COMPAT(29, FEATURE_AVX5124FMAPS,    "avx5124fmaps")
     147         411 : X86_FEATURE_COMPAT(30, FEATURE_AVX512VPOPCNTDQ, "avx512vpopcntdq")
     148             : // Features below here are not in libgcc/compiler-rt.
     149             : X86_FEATURE       (32, FEATURE_MOVBE)
     150             : X86_FEATURE       (33, FEATURE_ADX)
     151             : X86_FEATURE       (34, FEATURE_EM64T)
     152             : X86_FEATURE       (35, FEATURE_CLFLUSHOPT)
     153             : X86_FEATURE       (36, FEATURE_SHA)
     154             : #undef X86_FEATURE_COMPAT
     155             : #undef X86_FEATURE

Generated by: LCOV version 1.13