summaryrefslogtreecommitdiffstats
path: root/conf/machine/include/microblaze/arch-microblaze.inc
blob: 27f776c5dad54e864e79fe93fa13bae7b456f057 (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
# MicroBlaze architecture tune feature configuration

# Architecture feature and override
TUNEVALID[microblaze] = "MicroBlaze"
MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "" ,d)}"

# Endian
TUNEVALID[bigendian] = "Use Microblaze Big Endian."

MBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el" ,d)}"

TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-mbig-endian", "-mlittle-endian" ,d)}"

# General features
TUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter"
TUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions"
TUNEVALID[reorder] = "Enable Reorder Instructions"

# General feature compiler args
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift" ,d)}"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare" ,d)}"

# Disable reorder for v8.30 if pattern-compare is not enabled
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \
        bb.utils.contains("TUNE_FEATURES", "v8.30", \
            bb.utils.contains("TUNE_FEATURES", "pattern-compare", \
                "-mxl-reorder", "-mno-xl-reorder", d), \
            "-mxl-reorder", d), "-mno-xl-reorder", d)}"

# General feature package architecture formatting
MBPKGARCH_TUNE = ""
MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "" ,d)}"
MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "" ,d)}"
MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "" ,d)}"

# Additional features
require conf/machine/include/microblaze/feature-microblaze-versions.inc
require conf/machine/include/microblaze/feature-microblaze-math.inc

# Architecture name, either 'microblazeeb' or 'microblazeel' depending on endianess
TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el" ,d)}"

# Package Architecture formatting
TUNE_PKGARCH = "microblaze${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}"