+2018-05-08 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/85658
+ * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
+ (check_arch): Likewise.
+ (check_fpu): Return the result rather than printing it.
+ (end arch): Fix operator precedence.
+ (end cpu): Likewise.
+ (END): Print the result from check_fpu.
+
2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
function check_cpu (name) {
exts = split (name, extensions, "+")
- if (! extensions[1] in cpu_cnames) {
+ if (! (extensions[1] in cpu_cnames)) {
return "error"
}
}
function check_fpu (name) {
- if (name in fpu_cnames) {
- print fpu_cnames[name]
- } else print "error"
+ if (! (name in fpu_cnames)) {
+ return "error"
+ }
+ return fpu_cnames[name]
}
function check_arch (name) {
exts = split (name, extensions, "+")
- if (! extensions[1] in arch_isa) {
+ if (! (extensions[1] in arch_isa)) {
return "error"
}
/^end arch / {
if (NF != 3) fatal("syntax: end arch <name>")
if (arch_name != $3) fatal("mimatched end arch")
- if (! arch_name in arch_tune_for) {
+ if (! (arch_name in arch_tune_for)) {
fatal("arch definition lacks a \"tune for\" statement")
}
- if (! arch_name in arch_isa) {
+ if (! (arch_name in arch_isa)) {
fatal("arch definition lacks an \"isa\" statement")
}
arch_list = arch_list " " arch_name
cpu_cnames[cpu_name] = cpu_name
gsub(/[-+.]/, "_", cpu_cnames[cpu_name])
}
- if (! cpu_name in cpu_arch) fatal("cpu definition lacks an architecture")
+ if (! (cpu_name in cpu_arch)) fatal("cpu definition lacks an architecture")
cpu_list = cpu_list " " cpu_name
cpu_name = ""
parse_ok = 1
print check_arch(target[2])
} else if (cmd ~ /^chkfpu /) {
split (cmd, target)
- check_fpu(target[2])
+ print check_fpu(target[2])
} else fatal("unrecognized command: "cmd)
}