public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
To: Terry Guo <flameroc@gmail.com>
Cc: Terry Guo <terry.guo@arm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: Re: [PATCH][ARM]Automatically add -mthumb for thumb-only target when mode isn't specified
Date: Thu, 05 Mar 2015 07:02:00 -0000	[thread overview]
Message-ID: <EB20E5A2-045B-437B-ACE5-269132187F86@linaro.org> (raw)
In-Reply-To: <CAGbRaL6LpoeW1a6P+1aOw31fT6yZN7uLx+bGpkDmnuedoH7kqQ@mail.gmail.com>

> On Mar 5, 2015, at 9:14 AM, Terry Guo <flameroc@gmail.com> wrote:
> 
>> 
>> Thanks Terry (and everyone else) for explaining why we want to do this in the driver.  The substance of the patch looks good to me, and below are some comments and nit-picks.  (Also, I'm not an ARM maintainer, so this is a review, not an approval to commit).
>> 
>> Please make sure to update changelog before committing.
>> 
> 
> Thanks Maxim, your comments are great. I accepted all of them and
> commented two of them that I am not clear.
> 
> <<snapped>>
>>> +
>>> +struct arm_arch_core_flag
>>> +{
>>> +  const char *const name;
>>> +  const unsigned long flags;
>>> +};
>>> +
>>> +static const struct arm_arch_core_flag arm_arch_core_flags[] =
>>> +{
>>> +#undef ARM_CORE
>>> +#define ARM_CORE(NAME, X, IDENT, ARCH, FLAGS, COSTS) \
>>> +  {NAME, FLAGS | FL_FOR_ARCH##ARCH},
>>> +#include "arm-cores.def"
>>> +#undef ARM_CORE
>>> +#undef ARM_ARCH
>>> +#define ARM_ARCH(NAME, CORE, ARCH, FLAGS) \
>>> +  {NAME, FLAGS},
>>> +#include "arm-arches.def"
>>> +#undef ARM_ARCH
>>> +  {NULL, 0}
>>> +};
>> 
>> Did you consider implications from mixing ARCHes and CPUs in the same array?  It should not be a problem, but would you please double-check that cases like "-march=cortex-a15" are properly caught as errors elsewhere in the driver?
>> 
> 
> Not sure I follow you correctly here. This array is just used for my
> new arm_target_thumb_only function. It isn't used by any another code
> in gcc. So I don't think mixing them will break gcc option check
> mechanism. I tried below command and I can get error message:
> 
> $ ./install-native/bin/arm-none-eabi-gcc -march=cortex-a15 x.c -S -mthumb
> arm-none-eabi-gcc: error: unrecognized argument in option '-march=cortex-a15'

I'm just being paranoid here.  The above check you did is all I wanted.

> 
>>> #endif
>>> diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
>>> index 28ffe52..325a81c 100644
>>> --- a/gcc/config/arm/arm-protos.h
>>> +++ b/gcc/config/arm/arm-protos.h
>>> @@ -325,75 +325,6 @@ extern const char *arm_rewrite_selected_cpu (const char *name);
>>> 
>>> extern bool arm_is_constant_pool_ref (rtx);
>>> 
>>> -/* Flags used to identify the presence of processor capabilities.  */
>> 
>> You've lost this comment in the new file.  Was it intentional?
>> 
> 
> The line is used as first line in new file arm-flags.h.

Ack.

Thanks,

--
Maxim Kuvyrkov
www.linaro.org




      reply	other threads:[~2015-03-05  7:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02  1:45 Terry Guo
2015-03-02 13:08 ` Maxim Kuvyrkov
2015-03-02 13:29   ` James Greenhalgh
2015-03-02 16:14     ` Kyrill Tkachov
2015-03-03  2:28   ` Terry Guo
2015-03-04  2:45   ` Terry Guo
2015-03-04  2:46     ` Terry Guo
2015-03-04  8:16       ` Maxim Kuvyrkov
2015-03-05  6:14         ` Terry Guo
2015-03-05  7:02           ` Maxim Kuvyrkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EB20E5A2-045B-437B-ACE5-269132187F86@linaro.org \
    --to=maxim.kuvyrkov@linaro.org \
    --cc=Richard.Earnshaw@arm.com \
    --cc=flameroc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ramana.radhakrishnan@arm.com \
    --cc=terry.guo@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).