diff options
author | Sipke Vriend <sipke.vriend@xilinx.com> | 2013-05-23 08:18:02 +1000 |
---|---|---|
committer | Sipke Vriend <sipke.vriend@xilinx.com> | 2013-05-23 08:18:02 +1000 |
commit | 31a59c8825650f801a6e549b0215da835386b243 (patch) | |
tree | 65388cc467a2526267d8009ee0c9ad7c03fab806 | |
parent | 62047c26d234418404776b0af4f39e5d1c6c73c7 (diff) | |
download | meta-xilinx-31a59c8825650f801a6e549b0215da835386b243.tar.gz |
microblaze: Set FPU_TARGET and add sanity checking
Set bitbake 'known' FPU_TARGET to reflect soft-fpu or hard-fpu
Sanity check: add pattern-compare if reorder only exists in v8.30.
Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com>
-rw-r--r-- | conf/machine/include/microblaze/feature-microblaze-fpu.inc | 6 | ||||
-rw-r--r-- | conf/machine/include/microblaze/feature-microblaze-v8.inc | 21 |
2 files changed, 25 insertions, 2 deletions
diff --git a/conf/machine/include/microblaze/feature-microblaze-fpu.inc b/conf/machine/include/microblaze/feature-microblaze-fpu.inc index 07f9ba93..bf2fe38b 100644 --- a/conf/machine/include/microblaze/feature-microblaze-fpu.inc +++ b/conf/machine/include/microblaze/feature-microblaze-fpu.inc | |||
@@ -1,5 +1,3 @@ | |||
1 | TARGET_FPU = "fpu-other" | ||
2 | |||
3 | TUNEVALID[fpu-soft] = "Use Microblaze software FPU" | 1 | TUNEVALID[fpu-soft] = "Use Microblaze software FPU" |
4 | TUNEVALID[fpu-hard] = "Enable Microblaze hardware FPU in basic mode." | 2 | TUNEVALID[fpu-hard] = "Enable Microblaze hardware FPU in basic mode." |
5 | TUNEVALID[fpu-hard-extended] = "Enable Microblaze hardware FPU in extended mode - conversion and square root instructions." | 3 | TUNEVALID[fpu-hard-extended] = "Enable Microblaze hardware FPU in extended mode - conversion and square root instructions." |
@@ -11,5 +9,9 @@ MBCCARGSFPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "-mhar | |||
11 | MBPKGFPU_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-fb", "", d)}" | 9 | MBPKGFPU_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-fb", "", d)}" |
12 | MBPKGFPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "-fe", "${MBPKGFPU_BASIC}", d)}" | 10 | MBPKGFPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "-fe", "${MBPKGFPU_BASIC}", d)}" |
13 | 11 | ||
12 | # Set target fpu (bitbake known target) to soft or hard (basic or extended in microblaze language) | ||
13 | TARGETFPU_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "fpu-hard", "fpu-soft", d)}" | ||
14 | TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "fpu-hard", "${TARGETFPU_BASIC}", d)}" | ||
15 | |||
14 | TUNECONFLICTS[fpu-hard] = "fpu-soft" | 16 | TUNECONFLICTS[fpu-hard] = "fpu-soft" |
15 | TUNECONFLICTS[fpu-hard-extended] = "fpu-soft" | 17 | TUNECONFLICTS[fpu-hard-extended] = "fpu-soft" |
diff --git a/conf/machine/include/microblaze/feature-microblaze-v8.inc b/conf/machine/include/microblaze/feature-microblaze-v8.inc index 21b54c0f..46a11cfd 100644 --- a/conf/machine/include/microblaze/feature-microblaze-v8.inc +++ b/conf/machine/include/microblaze/feature-microblaze-v8.inc | |||
@@ -22,3 +22,24 @@ MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v8.10", "-v8.10", "" ,d) | |||
22 | TUNEVALID[v8.00] = "Use Microblaze version 8.00" | 22 | TUNEVALID[v8.00] = "Use Microblaze version 8.00" |
23 | MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v8.00", "-mcpu=v8.00.a", "" ,d)}" | 23 | MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v8.00", "-mcpu=v8.00.a", "" ,d)}" |
24 | MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v8.00", "-v8.00", "" ,d)}" | 24 | MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v8.00", "-v8.00", "" ,d)}" |
25 | |||
26 | TUNECONFLICTS[v8.00] += "reorder" | ||
27 | TUNECONFLICTS[v8.10] += "reorder" | ||
28 | TUNECONFLICTS[v8.20] += "reorder" | ||
29 | |||
30 | # Perform some additional sanity checking | ||
31 | python __anonymous () { | ||
32 | import bb | ||
33 | tune_features = bb.data.getVar('TUNE_FEATURES', d, 1) | ||
34 | tuneslist = tune_features.split() | ||
35 | |||
36 | # | ||
37 | # GCC will fail on v8.30 if reorder and pattern-compare are not | ||
38 | # both in ccflags | ||
39 | # -mxl-reorder requires -mxl-pattern-compare for -mcpu=v8.30.a | ||
40 | # Check if either one exists alone and if so, add the other | ||
41 | # | ||
42 | if 'v8.30' in tuneslist: | ||
43 | if 'reorder' in tuneslist and 'pattern-compare' not in tuneslist: | ||
44 | d.setVar("TUNE_FEATURES", "%s pattern-compare" % tune_features) | ||
45 | } | ||