aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCooper Qu <cooper.qu@linux.alibaba.com>2020-07-21 11:32:44 +0100
committerNick Clifton <nickc@redhat.com>2020-07-21 11:32:44 +0100
commit2b42b0415aee13f1939b395c3693e679d16d0a70 (patch)
tree5199fb0704ba314b70e8e679abb6033bc7420669
parent84dc5f0b5c57f6cc9d7ae8ea347c438b9fa9d8fc (diff)
downloadgdb-2b42b0415aee13f1939b395c3693e679d16d0a70.zip
gdb-2b42b0415aee13f1939b395c3693e679d16d0a70.tar.gz
gdb-2b42b0415aee13f1939b395c3693e679d16d0a70.tar.bz2
Fix Unreasonable arch and cpu conflict warning for ther CSky architecture.
* config/tc-csky.c (md_begin): Fix tests of arch and mach flags.
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/tc-csky.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ef6fc5a..fdbba0e 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2020-07-21 Cooper Qu <cooper.qu@linux.alibaba.com>
+
+ * config/tc-csky.c (md_begin): Fix tests of arch and mach flags.
+
2020-07-21 Jan Beulich <jbeulich@suse.com>
* testsuite/gas/i386/evex-no-scale-32.d,
diff --git a/gas/config/tc-csky.c b/gas/config/tc-csky.c
index be54afb..e90ebc2 100644
--- a/gas/config/tc-csky.c
+++ b/gas/config/tc-csky.c
@@ -1181,9 +1181,11 @@ md_begin (void)
if (mach_flag != 0)
{
- if ((mach_flag & CSKY_ARCH_MASK) != arch_flag && arch_flag != 0)
+ if (((mach_flag & CSKY_ARCH_MASK) != (arch_flag & CSKY_ARCH_MASK))
+ && arch_flag != 0)
as_warn (_("-mcpu conflict with -march option, using -mcpu"));
- if ((mach_flag & ~CSKY_ARCH_MASK) != flags && flags != 0)
+ if (((mach_flag & ~CSKY_ARCH_MASK) != (flags & ~CSKY_ARCH_MASK))
+ && flags != 0)
as_warn (_("-mcpu conflict with other model parameters, using -mcpu"));
}
else if (arch_flag != 0)