summaryrefslogtreecommitdiffstats
path: root/meta/conf/machine/include/microblaze/feature-microblaze-math.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/conf/machine/include/microblaze/feature-microblaze-math.inc')
-rw-r--r--meta/conf/machine/include/microblaze/feature-microblaze-math.inc33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/conf/machine/include/microblaze/feature-microblaze-math.inc b/meta/conf/machine/include/microblaze/feature-microblaze-math.inc
new file mode 100644
index 0000000000..a31516659c
--- /dev/null
+++ b/meta/conf/machine/include/microblaze/feature-microblaze-math.inc
@@ -0,0 +1,33 @@
1# 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