public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: David Miller <davem@davemloft.net>, cederman@gaisler.com
Cc: ebotcazou@adacore.com, gcc-patches@gcc.gnu.org, daniel@gaisler.com
Subject: Re: [PATCH-v3] [SPARC] Add a workaround for the LEON3FT store-store errata
Date: Fri, 30 Jun 2017 05:11:00 -0000	[thread overview]
Message-ID: <ba4616a8-fa49-3760-42ad-53892552e5da@embedded-brains.de> (raw)
In-Reply-To: <20170629.120524.1722371272567684822.davem@davemloft.net>

On 29/06/17 18:05, David Miller wrote:

> From: Daniel Cederman <cederman@gaisler.com>
> Date: Thu, 29 Jun 2017 17:15:43 +0200
>
>>> I'm not thrilled with this, it's undocumented, the other workaround
>>> don't have
>>> it and I don't think that we really need it.
>> The B2BST errata workaround requires more changes to assembler
>> routines commonly used by operating systems, such as for example
>> register window handling, than what the UT699 workaround needed. It
>> would be nice to have a way to only enable these modification when the
>> -mfix- flag is used. The alternative would be to provide a define
>> directly on the compiler command line in conjunction with -mfix
>> flag. But if more changes are required later on it would be good to
>> have the define more closely tied to the flag to minimize the number
>> of changes to Makefiles and etc.
> Personally, I have never seen compiler based CPP defines as ever being
> useful for tailoring OS assembler code.  Ever.
>
> In most cases you will want to support several families of CPUs and
> therefore sort out the individual cpu support assembler routines
> internally in the kernel sources.

This depends on the operating system you use. For some  embedded systems 
where the application and the operating system are one executable it is 
quite common to use compiler provided defines in assembly code.

For example:

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=newlib/libc/machine/arm/memcpy-armv7a.S;h=cd7962e075a30cb90ec073d77b177c3536429b9b;hb=HEAD

For a software development kit, the run-time libraries are built for a 
set of multilibs. Each assembler file may use multilib specific compiler 
defines, e.g. floating point unit present or not, errata XYZ present or 
not, etc.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

  reply	other threads:[~2017-06-30  5:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27  8:55 Daniel Cederman
2017-06-29 13:05 ` Eric Botcazou
2017-06-29 15:16   ` Daniel Cederman
2017-06-29 16:05     ` David Miller
2017-06-30  5:11       ` Sebastian Huber [this message]
2017-07-04 13:38         ` Daniel Cederman
2017-07-05  5:37           ` Sebastian Huber
2017-07-07 10:01           ` Eric Botcazou
2017-07-07 11:44             ` Daniel Cederman
2017-07-07 16:04               ` Eric Botcazou
2017-07-10  8:49                 ` Daniel Cederman

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=ba4616a8-fa49-3760-42ad-53892552e5da@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=cederman@gaisler.com \
    --cc=daniel@gaisler.com \
    --cc=davem@davemloft.net \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).