From 2b42b0415aee13f1939b395c3693e679d16d0a70 Mon Sep 17 00:00:00 2001 From: Cooper Qu Date: Tue, 21 Jul 2020 11:32:44 +0100 Subject: [PATCH] Fix Unreasonable arch and cpu conflict warning for ther CSky architecture. * config/tc-csky.c (md_begin): Fix tests of arch and mach flags. --- gas/ChangeLog | 4 ++++ gas/config/tc-csky.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index ef6fc5a3ed6..fdbba0e5bb9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2020-07-21 Cooper Qu + + * config/tc-csky.c (md_begin): Fix tests of arch and mach flags. + 2020-07-21 Jan Beulich * testsuite/gas/i386/evex-no-scale-32.d, diff --git a/gas/config/tc-csky.c b/gas/config/tc-csky.c index be54afbd679..e90ebc2d88d 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) -- 2.30.2