# Copyright 2017 Rene Rivera
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at
# https://www.bfgroup.xyz/b2/LICENSE.txt)

import feature ;

#| tag::doc[]

[[b2.builtin.features.instruction-set]]`instruction-set`::
*Allowed values:* depends on the used toolset.
+
Specifies for which specific instruction set the code should be generated. The
code in general might not run on processors with older/different instruction
sets.
+
While B2 allows a large set of possible values for this features,
whether a given value works depends on which compiler you use. Please see
the section <<b2.reference.tools.compilers>> for details.

|# # end::doc[]

feature.feature instruction-set
    :
        # x86 and x86-64
        native i486 i586 i686 pentium pentium-mmx pentiumpro pentium2 pentium3
        pentium3m pentium-m pentium4 pentium4m prescott nocona core2 corei7 corei7-avx core-avx-i
        conroe conroe-xe conroe-l allendale merom merom-xe kentsfield kentsfield-xe penryn wolfdale
        yorksfield nehalem sandy-bridge ivy-bridge haswell broadwell skylake skylake-avx512 cannonlake
        icelake-client icelake-server cascadelake cooperlake tigerlake rocketlake alderlake
        sapphirerapids
        atom
        k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp k8 opteron athlon64 athlon-fx
        k8-sse3 opteron-sse3 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 btver1
        btver2 znver1 znver2 znver3
        winchip-c6 winchip2
        c3 c3-2 c7

        # ia64
        itanium itanium1 merced itanium2 mckinley

        # Sparc
        v7 cypress v8 supersparc sparclite hypersparc sparclite86x f930 f934
        sparclet tsc701 v9 ultrasparc ultrasparc3

        # RS/6000 & PowerPC
        401 403 405 405fp 440 440fp 505 601 602 603 603e 604 604e 620 630 740 7400
        7450 750 801 821 823 860 970 8540 power-common ec603e g3 g4 g5 power power2
        power3 power4 power5 powerpc powerpc64 rios rios1 rsc rios2 rs64a

        # MIPS
        4kc 4km 4kp 4ksc 4kec 4kem 4kep 4ksd 5kc 5kf 20kc 24kc 24kf2_1 24kf1_1 24kec
        24kef2_1 24kef1_1 34kc 34kf2_1 34kf1_1 34kn 74kc 74kf2_1 74kf1_1 74kf3_2 1004kc
        1004kf2_1 1004kf1_1 i6400 i6500 interaptiv loongson2e loongson2f loongson3a
        gs464 gs464e gs264e m4k m14k m14kc m14ke m14kec m5100 m5101 octeon octeon+ octeon2
        octeon3 orion p5600 p6600 r2000 r3000 r3900 r4000 r4400 r4600 r4650 r4700 r5900
        r6000 r8000 rm7000 rm9000 r10000 r12000 r14000 r16000 sb1 sr71000 vr4100 vr4111
        vr4120 vr4130 vr4300 vr5000 vr5400 vr5500 xlr xlp

        # HP/PA-RISC
        700 7100 7100lc 7200 7300 8000

        # Advanced RISC Machines
        armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t armv5te armv6 armv6j iwmmxt ep9312
        armv7 armv7s

        cortex-a9+vfpv3 cortex-a53 cortex-r5 cortex-r5+vfpv3-d16

        # z Systems (aka s390x)
        z196 zEC12 z13 z14 z15

    :
        propagated optional
    ;
