summaryrefslogtreecommitdiffstats
path: root/bsp/meta-synopsys/conf/machine/include/arcv2-tune.inc
blob: a3605292b6ff16914271440855e3dad5815fd82a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
require arch-arc.inc

DEFAULTTUNE ?= "archs"
TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"

TUNEVALID[hs] = "Enable ARC HS core with 32-bit atomic ops"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'hs', ' -mcpu=hs', '', d)}"

TUNEVALID[llsc64] = "Enable 64-bit LL/SC operations"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'llsc64', ' -mll64', '', d)}"

TUNEVALID[div_rem] = "Enable simple divider"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'div_rem', ' -mdiv-rem', '', d)}"

TUNEVALID[mpy] = "Enable simple hardware multiplier"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mpy', ' -mmpy-option=mpy', '', d)}"

TUNEVALID[plus_qmacw] = "Enable most powerful hardware multiplier"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'plus_qmacw', ' -mmpy-option=plus_qmacw', '', d)}"

TUNEVALID[fpud_all] = "Enable double-precision FPU"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpud_all', ' -mfpu=fpud_all', '', d)}"

AVAILTUNES += "archs hs38 hs38linux"

TUNE_FEATURES_tune-archs = "hs llsc64 mpy"
TUNE_PKGARCH_tune-archs = "archs"
PACKAGE_EXTRA_ARCHS_tune-archs = "archs hs38 hs38linux"

TUNE_FEATURES_tune-hs38 = "hs llsc64 plus_qmacw"
TUNE_PKGARCH_tune-hs38 = "hs38"
PACKAGE_EXTRA_ARCHS_tune-hs38 = "hs38 hs38linux"

TUNE_FEATURES_tune-hs38linux = "hs llsc64 plus_qmacw fpud_all"
TUNE_PKGARCH_tune-hs38linux = "hs38linux"
PACKAGE_EXTRA_ARCHS_tune-hs38linux = "hs38linux"

def arc_machine_dict(machdata, d):
    machdata = {
            "elf" : {
                        "arc" :       (195,    0,    0,          True,          32),
                        "arceb" :     (195,    0,    0,          False,         32),
                      },
            "linux" : {
                        "arc" :       (195,    0,    0,          True,          32),
                        "arceb" :     (195,    0,    0,          False,         32),
                      },
    }
    return machdata

PACKAGEQA_EXTRA_MACHDEFFUNCS = "arc_machine_dict"