blob: cba0ae67e3d06e8483cc8fbd0a32261b4039eed4 [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
Andrew Geissler82c905d2020-04-13 13:39:40 -050016TUNE_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)}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040018
Andrew Geissler82c905d2020-04-13 13:39:40 -050019TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', ' -mno-xl-soft-div', ' -mxl-soft-div', d)}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040020
Andrew Geissler82c905d2020-04-13 13:39:40 -050021TUNE_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)}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040024
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