Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] ARC: Add support for ARC HS38 with Hardware Floating Point
Date: Mon, 10 Jul 2017 14:05:57 +0000	[thread overview]
Message-ID: <1499695556.6394.30.camel@synopsys.com> (raw)
In-Reply-To: <20170710154629.442a4411@windsurf.lan>

Hi Thomas,

On Mon, 2017-07-10 at 15:46 +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon, 10 Jul 2017 16:36:50 +0300, Alexey Brodkin wrote:
> > 
> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > ---
> > ?arch/Config.in.arc???????| 10 +++++++---
> > ?package/uclibc/Config.in |??1 +
> > ?2 files changed, 8 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/Config.in.arc b/arch/Config.in.arc
> > index 7d341f3136..d0e2286557 100644
> > --- a/arch/Config.in.arc
> > +++ b/arch/Config.in.arc
> > @@ -14,12 +14,15 @@ config BR2_arc770d
> > ?config BR2_archs38
> > ?	bool "ARC HS38"
> > ?
> > +config BR2_archs38_hf
> > +	bool "ARC HS38 with hard floating-point"
> 
> Does it need to be a separate CPU type, or an option when HS38 is
> selected ?

Well this is a real "-mcpu" value understood by GCC for ARC
------------------------------>8-------------------------------
arc-linux-gcc --target-help
...
ARC-specific assembler options:
? -mcpu=<cpu name>	??(default: hs38), assemble for CPU <cpu name>, one of:
??????????????????????????arc700, nps400, arcem, em, em4, em4_dmips, em4_fpus,?
??????????????????????????em4_fpuda, quarkse_em, archs, hs, hs34, hs38,?
??????????????????????????hs38_linux, arc600, arc600_norm, arc600_mul64,?
??????????????????????????arc600_mul32x16, arc601, arc601_norm, arc601_mul64,?
??????????????????????????arc601_mul32x16
------------------------------>8-------------------------------

And in itself this is pretty much an alias to a set of HW features
selected by default in the same ARC HS38 "template" in CPU configuration
utility. In fact it is "-mcpu=hs38 -mfpu=fpud_all". But when we configure GCC
with "-mcpu" option it then is used by default, i.e. even if we later build
a random application with a simple "arc-linux-gcc test.c" it implicitly gets
optimized for that same "-mcpu"... i.e. there's no need in adding stuff in
TARGET_ABI variable in Buildroot etc.

For example in OpenEmbedded we went via separate options instead of those
"templates" as the same toolchain is reused between different builds which
differs from Buildroot where we build everything for just one HW configuration.
So IMHO templates approach in Buildroot is more convenient.

> ?config BR2_ARCH
> > ?	default "arc"	if BR2_arcle
> > @@ -37,6 +40,7 @@ config BR2_GCC_TARGET_CPU
> > ?	default "arc700" if BR2_arc750d
> > ?	default "arc700" if BR2_arc770d
> > ?	default "archs"	?if BR2_archs38
> > +	default "hs38_linux"	?if BR2_archs38_hf
> 
> gcc really understands -mcpu=hs38_linux ?
> 
> It seems odd to have the operating system name encoded in the CPU name.

The rationale behind that naming was to highlight a template which is
the best option for Linux use-case. I.e. if you want to build a system that
runs
Linux on top of ARC HS38 core please consider usage of that "template"
which has HW features that [may significantly] improve performance of the
system.

Still not sure if now you feel more comfortable with that stuff :))

-Alexey

  reply	other threads:[~2017-07-10 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 13:36 [Buildroot] [PATCH] ARC: Add support for ARC HS38 with Hardware Floating Point Alexey Brodkin
2017-07-10 13:46 ` Thomas Petazzoni
2017-07-10 14:05   ` Alexey Brodkin [this message]
2018-03-31 14:38     ` Arnout Vandecappelle
2018-04-02 13:19       ` Alexey Brodkin

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=1499695556.6394.30.camel@synopsys.com \
    --to=alexey.brodkin@synopsys.com \
    --cc=buildroot@busybox.net \
    /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