blob: a31516659c9a4fd2f07a724c63e6d9d252f204c0 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001# This include describes the math features (integer and floating point) that
2# are available for the MicroBlaze ISA
3
4TUNEVALID[multiply-low] = "Hardware multipler with 32 bit result"
5TUNEVALID[multiply-high] = "Hardware multipler with 64 bit result"
6TUNEVALID[divide-hard] = "Hardware divider"
7TUNEVALID[fpu-soft] = "Software FPU"
8TUNEVALID[fpu-hard] = "Hardware FPU in basic mode"
9TUNEVALID[fpu-hard-extended] = "Hardware FPU in extended mode (conversion and square root instructions)"
10
11TUNECONFLICTS[fpu-soft] = "fpu-hard fpu-hard-extended"
12TUNECONFLICTS[fpu-hard] = "fpu-soft"
13TUNECONFLICTS[fpu-hard-extended] = "fpu-soft"
14
15# Compiler args
16TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['multiply-low', 'multiply-high'], '-mno-xl-soft-mul', '-mxl-soft-mul', d)}"
17TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mxl-multiply-high', '', d)}"
18
19TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-mno-xl-soft-div', '-mxl-soft-div', d)}"
20
21TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', '', '', d)}"
22TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['fpu-hard', 'fpu-hard-extended'], '-mhard-float', '', d)}"
23TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-mxl-float-convert -mxl-float-sqrt', '', d)}"
24
25# Set target fpu (bitbake known target) to soft or hard (basic or extended)
26TARGET_FPU = "${@bb.utils.contains_any('TUNE_FEATURES', 'fpu-hard fpu-hard-extended', 'fpu-hard', 'fpu-soft', d)}"
27
28# Package Architecture formatting
29MBPKGARCH_MATH = ""
30MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mh', bb.utils.contains('TUNE_FEATURES', 'multiply-low', '-ml', '', d), d)}"
31MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-div', '', d)}"
32MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-fe', bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '-fb', '', d), d)}"
33