From sandra@codesourcery.com Tue May 1 04:12:00 2018
From: sandra@codesourcery.com (Sandra Loosemore)
Date: Tue, 01 May 2018 04:12:00 -0000
Subject: "position independent" vs "position-independent" in documentation
In-Reply-To: <20180430115654.GK20930@redhat.com>
References: <20180430115654.GK20930@redhat.com>
Message-ID: <646c8ca5-73bb-7566-abf3-a03c47a02140@codesourcery.com>
On 04/30/2018 05:56 AM, Jonathan Wakely wrote:
> Should we standardize on "position-independent" and add it to
> https://gcc.gnu.org/codingconventions.html#Spelling ?
The same generic English usage rules apply here as to other compound
phrases; hyphenate when immediately before a noun, don't hyphenate in
other contexts. So "the compiler generates position-independent code"
and "the compiler generates code that is position independent" are both
correct. However, I don't think it's common to use "position
independent" (hyphenated or not) except as a modifier for "code", so you
could add "position-independent code" (rather than just
"position-independent") to the glossary.
-Sandra
From andrewm.roberts@sky.com Tue May 1 04:42:00 2018
From: andrewm.roberts@sky.com (Andrew Roberts)
Date: Tue, 01 May 2018 04:42:00 -0000
Subject: gcc 8.0.1 RC documentation broken
Message-ID: <4aba19fd-3e5d-8a81-e342-ec170befa672@sky.com>
I filed a bug (85578) about the documentation in:
gcc-8.0.1-RC-20180427/INSTALL
being broken (links not working).
I filed this under 'web' as I couldn't see any documentation component.
It doesn't appear to have been looked at,
so just wanted to flag it up before the release tomorrow.
From jakub@redhat.com Tue May 1 07:27:00 2018
From: jakub@redhat.com (Jakub Jelinek)
Date: Tue, 01 May 2018 07:27:00 -0000
Subject: Broken links in INSTALL/specific.html
Message-ID: <20180501072701.GJ8577@tucnak>
Hi!
PR web/85578 complains about broken links in INSTALL/specific.html inside of
the rc tarballs, I've looked at past releases and at least the releases I've
checked (4.7.0, 6.1, 7.1, 7.3, 8.1rc2) all have the broken links,
e.g.
aarch64*-*-*
and
aarch64*-*-*
Looking at online docs, they are ok.
I think this has been fixed for the online docs with:
Index: preprocess
===================================================================
RCS file: /cvs/gcc/wwwdocs/bin/preprocess,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -p -r1.38 -r1.39
--- preprocess 28 Aug 2003 13:05:38 -0000 1.38
+++ preprocess 5 Sep 2004 21:50:02 -0000 1.39
@@ -144,7 +144,10 @@ process_file()
cat $STYLE > $TMPDIR/input
printf '\n' `pwd` >> $TMPDIR/input
cat $f >> $TMPDIR/input
- ${MHC} $TMPDIR/input > $TMPDIR/output
+ # Use sed to work around makeinfo 4.7 brokenness.
+ ${MHC} $TMPDIR/input \
+ | sed -e 's/_002d/-/g' -e 's/_002a/*/g' \
+ > $TMPDIR/output
# Copy the page only if it's new or there has been a change, and,
# first of all, if there was no problem when running MetaHTML.
revision 1.39
date: 2004/09/05 21:50:02; author: gerald; state: Exp; lines: +4 -1
Use sed to work around makeinfo 4.7 brokenness.
Isn't this something we should be doing in gcc/doc/install.texi2html
too (or somewhere else)?
Bugzilla is down, so can't discuss it there...
Jakub
From marketing@iccsat.com Tue May 1 07:34:00 2018
From: marketing@iccsat.com (=?utf-8?Q?ICCSAT?=)
Date: Tue, 01 May 2018 07:34:00 -0000
Subject: =?utf-8?Q?Fast=20and=20Unlimited=20Satellite=20Internet=20Subscription?=
Message-ID:
http://iccsat.com?&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31
** ICCSAT (http://www.iccsat.com?&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
------------------------------------------------------------
We continue to expand across a broad range of industries as we leverage our expertise and advanced technology to meet the varied needs of these customers from remote offices, support mobile connectivity across land, sea and air, providing high-speed broadband access anywhere in the world.
** ICCSAT SERVICES
------------------------------------------------------------
http://www.iccsat.net/?page_id=10491&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31
** Point to Point (http://www.iccsat.net/?page_id=10491&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
------------------------------------------------------------
Link is a dedicated link that connects exactly two communication facilities.
http://www.iccsat.net/?page_id=10507&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31
** Point to Multipoint (http://www.iccsat.net/?page_id=10507&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
------------------------------------------------------------
Communication which is accomplished via a specific and distinct type of multipoint connection.
** 100% Secured
------------------------------------------------------------
Enjoy and have a peace of mind with our 100% Secured Connection services
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://www.iccsat.net/?page_id=10446&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31
** SCPC/SCPC (http://www.iccsat.net/?page_id=10446&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
------------------------------------------------------------
Cost effective solution for broadband connectivity, can be mounted on smaller vehicles.
http://www.iccsat.net/?page_id=10512&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31
** SCPC/DVB (http://www.iccsat.net/?page_id=10512&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
------------------------------------------------------------
SCPC-DVB Dedicated Services SCPC/DVB is widely used for access to internet services.
http://www.iccsat.net/?page_id=10515&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31
** Mesh Service (http://www.iccsat.net/?page_id=10515&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
------------------------------------------------------------
A type of networking wherein each site in the network may act as an independent router.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://www.iccsat.net/?page_id=10509&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31
** Internet Services (http://www.iccsat.net/?page_id=10509&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
------------------------------------------------------------
Provide internet broadband connection to the end customer based on their requirements.
http://www.iccsat.net/?page_id=10509&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31
** IP Connectivity (http://www.iccsat.net/?page_id=10509&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
------------------------------------------------------------
Provide internet broadband connection to the end customer based on their requirements.
http://www.iccsat.net/?page_id=10446&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31
** Mobile VSAT (http://www.iccsat.net/?page_id=10446&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
------------------------------------------------------------
Cost effective solution for broadband connectivity, can be mounted on smaller vehicles.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ICCSAT
Jeddah, Kingdom Saudi Arabia.
Tel.: +966 92 000 1445
Fax: +966 12 6067356
Email: sales@iccsat.com
www.iccsat.com
SHARE (https://www.facebook.com/sharer/sharer.php?u=preview.mailerlite.com/l0b4r4&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31) FORWARD (?&utm_source=newsletter&utm_medium=email&utm_campaign=vsat_satellite_service_data_voice_internet&utm_term=2017-10-31)
** Like on Facebook:
------------------------------------------------------------
** VSAT Satellite Service Data - Voice - Internet
------------------------------------------------------------
This email was sent to gcc@gcc.gnu.org (mailto:gcc@gcc.gnu.org)
why did I get this? (https://4ntelecom.us17.list-manage.com/about?u=f714fbd47cdf592d2c963afc5&id=b416cecabb&e=74f394ded9&c=48b2726943) unsubscribe from this list (https://4ntelecom.us17.list-manage.com/unsubscribe?u=f714fbd47cdf592d2c963afc5&id=b416cecabb&e=74f394ded9&c=48b2726943) update subscription preferences (https://4ntelecom.us17.list-manage.com/profile?u=f714fbd47cdf592d2c963afc5&id=b416cecabb&e=74f394ded9)
4NTELECOMMUNICATION . Saudi Arabia. Jeddah. Tahlia Corniche Road. Villa no. 3 . Jeddah 21332 . Saudi Arabia
From andrewm.roberts@sky.com Tue May 1 09:43:00 2018
From: andrewm.roberts@sky.com (Andrew Roberts)
Date: Tue, 01 May 2018 09:43:00 -0000
Subject: Broken links in INSTALL/specific.html
In-Reply-To: <20180501072701.GJ8577@tucnak>
References: <20180501072701.GJ8577@tucnak>
Message-ID: <2d2fc215-d59e-77a5-9b3e-793c0a23678d@sky.com>
The reason I was looking at the versions in the RC tarball was that I
have never been clear as to what release the website
install/prerequisite/target info actually applies to.
It would be much better if this info was on a per release basis on the
web site, like the changelog and manuals. Thus any target
specific stuff which was removed wouldn't affect older releases
documentation.
Speaking of manuals, it might be worth documenting the make commands for
the documentation (make html, install-html and pdf, install-pdf) on the
build.html page.
The documentation can only get checked before the release if people are
aware how to build it.
Andrew
On 01/05/18 08:27, Jakub Jelinek wrote:
> Hi!
>
> PR web/85578 complains about broken links in INSTALL/specific.html inside of
> the rc tarballs, I've looked at past releases and at least the releases I've
> checked (4.7.0, 6.1, 7.1, 7.3, 8.1rc2) all have the broken links,
> e.g.
> aarch64*-*-*
> and
>
>
aarch64*-*-*
> Looking at online docs, they are ok.
>
> I think this has been fixed for the online docs with:
> Index: preprocess
> ===================================================================
> RCS file: /cvs/gcc/wwwdocs/bin/preprocess,v
> retrieving revision 1.38
> retrieving revision 1.39
> diff -u -p -r1.38 -r1.39
> --- preprocess 28 Aug 2003 13:05:38 -0000 1.38
> +++ preprocess 5 Sep 2004 21:50:02 -0000 1.39
> @@ -144,7 +144,10 @@ process_file()
> cat $STYLE > $TMPDIR/input
> printf '\n' `pwd` >> $TMPDIR/input
> cat $f >> $TMPDIR/input
> - ${MHC} $TMPDIR/input > $TMPDIR/output
> + # Use sed to work around makeinfo 4.7 brokenness.
> + ${MHC} $TMPDIR/input \
> + | sed -e 's/_002d/-/g' -e 's/_002a/*/g' \
> + > $TMPDIR/output
>
> # Copy the page only if it's new or there has been a change, and,
> # first of all, if there was no problem when running MetaHTML.
>
> revision 1.39
> date: 2004/09/05 21:50:02; author: gerald; state: Exp; lines: +4 -1
> Use sed to work around makeinfo 4.7 brokenness.
>
> Isn't this something we should be doing in gcc/doc/install.texi2html
> too (or somewhere else)?
>
> Bugzilla is down, so can't discuss it there...
>
> Jakub
>
From jwakely@redhat.com Tue May 1 10:17:00 2018
From: jwakely@redhat.com (Jonathan Wakely)
Date: Tue, 01 May 2018 10:17:00 -0000
Subject: "position independent" vs "position-independent" in documentation
In-Reply-To: <646c8ca5-73bb-7566-abf3-a03c47a02140@codesourcery.com>
References: <20180430115654.GK20930@redhat.com> <646c8ca5-73bb-7566-abf3-a03c47a02140@codesourcery.com>
Message-ID: <20180501101732.GM20930@redhat.com>
On 30/04/18 22:12 -0600, Sandra Loosemore wrote:
>On 04/30/2018 05:56 AM, Jonathan Wakely wrote:
>>Should we standardize on "position-independent" and add it to
>>https://gcc.gnu.org/codingconventions.html#Spelling ?
>
>The same generic English usage rules apply here as to other compound
>phrases; hyphenate when immediately before a noun, don't hyphenate in
>other contexts. So "the compiler generates position-independent code"
>and "the compiler generates code that is position independent" are
>both correct.
Or we could decide that "position-independent" should always be
hyphenated as it's a commonly established adjective. I'm not arguing
in favour of that, but it's how it's used in some of the docs already.
>However, I don't think it's common to use "position
>independent" (hyphenated or not) except as a modifier for "code", so
>you could add "position-independent code" (rather than just
>"position-independent") to the glossary.
We have several of uses of "position independent executable" and
one "position independent data" which should be hyphenated.
Ignoring all the uses of "position-independent code" that already have
a hyphen we're left with the following and none of them is correct!
--
gcc/doc/invoke.texi-@opindex pie
gcc/doc/invoke.texi:Produce a dynamically linked position independent executable on targets
gcc/doc/invoke.texi-that support it. For predictable results, you must also specify the same
--
gcc/doc/invoke.texi-@opindex no-pie
gcc/doc/invoke.texi:Don't produce a dynamically linked position independent executable.
gcc/doc/invoke.texi-
--
gcc/doc/invoke.texi-@opindex static-pie
gcc/doc/invoke.texi:Produce a static position independent executable on targets that support
gcc/doc/invoke.texi:it. A static position independent executable is similar to a static
gcc/doc/invoke.texi-executable, but can be loaded at any address without a dynamic linker.
--
gcc/doc/invoke.texi-but not for the Sun 386i. Code generated for the IBM RS/6000 is always
gcc/doc/invoke.texi:position-independent.
gcc/doc/invoke.texi-
--
gcc/doc/invoke.texi-Generate code that does not use a global pointer register. The result
gcc/doc/invoke.texi:is not position independent code, and violates the IA-64 ABI@.
gcc/doc/invoke.texi-
--
gcc/doc/invoke.texi-@itemx -mno-shared
gcc/doc/invoke.texi:Generate (do not generate) code that is fully position-independent,
gcc/doc/invoke.texi-and that can therefore be linked into shared libraries. This option
--
gcc/doc/invoke.texi-
gcc/doc/invoke.texi:All @option{-mabicalls} code has traditionally been position-independent,
gcc/doc/invoke.texi-regardless of options like @option{-fPIC} and @option{-fpic}. However,
--
gcc/doc/invoke.texi-@opindex mno-pid
gcc/doc/invoke.texi:Enables the generation of position independent data. When enabled any
gcc/doc/invoke.texi-access to constant data is done via an offset from a base address
--
gcc/doc/md.texi-Constant for arithmetic/logical operations.
gcc/doc/md.texi:This is like @code{i}, except that for position independent code,
gcc/doc/md.texi-no symbols / expressions needing relocations are allowed.
--
gcc/doc/tm.texi-* Sections:: Dividing storage into text, data, and other sections.
gcc/doc/tm.texi:* PIC:: Macros for position independent code.
gcc/doc/tm.texi-* Assembler Format:: Defining how to write insns and pseudo-ops to output.
--
gcc/doc/tm.texi-@section Position Independent Code
gcc/doc/tm.texi:@cindex position independent code
gcc/doc/tm.texi-@cindex PIC
--
gcc/doc/tm.texi-A C expression that is nonzero if @var{x} is a legitimate immediate
gcc/doc/tm.texi:operand on the target machine when generating position independent code.
gcc/doc/tm.texi-You can assume that @var{x} satisfies @code{CONSTANT_P}, so you need not
--
gcc/doc/tm.texi-(including @code{SYMBOL_REF}) can be immediate operands when generating
gcc/doc/tm.texi:position independent code.
gcc/doc/tm.texi-@end defmac
--
gcc/doc/tm.texi.in-* Sections:: Dividing storage into text, data, and other sections.
gcc/doc/tm.texi.in:* PIC:: Macros for position independent code.
gcc/doc/tm.texi.in-* Assembler Format:: Defining how to write insns and pseudo-ops to output.
--
gcc/doc/tm.texi.in-@section Position Independent Code
gcc/doc/tm.texi.in:@cindex position independent code
gcc/doc/tm.texi.in-@cindex PIC
--
gcc/doc/tm.texi.in-A C expression that is nonzero if @var{x} is a legitimate immediate
gcc/doc/tm.texi.in:operand on the target machine when generating position independent code.
gcc/doc/tm.texi.in-You can assume that @var{x} satisfies @code{CONSTANT_P}, so you need not
--
gcc/doc/tm.texi.in-(including @code{SYMBOL_REF}) can be immediate operands when generating
gcc/doc/tm.texi.in:position independent code.
gcc/doc/tm.texi.in-@end defmac
From jwakely.gcc@gmail.com Tue May 1 10:29:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Tue, 01 May 2018 10:29:00 -0000
Subject: gcc 8.0.1 RC documentation broken
In-Reply-To: <4aba19fd-3e5d-8a81-e342-ec170befa672@sky.com>
References: <4aba19fd-3e5d-8a81-e342-ec170befa672@sky.com>
Message-ID:
On 1 May 2018 at 05:42, Andrew Roberts wrote:
> I filed this under 'web' as I couldn't see any documentation component. It
> doesn't appear to have been looked at,
There's a "documentation" keyword instead, but I'm often not sure
which component doc bugs should be filed under.
From maxim.kuvyrkov@linaro.org Tue May 1 13:04:00 2018
From: maxim.kuvyrkov@linaro.org (Maxim Kuvyrkov)
Date: Tue, 01 May 2018 13:04:00 -0000
Subject: Stack protector: leak of guard's address on stack
In-Reply-To: <87muxm2rny.fsf@mid.deneb.enyo.de>
References: <20180427121601.GT8577@tucnak> <20180427122204.GU8577@tucnak> <20180427133845.GV8577@tucnak> <87y3h76vig.fsf@mid.deneb.enyo.de> <94B2316C-48EA-41AC-AED6-C7ACBBD628FE@linaro.org> <87muxm2rny.fsf@mid.deneb.enyo.de>
Message-ID: <7132E024-182D-4A0F-859C-299CC9B5DBA8@linaro.org>
> On Apr 29, 2018, at 2:11 PM, Florian Weimer wrote:
>
> * Maxim Kuvyrkov:
>
>>> On Apr 28, 2018, at 9:22 PM, Florian Weimer wrote:
>>>
>>> * Thomas Preudhomme:
>>>
>>>> Yes absolutely, CSE needs to be avoided. I made memory access volatile
>>>> because the change was easier to do. Also on Arm Thumb-1 computing the
>>>> guard's address itself takes several loads so had to modify some more
>>>> patterns. Anyway, regardless of the proper fix, do you have any objection
>>>> to raising a CVE for that issue?
>>>
>>> Please file a bug in Bugzilla first and use that in the submission to
>>> MITRE.
>>
>> Thomas filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85434 couple
>> of weeks ago.
>
> Is there a generic way to find other affected targets?
>
> If we only plan to fix 32-bit Arm, we should make the CVE identifier
> specific to that, to avoid confusion.
The problem is fairly target-dependent, so architecture maintainers need to look at how stack-guard canaries and their addresses are handled and whether they can be spilled onto stack.
It appears we need to poll architecture maintainers before filing the CVE.
--
Maxim Kuvyrkov
www.linaro.org
From fw@deneb.enyo.de Tue May 1 13:37:00 2018
From: fw@deneb.enyo.de (Florian Weimer)
Date: Tue, 01 May 2018 13:37:00 -0000
Subject: Stack protector: leak of guard's address on stack
In-Reply-To: <7132E024-182D-4A0F-859C-299CC9B5DBA8@linaro.org> (Maxim Kuvyrkov's message of "Tue, 1 May 2018 16:04:34 +0300")
References: <20180427121601.GT8577@tucnak> <20180427122204.GU8577@tucnak> <20180427133845.GV8577@tucnak> <87y3h76vig.fsf@mid.deneb.enyo.de> <94B2316C-48EA-41AC-AED6-C7ACBBD628FE@linaro.org> <87muxm2rny.fsf@mid.deneb.enyo.de> <7132E024-182D-4A0F-859C-299CC9B5DBA8@linaro.org>
Message-ID: <87604733ac.fsf@mid.deneb.enyo.de>
* Maxim Kuvyrkov:
> The problem is fairly target-dependent, so architecture maintainers
> need to look at how stack-guard canaries and their addresses are
> handled and whether they can be spilled onto stack.
>
> It appears we need to poll architecture maintainers before filing the CVE.
One CVE ID by identified affected architecture would work as well.
MITRE cares about affected software *versions* as well, and since the
targets were added at different GCC versions (or stack protector
support was added), the CVE IDs should be split in most cases anyway.
From freddie_chopin@op.pl Tue May 1 18:38:00 2018
From: freddie_chopin@op.pl (Freddie Chopin)
Date: Tue, 01 May 2018 18:38:00 -0000
Subject: Second GCC 8.1 Release Candidate available from gcc.gnu.org
In-Reply-To: <20180427213950.GA8577@tucnak>
References: <20180427213950.GA8577@tucnak>
Message-ID: <8aa3c845c6eaff74cd7ebff731afe4d55bdc67de.camel@op.pl>
On Fri, 2018-04-27 at 23:39 +0200, Jakub Jelinek wrote:
> The second release candidate for GCC 8.1 is available from
>
> ftp://gcc.gnu.org/pub/gcc/snapshots/8.0.1-RC-20180427
>
> and shortly its mirrors. It has been generated from SVN revision
> 259731.
>
> I have so far bootstrapped and tested the release candidate on
> x86_64-linux and i686-linux. Please test it and report any issues to
> bugzilla.
>
> If all goes well, I'd like to release 8.1 on Wednesday, May 2nd.
Hello!
I would like to bring this strange issue to your attention too.
https://sourceware.org/bugzilla/show_bug.cgi?id=23126#c3
This is not (at least not entirely) a GCC problem, but with previous
versions (back to GCC 5 at least) it was working fine, because GCC did
not explicitly set `.arch` directive in assembly files - just `.cpu`.
Regards,
FCh
From chengniansun@gmail.com Tue May 1 19:53:00 2018
From: chengniansun@gmail.com (Chengnian Sun)
Date: Tue, 01 May 2018 19:53:00 -0000
Subject: Should GCC emit the same code for compilation with '-g' and without '-g'
Message-ID:
Hi,
Does gcc have a requirement about the impact of emitting debug info on the
generated code? Should the code be the same no matter whether '-g' is
specified?
Thank you.
--
Best Regards.
Chengnian
From jakub@redhat.com Tue May 1 19:58:00 2018
From: jakub@redhat.com (Jakub Jelinek)
Date: Tue, 01 May 2018 19:58:00 -0000
Subject: Should GCC emit the same code for compilation with '-g' and without '-g'
In-Reply-To:
References:
Message-ID: <20180501195759.GP8577@tucnak>
On Tue, May 01, 2018 at 12:53:45PM -0700, Chengnian Sun wrote:
> Does gcc have a requirement about the impact of emitting debug info on the
> generated code? Should the code be the same no matter whether '-g' is
> specified?
Yes (except for selective scheduling, but that warns if you combine
-fselecting-scheduling{,2} together with -fvar-tracking-assignments
and disables the latter by default).
Jakub
From Robert.Suchanek@mips.com Wed May 2 09:53:00 2018
From: Robert.Suchanek@mips.com (Robert Suchanek)
Date: Wed, 02 May 2018 09:53:00 -0000
Subject: Introducing a nanoMIPS port for GCC
Message-ID: <3f321d50ed794f5daa3f5ee4f5b62dea@mips.com>
Yesterday, MIPS Tech announced the latest generation of the MIPS family of
architectures called nanoMIPS [1]. As part of the development we have been
designing all the open source tools necessary to support the architecture and,
thanks to the speed with which we were able to prototype, we have also been
using these tools to shape the architecture along the way. This has led to
some really interesting improvements in the tools, which MIPS would like to
contribute back to the community. While doing this work many of us have been
unable to contribute to the community as actively as we would have liked, we
are therefore very grateful for the community support given to the MIPS
architecture over the last 18 months. This announcement has a general
introduction at the start, so if you have already read it for one of the other
tools, you can skip down to the information specific to GCC.
For anyone who knows the MIPS architecture you may well wonder why we are
introducing another major variant and the question is perfectly valid. We do
admittedly have quite a few: MIPS I through MIPS IV, MIPS32 and MIPS64 through
to MIPS32R6 and MIPS64R6, MIPS16e, MIPS16e2, microMIPSR3 and microMIPSR6.
Each of these serves (or served) a purpose and there is a high level of
synergy between all of them. In general, they build upon the previous and
there is a high level of compatibility, even when switching to a new encoding
like moving from MIPS to microMIPS. The switch to MIPS32R6/MIPS64R6 was a
major shift in the way the architecture innovated and drew more on the
original theory of the architecture, where evolution was not expected to be
limited by binary compatibility. MIPS Release 6 removed instructions and did
create some very minor incompatibility but is also much cleaner to implement
from a micro-architecture perspective. We have taken this idea much further
with nanoMIPS and reimagined the instruction set, by drawing on all the
experience gained from previous designs. Hopefully others will find it as
interesting as we do.
The major driving force behind the nanoMIPS architecture was to achieve
outstanding code density, while also balancing out hardware and software
design cost. As background MIPS has two compressed ISA variants: MIPS16e,
which cannot exist without also implementing MIPS32, and microMIPS, which can
exist on its own. Since MIPS16e has specific limits that cannot be engineered
around, we chose to use an approach similar to the microMIPS design.
nanoMIPS has a variable-length compressed instruction set that is completely
standalone from the other MIPS ISAs. It is designed to compress the highest
frequency instructions to 16-bits, and use 48-bit instructions to efficiently
encode 32-bit constants into the instruction stream. There is also a wider
range of 32-bit instructions, which merge carefully chosen high frequency
instruction sequences into single operations creating more flexible addressing
modes such as indexed and scaled indexed addressing, branch compare with
immediate and macro style instructions. The macro like instructions compress
prologue and epilogue sequences, as well as a small number of high frequency
instruction pairs like two move instructions or a move and function call.
nanoMIPS also totally eliminates branch delay slots which follows a precedent
set by microMIPSR6.
To get the best from a new ISA we also re-engineered the ABI and created a new
symbiotic relationship between the ISA and ABI that pushes code density and
performance further still. The ABI creates a fully link time relaxable model,
which enables us to squeeze every last byte out of the code image even when
deferring final addressing mode and layout decisions to link time. We have
been mindful of MIPS heritage and ensured that while open to any possible
change, we also have minimal impact when porting code from MIPS to nanoMIPS,
and have plenty of support to achieve source compatibility between the two.
The net effect of these changes leads to an average code size reduction of 20%
relative to microMIPSR6. This compression could well be one of the best
achieved by GNU tools for any RISC ISA. Comparing the ISA in terms of number
of instructions to issue vs microMIPS we also see a reduction of between 8%
and 11% of dynamic instruction count.
Below we dig into some technical specifics for each of the GNU tools; we
welcome any feedback and questions as we start to look at rebasing this work
to the trunk/master and formally submitting it. nanoMIPS pre-built toolchains
and source code tarballs are available at:
http://codescape.mips.com/components/toolchain/nanomips/2018.04-02/
GCC specific details
====================
The back-end
------------
Instead of creating a new back-end for nanoMIPS, we decided to reuse the
existing MIPS back-end. Starting from scratch would have required copying the
majority of code but most of the logic would have remained the same. Reusing
allowed us to speed up porting. Maintenance might be more difficult but a fix
for nanoMIPS could automatically be a fix MIPS and vice versa.
Most of the back-end is contained within a small number of files. The shared
part is mostly in mips.{h,c,md,opt} files. The MIPS toolchains use
mips-classic.md as the entry file (instead of mips.md) i.e. it includes
shareable mips.md, processor configuration and includes all other .md files as
necessary. nanomips.md is used as the entry file for nanoMIPS toolchains and
similarly includes its own processors list, mips.md and other machine
descriptions files as needed. Doing it in this way makes it easier to enable
features which can be shared between the two. Some chunks of the back-end
code had to be enabled conditionally, as the compiler would otherwise fail to
build (missing patterns etc). Lastly, we needed to clean up nanoMIPS' target
options by disabling them in mips.opt, and also create a number nanoMIPS
specific files to keep the separation as clear as possible.
The p32 ABI [2]
---------------
1. Calling convention
To avoid major porting issues, the register conventions have been left mostly
intact, and resemble the MIPS n32/n64 ABIs. The main difference is the
removal of dedicated return registers ($2/v0, $3/v1) and using the argument
registers to return values from functions. The old return registers have been
re-purposed and have now become temporaries. This allowed us to achieve
better code density because of more efficient data passing between functions
e.g. foo(bar()). This is particularly visible in soft-float mode, where more
complex expressions require multiple library calls.
The nanoMIPS ABI requires the usage of either named registers, such as
$a0..$a7 for arguments, $s0..$s7 for saved temporaries, etc. or of the
$r0..$r31 format. Using $0..$31 is no longer supported by default, but can be
re-enabled by using -mlegacyregs.
2. Stack frame organization
The major change in comparison to the previous MIPS ABIs is changing the
location of the frame pointer. The frame pointers now form a chain that will
allow an efficient stack unwinding. Previously, in order to find the location
of the frame-pointer, the instructions had to be scanned at the current
program counter, going backwards. With this change, finding the location is
trivial, however, it's important to point out that the frame pointer is biased
by 4096 bytes i.e. logical_frame_pointer = $fp + 4096. The rationale was to
enable full use of the unsigned 12-bit offsets in memory instructions when
using the frame pointer as the base. Another notable difference is in the
order of general-purpose registers on the stack, which now reflects the
operation of the SAVE/RESTORE instructions from the nanoMIPS ISA.
3. Code and data models
The automatic model (-mcmodel=auto) produces the most compact code possible by
relying on the linker to do further size optimizations on the
compiler-generated code. The linker will also expand the code when symbols
end up being out of range. This model has been designed to keep the size
difference between the intermediate objects and the fully linked object as
small as possible, although having the linker perform too many expansions will
widen that gap. It can be used only with a linker which is capable of
performing relaxations and expansions.
The medium model (-mcmodel=medium) is somewhat similar to the automatic model
in terms of the range and size of the generated code, but it does not rely on
linker relaxations and expansions. This lack of linker transformations makes
the size of the fully linked object more predictable, even though it squanders
some opportunities for further size optimization and it introduces inherent
limitations in the fully linked code.
The large model (-mcmodel=large) produces code which has an unlimited range by
only using instructions which cover the entire address space. Because these
instructions tend to be bigger, this model sacrifices code size in order to
guarantee that code sequences will work regardless of where the symbol is
placed in memory. The large model also does not rely on linker relaxations
and expansions.
In addition to the models, there are 4 addressing modes:
- absolute: addresses are fixed at link-time. This mode is rarely necessary
but has some potential for energy efficiency.
- PC-relative: addresses appear as offsets from the PC and are used in
PC-relative instructions. This mode produces position-independent code.
- GP-relative: addresses appear as offsets from the GP and are used in
GP-relative instructions. Symbols are placed in the small data section,
also known as .sdata. This mode produces position-independent data for
some or all symbols of an application.
- GOT-dependent: addresses are kept in the GOT and are loaded by using offsets
between the GP and a given symbol's entry in the GOT. This mode produces
dynamically linkable code.
4. Thread Local Storage
The nanoMIPS TLS ABI has support for both the traditional TLS models and TLS
descriptors. All of the TLS models have been adapted to the nanoMIPS ISA
following an approach similar to the one taken for the code and data models.
The runtime TLS layout has also been redesigned to take advantage of the
unsigned offset LW[U12] nanoMIPS instruction, thus extending the possible
range of symbols inside the TLS block.
Target-independent optimizations
--------------------------------
In addition to these ABI improvements, we have also developed various
target-independent and nanoMIPS-specific compiler optimizations, in order to
further improve code size and performance.
1. LRA: use equivalences to help with frame pointer elimination
(currently enabled by -mlra-equiv)
The patch has already been posted [3] and went through some additional changes
since posting. A case was found where LRA produced suboptimal code for a
large frame and frame growing downward. The code size was affected
particularly in cases where the offset was large and could not be used in an
add operation directly introducing more instructions for a single frame
access. Using the equivalences, the frame pointer gets eliminated more often,
resulting in smaller code. The reasons are twofold: register pressure drops
resulting in fewer spills and the offset might be smaller fitting into a
single add instruction for every frame access.
2. IRA register recoloring (-fadjust-costs)
The goal of register cost adjustment optimization is to make better usage of
instructions that improve code density. This group of instructions includes
16-bit instructions and 32-bit nanoMIPS instructions which replace two other
instructions (e.g. movep, move.balc, etc). Most of these instructions can use
only a subset of all available registers and the purpose of this optimization
is to increase the chances that pseudo registers used inside these
instructions are assigned to the required hard registers. This is achieved by
introducing a new target hook through which the cost of corresponding hard
registers is modified just before allocation of a pseudo register. Cost
modification is based on the properties of all instructions in which a pseudo
register is used. If assigning a pseudo to some hard registers would lead to
more dense code e.g. by being able to generate 16-bit instructions, then the
cost of these hard registers is decreased. Otherwise, the cost of the hard
registers is increased, thus improving the chances that these hard registers
will be available for pseudos that are allocated later in the process.
3. Jump-table optimization (-fjump-table-clusters)
The optimization enables the splitting of a single switch statement into a
combination of multiple jump tables and decision trees. GCC currently emits
either a single jump table or decision tree. The optimization can be enabled
by the command line option -fjump-table-clusters and is target-independent.
A MIPS specific option has been added (-mjump-table-density=DENSITY) to change
the default density. DENSITY is the minimum percentage of non-default case
indices in a jump table. If not specified, GCC will use the default density
of 40%, if optimizing for size, and 10%, if optimizing for speed. The target
option will be later replaced by an appropriate --param jump-table-density
option or something similar.
4. Edge sorting for -Os during basic block reordering
(-freorder-blocks-edge-sort=[one|two|all|default])
When reordering blocks using the `simple' algorithm edges are sorted for speed
optimized functions and not sorted for size optimized functions. However,
sorting the edges for size optimized functions can significantly improve
performance with some code size cost. Inner loops show the greatest benefit
with `level' set to `one'. Further improvement is possible by sorting one
level of nested loops (`level' set to `two') with additional cost in size.
Finally, all edges can be sorted (`level' set to `all'). This option
overrides the normal sorting choice for both size and speed optimized
functions.
Target-specific optimizations
-----------------------------
1. Optimized inline memcpy (-mmemcpy-interleave=NUM/-mmulti-memcpy)
These options have been introduced to control the inlined memcpy.
-mmulti-memcpy attempts to exploit Load/Store Word Multiple instructions and
-mmemcpy-interleave=NUM controls how loads and stores are interleaved i.e. how
many NUM words are loaded first before storing them.
2. MOVEP/MOVE.BALC/RESTORE.JRC
A machine-dependent hook will attempt to find opportunities in the
instruction stream to combine instructions into MOVEP, MOVE.BALC or
RESTORE.JRC to improve code density. MOVE.BALC can be controlled with
-m[no-]opt-movebalc switch.
3. Offset shrinking pass (-m[no-]shrink-offsets)
This pass processes the instruction stream, extracts offsets from memory
accesses, and then tries to figure out the best offset adjustment to get the
maximum potential code size savings. We take into account the cost of
introducing a new add instruction that could undo the code size savings. As
the pass is run before the register allocation, we can only speculate and be
optimistic about the potential code size improvement. These guesses appear to
be relatively good on average but might need to be considered on a case by
case basis.
4. Jump-table optimization (-mjump-table-opt)
This switch enables jump-tables which contain relative addresses.
5. BALC stubs (-m[no-]balc-stubs)
This code size optimization is not performed by the compiler, but by the
the assembler. It controls out-of-range call optimization through trampoline
stubs. It is enabled by default when optimizing for size.
Note that support for 64-bit and floating-point is not finalized and still
unofficial.
GCC contributors
================
- nanoMIPS port, ABI, code and data models, TLS, bugfixes:
Robert Suchanek
Toma Tabacu
Matthew Fortune
- IRA register recosting, edge sorting:
Zoran Jovanovic
- Jump-table optimization, scheduler, MOVE.BALC/MOVEP optimization:
Prachi Godbole
- RESTORE.JRC optimization:
Robert Suchanek
- Lightweight sync codes:
Faraz Shahbazker
- Offset shrinking pass:
Robert Suchanek
Steve Ellcey
- Exception handling:
Jack Romo
- Dejagnu tests, bugfixes:
Stefan Markovic
Sara Popadic
References:
[1] https://www.mips.com/press/new-mips-i7200-processor-core-delivers-unmatched-performance-and-efficiency-for-advanced-lte5g-communications-and-networking-ic-designs/
[2] Codescape GNU tools for nanoMIPS: ELF ABI Supplement,
https://codescape.mips.com/components/toolchain/nanomips/2018.04-02/docs/MIPS_nanoMIPS_ABI_supplement_01_02_DN00179.pdf
[3] https://patchwork.ozlabs.org/patch/666637/
From Matthew.Fortune@mips.com Wed May 2 10:05:00 2018
From: Matthew.Fortune@mips.com (Matthew Fortune)
Date: Wed, 02 May 2018 10:05:00 -0000
Subject: Introducing a nanoMIPS port for GCC
Message-ID: <9253772adfd3429dbdaddf0dd622c709@mips.com>
Robert Suchanek writes:
> the last 18 months. This announcement has a general introduction at
> the start, so if you have already read it for one of the other tools,
> you can skip down to the information specific to GCC.
Thanks, Robert.
Corresponding technical info for other toolchain components can be
found in the following archived posts.
binutils/gdb/gold
=================
http://sourceware.org/ml/binutils/2018-05/msg00003.html
qemu
====
http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg00081.html
Thanks,
Matthew
From chenyiliangex@gmail.com Wed May 2 10:22:00 2018
From: chenyiliangex@gmail.com (yiliang chen)
Date: Wed, 02 May 2018 10:22:00 -0000
Subject: i don't known what is happened
Message-ID:
Hello, I am a Chinese developer.When compiling the gcc source code, I
encountered a rather confusing problem, but I don't know it was a bug or
not.
I compile Gcc with MSYS2 on Windows? In order to output the Intel assembly
file by default, I modified the gcc\config\i386\i386.opt file as follows
masm=
Target RejectNegative Joined Enum(asm_dialect) Var(ix86_asm_dialect)
Init(ASM_INTEL)
Use given assembler dialect.
however, An error occurred when compiling to
libgcc/config/i386/sfp-exceptions.c file? it tell me :
C:\MSYS\MSYS32\tmp\cctIKXUx.s: Assembler messages:
C:\MSYS\MSYS32\tmp\cctIKXUx.s:69: Error: no such instruction: `fdivs DWORD
PTR [esp]'
C:\MSYS\MSYS32\tmp\cctIKXUx.s:135: Error: no such instruction: `fdivs DWORD
PTR [esp]'
I don't known why!!
From jwakely.gcc@gmail.com Wed May 2 10:24:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Wed, 02 May 2018 10:24:00 -0000
Subject: i don't known what is happened
In-Reply-To:
References:
Message-ID:
Please don't cross post to all these mailing lists.
If you want a bugzilla account then email the account request list,
not the other lists. If you want help, email gcc-help, not the other
lists. If you want to discuss development of GCC then email the
development list, not the other lists.
It is never appropriate to cross-post to all three.
On 2 May 2018 at 11:22, yiliang chen wrote:
> Hello, I am a Chinese developer.When compiling the gcc source code, I
> encountered a rather confusing problem, but I don't know it was a bug or
> not.
>
> I compile Gcc with MSYS2 on Windows? In order to output the Intel assembly
> file by default, I modified the gcc\config\i386\i386.opt file as follows
>
> masm=
> Target RejectNegative Joined Enum(asm_dialect) Var(ix86_asm_dialect)
> Init(ASM_INTEL)
> Use given assembler dialect.
>
> however, An error occurred when compiling to
> libgcc/config/i386/sfp-exceptions.c file? it tell me :
>
> C:\MSYS\MSYS32\tmp\cctIKXUx.s: Assembler messages:
> C:\MSYS\MSYS32\tmp\cctIKXUx.s:69: Error: no such instruction: `fdivs DWORD
> PTR [esp]'
> C:\MSYS\MSYS32\tmp\cctIKXUx.s:135: Error: no such instruction: `fdivs DWORD
> PTR [esp]'
>
> I don't known why!!
>
From chris@groessler.org Wed May 2 10:49:00 2018
From: chris@groessler.org (Christian Groessler)
Date: Wed, 02 May 2018 10:49:00 -0000
Subject: wrong comment in gcc/testsuite/gcc.c-torture/compile/simd-5.c
Message-ID: <5fb48660-4ec7-fee8-213c-4d1b68ec4755@groessler.org>
Hi,
--- a/gcc/testsuite/gcc.c-torture/compile/simd-5.c
+++ b/gcc/testsuite/gcc.c-torture/compile/simd-5.c
@@ -6,7 +6,7 @@ main(){
??vector64 int a = {1, -1};
??vector64 int b = {2, -2};
??c = -a + b*b*(-1LL);
-/* c is now {5, 3} */
+/* c is now {-5, -3} */
?? printf("result is %llx\n", (long long)c);
??}
regards,
chris
From jakub@redhat.com Wed May 2 12:16:00 2018
From: jakub@redhat.com (Jakub Jelinek)
Date: Wed, 02 May 2018 12:16:00 -0000
Subject: GCC 8.1 Released
Message-ID: <20180502121524.GT8577@tucnak>
We are proud to announce the next, major release of the
GNU Compiler Collection.
Are you tired of your existing compilers?
Want fresh new language features and better optimizations?
Make your day with the new GCC 8.1!
GCC 8.1 is a major release containing substantial new
functionality not available in GCC 7.x or previous GCC releases.
The C++ front-end now has experimental support for some parts of the
upcoming C++2a draft, with the -std=c++2a and -std=gnu++2a options, and the
libstdc++ library has some further C++17 and C++2a draft library features
implemented too.
This releases features significant improvements in the emitted diagnostics,
including improved locations, location ranges and fix-it hints (especially
in the C++ front-end), and various new warnings have been added.
Profile driven optimizations have been significantly improved, on x86
functions are now split into hot and cold regions by default. The link time
optimizations now have a new way of emitting the DWARF debug information,
which makes LTO optimized code more debuggable. New loop optimizers have
added and existing improved and some, like -ftree-loop-distribution,
-floop-unroll-and-jam and -floop-interchange have been enabled by default at
-O3.
The AArch64 target now supports the Scalable Vector Extension, which
features vectors with runtime determined number of elements.
Some code that compiled successfully with older GCC versions might require
source changes, see http://gcc.gnu.org/gcc-8/porting_to.html for
details.
See
https://gcc.gnu.org/gcc-8/changes.html
for more information about changes in GCC 8.1.
This release is available from the FTP servers listed here:
http://www.gnu.org/order/ftp.html
The release is in gcc/gcc-8.1.0/ subdirectory.
If you encounter difficulties using GCC 8.1, please do not contact me
directly. Instead, please visit http://gcc.gnu.org for information about
getting help.
Driving a leading free software project such as GNU Compiler Collection
would not be possible without support from its many contributors.
Not to only mention its developers but especially its regular testers
and users which contribute to its high quality. The list of individuals
is too large to thank individually!
Please consider a donation to the GNU Toolchain Fund to support the
continued development of GCC!
From joseph@codesourcery.com Wed May 2 15:25:00 2018
From: joseph@codesourcery.com (Joseph Myers)
Date: Wed, 02 May 2018 15:25:00 -0000
Subject: Introducing a nanoMIPS port for GCC
In-Reply-To: <9253772adfd3429dbdaddf0dd622c709@mips.com>
References: <9253772adfd3429dbdaddf0dd622c709@mips.com>
Message-ID:
On Wed, 2 May 2018, Matthew Fortune wrote:
> qemu
> ====
> http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg00081.html
That answers one thing I was wondering, by saying you're using the generic
Linux kernel syscall interface rather than any of the existing MIPS
syscall interfaces.
Is your Linux kernel port available somewhere (or a description of it
corresponding to these descriptions of changes to toolchain components)?
--
Joseph S. Myers
joseph@codesourcery.com
From daniel.santos@pobox.com Wed May 2 16:37:00 2018
From: daniel.santos@pobox.com (Daniel Santos)
Date: Wed, 02 May 2018 16:37:00 -0000
Subject: GCC 8.1 Released
In-Reply-To: <20180502121545.GU8577@tucnak>
References: <20180502121545.GU8577@tucnak>
Message-ID: <28325bfe-e9fc-81be-e3f2-a3cb5919a529@pobox.com>
Woo hoo!
Looks like I forgot to add the details of -mcall-ms2sysv-xlogues to the
changes (https://gcc.gnu.org/gcc-8/changes.html).? Is it too late to
change that?? At least this only really affects one project (that I'm
aware of).? I've got some improvements to it for GCC 9 that I'll get
together in the next few weeks.? I'll email the Wine list later today.
Daniel
From jakub@redhat.com Wed May 2 16:43:00 2018
From: jakub@redhat.com (Jakub Jelinek)
Date: Wed, 02 May 2018 16:43:00 -0000
Subject: GCC 8.1 Released
In-Reply-To: <28325bfe-e9fc-81be-e3f2-a3cb5919a529@pobox.com>
References: <20180502121545.GU8577@tucnak> <28325bfe-e9fc-81be-e3f2-a3cb5919a529@pobox.com>
Message-ID: <20180502164306.GZ8577@tucnak>
On Wed, May 02, 2018 at 11:38:51AM -0500, Daniel Santos wrote:
> Looks like I forgot to add the details of -mcall-ms2sysv-xlogues to the
> changes (https://gcc.gnu.org/gcc-8/changes.html).?? Is it too late to
> change that??? At least this only really affects one project (that I'm
> aware of).?? I've got some improvements to it for GCC 9 that I'll get
> together in the next few weeks.?? I'll email the Wine list later today.
There is no deadline on gcc-*/changes.html changes, it can be changed
whenever changes for it are acked. Of course it is always better to
do it before the release if possible.
Jakub
From damian@sourceryinstitute.org Wed May 2 17:21:00 2018
From: damian@sourceryinstitute.org (Damian Rouson)
Date: Wed, 02 May 2018 17:21:00 -0000
Subject: GCC 8.1 Released
In-Reply-To: <20180502164306.GZ8577@tucnak>
References: <20180502121545.GU8577@tucnak> <28325bfe-e9fc-81be-e3f2-a3cb5919a529@pobox.com> <20180502164306.GZ8577@tucnak>
Message-ID:
?
On May 2, 2018 at 9:43:23 AM, Jakub Jelinek (jakub@redhat.com(mailto:jakub@redhat.com)) wrote:
> There is no deadline on gcc-*/changes.html changes, it can be changed
> whenever changes for it are acked. Of course it is always better to
> do it before the release if possible.
>
Could someone please point me to instructions for how to submit a change to the gfortran changes list? ?I?d like to add the following bullet:
* Partial support is provided for the Fortran 2018 teams feature, which enables the formation of hierarchical subsets of images that execute independently of other image subsets.
Damian
From jwakely.gcc@gmail.com Wed May 2 17:35:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Wed, 02 May 2018 17:35:00 -0000
Subject: GCC 8.1 Released
In-Reply-To:
References: <20180502121545.GU8577@tucnak> <28325bfe-e9fc-81be-e3f2-a3cb5919a529@pobox.com> <20180502164306.GZ8577@tucnak>
Message-ID:
On 2 May 2018 at 18:21, Damian Rouson wrote:
> Could someone please point me to instructions for how to submit a change to the gfortran changes list?
The web pages are hosted in CVS and patches for them are handled like
any other GCC patches:
https://gcc.gnu.org/about.html#cvs
From jimw@sifive.com Wed May 2 18:02:00 2018
From: jimw@sifive.com (Jim Wilson)
Date: Wed, 02 May 2018 18:02:00 -0000
Subject: GCC 8.1 Released
In-Reply-To:
References: <20180502121545.GU8577@tucnak> <28325bfe-e9fc-81be-e3f2-a3cb5919a529@pobox.com> <20180502164306.GZ8577@tucnak>
Message-ID:
On 05/02/2018 10:21 AM, Damian Rouson wrote:
> Could someone please point me to instructions for how to submit a change to the gfortran changes list? ??I???d like to add the following bullet:
See also
https://gcc.gnu.org/contribute.html#webchanges
Jim
From Matthew.Fortune@mips.com Wed May 2 20:52:00 2018
From: Matthew.Fortune@mips.com (Matthew Fortune)
Date: Wed, 02 May 2018 20:52:00 -0000
Subject: Introducing a nanoMIPS port for GCC
In-Reply-To:
References: <9253772adfd3429dbdaddf0dd622c709@mips.com>
Message-ID: <1e1ee389e85547fdba538748d031bc22@mips.com>
Joseph Myers writes:
> On Wed, 2 May 2018, Matthew Fortune wrote:
>
> > qemu
> > ====
> > http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg00081.html
>
> That answers one thing I was wondering, by saying you're using the generic
> Linux kernel syscall interface rather than any of the existing MIPS
> syscall interfaces.
>
> Is your Linux kernel port available somewhere (or a description of it
> corresponding to these descriptions of changes to toolchain components)?
Hi Joseph,
The kernel is being prepared for a branch in the linux-mips.org repository
and a document adding to the wiki there. All being well it will not take
too long to get that available.
To my knowledge the major areas of the nanoMIPS kernel that are not yet
finalised are the debug interfaces but our kernel engineers will be able
to give a more detailed description.
Matthew
From gccadmin@gcc.gnu.org Wed May 2 22:43:00 2018
From: gccadmin@gcc.gnu.org (gccadmin@gcc.gnu.org)
Date: Wed, 02 May 2018 22:43:00 -0000
Subject: gcc-6-20180502 is now available
Message-ID: <20180502224306.65662.qmail@sourceware.org>
Snapshot gcc-6-20180502 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/6-20180502/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 6 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-6-branch revision 259867
You'll find:
gcc-6-20180502.tar.xz Complete GCC
SHA256=12bc75f9ecc4e02c8f496446fbb6dc2340c02552f08a203e098d94914dbc197f
SHA1=99ea089cbc190b12e2b39d003ebbb7fea8bb4ac4
Diffs from 6-20180425 are available in the diffs/ subdirectory.
When a particular snapshot is ready for public consumption the LATEST-6
link is updated and a message is sent to the gcc list. Please do not use
a snapshot before it has been announced that way.
From njasrotia662webtech@gmail.com Thu May 3 12:37:00 2018
From: njasrotia662webtech@gmail.com (nidhi jasrotia)
Date: Thu, 03 May 2018 12:37:00 -0000
Subject: Guaranteed 1st Page On Google
Message-ID:
Hi,
Hope that you are well!
We offer SEO, SMO & Local business listing service to increase website
visibility and traffic from the relevant market.
If you are looking to rank in top page on Google and wanted more traffic,
please let me know.
We look forward to hearing from you.
*With Best Regards*
*Nidhi jasrotia*
*Business Development Manager,*
*Online SEO I SMO I PPC I Web Design & Development*
[image: beacon]
From David.Taylor@dell.com Thu May 3 17:09:00 2018
From: David.Taylor@dell.com (taylor, david)
Date: Thu, 03 May 2018 17:09:00 -0000
Subject: gcov and initialized data
Message-ID: <63F1AEE13FAE864586D589C671A6E18B10FE1091@MX203CL03.corp.emc.com>
I want to use gcov in an embedded type environment. It supports both cold boot
and warm boot.
For warm boot it does not reload the program from media, instead it 'just' jumps
to the start and begins again. Due to support for warm boot, it does not support
read-write initialized data. Writable data is initialized at run-time.
When you build your program for code coverage (-ftest-coverage -fprofile-arcs),
GCC creates some initialized read-write GCOV related data. Has anyone modified
GCC to, presumably either under control of a command line option or possibly a
configure time option, to initialize such data at run-time instead of compile-time?
Thanks.
David
p.s. In case it matters / anyone cares -- we have copyright assignments on file for
GCC, BINUTILS, and GDB, which the company lawyers assure me survived our
acquisition by Dell.
From nathan@acm.org Thu May 3 17:57:00 2018
From: nathan@acm.org (Nathan Sidwell)
Date: Thu, 03 May 2018 17:57:00 -0000
Subject: gcov and initialized data
In-Reply-To: <63F1AEE13FAE864586D589C671A6E18B10FE1091@MX203CL03.corp.emc.com>
References: <63F1AEE13FAE864586D589C671A6E18B10FE1091@MX203CL03.corp.emc.com>
Message-ID: <05d38325-59f4-4b83-8658-49b6808647b8@acm.org>
On 05/03/2018 01:09 PM, taylor, david wrote:
> When you build your program for code coverage (-ftest-coverage -fprofile-arcs),
> GCC creates some initialized read-write GCOV related data. Has anyone modified
> GCC to, presumably either under control of a command line option or possibly a
> configure time option, to initialize such data at run-time instead of compile-time?
How is this distinct to having to support regular C code such as:
int x = 5;
? (I'm guessing the simplest solution would be to post-process the
statically linked image to do some kind of run-length compression on its
.data section and squirrel that away somewhere that a decompressor can
find it early on)
nathan
--
Nathan Sidwell
From toon@moene.org Thu May 3 18:43:00 2018
From: toon@moene.org (Toon Moene)
Date: Thu, 03 May 2018 18:43:00 -0000
Subject: Interesting statistics on vectorization for Skylake avx512 (i9-7900) - 8.1 vs. 7.3.
Message-ID: <0b14a1db-f90c-66f4-420c-954a354d2f82@moene.org>
Consider the attached Fortran code (the most expensive routine,
computation-wise, in our weather forecasting model).
verint.s.7.3 is the result of:
gfortran -g -O3 -S -march=native -mtune=native verint.f
using release 7.3.
verint.s.8.1 is the result of:
gfortran -g -O3 -S -march=native -mtune=native verint.f
using the recently released GCC 8.1.
$ wc -l verint.s.7.3 verint.s.8.1
7818 verint.s.7.3
6087 verint.s.8.1
$ grep vfma verint.s.7.3 | wc -l
381
$ grep vfma verint.s.8.1 | wc -l
254
but:
$ grep vfma verint.s.7.3 | grep -v ss | wc -l
127
$ grep vfma verint.s.8.1 | grep -v ss | wc -l
127
and:
$ grep movaps verint.s.7.3 | wc -l
306
$ grep movaps verint.s.8.3 | wc -l
270
Finally:
$ grep zmm verint.s.7.3 | wc -l
1494
$ grep zmm verint.s.8.1 | wc -l
0
$ grep ymm verint.s.7.3 | wc -l
379
$ grep ymm verint.s.8.1 | wc -l
1464
I haven't had the opportunity to test this for speed (is quite
complicated, as I have to build several support libraries with 8.1, like
openmpi, netcdf, hdf{4|5}, fftw ...)
--
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news
-------------- next part --------------
A non-text attachment was scrubbed...
Name: verint.f
Type: text/x-fortran
Size: 12959 bytes
Desc: not available
URL:
From David.Taylor@dell.com Thu May 3 18:47:00 2018
From: David.Taylor@dell.com (taylor, david)
Date: Thu, 03 May 2018 18:47:00 -0000
Subject: gcov and initialized data
In-Reply-To: <05d38325-59f4-4b83-8658-49b6808647b8@acm.org>
References: <63F1AEE13FAE864586D589C671A6E18B10FE1091@MX203CL03.corp.emc.com> <05d38325-59f4-4b83-8658-49b6808647b8@acm.org>
Message-ID: <63F1AEE13FAE864586D589C671A6E18B10FE110A@MX203CL03.corp.emc.com>
> From: Nathan Sidwell [mailto:nathanmsidwell@gmail.com] On Behalf Of
> Nathan Sidwell
> Sent: Thursday, May 3, 2018 1:58 PM
> To: taylor, david; gcc@gcc.gnu.org
> Subject: Re: gcov and initialized data
>
> On 05/03/2018 01:09 PM, taylor, david wrote:
>
> > When you build your program for code coverage (-ftest-coverage
> > -fprofile-arcs), GCC creates some initialized read-write GCOV related
> > data. Has anyone modified GCC to, presumably either under control of
> > a command line option or possibly a configure time option, to initialize such
> data at run-time instead of compile-time?
>
> How is this distinct to having to support regular C code such as:
>
> int x = 5;
>
> ? (I'm guessing the simplest solution would be to post-process the statically
> linked image to do some kind of run-length compression on its .data section
> and squirrel that away somewhere that a decompressor can find it early on)
There's a linker script. It sets the size of the .data section to 0. Any attempt to
use initialized read-write data overflows the .data section and fails the build.
> nathan
>
> --
> Nathan Sidwell
From gccadmin@gcc.gnu.org Thu May 3 22:40:00 2018
From: gccadmin@gcc.gnu.org (gccadmin@gcc.gnu.org)
Date: Thu, 03 May 2018 22:40:00 -0000
Subject: gcc-7-20180503 is now available
Message-ID: <20180503224009.54657.qmail@sourceware.org>
Snapshot gcc-7-20180503 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/7-20180503/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 7 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-7-branch revision 259911
You'll find:
gcc-7-20180503.tar.xz Complete GCC
SHA256=2c7c10ee96986e919c29ffa5475b305945d80ee8ee39b3ddf9232de06607ffd1
SHA1=ebf856d64f84bc8efe2ee48225f5591ee1d98984
Diffs from 7-20180426 are available in the diffs/ subdirectory.
When a particular snapshot is ready for public consumption the LATEST-7
link is updated and a message is sent to the gcc list. Please do not use
a snapshot before it has been announced that way.
From bert.wesarg@googlemail.com Fri May 4 06:23:00 2018
From: bert.wesarg@googlemail.com (Bert Wesarg)
Date: Fri, 04 May 2018 06:23:00 -0000
Subject: GCC 8.1 Released
In-Reply-To: <20180502121524.GT8577@tucnak>
References: <20180502121524.GT8577@tucnak>
Message-ID:
Hi,
On Wed, May 2, 2018 at 2:15 PM, Jakub Jelinek wrote:
> Some code that compiled successfully with older GCC versions might require
> source changes, see http://gcc.gnu.org/gcc-8/porting_to.html for
> details.
in "Fortran language issues" it reads: "Prior to GCC 7", shouldn't
that be "Prior to GCC 8" or "Up to GCC 7"?
And can somebody can tell me, whether this Fortran issue effects also
Fortran code which calls C functions?
Thanks.
Best,
Bert
From blomqvist.janne@gmail.com Fri May 4 06:31:00 2018
From: blomqvist.janne@gmail.com (Janne Blomqvist)
Date: Fri, 04 May 2018 06:31:00 -0000
Subject: GCC 8.1 Released
In-Reply-To:
References: <20180502121524.GT8577@tucnak>
Message-ID:
On Fri, May 4, 2018 at 9:22 AM, Bert Wesarg
wrote:
> Hi,
>
> On Wed, May 2, 2018 at 2:15 PM, Jakub Jelinek wrote:
> > Some code that compiled successfully with older GCC versions might
> require
> > source changes, see http://gcc.gnu.org/gcc-8/porting_to.html for
> > details.
>
> in "Fortran language issues" it reads: "Prior to GCC 7", shouldn't
> that be "Prior to GCC 8" or "Up to GCC 7"?
>
Yes, indeed it should. Thanks for noticing.
>
> And can somebody can tell me, whether this Fortran issue effects also
> Fortran code which calls C functions?
>
>
If it's a "normal" C function with NULL-terminated strings, then no. If
it's a C function which is designed to follow the Fortran procedure ABI
(where strings are passed as a pointer + a hidden length argument), then
yes.
--
Janne Blomqvist
From richard.guenther@gmail.com Fri May 4 07:14:00 2018
From: richard.guenther@gmail.com (Richard Biener)
Date: Fri, 04 May 2018 07:14:00 -0000
Subject: Interesting statistics on vectorization for Skylake avx512 (i9-7900) - 8.1 vs. 7.3.
In-Reply-To: <0b14a1db-f90c-66f4-420c-954a354d2f82@moene.org>
References: <0b14a1db-f90c-66f4-420c-954a354d2f82@moene.org>
Message-ID:
On Thu, May 3, 2018 at 8:43 PM, Toon Moene wrote:
> Consider the attached Fortran code (the most expensive routine,
> computation-wise, in our weather forecasting model).
>
> verint.s.7.3 is the result of:
>
> gfortran -g -O3 -S -march=native -mtune=native verint.f
>
> using release 7.3.
>
> verint.s.8.1 is the result of:
>
> gfortran -g -O3 -S -march=native -mtune=native verint.f
>
> using the recently released GCC 8.1.
>
> $ wc -l verint.s.7.3 verint.s.8.1
> 7818 verint.s.7.3
> 6087 verint.s.8.1
>
> $ grep vfma verint.s.7.3 | wc -l
> 381
> $ grep vfma verint.s.8.1 | wc -l
> 254
>
> but:
>
> $ grep vfma verint.s.7.3 | grep -v ss | wc -l
> 127
> $ grep vfma verint.s.8.1 | grep -v ss | wc -l
> 127
>
> and:
>
> $ grep movaps verint.s.7.3 | wc -l
> 306
> $ grep movaps verint.s.8.3 | wc -l
> 270
>
> Finally:
>
> $ grep zmm verint.s.7.3 | wc -l
> 1494
> $ grep zmm verint.s.8.1 | wc -l
> 0
> $ grep ymm verint.s.7.3 | wc -l
> 379
> $ grep ymm verint.s.8.1 | wc -l
> 1464
>
> I haven't had the opportunity to test this for speed (is quite complicated,
> as I have to build several support libraries with 8.1, like openmpi, netcdf,
> hdf{4|5}, fftw ...)
GCC 8 has changes to prefer AVX256 by default for Skylake-avx512, even
with AVX512 available.
You can change that with -mprefer-vector-width=512 or by changing the
avx256_optimal tune via -mtune-ctrl=^avx256_optimal
There are now also measures in place to avoid fma in certain situations where it
doesn't help performance.
So - performance measurements would be nice to have ;)
Richard.
>
> --
> Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
> Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
> At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
> Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news
From cc647390@gmail.com Fri May 4 12:12:00 2018
From: cc647390@gmail.com (Christina Chavez)
Date: Fri, 04 May 2018 12:12:00 -0000
Subject: Fwd: OMB-A-130
Message-ID:
{?}Copyright2047ICC.cc3.*
---------- Forwarded message ----------
From: cc647390@gmail.com
Date: Apr 25, 2018 6:21 PM
Subject: OMB-A-130
To:
Cc:
>>>((ASU-2016-01))(2018-03)//regarding CONSECUTIVE CONCURRENT WILLFULL
CONSTITUTIONAL & INTERNATIONAL TRADE VIOLATIONS! Request::REQUEST;(please r
u STRONG ENOUGH 2 HAVE AN "ACTIVE" Conscious???)FROM:: (((Ms.CHRISTINA
MILDRED CHAVEZ)))vs. State of New Mexico Secretary of State &/ or all "
affiliates"(cash-control/sba& ha) ASSET ACCOUNTS=$45 BILLION FROM MY
PERSONAL BUSINESS UNIVERSAL GOVT CONTRACTOR)(X.3)w&i(EULA PATENTS;
NOTICE!FAR52.227.19.CC3.*{?}2047).Personal Services
Consultant(Psc7)WHD/EBSA/SSA"LEGACY" INVESTMENT ACCOUNT(S)RETIRED MILITARY
.CIA&IRS&SEC&DEPARTMENT OF(PIA)FISCAL SERVICES U.S.TREASURY.INTERNATIONAL
SECURITIES ENTITY{{SG1}}.see JSC INQUIRY No.2013-077(ALSO VIOLATIONS
HB-1,HB2,)SUPREME COURT DOCKET NO.34,601(Court Judge Conduct Violations
NMSA 1978 RULES-21-206(A),21-101,21-102,21-103,21-303,21-204(B)(C), et.al.
NET INCOME LOSSES EXCEEDS PUBLIC HEALTH &/Or SAFETY RISKS LOSS BASE
MINIMUMS. 7-1-4-3 nmsa 1978/CONTINUED NON COMPLIANCE MALICIOUS INDIFFERENCE
TO"REASONABLE_MAN_STANDARD". National Defense Authorization Act
FY2016/Note 552a Title5 P.L.111-203,124 Stat.2081/1693d&1693f TitleX/ Title
1 Violations. There is No "Competent" Attorney's CPA'$ Available in the
State of New Nexico to help Resolve Mandated Required_ Already
Adjucated_PAYROLL,RETIREMENT& INVESTMENT ACCOUNT VIOLATIONS. Dear Sir. I am
10 Years of " Information Collection Reporting Entity" Active Contributing
Earned Income & Investment Asset Issuer.( No Notification or Comprehensive
Communication from New Mexico State Financial Administration.) I Require
"Independent" Investment Individual Plan EXECUTIVE OF ESTATE & Advance
Directives.Asset Accounts in Virginia_Industrial Savings&Loan Virginia,
NYFRB. ASSET ACCOUNTS.IRREVOCAVLE LETTERS OF CREDIT FROM U.S.DEPT.OF
TREASURY(Fiscal Services) IRS LR'$ (Taxes,Security Together) DOD, DOL, GOA,
GPA,[[ILC.USA 1.ILC]]{07}& Others. My mobile phone(505)357-4566. Thank You
Sir.>>>>
{?}Copyright2047ICC.cc3.*
From umesh.kalappa0@gmail.com Fri May 4 12:50:00 2018
From: umesh.kalappa0@gmail.com (Umesh Kalappa)
Date: Fri, 04 May 2018 12:50:00 -0000
Subject: GCC Compiler Optimization ignores or mistreats MFENCE memory barrier related instruction
In-Reply-To:
References:
Message-ID:
Hi Alex ,
Agree that float division don't touch memory ,but fdiv result (stack
register ) is stored back to a memory i.e fResult .
So compiler barrier in the inline asm i.e ::memory should prevent the
shrinkage of instructions like "fstps fResult(%rip)" behind the
fence ?
BTW ,if we make fDivident and fResult = 0.0f gloabls,the code
emitted looks ok i.e
#gcc -S test.c -O3 -mmmx -mno-sse
flds .LC0(%rip)
fsts fDivident(%rip)
fdivs .LC1(%rip)
fstps fResult(%rip)
#APP
# 10 "test.c" 1
mfence
# 0 "" 2
#NO_APP
flds fResult(%rip)
movl $.LC2, %edi
xorl %eax, %eax
fstpl (%rsp)
call printf
So i strongly believe that ,its compiler issue and please feel free
correct me in any case.
Thank you and waiting for your reply.
~Umesh
On Fri, Apr 13, 2018 at 5:58 PM, Alexander Monakov wrote:
> On Fri, 13 Apr 2018, Vivek Kinhekar wrote:
>> The mfence instruction with memory clobber asm instruction should create a
>> barrier between division and printf instructions.
>
> No, floating-point division does not touch memory, so the asm does not (and
> need not) restrict its motion.
>
> Alexander
From dmalcolm@redhat.com Fri May 4 20:47:00 2018
From: dmalcolm@redhat.com (David Malcolm)
Date: Fri, 04 May 2018 20:47:00 -0000
Subject: ANN: gcc-python-plugin 0.16
Message-ID: <1525466854.2961.34.camel@redhat.com>
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the
CPython interpreter within GCC, allowing you to write new compiler
warnings in Python, generate code visualizations, etc.
This releases adds support for gcc 7 and gcc 8 (along with continued
support for gcc 4.6, 4.7, 4.8, 4.9, 5 and 6).
The upstream location for the plugin has moved from fedorahosted.org to
https://github.com/davidmalcolm/gcc-python-plugin
Additionally, this release contains the following improvements:
* add gcc.RichLocation for GCC 6 onwards
* gcc.Location
* add caret, start, finish attributes for GCC 7 onwards
* add gcc.Location.offset_column() method
Tarball releases are available at:
https://github.com/davidmalcolm/gcc-python-plugin/releases
Prebuilt-documentation can be seen at:
http://gcc-python-plugin.readthedocs.org/en/latest/index.html
The plugin and checker are Free Software, licensed under the GPLv3 or
later.
Enjoy!
Dave Malcolm
From gccadmin@gcc.gnu.org Fri May 4 22:41:00 2018
From: gccadmin@gcc.gnu.org (gccadmin@gcc.gnu.org)
Date: Fri, 04 May 2018 22:41:00 -0000
Subject: gcc-8-20180504 is now available
Message-ID: <20180504224106.45651.qmail@sourceware.org>
Snapshot gcc-8-20180504 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/8-20180504/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 8 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-8-branch revision 259960
You'll find:
gcc-8-20180504.tar.xz Complete GCC
SHA256=b49b674524449c999c0966271c2fc4488a2db8cec8d65e78ba6665408577f572
SHA1=9b4f388d4c8f58d0a4fcfe888a7bc8ca86679d39
Diffs from 8-20180427 are available in the diffs/ subdirectory.
When a particular snapshot is ready for public consumption the LATEST-8
link is updated and a message is sent to the gcc list. Please do not use
a snapshot before it has been announced that way.
From reply5@oddcoll.com Sat May 5 00:15:00 2018
From: reply5@oddcoll.com (Debt Recovery)
Date: Sat, 05 May 2018 00:15:00 -0000
Subject: {Alerting You}
Message-ID:
Hello,
I am very sorry I have to reach you through this medium. I am a member of the European Debt Recovery Unit and I am aware of your ordeal about your unpaid fund.
It may also interest you to know that, not long after the Debt Management Office (DMO) completed the merger and acquisition process of all pending payments in response to the petition raised by the international community about their unpaid funds. I discovered that their boss connived with some top officials to divert funds approve to settle unpaid inheritances, email lottery winners, Internet scam victims, unclaimed consignments(concealed funds) and International Contractors.
The DMO has already given approval for the payment of your fund but they deliberately withheld your payment file and continue to demand fees from you through their associates from different unassigned affiliates mostly from Africa, US and the Netherlands all in an attempt to frustrate you and enrich themselves. I wonder why you haven?t notice all these while.
You may choose to disbelieve this email as inconceivable facts but my doctrine does not permit such act, reason I have to open up to you to seek the right channel. Your fund was authorized to be paid to you through the DMO asset management firm with a Claim Code Numbers, which was supposed to have been issued to you before now.
Upon your response, I shall guide you through and provide you with details to contact the assigned affiliate who will expeditiously facilitate the release of your fund.
Thanks and have a wonderful day.
Yours Faithfully,
Administrative Staff.
European Debt Recovery Agent,
UK.Ref:EDRA/290318/UK03.
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
From mutazilah@gmail.com Sat May 5 09:01:00 2018
From: mutazilah@gmail.com (Paul Edwards)
Date: Sat, 05 May 2018 09:01:00 -0000
Subject: i370 - negative indexes
Message-ID: <0AF412897A1E401AAC2DF01FB1BA1CAE@DESKTOP57VDCOT>
Hi.
On the i370 port of GCC 3.2.3, I am
getting the following issue.
This code:
C:\scratch\bug>type bug.c
const char *p;
void foo(void)
{
printf("p-1 is %x\n", p[-1]);
}
generates:
...
L 2,=F'-1'
...
IC 4,0(2,3)
ie it is using a value of x??FFFFFFFF?? in R2 as an index.
This works fine in AM24 and AM31 environments, but
fails for AM64 where an address above 4 GiB is
computed.
Such code is very rare, so I would like to just have
a rule that the index must always be a positive
value, and for negative indexes like the above,
different code is generated to do an actual
subtract instead of trying to do everything via
the index.
Any idea how to achieve that? I can't see
anywhere in i370.md where I can put some
sort of constraint.
Note that I am producing 32-bit modules, but
setting them to AM64 so that they can use
the full 4 GiB on certain environments (like
MVS/380), instead of having a 2 GiB limit.
Thanks. Paul.
---
This email has been checked for viruses by AVG.
http://www.avg.com
From xiahan@tju.edu.cn Sat May 5 12:13:00 2018
From: xiahan@tju.edu.cn (=?UTF-8?B?5aSP5pmX?=)
Date: Sat, 05 May 2018 12:13:00 -0000
Subject: =?UTF-8?B?44CQR0NDIHZlcnNpb24gY2FuIG5vdCBiZSBjaGFuZ2Vk44CR?=
Message-ID:
root@Xia-Ubuntu:/usr/bin# gcc -v
???? specs?
COLLECT_GCC=gcc
???x86_64-pc-linux-gnu
????../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
?????posix
gcc ?? 6.2.0 (GCC)
I have tried many methods like 'ln' and priority changing, but 'gcc -v' still maintain at '6.2.0'.......
From carlhansen1234@gmail.com Sat May 5 20:47:00 2018
From: carlhansen1234@gmail.com (carl hansen)
Date: Sat, 05 May 2018 20:47:00 -0000
Subject: =?UTF-8?Q?Re=3A_=E3=80=90GCC_version_can_not_be_changed=E3=80=91?=
In-Reply-To:
References:
Message-ID:
On Sat, May 5, 2018 at 5:13 AM, ?? wrote:
> root@Xia-Ubuntu:/usr/bin# gcc -v
> ???? specs?
> COLLECT_GCC=gcc
> ???x86_64-pc-linux-gnu
> ????../configure -enable-checking=release -enable-languages=c,c++
> -disable-multilib
> ?????posix
> gcc ?? 6.2.0 (GCC)
> I have tried many methods like 'ln' and priority changing, but 'gcc -v'
> still maintain at '6.2.0'.....
?perhaps
which -a gcc
will provide a clue?
From euloanty@live.com Sun May 6 00:34:00 2018
From: euloanty@live.com (sotrdg sotrdg)
Date: Sun, 06 May 2018 00:34:00 -0000
Subject: random_device implementation
Message-ID:
https://github.com/euloanty/mingw-std-random_device/blob/master/random_device_gcc_withcxx11abi/random.cc
Sent from Mail for Windows 10
From lh_mouse@126.com Sun May 6 08:11:00 2018
From: lh_mouse@126.com (Liu Hao)
Date: Sun, 06 May 2018 08:11:00 -0000
Subject: =?UTF-8?Q?Re:_=e3=80=90GCC_version_can_not_be_changed=e3=80=91?=
In-Reply-To:
References:
Message-ID: <73990691-d312-f038-2578-cc9433b5bead@126.com>
??? 2018/5/5 20:13, ?????? ??????:
> root@Xia-Ubuntu:/usr/bin# gcc -v
> ????????
??? specs???
> COLLECT_GCC=gcc
> ?????????x86_64-pc-linux-gnu
> ?
??????????../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
> ???????????????posix
> gcc ?????? 6.2.0 (GCC)
> I have tried many methods like 'ln' and priority changing, but 'gcc -v' still maintain at '6.2.0'.......
>
If you are using Ubuntu, the command `gcc` is a symlink to whichever
version selected by your Ubuntu release and is the one used to build all
system packages. Consequently, using a different target might result in
binary incompatibility and is not recommended.
If you would like to invoke a different version of GCC, append the
version number to it. This is true for all official releases and PPA
packages.
For example, to invoke GCC 7 explicitly, you have to ensure it is
installed by running `sudo apt-get install gcc-7`. The command `gcc-7`
will be available thereafter and can be invoked either directly or
indirectly by setting the `CC` environment variable.
--
Best regards,
LH_Mouse
From rainer@emrich-ebersheim.de Sun May 6 15:44:00 2018
From: rainer@emrich-ebersheim.de (Rainer Emrich)
Date: Sun, 06 May 2018 15:44:00 -0000
Subject: Successful bootsrap of gcc 8.1.0 on x86_64-w64-mingw32
Message-ID: <4f2fea67-c753-d6f6-5747-52d21814871d@emrich-ebersheim.de>
Bootstrap is done with msys2 on Windows 7. For the testsuite results see
https://gcc.gnu.org/ml/gcc-testresults/2018-05/msg00583.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL:
From gccadmin@gcc.gnu.org Sun May 6 22:41:00 2018
From: gccadmin@gcc.gnu.org (gccadmin@gcc.gnu.org)
Date: Sun, 06 May 2018 22:41:00 -0000
Subject: gcc-9-20180506 is now available
Message-ID: <20180506224137.52405.qmail@sourceware.org>
Snapshot gcc-9-20180506 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/9-20180506/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 9 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/trunk revision 259982
You'll find:
gcc-9-20180506.tar.xz Complete GCC
SHA256=dde70aaeb5569e422245051e4d3975e8dcc5a5ea8d0ee6f742dad4021908a7b6
SHA1=f4ce8a1c911af280366828e1dcf93112eac7664f
Diffs from 9-20180429 are available in the diffs/ subdirectory.
When a particular snapshot is ready for public consumption the LATEST-9
link is updated and a message is sent to the gcc list. Please do not use
a snapshot before it has been announced that way.
From umesh.kalappa0@gmail.com Mon May 7 08:28:00 2018
From: umesh.kalappa0@gmail.com (Umesh Kalappa)
Date: Mon, 07 May 2018 08:28:00 -0000
Subject: GCC Compiler Optimization ignores or mistreats MFENCE memory barrier related instruction
Message-ID:
CCed Jakub,
> Hi Alex,
> Agree that float division don't touch memory ,but fdiv result (stack
> register ) is stored back to a memory i.e fResult .
>
> So compiler barrier in the inline asm i.e ::memory should prevent the
> shrinkage of instructions like "fstps fResult(%rip)" behind the
> fence ?
>
> BTW ,if we make fDivident and fResult = 0.0f gloabls,the code
> emitted looks ok i.e
> #gcc -S test.c -O3 -mmmx -mno-sse
>
> flds .LC0(%rip)
> fsts fDivident(%rip)
> fdivs .LC1(%rip)
> fstps fResult(%rip)
> #APP
> # 10 "test.c" 1
> mfence
> # 0 "" 2
> #NO_APP
> flds fResult(%rip)
> movl $.LC2, %edi
> xorl %eax, %eax
> fstpl (%rsp)
> call printf
>
> So i strongly believe that ,its compiler issue and please feel free
> correct me in any case.
>
> Thank you and waiting for your reply.
>
> ~Umesh
>
>
>
>
> On Fri, Apr 13, 2018 at 5:58 PM, Alexander Monakov wrote:
>> On Fri, 13 Apr 2018, Vivek Kinhekar wrote:
>>> The mfence instruction with memory clobber asm instruction should create a
>>> barrier between division and printf instructions.
>>
>> No, floating-point division does not touch memory, so the asm does not (and
>> need not) restrict its motion.
>>
>> Alexander
From jakub@redhat.com Mon May 7 08:38:00 2018
From: jakub@redhat.com (Jakub Jelinek)
Date: Mon, 07 May 2018 08:38:00 -0000
Subject: GCC Compiler Optimization ignores or mistreats MFENCE memory barrier related instruction
In-Reply-To:
References:
Message-ID: <20180507083830.GF8577@tucnak>
On Mon, May 07, 2018 at 01:58:48PM +0530, Umesh Kalappa wrote:
> CCed Jakub,
> > Agree that float division don't touch memory ,but fdiv result (stack
> > register ) is stored back to a memory i.e fResult .
That doesn't really matter. It is stored to a stack spill slot, something
that doesn't have address taken and other code (e.g. in other threads) can't
in a valid program access it. That is not considered memory for the
inline-asm, only objects that must live in memory count.
Jakub
From jwakely.gcc@gmail.com Mon May 7 12:05:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Mon, 07 May 2018 12:05:00 -0000
Subject: Successful bootsrap of gcc 8.1.0 on x86_64-w64-mingw32
In-Reply-To: <4f2fea67-c753-d6f6-5747-52d21814871d@emrich-ebersheim.de>
References: <4f2fea67-c753-d6f6-5747-52d21814871d@emrich-ebersheim.de>
Message-ID:
On 6 May 2018 at 16:44, Rainer Emrich wrote:
> Bootstrap is done with msys2 on Windows 7. For the testsuite results see
> https://gcc.gnu.org/ml/gcc-testresults/2018-05/msg00583.html
Thanks for this. Would you be able to send me the
$objdir/$target/libstdc++-v3/testsuite/libstdc++.log file?
From leslie.poulin@worldonlinetech.com Mon May 7 13:39:00 2018
From: leslie.poulin@worldonlinetech.com (Leslie Poulin)
Date: Mon, 07 May 2018 13:39:00 -0000
Subject: Updated ATLAS Email List
Message-ID:
Hi,
Hope you having a great day!
I just wanted to be aware if you would be interested in acquiring ATLAS Users Contact List for marketing your product or service.
These are the fields that we provide for each contacts: Names, Title, Email, Contact Number, Company Name, Company URL, and Company physical location, SIC Code, Industry and Company Size (Revenue and Employee).
Kindly review and let me be aware of your interest so that I can get back to you with the exact counts and more info regarding the same.
Do let me be aware if you have any questions for me.
Regards,
Leslie
Database Executive
If you do not wish to receive these emails. Please respond Exit.
From indu.bhagat@oracle.com Mon May 7 17:03:00 2018
From: indu.bhagat@oracle.com (Indu Bhagat)
Date: Mon, 07 May 2018 17:03:00 -0000
Subject: fminnm/fmaxnm generation in aarch64
In-Reply-To: <4067c389-edc1-3858-e52c-8b9f167316a7@oracle.com>
References: <4067c389-edc1-3858-e52c-8b9f167316a7@oracle.com>
Message-ID: <7b6269f0-2daa-4335-e854-2685313da9c7@oracle.com>
[Trying to get some feedback. I earlier posted on gcc-help a week ago]
In tree.def -
/* Minimum and maximum values. When used with floating point, if both
operands are zeros, or if either operand is NaN, then it is unspecified
which of the two operands is returned as the result. */
DEFTREECODE (MIN_EXPR, "min_expr", tcc_binary, 2)
DEFTREECODE (MAX_EXPR, "max_expr", tcc_binary, 2)
I see that the compiler cannot simplify an expression like
((a
gd??-??---??--??-???136-4072-5689
From aph@redhat.com Tue May 8 07:57:00 2018
From: aph@redhat.com (Andrew Haley)
Date: Tue, 08 May 2018 07:57:00 -0000
Subject: fminnm/fmaxnm generation in aarch64
In-Reply-To: <7b6269f0-2daa-4335-e854-2685313da9c7@oracle.com>
References: <4067c389-edc1-3858-e52c-8b9f167316a7@oracle.com> <7b6269f0-2daa-4335-e854-2685313da9c7@oracle.com>
Message-ID:
On 07/05/18 18:08, Indu Bhagat wrote:
> [Trying to get some feedback. I earlier posted on gcc-help a week ago]
>
> In tree.def -
>
> /* Minimum and maximum values.?? When used with floating point, if both
> ???? operands are zeros, or if either operand is NaN, then it is unspecified
> ???? which of the two operands is returned as the result. */
> DEFTREECODE (MIN_EXPR, "min_expr", tcc_binary, 2)
> DEFTREECODE (MAX_EXPR, "max_expr", tcc_binary, 2)
>
> I see that the compiler cannot simplify an expression like
> ((a (-ffinite-math-only -fno-signed zeros flags).
>
> Q1: It is not clear to me what is the fundamental reason of the
> ?????? "unspecified behaviour" of MIN_EXPR/MAX_EXPR in case of floating point
> ?????? operands ?
>
> (For the sake of discussing what I write hereafter, assume that
> fminnm/fmaxnm instructions offer better performance than fcsel/fcmp). So, two
> further questions:
>
> Q2. If one wants the compiler to generate fminnm/fmaxnm instructions, while
> ?????? conforming with IEEE standard, the way to do that will be to use math
> ?????? builtins fmin()/fmax(). Is this correct understanding?
Yes.
> Q3. What will it take for the compiler transform high-level language
> ?????? floating point construct like ((a ?????? aarch64 targets?
You'd have to use -ffast-math or .ffinite-math-only. The meaning of the expression
((a
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
From fweimer@redhat.com Tue May 8 11:36:00 2018
From: fweimer@redhat.com (Florian Weimer)
Date: Tue, 08 May 2018 11:36:00 -0000
Subject: [RFC] Deprecate "implicit int" for main() in C++
In-Reply-To: <20180425144008.GU20930@redhat.com>
References: <20180425122305.GS20930@redhat.com> <7039f928-e50b-1f75-4f71-70fda5873ab0@redhat.com> <20180425144008.GU20930@redhat.com>
Message-ID: <1eda6680-f574-7637-42dd-4309dacb012e@redhat.com>
On 04/25/2018 04:40 PM, Jonathan Wakely wrote:
> More concretely, deprecating it for a few releases would allow us to
> apply the attached patch at some point in the future, so that instead
> of:
>
> rt.c:1:6: warning: ISO C++ forbids declaration of ???main??? with no type
> [-Wreturn-type]
> main() { return 0; }
> ???????? ^
>
> We'd get:
>
> rt.c:1:6: error: ISO C++ forbids declaration of 'main' with no type
> [-fpermissive]
> main() { return 0; }
> ???????? ^
I wonder if it's currently a warning because the implicit int is used in
configure checks. If this is the case, maybe we cannot make it an error
without altering the result of configure tests?
Thanks,
Florian
From jwakely.gcc@gmail.com Tue May 8 11:39:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Tue, 08 May 2018 11:39:00 -0000
Subject: [RFC] Deprecate "implicit int" for main() in C++
In-Reply-To: <1eda6680-f574-7637-42dd-4309dacb012e@redhat.com>
References: <20180425122305.GS20930@redhat.com> <7039f928-e50b-1f75-4f71-70fda5873ab0@redhat.com> <20180425144008.GU20930@redhat.com> <1eda6680-f574-7637-42dd-4309dacb012e@redhat.com>
Message-ID:
On 8 May 2018 at 12:35, Florian Weimer wrote:
> On 04/25/2018 04:40 PM, Jonathan Wakely wrote:
>>
>> More concretely, deprecating it for a few releases would allow us to
>> apply the attached patch at some point in the future, so that instead
>> of:
>>
>> rt.c:1:6: warning: ISO C++ forbids declaration of ?main? with no type
>> [-Wreturn-type]
>> main() { return 0; }
>> ^
>>
>> We'd get:
>>
>> rt.c:1:6: error: ISO C++ forbids declaration of 'main' with no type
>> [-fpermissive]
>> main() { return 0; }
>> ^
>
>
> I wonder if it's currently a warning because the implicit int is used in
> configure checks. If this is the case, maybe we cannot make it an error
> without altering the result of configure tests?
Sigh, you're probably right. Since GCC 8.1 any such configure tests
will get a warning (or an error with -Werror) so maybe they'll
eventually get fixed.
Jason already expressed a preference for not making the change anyway.
From schwab@suse.de Tue May 8 12:02:00 2018
From: schwab@suse.de (Andreas Schwab)
Date: Tue, 08 May 2018 12:02:00 -0000
Subject: [RFC] Deprecate "implicit int" for main() in C++
In-Reply-To: <1eda6680-f574-7637-42dd-4309dacb012e@redhat.com> (Florian Weimer's message of "Tue, 8 May 2018 13:35:57 +0200")
References: <20180425122305.GS20930@redhat.com> <7039f928-e50b-1f75-4f71-70fda5873ab0@redhat.com> <20180425144008.GU20930@redhat.com> <1eda6680-f574-7637-42dd-4309dacb012e@redhat.com>
Message-ID:
On Mai 08 2018, Florian Weimer wrote:
> I wonder if it's currently a warning because the implicit int is used in
> configure checks.
Is it? At least in the GCC sources I couldn't find any occurence of
main without a preceding int.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
From sbergman@redhat.com Tue May 8 12:44:00 2018
From: sbergman@redhat.com (Stephan Bergmann)
Date: Tue, 08 May 2018 12:44:00 -0000
Subject: libstdc++: ODR violation when using std::regex with and without -D_GLIBCXX_DEBUG
Message-ID: <0313d6bf-9a35-18d7-932a-3adc09c064d8@redhat.com>
I was recently bitten by the following issue (Linux, libstdc++ 8.0.1):
A process loads two dynamic libraries A and B both using std::regex, and
A is compiled without -D_GLIBCXX_DEBUG while B is compiled with
-D_GLIBCXX_DEBUG. B creates an instance of std::regex, which internally
creates a
std::shared_ptr>>,
where _NFA has various members of std::__debug::vector type (but which
isn't reflected in the mangled name of that _NFA instantiation itself).
Now, when that instance of std::regex is destroyed again in library B,
the
std::shared_ptr>>::~shared_ptr
destructor (and functions it in turn calls) that happens to get picked
is the (inlined, and exported due to default visibility) instance from
library A. And that assumes that that _NFA instantiation has members of
non-debug std::vector type, which causes a crash.
Should it be considered a bug that such mixture of debug and non-debug
std::regex usage causes ODR violations?
From jwakely.gcc@gmail.com Tue May 8 13:00:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Tue, 08 May 2018 13:00:00 -0000
Subject: libstdc++: ODR violation when using std::regex with and without -D_GLIBCXX_DEBUG
In-Reply-To: <0313d6bf-9a35-18d7-932a-3adc09c064d8@redhat.com>
References: <0313d6bf-9a35-18d7-932a-3adc09c064d8@redhat.com>
Message-ID:
On 8 May 2018 at 13:44, Stephan Bergmann wrote:
> I was recently bitten by the following issue (Linux, libstdc++ 8.0.1): A
> process loads two dynamic libraries A and B both using std::regex, and A is
> compiled without -D_GLIBCXX_DEBUG while B is compiled with -D_GLIBCXX_DEBUG.
This is only supported in very restricted cases.
> B creates an instance of std::regex, which internally creates a
> std::shared_ptr>>,
> where _NFA has various members of std::__debug::vector type (but which isn't
> reflected in the mangled name of that _NFA instantiation itself).
>
> Now, when that instance of std::regex is destroyed again in library B, the
> std::shared_ptr>>::~shared_ptr
> destructor (and functions it in turn calls) that happens to get picked is
> the (inlined, and exported due to default visibility) instance from library
> A. And that assumes that that _NFA instantiation has members of non-debug
> std::vector type, which causes a crash.
>
> Should it be considered a bug that such mixture of debug and non-debug
> std::regex usage causes ODR violations?
Yes, but my frank response is "don't do that".
The right fix here might be to ensure that _NFA always uses the
non-debug vector even in Debug Mode, but I'm fairly certain there are
other similar problems lurking.
From jwakely.gcc@gmail.com Tue May 8 13:00:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Tue, 08 May 2018 13:00:00 -0000
Subject: libstdc++: ODR violation when using std::regex with and without -D_GLIBCXX_DEBUG
In-Reply-To:
References: <0313d6bf-9a35-18d7-932a-3adc09c064d8@redhat.com>
Message-ID:
On 8 May 2018 at 14:00, Jonathan Wakely wrote:
> On 8 May 2018 at 13:44, Stephan Bergmann wrote:
>> I was recently bitten by the following issue (Linux, libstdc++ 8.0.1): A
>> process loads two dynamic libraries A and B both using std::regex, and A is
>> compiled without -D_GLIBCXX_DEBUG while B is compiled with -D_GLIBCXX_DEBUG.
>
> This is only supported in very restricted cases.
>
>> B creates an instance of std::regex, which internally creates a
>> std::shared_ptr>>,
>> where _NFA has various members of std::__debug::vector type (but which isn't
>> reflected in the mangled name of that _NFA instantiation itself).
>>
>> Now, when that instance of std::regex is destroyed again in library B, the
>> std::shared_ptr>>::~shared_ptr
>> destructor (and functions it in turn calls) that happens to get picked is
>> the (inlined, and exported due to default visibility) instance from library
>> A. And that assumes that that _NFA instantiation has members of non-debug
>> std::vector type, which causes a crash.
>>
>> Should it be considered a bug that such mixture of debug and non-debug
>> std::regex usage causes ODR violations?
>
> Yes, but my frank response is "don't do that".
>
> The right fix here might be to ensure that _NFA always uses the
> non-debug vector even in Debug Mode, but I'm fairly certain there are
> other similar problems lurking.
N.B. I think this discussion belongs on the libstdc++ list.
From marc.glisse@inria.fr Tue May 8 14:46:00 2018
From: marc.glisse@inria.fr (Marc Glisse)
Date: Tue, 08 May 2018 14:46:00 -0000
Subject: libstdc++: ODR violation when using std::regex with and without -D_GLIBCXX_DEBUG
In-Reply-To:
References: <0313d6bf-9a35-18d7-932a-3adc09c064d8@redhat.com>
Message-ID:
On Tue, 8 May 2018, Jonathan Wakely wrote:
> On 8 May 2018 at 14:00, Jonathan Wakely wrote:
>> On 8 May 2018 at 13:44, Stephan Bergmann wrote:
>>> I was recently bitten by the following issue (Linux, libstdc++ 8.0.1): A
>>> process loads two dynamic libraries A and B both using std::regex, and A is
>>> compiled without -D_GLIBCXX_DEBUG while B is compiled with -D_GLIBCXX_DEBUG.
>>
>> This is only supported in very restricted cases.
>>
>>> B creates an instance of std::regex, which internally creates a
>>> std::shared_ptr>>,
>>> where _NFA has various members of std::__debug::vector type (but which isn't
>>> reflected in the mangled name of that _NFA instantiation itself).
>>>
>>> Now, when that instance of std::regex is destroyed again in library B, the
>>> std::shared_ptr>>::~shared_ptr
>>> destructor (and functions it in turn calls) that happens to get picked is
>>> the (inlined, and exported due to default visibility) instance from library
>>> A. And that assumes that that _NFA instantiation has members of non-debug
>>> std::vector type, which causes a crash.
>>>
>>> Should it be considered a bug that such mixture of debug and non-debug
>>> std::regex usage causes ODR violations?
>>
>> Yes, but my frank response is "don't do that".
>>
>> The right fix here might be to ensure that _NFA always uses the
>> non-debug vector even in Debug Mode, but I'm fairly certain there are
>> other similar problems lurking.
>
> N.B. I think this discussion belongs on the libstdc++ list.
Would it make sense to use the abi_tag attribute to help with that? (I
didn't really think about it, maybe it doesn't)
"don't do that" remains the most sensible answer.
--
Marc Glisse
From jwakely.gcc@gmail.com Tue May 8 15:18:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Tue, 08 May 2018 15:18:00 -0000
Subject: libstdc++: ODR violation when using std::regex with and without -D_GLIBCXX_DEBUG
In-Reply-To:
References: <0313d6bf-9a35-18d7-932a-3adc09c064d8@redhat.com>
Message-ID:
On 8 May 2018 at 15:45, Marc Glisse wrote:
> On Tue, 8 May 2018, Jonathan Wakely wrote:
>
>> On 8 May 2018 at 14:00, Jonathan Wakely wrote:
>>>
>>> On 8 May 2018 at 13:44, Stephan Bergmann wrote:
>>>>
>>>> I was recently bitten by the following issue (Linux, libstdc++ 8.0.1): A
>>>> process loads two dynamic libraries A and B both using std::regex, and A
>>>> is
>>>> compiled without -D_GLIBCXX_DEBUG while B is compiled with
>>>> -D_GLIBCXX_DEBUG.
>>>
>>>
>>> This is only supported in very restricted cases.
>>>
>>>> B creates an instance of std::regex, which internally creates a
>>>> std::shared_ptr>>,
>>>> where _NFA has various members of std::__debug::vector type (but which
>>>> isn't
>>>> reflected in the mangled name of that _NFA instantiation itself).
>>>>
>>>> Now, when that instance of std::regex is destroyed again in library B,
>>>> the
>>>>
>>>> std::shared_ptr>>::~shared_ptr
>>>> destructor (and functions it in turn calls) that happens to get picked
>>>> is
>>>> the (inlined, and exported due to default visibility) instance from
>>>> library
>>>> A. And that assumes that that _NFA instantiation has members of
>>>> non-debug
>>>> std::vector type, which causes a crash.
>>>>
>>>> Should it be considered a bug that such mixture of debug and non-debug
>>>> std::regex usage causes ODR violations?
>>>
>>>
>>> Yes, but my frank response is "don't do that".
>>>
>>> The right fix here might be to ensure that _NFA always uses the
>>> non-debug vector even in Debug Mode, but I'm fairly certain there are
>>> other similar problems lurking.
>>
>>
>> N.B. I think this discussion belongs on the libstdc++ list.
>
>
> Would it make sense to use the abi_tag attribute to help with that? (I
> didn't really think about it, maybe it doesn't)
Yes, I think we could add it conditionally in debug mode, so that
types with members that are either std::xxx or __gnu_debug::xxx get a
different mangled name in debug mode.
For the regex _NFA type I don't think we want the debug mode checking,
because users can't access it directly so any errors are in the
libstdc++ implementation and we should have eliminated them ourselves,
not be pushing detection of those logic errors into users' programs.
For std::match_results (which derives from std::vector) it's possible
for users to use invalid iterators obtained from a match_results, so
Debug Mode can help. In that case we could decide whether to add the
abi_tag, or always derive from _GLIBCXX_STD_C::vector (i.e. the
non-debug mode one), or even provide an entire
__gnu_debug::match_results type.
> "don't do that" remains the most sensible answer.
Yes, it's just asking for trouble.
From info@gnusa.id Tue May 8 20:02:00 2018
From: info@gnusa.id (Mr. James Chong)
Date: Tue, 08 May 2018 20:02:00 -0000
Subject: Partnership,gcc@gcc.gnu.org
Message-ID:
I Contacted you direct to your email, this your email,gcc@gcc.gnu.org?
How are you and your family?I am MrJames Chong,I will like to discuss something very important with you because I 'm looking for a reliable and trustworthy businessman/individual to handle a lucrative investment in your country.If you are interested and can handle any project reply for more detail
From joseph@codesourcery.com Tue May 8 21:22:00 2018
From: joseph@codesourcery.com (Joseph Myers)
Date: Tue, 08 May 2018 21:22:00 -0000
Subject: fminnm/fmaxnm generation in aarch64
In-Reply-To: <7b6269f0-2daa-4335-e854-2685313da9c7@oracle.com>
References: <4067c389-edc1-3858-e52c-8b9f167316a7@oracle.com> <7b6269f0-2daa-4335-e854-2685313da9c7@oracle.com>
Message-ID:
On Mon, 7 May 2018, Indu Bhagat wrote:
> Q2. If one wants the compiler to generate fminnm/fmaxnm instructions, while
> conforming with IEEE standard, the way to do that will be to use math
> builtins fmin()/fmax(). Is this correct understanding?
For IEEE 754-2008 minNum / maxNum operations, which those instructions
correspond to and fmin and fmax bind to, yes. For IEEE 754-2018 (in
progress), there are different minimum / maximum operations, which don't
match those AArch64 instructions (but some do match RISC-V instructions),
and there are new proposed corresponding C functions such as fmaximum and
fminimum_num (I don't know of implementations of those functions).
--
Joseph S. Myers
joseph@codesourcery.com
From msebor@gmail.com Tue May 8 22:24:00 2018
From: msebor@gmail.com (Martin Sebor)
Date: Tue, 08 May 2018 22:24:00 -0000
Subject: style of code examples in changes.html
In-Reply-To: <1524502548.5688.181.camel@redhat.com>
References: <5b1c9631-4dc1-8d44-0863-f2ddedda33e1@gmail.com> <1524502548.5688.181.camel@redhat.com>
Message-ID:
On 04/23/2018 10:55 AM, David Malcolm wrote:
> On Mon, 2018-04-16 at 20:34 -0600, Martin Sebor wrote:
>> Hi David & Gerald,
>
> (sorry for the late response; I was offline on vacation last week)
>
>> I noticed that the coding examples in the updates I committed
>> to changes.html use a different formatting style than David's.
>> I just copied mine from GCC 7 changes.html, and those I copied
>> from David's for that version :)
>
> There are at least two kinds of example in the website:
> (a) source code examples, and
> (b) "screenshots" of gcc output, which can themselves contain code
> output as part of a diagnostic.
>
> I got sick of hand-converting (b) to our HTML tags, so I wrote a script
> to do it, which I used for my gcc-8/changes.html.
>
> The script is in the website's CVS repository as:
> bin/gcc-color-to-html.py
> and can be run like this:
>
> LANG=C \
> gcc $@ \
> -fdiagnostics-color=always 2>&1 \
> | ./bin/gcc-color-to-html.py
>
> See
> https://gcc.gnu.org/ml/gcc-patches/2018-04/msg00186.html
>
> I also added a
>
>
> around the output, though this isn't done by the above script.
>
> I actually had a fair bit more scripting than this, based on the
> scripting I did for my blogpost here:
> https://github.com/davidmalcolm/gcc-8-blogpost/blob/master/blog.html.in
> where lines like:
>
> INVOKE_GCC unclosed.c
>
> in a foo.html.in get turned into a "screenshot" of the pertinent gcc
> invocation in the foo.html. But given that we don't want to require
> running gcc itself to build the website (and indeed, specific gcc
> versions), I just used this to generate the patch.
>
>> Should we make an effort to
>> make them all look the same?
>
> Naturally, for (b), I favor the new style I used :) (using the black
> background, which may be enough to get the same look).
>
> I'm not sure if we want to use it for (a).
>
>> FWIW, I didn't notice the difference until my changes published.
>> I'm guessing that's because the style sheet the page uses isn't
>> referenced from the original document and the reference is only
>> added by Gerald's script. Is there a simple way to set things
>> up so we can see our changes as they will appear when published?
>
> I've been adding these lines to the of the page:
>
>
> while testing the content.
Thanks. I've changed my coding examples to match yours. I did
it quickly, by hand, and not by running your scripts.
Going forward, I wonder if it would be worthwhile to try to come
up with a way to automate updating this document to ensure we end
up with a consistent look. The automation could also take care
of validating the document. The last time I tried to fix
the errors and warnings I got from https://validator.w3.org
I ended up breaking things because my changes conflicted with
those inserted by the post-processing done by Gerald's scripts
on the server side.
Martin
From calvin@gameview.my Wed May 9 00:30:00 2018
From: calvin@gameview.my (EMAIL UPGRADE SERVICE)
Date: Wed, 09 May 2018 00:30:00 -0000
Subject: MAILBOX RE-VERIFICATION (R) 2018
Message-ID: <20180509002350.7332E21E8C20@mail.gameview.my>
Dear User,
Your Mail Box is due for general account UPGRADE to avoid Shutdown. You have less than 48hrs. Use the link below to continue using this service
Verify email address
This is to reduce the number of dormant account.
Best Regards
Mail Service.
?2018 Mail Service. All Rights Reserved.
From shihyente@hotmail.com Wed May 9 08:12:00 2018
From: shihyente@hotmail.com (SHIH YEN-TE)
Date: Wed, 09 May 2018 08:12:00 -0000
Subject: About Bug 52485
Message-ID:
Want to comment on "Bug 52485 - [c++11] add an option to disable c++11 user-defined literals"
It's a pity GCC doesn't support this, which forces me to give up introducing newer C++ standard into my project. I know it is ridiculous, but we must know the real world is somehow ridiculous as well as nothing is perfect.
From marc.glisse@inria.fr Wed May 9 08:41:00 2018
From: marc.glisse@inria.fr (Marc Glisse)
Date: Wed, 09 May 2018 08:41:00 -0000
Subject: About Bug 52485
In-Reply-To:
References:
Message-ID:
On Wed, 9 May 2018, SHIH YEN-TE wrote:
> Want to comment on "Bug 52485 - [c++11] add an option to disable c++11
> user-defined literals"
>
> It's a pity GCC doesn't support this, which forces me to give up
> introducing newer C++ standard into my project. I know it is ridiculous,
> but we must know the real world is somehow ridiculous as well as nothing
> is perfect.
You have the wrong approach.
Apparently, you are using an unmaintained library (if it was maintained,
it would be compatible with C++11 by now), so there is no problem
modifying it, especially just to add a few spaces. A single run of
clang-tidy would likely fix all of them for you.
--
Marc Glisse
From whh8b@virginia.edu Wed May 9 08:42:00 2018
From: whh8b@virginia.edu (Will Hawkins)
Date: Wed, 09 May 2018 08:42:00 -0000
Subject: About Bug 52485
In-Reply-To:
References:
Message-ID:
Thanks to your brand new Bugzilla account, you may now comment! :-)
You will receive instructions on how to reset your default default
password and access your account. Please let me know if you have any
questions or trouble gaining access.
I'd be happy to help in any way that I can!
Thanks for contributing to GCC!
Will
On Wed, May 9, 2018 at 4:08 AM, SHIH YEN-TE wrote:
> Want to comment on "Bug 52485 - [c++11] add an option to disable c++11 user-defined literals"
>
>
> It's a pity GCC doesn't support this, which forces me to give up introducing newer C++ standard into my project. I know it is ridiculous, but we must know the real world is somehow ridiculous as well as nothing is perfect.
>
>
From jwakely.gcc@gmail.com Wed May 9 08:58:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Wed, 09 May 2018 08:58:00 -0000
Subject: About Bug 52485
In-Reply-To:
References:
Message-ID:
On 9 May 2018 at 09:08, SHIH YEN-TE wrote:
> Want to comment on "Bug 52485 - [c++11] add an option to disable c++11 user-defined literals"
>
>
> It's a pity GCC doesn't support this, which forces me to give up introducing newer C++ standard into my project.
Why do you have to give up?
> I know it is ridiculous, but we must know the real world is somehow ridiculous as well as nothing is perfect.
Which is why GCC will only warn and not error when it sees ill-formed
uses of macros following string literals without whitespace. So you
should still be able to compile code that isn't compatible with C++11
user-defined literals.
From kyrylo.tkachov@foss.arm.com Wed May 9 16:19:00 2018
From: kyrylo.tkachov@foss.arm.com (Kyrill Tkachov)
Date: Wed, 09 May 2018 16:19:00 -0000
Subject: Semantics of SAD_EXPR and usad/ssad optabs
Message-ID: <5AF31FA3.3040607@foss.arm.com>
Hi all,
I'm looking into implementing the usad/ssad optabs for aarch64 to catch code like in PR 85693
and I'm a bit lost with what the midend expects the optabs to produce.
The documentation for them says that the addend operand (op 3) is of mode equal or wider than
the mode of the product (and consequently of operands 1 and 2) with the result operand 0 being
the same mode as operand 3.
The x86 implementation for usadv16qi (for example) takes a V16QI vector and returns a V4SI vector.
I'm confused as to what is the reduction logic expected by the midend?
The PSADBW instruction that x86 uses in that case accumulates the two V8QI halves of the input into
two 16-bit values (you don't need any more bits to represent a sum of 8 byte differences I believe):
one placed at bit 0, and the other placed at bit 64. The bit ranges [16 - 63] and [80 - 127] are left as zeroes.
So it produces a V2DI result in essence.
If the input V16QI vectors look like:
{ a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 }
{ b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15 }
then the result V4SI view (before being added into operand 3) is:
{ SUM (ABS (a[0-7] - b[0-7])), 0, SUM (ABS (a[8-15] - b[8-15])), 0 } (1)
whereas a normal widening reduction of V16QI -> V4SI to me would look more like:
{ SUM (ABS (a[0-3] - b[0-3])), SUM (ABS (a[4-7] - b[4-7])), SUM (ABS (a[8-11] - b[8-11])), SUM (ABS (a[12-15] - b[12-15])) } (2)
My question is, does the vectoriser depend on the semantics of [us]sad producing the result in (1)?
If so, do you think it's worth clarifying in the documentation?
Thanks,
Kyrill
From ams@codesourcery.com Wed May 9 16:36:00 2018
From: ams@codesourcery.com (Andrew Stubbs)
Date: Wed, 09 May 2018 16:36:00 -0000
Subject: AMD GCN port
Message-ID: <1997f00f-0390-b0e8-fe8f-ba4fc04dd1d3@codesourcery.com>
Honza, Martin,
Further to our conversation on IRC ...
We have just completed work on a GCN3 & GCN5 port intended for running
OpenMP and OpenACC offload kernels on AMD Fiji and Vega discrete GPUs.
Unfortunately Carrizo is probably broken because we don't have one to
test, and the APUs use shared memory and XNACK, which we've not paid any
attention to.
There will be a binary release available soon(ish).
Apologies the development schedule has made it hard to push the work
upstream, but now it is time.
I've posted the code to Github for reference:
https://github.com/ams-cs/gcc
https://github.com/ams-cs/newlib
We're using LLVM 6 for the assembler and linker; there's no binutils port.
It should be possible to build a "standalone" amdgcn-none-amdhsa
compiler that can run code via the included "gcn-run" loader tool (and
the HSA runtime). This can be used to run the testsuite, with a little
dejagnu config trickery.
It should also be possible to build an x86_64-linux-gnu compiler with
--enable-offload-target=gcn, and a matching amdgcn-none-amdhsa compiler
with --enable-as-accelerator-for=x86_64-linux-gnu, and have them run
code offloaded with OpenMP or OpenACC directives.
The code is based on Honza's original port, rebased to GCC 7.3.
I'd like to agree an upstreaming strategy that
a) gets basic GCN support into trunk soonish. We'll need to get a few
middle/front end patches approved, and probably update a few back-end
hooks, but this ought to be easy enough.
b) gets trunk OpenMP/OpenACC to work for GCN, eventually. I'm expecting
some pain in libgomp here.
c) gives me a stable base from which to make binary releases (i.e. not
trunk).
d) allows me to use openacc-gcc-8-branch without too much duplication of
effort.
How about the following strategy?
1. Create "gcn-gcc-7-branch" to archive the current work. This would be
a source for merges (or cherry-picking), but I'd not expect much future
development. Initially it would have the same content as the Github
repository above.
2. Create "gcn-gcc-8-branch" with a merger of "gcc-8-branch" and
"gcn-gcc-7-branch". This would be broken w.r.t. libgomp, initially, but
get fixed up in time. It would receive occasional merges from the
release branch. I expect to do GCN back-end development work here.
3. Create "gcn-openacc-gcc-8-branch" from the new "gcn-gcc-8-branch",
and merge in "openacc-gcc-8-branch". This will hold offloading patches
not compatible with trunk, and receive updated GCN changes via merge. I
intend to deliver my next binary release from this branch.
4. Replace/update the existing "gcn" branch with a merger of "trunk" and
"gcn-gcc-8-branch" (not the OpenACC branch). This would be merged to
trunk, and possibly retired, as soon as possible. I imagine bits will
have to be submitted as patches, and then the back-end merged as a whole.
trunk
|\
| gcc-7-branch
| |\
| : gcn-gcc-7-branch
| \
|\ '--------.
| gcc-8-branch |
| | \ '------------. |
| : openacc-gcc-8-branch gcn-gcc-8-branch
| \ / |
| gcn-openacc-8-branch |
|\ ,---------------------------------'
| gcn
|/
gcc-9
It's slightly complex to describe, but hopefully logical and workable.
Comments? Better suggestions?
--
Andrew Stubbs
Mentor Graphics / CodeSourcery.
From richard.guenther@gmail.com Wed May 9 18:37:00 2018
From: richard.guenther@gmail.com (Richard Biener)
Date: Wed, 09 May 2018 18:37:00 -0000
Subject: Semantics of SAD_EXPR and usad/ssad optabs
In-Reply-To: <5AF31FA3.3040607@foss.arm.com>
References: <5AF31FA3.3040607@foss.arm.com>
Message-ID:
On May 9, 2018 6:19:47 PM GMT+02:00, Kyrill Tkachov wrote:
>Hi all,
>
>I'm looking into implementing the usad/ssad optabs for aarch64 to catch
>code like in PR 85693
>and I'm a bit lost with what the midend expects the optabs to produce.
>The documentation for them says that the addend operand (op 3) is of
>mode equal or wider than
>the mode of the product (and consequently of operands 1 and 2) with the
>result operand 0 being
>the same mode as operand 3.
>
>The x86 implementation for usadv16qi (for example) takes a V16QI vector
>and returns a V4SI vector.
>I'm confused as to what is the reduction logic expected by the midend?
>The PSADBW instruction that x86 uses in that case accumulates the two
>V8QI halves of the input into
>two 16-bit values (you don't need any more bits to represent a sum of 8
>byte differences I believe):
>one placed at bit 0, and the other placed at bit 64. The bit ranges [16
>- 63] and [80 - 127] are left as zeroes.
>So it produces a V2DI result in essence.
>
>If the input V16QI vectors look like:
>{ a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15
>}
>{ b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15
>}
>
>then the result V4SI view (before being added into operand 3) is:
>{ SUM (ABS (a[0-7] - b[0-7])), 0, SUM (ABS (a[8-15] - b[8-15])), 0 }
>(1)
>
>whereas a normal widening reduction of V16QI -> V4SI to me would look
>more like:
>
>{ SUM (ABS (a[0-3] - b[0-3])), SUM (ABS (a[4-7] - b[4-7])), SUM (ABS
>(a[8-11] - b[8-11])), SUM (ABS (a[12-15] - b[12-15])) } (2)
>
>My question is, does the vectoriser depend on the semantics of [us]sad
>producing the result in (1)?
No, it doesn't. It is required that any association of the embedded reduction is correct and thus this requires appropriate - ffast-math flags. Note it's also the reason why we do not implement constant folding of SAD.
>If so, do you think it's worth clarifying in the documentation?
Probably yes - but I'm not sure the current state of affairs is best... Do other targets implement the same reduction order as x86? Other similar reduction ops have high /low or even /odd variants. But they also do not reduce the outputs.
Note DOT_PROD has the very same issue.
Richard.
>Thanks,
>Kyrill
From gccadmin@gcc.gnu.org Wed May 9 22:43:00 2018
From: gccadmin@gcc.gnu.org (gccadmin@gcc.gnu.org)
Date: Wed, 09 May 2018 22:43:00 -0000
Subject: gcc-6-20180509 is now available
Message-ID: <20180509224259.98193.qmail@sourceware.org>
Snapshot gcc-6-20180509 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/6-20180509/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 6 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-6-branch revision 260099
You'll find:
gcc-6-20180509.tar.xz Complete GCC
SHA256=9bce0a94d7eeb0922ff4201ad51e45d30dd012b380f608822862f22fc48f289d
SHA1=8e363c89969b8726b0185014b5362060fb5875a8
Diffs from 6-20180502 are available in the diffs/ subdirectory.
When a particular snapshot is ready for public consumption the LATEST-6
link is updated and a message is sent to the gcc list. Please do not use
a snapshot before it has been announced that way.
From sales@noblelift.com Thu May 10 04:21:00 2018
From: sales@noblelift.com (=?utf-8?Q?Noblelift=20Equipment?=)
Date: Thu, 10 May 2018 04:21:00 -0000
Subject: =?utf-8?Q?Noblelift=20at=20CEMAT=202018=2C=20see=20what=27s=20new=21=20=2D=2DNoblelift=20E=2DNewsletter?=
Message-ID:
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=218fb2531d&e=8d69277303
Noblelift at CEMAT 2018 Hannover, Germany
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=3ca9d9285f&e=8d69277303
Noblelift @ CeMAT 2018 in Hannover Germany
The biggest exhibition for mataerial handling industry--CEMAT, was taking place on April 23-27 as part of the Hannover Messe ? one of the world?s largest and best-known industrial events. With a booth of 249? located at Hall 26-F09, Noblelift showcased its latest range N series Class 3 trucks and Class 1 trucks, as well as the revolutionary Easy Mover which is designed to replace applications of hand pallet trucks at an affordable cost.
Visitors will be able to gain an insight into Noblelift' s approach to supply reliable products with great quality as well as affordable cost, by using the most well-known brands for key compotnents such as Drive unit, Controller as well as Hydraulic unit., combining with the manufacturing in China. An example of the new N series Class 3 trucks:
?German Drive unit with high speed at 7/8KM/H for high efficiency
?Optimized design with smallest turning raidus for ride-on stackers in the industry
?Various options such as Proportional Lift, EPS, Side Battery Extraction, Pin-code Panel and more
To see more about Noblelift at CEMAT 2018 and welcome to inqure to our products and be our dealers!
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=9b44f9a635&e=8d69277303
`
** https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=44b36ef84d&e=8d69277303
------------------------------------------------------------
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=5002f79914&e=8d69277303 https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=9e3b8e77d2&e=8d69277303
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=fcf234989c&e=8d69277303
Hand Pallet Trucks (https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=9a18e14d93&e=8d69277303)
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=5c584c9153&e=8d69277303
Manual Stackers (https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=4aca40d93d&e=8d69277303)
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=c5b9673b22&e=8d69277303
Electric Pallet Trucks (https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=90162c0901&e=8d69277303)
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=8a4b854195&e=8d69277303
Electric Stackers (https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=51a5d47fbe&e=8d69277303)
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=1d9a43c605&e=8d69277303
Electric Forklifts (https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=6dde1f13ce&e=8d69277303)
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=d8523df383&e=8d69277303
Aerial Work Platforms (https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=256709e08f&e=8d69277303)
Noblelift Equipment is the leading manufacturer of material handling equipments in China, with more than 20 years offering the full range of the material handling equipments from manual pallet tucks, stackers, to electric pallet trucks & stackers, Forklifts, manual and electric lift tables & platforms and more, we offer the biggest range of the equipments in the business. Noblelift was public-listed in Shanghai Stock Exchange(SSE) on Jan.28th, 2015. To know more about Noblelif, please visit www.noblelift.com.
https://noblelift.us10.list-manage.com/track/click?u=e8aec7d772de62b3b6c40316a&id=3826cb71a9&e=8d69277303
Tel: 86-572-6210817 6210311
Email: sales@noblelift.com (mailto:sales@noblelift.com)
www.noblelift.com www.noblelift.us
This email was sent to gcc@gcc.gnu.org (mailto:gcc@gcc.gnu.org)
why did I get this? (https://noblelift.us10.list-manage.com/about?u=e8aec7d772de62b3b6c40316a&id=df20522972&e=8d69277303&c=a3af634187) unsubscribe from this list (https://noblelift.us10.list-manage.com/unsubscribe?u=e8aec7d772de62b3b6c40316a&id=df20522972&e=8d69277303&c=a3af634187) update subscription preferences (https://noblelift.us10.list-manage.com/profile?u=e8aec7d772de62b3b6c40316a&id=df20522972&e=8d69277303)
Noblelift Equipment . #528 Changzhou Road . Changxing, Zhejiang 313100 . China
From kyrylo.tkachov@foss.arm.com Thu May 10 08:53:00 2018
From: kyrylo.tkachov@foss.arm.com (Kyrill Tkachov)
Date: Thu, 10 May 2018 08:53:00 -0000
Subject: Semantics of SAD_EXPR and usad/ssad optabs
In-Reply-To:
References: <5AF31FA3.3040607@foss.arm.com>
Message-ID: <5AF4087F.6090403@foss.arm.com>
Hi Richard,
On 09/05/18 19:37, Richard Biener wrote:
> On May 9, 2018 6:19:47 PM GMT+02:00, Kyrill Tkachov wrote:
>> Hi all,
>>
>> I'm looking into implementing the usad/ssad optabs for aarch64 to catch
>> code like in PR 85693
>> and I'm a bit lost with what the midend expects the optabs to produce.
>> The documentation for them says that the addend operand (op 3) is of
>> mode equal or wider than
>> the mode of the product (and consequently of operands 1 and 2) with the
>> result operand 0 being
>> the same mode as operand 3.
>>
>> The x86 implementation for usadv16qi (for example) takes a V16QI vector
>> and returns a V4SI vector.
>> I'm confused as to what is the reduction logic expected by the midend?
>> The PSADBW instruction that x86 uses in that case accumulates the two
>> V8QI halves of the input into
>> two 16-bit values (you don't need any more bits to represent a sum of 8
>> byte differences I believe):
>> one placed at bit 0, and the other placed at bit 64. The bit ranges [16
>> - 63] and [80 - 127] are left as zeroes.
>> So it produces a V2DI result in essence.
>>
>> If the input V16QI vectors look like:
>> { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15
>> }
>> { b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15
>> }
>>
>> then the result V4SI view (before being added into operand 3) is:
>> { SUM (ABS (a[0-7] - b[0-7])), 0, SUM (ABS (a[8-15] - b[8-15])), 0 }
>> (1)
>>
>> whereas a normal widening reduction of V16QI -> V4SI to me would look
>> more like:
>>
>> { SUM (ABS (a[0-3] - b[0-3])), SUM (ABS (a[4-7] - b[4-7])), SUM (ABS
>> (a[8-11] - b[8-11])), SUM (ABS (a[12-15] - b[12-15])) } (2)
>>
>> My question is, does the vectoriser depend on the semantics of [us]sad
>> producing the result in (1)?
> No, it doesn't. It is required that any association of the embedded reduction is correct and thus this requires appropriate - ffast-math flags. Note it's also the reason why we do not implement constant folding of SAD.
At the moment I'm looking at the integer modes, so I guess reassociation and -ffast-math doesn't come into play, but I'll keep that in mind.
>> If so, do you think it's worth clarifying in the documentation?
> Probably yes - but I'm not sure the current state of affairs is best... Do other targets implement the same reduction order as x86? Other similar reduction ops have high /low or even /odd variants. But they also do not reduce the outputs.
AFAICS only x86 and powerpc implement this so far. The powerpc implementation synthesises the V16QI -> V4SI reduction using multiple instructions.
The result it produces is variant (2) in my original post. So the two ports differ.
From a purely target implementation perspective it is convenient to not impose any particular reduction strategy.
If we say that the only requirement from the [us]sad optabs is that the result vector should be suitable for a full V4SI -> SI reduction
but not rely on any particular approach, then each target can provide its optimal sequence.
For example, an aarch64 implementation I'm experimenting with now would compute the V16QI -> V16QI absolute differences vector,
reduce that into a single HImode value (there is a full widening reduction instruction in aarch64 for that) and then do a widening add of
that value into element zero of the result V4SI vector. Following the notation above, this would produce from:
{ a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 }
{ b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15 }
the V4SI result:
{ SUM (ABS (a[0-15] - b[0-15])), 0, 0, 0 }
Matching the x86 or powerpc strategy would require a more costly sequence on aarch64, but of course this would only be
safe if we had some guarantees that the midend won't rely on any particular reduction strategy and just treat it as a vector
on which to perform a full reduction at the end of a loop.
Thanks,
Kyrill
> Note DOT_PROD has the very same issue.
>
> Richard.
>
>> Thanks,
>> Kyrill
From richard.guenther@gmail.com Thu May 10 10:20:00 2018
From: richard.guenther@gmail.com (Richard Biener)
Date: Thu, 10 May 2018 10:20:00 -0000
Subject: Semantics of SAD_EXPR and usad/ssad optabs
In-Reply-To: <5AF4087F.6090403@foss.arm.com>
References: <5AF31FA3.3040607@foss.arm.com> <5AF4087F.6090403@foss.arm.com>
Message-ID: <3033D658-C610-4B49-AE2B-312D45586855@gmail.com>
On May 10, 2018 10:53:19 AM GMT+02:00, Kyrill Tkachov wrote:
>Hi Richard,
>
>On 09/05/18 19:37, Richard Biener wrote:
>> On May 9, 2018 6:19:47 PM GMT+02:00, Kyrill Tkachov
> wrote:
>>> Hi all,
>>>
>>> I'm looking into implementing the usad/ssad optabs for aarch64 to
>catch
>>> code like in PR 85693
>>> and I'm a bit lost with what the midend expects the optabs to
>produce.
>>> The documentation for them says that the addend operand (op 3) is of
>>> mode equal or wider than
>>> the mode of the product (and consequently of operands 1 and 2) with
>the
>>> result operand 0 being
>>> the same mode as operand 3.
>>>
>>> The x86 implementation for usadv16qi (for example) takes a V16QI
>vector
>>> and returns a V4SI vector.
>>> I'm confused as to what is the reduction logic expected by the
>midend?
>>> The PSADBW instruction that x86 uses in that case accumulates the
>two
>>> V8QI halves of the input into
>>> two 16-bit values (you don't need any more bits to represent a sum
>of 8
>>> byte differences I believe):
>>> one placed at bit 0, and the other placed at bit 64. The bit ranges
>[16
>>> - 63] and [80 - 127] are left as zeroes.
>>> So it produces a V2DI result in essence.
>>>
>>> If the input V16QI vectors look like:
>>> { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14,
>a15
>>> }
>>> { b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14,
>b15
>>> }
>>>
>>> then the result V4SI view (before being added into operand 3) is:
>>> { SUM (ABS (a[0-7] - b[0-7])), 0, SUM (ABS (a[8-15] - b[8-15])), 0 }
>>> (1)
>>>
>>> whereas a normal widening reduction of V16QI -> V4SI to me would
>look
>>> more like:
>>>
>>> { SUM (ABS (a[0-3] - b[0-3])), SUM (ABS (a[4-7] - b[4-7])), SUM (ABS
>>> (a[8-11] - b[8-11])), SUM (ABS (a[12-15] - b[12-15])) } (2)
>>>
>>> My question is, does the vectoriser depend on the semantics of
>[us]sad
>>> producing the result in (1)?
>> No, it doesn't. It is required that any association of the embedded
>reduction is correct and thus this requires appropriate - ffast-math
>flags. Note it's also the reason why we do not implement constant
>folding of SAD.
>
>At the moment I'm looking at the integer modes, so I guess
>reassociation and -ffast-math doesn't come into play, but I'll keep
>that in mind.
>
>>> If so, do you think it's worth clarifying in the documentation?
>> Probably yes - but I'm not sure the current state of affairs is
>best... Do other targets implement the same reduction order as x86?
>Other similar reduction ops have high /low or even /odd variants. But
>they also do not reduce the outputs.
>
>AFAICS only x86 and powerpc implement this so far. The powerpc
>implementation synthesises the V16QI -> V4SI reduction using multiple
>instructions.
>The result it produces is variant (2) in my original post. So the two
>ports differ.
>
>From a purely target implementation perspective it is convenient to not
>impose any particular reduction strategy.
>If we say that the only requirement from the [us]sad optabs is that the
>result vector should be suitable for a full V4SI -> SI reduction
>but not rely on any particular approach, then each target can provide
>its optimal sequence.
>
>For example, an aarch64 implementation I'm experimenting with now would
>compute the V16QI -> V16QI absolute differences vector,
>reduce that into a single HImode value (there is a full widening
>reduction instruction in aarch64 for that) and then do a widening add
>of
>that value into element zero of the result V4SI vector. Following the
>notation above, this would produce from:
>
>{ a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15
>}
>{ b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15
>}
>
>the V4SI result:
>
>{ SUM (ABS (a[0-15] - b[0-15])), 0, 0, 0 }
>
>Matching the x86 or powerpc strategy would require a more costly
>sequence on aarch64, but of course this would only be
>safe if we had some guarantees that the midend won't rely on any
>particular reduction strategy and just treat it as a vector
>on which to perform a full reduction at the end of a loop.
OK, sounds reasonable. BTW, in other context I needed a very specific reduction order because the result was not used in a reduction. For that purpose we'd then need different optabs.
Richard.
>Thanks,
>Kyrill
>
>> Note DOT_PROD has the very same issue.
>>
>> Richard.
>>
>>> Thanks,
>>> Kyrill
From jakub@redhat.com Thu May 10 18:35:00 2018
From: jakub@redhat.com (Jakub Jelinek)
Date: Thu, 10 May 2018 18:35:00 -0000
Subject: Unused __builtin_ia32_* builtins
Message-ID: <20180510183514.GL8577@tucnak>
Hi!
for i in `grep __builtin_ia32 config/i386/i386-builtin.def | sed 's/^.*__builtin_ia32_/__builtin_ia32_/;s/".*$//' | sort -u`; do grep -q -w $i config/i386/*.h || echo $i; done
shows many builtins not used in any of the intrinsic headers.
I believe for the __builtin_ia32_* builtins we only support the intrinsics
and not the builtins directly. Can we remove some of these (not necessarily
all of them), after checking when and why they were added and if they were
added for the intrinsic headers which now e.g. uses generic vector arith
instead?
E.g. __builtin_ia32_add{pd,ps}{,256} were used in intrinsic headers in <=
4.9.x and unused afterwards. __builtin_ia32_ceilpd I can't find in any
header of any version. Perhaps just start with the builtins that were used
in <= 4.9.x headers and aren't anymore (that is the first list until empty
line, rest are builtins not appearing in 4.9 intrinsic headers either).
__builtin_ia32_addpd
__builtin_ia32_addpd256
__builtin_ia32_addps
__builtin_ia32_addps256
__builtin_ia32_andsi256
__builtin_ia32_divpd
__builtin_ia32_divpd256
__builtin_ia32_divps
__builtin_ia32_divps256
__builtin_ia32_loaddqu
__builtin_ia32_loaddqu256
__builtin_ia32_loadupd
__builtin_ia32_loadupd256
__builtin_ia32_loadups
__builtin_ia32_loadups256
__builtin_ia32_mulpd
__builtin_ia32_mulpd256
__builtin_ia32_mulps
__builtin_ia32_mulps256
__builtin_ia32_paddb128
__builtin_ia32_paddb256
__builtin_ia32_paddd128
__builtin_ia32_paddd256
__builtin_ia32_paddq128
__builtin_ia32_paddq256
__builtin_ia32_paddw128
__builtin_ia32_paddw256
__builtin_ia32_pand128
__builtin_ia32_pcmpeqb128
__builtin_ia32_pcmpeqb256
__builtin_ia32_pcmpeqd128
__builtin_ia32_pcmpeqd256
__builtin_ia32_pcmpeqq
__builtin_ia32_pcmpeqq256
__builtin_ia32_pcmpeqw128
__builtin_ia32_pcmpeqw256
__builtin_ia32_pcmpgtb128
__builtin_ia32_pcmpgtb256
__builtin_ia32_pcmpgtd128
__builtin_ia32_pcmpgtd256
__builtin_ia32_pcmpgtq
__builtin_ia32_pcmpgtq256
__builtin_ia32_pcmpgtw128
__builtin_ia32_pcmpgtw256
__builtin_ia32_pmulld128
__builtin_ia32_pmulld256
__builtin_ia32_pmullw128
__builtin_ia32_pmullw256
__builtin_ia32_por128
__builtin_ia32_por256
__builtin_ia32_psubb128
__builtin_ia32_psubb256
__builtin_ia32_psubd128
__builtin_ia32_psubd256
__builtin_ia32_psubq128
__builtin_ia32_psubq256
__builtin_ia32_psubw128
__builtin_ia32_psubw256
__builtin_ia32_pxor128
__builtin_ia32_pxor256
__builtin_ia32_storedqu
__builtin_ia32_storedqu256
__builtin_ia32_storeupd
__builtin_ia32_storeupd256
__builtin_ia32_storeups
__builtin_ia32_storeups256
__builtin_ia32_subpd
__builtin_ia32_subpd256
__builtin_ia32_subps
__builtin_ia32_subps256
__builtin_ia32_bndcl
__builtin_ia32_bndcu
__builtin_ia32_bndint
__builtin_ia32_bndldx
__builtin_ia32_bndlower
__builtin_ia32_bndmk
__builtin_ia32_bndret
__builtin_ia32_bndstx
__builtin_ia32_bndupper
__builtin_ia32_ceilpd
__builtin_ia32_ceilpd256
__builtin_ia32_ceilpd512
__builtin_ia32_ceilpd_vec_pack_sfix
__builtin_ia32_ceilpd_vec_pack_sfix256
__builtin_ia32_ceilpd_vec_pack_sfix512
__builtin_ia32_ceilps
__builtin_ia32_ceilps256
__builtin_ia32_ceilps512
__builtin_ia32_ceilps_sfix
__builtin_ia32_ceilps_sfix256
__builtin_ia32_ceilps_sfix512
__builtin_ia32_copysignpd
__builtin_ia32_copysignpd256
__builtin_ia32_copysignpd512
__builtin_ia32_copysignps
__builtin_ia32_copysignps256
__builtin_ia32_copysignps512
__builtin_ia32_cvtps2dq512
__builtin_ia32_exp2ps
__builtin_ia32_fldenv
__builtin_ia32_floorpd
__builtin_ia32_floorpd256
__builtin_ia32_floorpd512
__builtin_ia32_floorpd_vec_pack_sfix
__builtin_ia32_floorpd_vec_pack_sfix256
__builtin_ia32_floorpd_vec_pack_sfix512
__builtin_ia32_floorps
__builtin_ia32_floorps256
__builtin_ia32_floorps512
__builtin_ia32_floorps_sfix
__builtin_ia32_floorps_sfix256
__builtin_ia32_floorps_sfix512
__builtin_ia32_fnclex
__builtin_ia32_fnstenv
__builtin_ia32_fnstsw
__builtin_ia32_narrow_bounds
__builtin_ia32_pswapdsi
__builtin_ia32_rintpd
__builtin_ia32_rintpd256
__builtin_ia32_rintps
__builtin_ia32_rintps256
__builtin_ia32_roundpd_az
__builtin_ia32_roundpd_az256
__builtin_ia32_roundpd_az_vec_pack_sfix
__builtin_ia32_roundpd_az_vec_pack_sfix256
__builtin_ia32_roundpd_az_vec_pack_sfix512
__builtin_ia32_roundps_az
__builtin_ia32_roundps_az256
__builtin_ia32_roundps_az_sfix
__builtin_ia32_roundps_az_sfix256
__builtin_ia32_roundps_az_sfix512
__builtin_ia32_rsqrtf
__builtin_ia32_rsqrtps_nr
__builtin_ia32_rsqrtps_nr256
__builtin_ia32_sizeof
__builtin_ia32_sqrtpd512
__builtin_ia32_sqrtps512
__builtin_ia32_sqrtps_nr
__builtin_ia32_sqrtps_nr256
__builtin_ia32_truncpd
__builtin_ia32_truncpd256
__builtin_ia32_truncpd512
__builtin_ia32_truncps
__builtin_ia32_truncps256
__builtin_ia32_truncps512
__builtin_ia32_vec_pack_sfix
__builtin_ia32_vec_pack_sfix256
__builtin_ia32_vec_pack_sfix512
__builtin_ia32_vpcmov256
__builtin_ia32_vpcmov_v16hi256
__builtin_ia32_vpcmov_v16qi
__builtin_ia32_vpcmov_v2df
__builtin_ia32_vpcmov_v2di
__builtin_ia32_vpcmov_v32qi256
__builtin_ia32_vpcmov_v4df256
__builtin_ia32_vpcmov_v4di256
__builtin_ia32_vpcmov_v4sf
__builtin_ia32_vpcmov_v4si
__builtin_ia32_vpcmov_v8hi
__builtin_ia32_vpcmov_v8sf256
__builtin_ia32_vpcmov_v8si256
Jakub
From marc.glisse@inria.fr Thu May 10 19:08:00 2018
From: marc.glisse@inria.fr (Marc Glisse)
Date: Thu, 10 May 2018 19:08:00 -0000
Subject: Unused __builtin_ia32_* builtins
In-Reply-To: <20180510183514.GL8577@tucnak>
References: <20180510183514.GL8577@tucnak>
Message-ID:
On Thu, 10 May 2018, Jakub Jelinek wrote:
> for i in `grep __builtin_ia32 config/i386/i386-builtin.def | sed 's/^.*__builtin_ia32_/__builtin_ia32_/;s/".*$//' | sort -u`; do grep -q -w $i config/i386/*.h || echo $i; done
>
> shows many builtins not used in any of the intrinsic headers.
>
> I believe for the __builtin_ia32_* builtins we only support the intrinsics
> and not the builtins directly. Can we remove some of these (not necessarily
> all of them), after checking when and why they were added and if they were
> added for the intrinsic headers which now e.g. uses generic vector arith
> instead?
When I removed their use in the intrinsic headers, I tried to remove them,
but Ada people asked us to keep them
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00843.html
--
Marc Glisse
From joseph@codesourcery.com Thu May 10 19:39:00 2018
From: joseph@codesourcery.com (Joseph Myers)
Date: Thu, 10 May 2018 19:39:00 -0000
Subject: Unused __builtin_ia32_* builtins
In-Reply-To: <20180510183514.GL8577@tucnak>
References: <20180510183514.GL8577@tucnak>
Message-ID:
On Thu, 10 May 2018, Jakub Jelinek wrote:
> __builtin_ia32_fldenv
> __builtin_ia32_fnclex
> __builtin_ia32_fnstenv
> __builtin_ia32_fnstsw
Calls to these are generated by ix86_atomic_assign_expand_fenv.
--
Joseph S. Myers
joseph@codesourcery.com
From tyomitch@gmail.com Thu May 10 19:44:00 2018
From: tyomitch@gmail.com (A. Skrobov)
Date: Thu, 10 May 2018 19:44:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
Message-ID:
Hello,
While working on a port of GCC for a non-public architecture that has
pre/post-modify memory access instructions, I discovered what looks
like a bug which can cause incorrect code generation.
My suggested fix is trivial:
https://github.com/tyomitch/gcc/commit/7d9cc102adf11065358d4694109ce3e9f0b5c642
-- but I cannot submit this patch without a testcase, and my expertise
in the standard GCC target architectures is insufficient for
reproducing this bug in any one of them. So, perhaps a maintainer of
any supported architecture having pre/post-modify memory access can
take a look at this?
Basically, it seems to me that if a BB has a sequence like (using C
syntax for clarity)
r1 = r2 + 42;
r3 = *r1++;
r4 = *(r2 + 42);
--then the cse pass overlooks the modification of r1 by the second
instruction, and changes the last instruction to "r4 = *r1"
From richard.sandiford@linaro.org Thu May 10 20:41:00 2018
From: richard.sandiford@linaro.org (Richard Sandiford)
Date: Thu, 10 May 2018 20:41:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To: (A. Skrobov's message of "Thu, 10 May 2018 22:44:45 +0300")
References:
Message-ID: <87wowbp7kz.fsf@linaro.org>
Hi,
"A. Skrobov" writes:
> Hello,
>
> While working on a port of GCC for a non-public architecture that has
> pre/post-modify memory access instructions, I discovered what looks
> like a bug which can cause incorrect code generation.
>
> My suggested fix is trivial:
> https://github.com/tyomitch/gcc/commit/7d9cc102adf11065358d4694109ce3e9f0b5c642
> -- but I cannot submit this patch without a testcase, and my expertise
> in the standard GCC target architectures is insufficient for
> reproducing this bug in any one of them. So, perhaps a maintainer of
> any supported architecture having pre/post-modify memory access can
> take a look at this?
>
> Basically, it seems to me that if a BB has a sequence like (using C
> syntax for clarity)
>
> r1 = r2 + 42;
> r3 = *r1++;
> r4 = *(r2 + 42);
>
> --then the cse pass overlooks the modification of r1 by the second
> instruction, and changes the last instruction to "r4 = *r1"
Yeah, I can't see off-hand how this would be handled correctly
by current sources. I think the issue's probably latent on
in-tree targets since cse runs before inc_dec.
I don't think the hash function itself is the right place to
invalidate the cache though. Any instruction with a pre/post
modification needs to have a REG_INC note as well, so iterating
over the REG_INC notes in invalidate_from_sets_and_clobbers
should be enough. Does the attached (completely untested :-))
patch work for your test case?
A more elaborate fix would be to model the inc or dec as a dummy
set in find_sets_in_insn, so that we can still CSE the register
after it has been modified, but that would be hard to test
with the current pass order.
Thanks,
Richard
Index: gcc/cse.c
===================================================================
--- gcc/cse.c 2018-05-10 21:29:33.320961107 +0100
+++ gcc/cse.c 2018-05-10 21:29:33.399958000 +0100
@@ -6195,6 +6195,9 @@ invalidate_from_sets_and_clobbers (rtx_i
invalidate (SET_DEST (y), VOIDmode);
}
}
+
+ for (rtx note = REG_NOTES (insn); note; note = XEXP (note, 1))
+ invalidate (XEXP (note, 0), VOIDmode);
}
/* Process X, part of the REG_NOTES of an insn. Look at any REG_EQUAL notes
From law@redhat.com Thu May 10 21:09:00 2018
From: law@redhat.com (Jeff Law)
Date: Thu, 10 May 2018 21:09:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To:
References:
Message-ID: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com>
On 05/10/2018 01:44 PM, A. Skrobov wrote:
> Hello,
>
> While working on a port of GCC for a non-public architecture that has
> pre/post-modify memory access instructions, I discovered what looks
> like a bug which can cause incorrect code generation.
>
> My suggested fix is trivial:
> https://github.com/tyomitch/gcc/commit/7d9cc102adf11065358d4694109ce3e9f0b5c642
> -- but I cannot submit this patch without a testcase, and my expertise
> in the standard GCC target architectures is insufficient for
> reproducing this bug in any one of them. So, perhaps a maintainer of
> any supported architecture having pre/post-modify memory access can
> take a look at this?
>
> Basically, it seems to me that if a BB has a sequence like (using C
> syntax for clarity)
>
> r1 = r2 + 42;
> r3 = *r1++;
> r4 = *(r2 + 42);
>
> --then the cse pass overlooks the modification of r1 by the second
> instruction, and changes the last instruction to "r4 = *r1"
My recollection is that auto-increment addressing modes should not
appear in the RTL in the CSE pass.
Where are the auto-increment addressing modes coming from?
jeff
From freddie_chopin@op.pl Thu May 10 21:32:00 2018
From: freddie_chopin@op.pl (Freddie Chopin)
Date: Thu, 10 May 2018 21:32:00 -0000
Subject: LTO vs GCC 8
Message-ID: <7837e9b3a56c6eb8806ae42a0b2447d09b7e1078.camel@op.pl>
Hi!
In one of my embedded projects I have an option to enable LTO. This was
working more or less fine for GCC 6 and GCC 7, however for GCC 8.1.0
(and binutils 2.30) - with the same set of options - I see something
like this
-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --
$ arm-none-eabi-g++ -Wall -Wextra -Wshadow -std=gnu++11 -mcpu=cortex-m4
-mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -ggdb3 -O2 -flto -ffat-
lto-objects -fno-use-cxa-atexit -ffunction-sections -fdata-sections
-fno-rtti -fno-exceptions ... [include paths] ... -MD -MP -c
test/TestCase.cpp -o output/test/TestCase.o
$ arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard
-mfpu=fpv4-sp-d16 -g -O2 -flto -fuse-linker-plugin -Wl,-
Map=output/test/distortosTest.map,--cref,--gc-sections
-Toutput/ST_STM32F4DISCOVERY.preprocessed.ld ... [a lot of objects] ...
-Wl,--whole-archive -l:output/libdistortos.a -Wl,--no-whole-archive -o
output/test/distortosTest.elf
$ arm-none-eabi-objdump --demangle -S output/test/distortosTest.elf >
output/test/distortosTest.lss
arm-none-eabi-objdump: Dwarf Error: Could not find abbrev number 167.
arm-none-eabi-objdump: Dwarf Error: found dwarf version '37', this
reader only handles version 2, 3, 4 and 5 information.
arm-none-eabi-objdump: Dwarf Error: found dwarf version '6144', this
reader only handles version 2, 3, 4 and 5 information.
arm-none-eabi-objdump: Dwarf Error: found dwarf version '4864', this
reader only handles version 2, 3, 4 and 5 information.
...
... (a lot more)
...
-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --
As you see, the errors apear only when I try to generate an assembly
dump. I'm not sure whether the problem is in GCC or in objdump, but
when I have an .elf file produced (with the same options) by gcc 7.3.0,
then this new version of objdump doesn't produce any errors. What is
also interesting is that the errors are not fatal - the exit code of
the process is 0.
What is also interesing is that this problem doesn't appear in a
trivial test case, so I suspect this is something more subtle. I did
not try to narrow it down into a shareable test case, but if you have
no hints then maybe I'll try to do that.
Any ideas what may be the problem here? Especially do you know whether
I should be asking this question here or maybe on binutils mailing
list?
Thanks in advance!
Regards,
FCh
From gccadmin@gcc.gnu.org Thu May 10 22:40:00 2018
From: gccadmin@gcc.gnu.org (gccadmin@gcc.gnu.org)
Date: Thu, 10 May 2018 22:40:00 -0000
Subject: gcc-7-20180510 is now available
Message-ID: <20180510224018.52697.qmail@sourceware.org>
Snapshot gcc-7-20180510 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/7-20180510/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 7 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-7-branch revision 260137
You'll find:
gcc-7-20180510.tar.xz Complete GCC
SHA256=560bce7d26725be46f3b940581d82490168521d2560f8befd8cecacdb2049b0e
SHA1=f31bb1283d8a2a2a6d51a7ff49474ab5663ae4f1
Diffs from 7-20180503 are available in the diffs/ subdirectory.
When a particular snapshot is ready for public consumption the LATEST-7
link is updated and a message is sent to the gcc list. Please do not use
a snapshot before it has been announced that way.
From tyomitch@gmail.com Fri May 11 05:45:00 2018
From: tyomitch@gmail.com (A. Skrobov)
Date: Fri, 11 May 2018 05:45:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com>
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com>
Message-ID:
On Fri, May 11, 2018 at 12:09 AM, Jeff Law wrote:
>
> My recollection is that auto-increment addressing modes should not
> appear in the RTL in the CSE pass.
Fair enough; but they're explicitly listed in the big switch block in
hash_rtx_cb ().
Should my added line change from "invalidate_dest (XEXP (x, 0));" to
"gcc_unreachable ();" ?
Such a patch wouldn't need a testcase, I suppose.
From richard.guenther@gmail.com Fri May 11 09:19:00 2018
From: richard.guenther@gmail.com (Richard Biener)
Date: Fri, 11 May 2018 09:19:00 -0000
Subject: LTO vs GCC 8
In-Reply-To: <7837e9b3a56c6eb8806ae42a0b2447d09b7e1078.camel@op.pl>
References: <7837e9b3a56c6eb8806ae42a0b2447d09b7e1078.camel@op.pl>
Message-ID:
On Thu, May 10, 2018 at 11:32 PM, Freddie Chopin wrote:
> Hi!
>
> In one of my embedded projects I have an option to enable LTO. This was
> working more or less fine for GCC 6 and GCC 7, however for GCC 8.1.0
> (and binutils 2.30) - with the same set of options - I see something
> like this
>
> -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --
>
> $ arm-none-eabi-g++ -Wall -Wextra -Wshadow -std=gnu++11 -mcpu=cortex-m4
> -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -ggdb3 -O2 -flto -ffat-
> lto-objects -fno-use-cxa-atexit -ffunction-sections -fdata-sections
> -fno-rtti -fno-exceptions ... [include paths] ... -MD -MP -c
> test/TestCase.cpp -o output/test/TestCase.o
>
> $ arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard
> -mfpu=fpv4-sp-d16 -g -O2 -flto -fuse-linker-plugin -Wl,-
> Map=output/test/distortosTest.map,--cref,--gc-sections
> -Toutput/ST_STM32F4DISCOVERY.preprocessed.ld ... [a lot of objects] ...
> -Wl,--whole-archive -l:output/libdistortos.a -Wl,--no-whole-archive -o
> output/test/distortosTest.elf
>
> $ arm-none-eabi-objdump --demangle -S output/test/distortosTest.elf >
> output/test/distortosTest.lss
> arm-none-eabi-objdump: Dwarf Error: Could not find abbrev number 167.
> arm-none-eabi-objdump: Dwarf Error: found dwarf version '37', this
> reader only handles version 2, 3, 4 and 5 information.
> arm-none-eabi-objdump: Dwarf Error: found dwarf version '6144', this
> reader only handles version 2, 3, 4 and 5 information.
> arm-none-eabi-objdump: Dwarf Error: found dwarf version '4864', this
> reader only handles version 2, 3, 4 and 5 information.
> ...
> ... (a lot more)
> ...
>
> -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --
>
> As you see, the errors apear only when I try to generate an assembly
> dump. I'm not sure whether the problem is in GCC or in objdump, but
> when I have an .elf file produced (with the same options) by gcc 7.3.0,
> then this new version of objdump doesn't produce any errors. What is
> also interesting is that the errors are not fatal - the exit code of
> the process is 0.
>
> What is also interesing is that this problem doesn't appear in a
> trivial test case, so I suspect this is something more subtle. I did
> not try to narrow it down into a shareable test case, but if you have
> no hints then maybe I'll try to do that.
>
> Any ideas what may be the problem here? Especially do you know whether
> I should be asking this question here or maybe on binutils mailing
> list?
Hmm, can you try without --gc-sections? "Old" GNU ld versions have
a bug that wrecks debug info (sourceware PR20882).
Richard.
> Thanks in advance!
>
> Regards,
> FCh
From richard.guenther@gmail.com Fri May 11 09:26:00 2018
From: richard.guenther@gmail.com (Richard Biener)
Date: Fri, 11 May 2018 09:26:00 -0000
Subject: AMD GCN port
In-Reply-To: <1997f00f-0390-b0e8-fe8f-ba4fc04dd1d3@codesourcery.com>
References: <1997f00f-0390-b0e8-fe8f-ba4fc04dd1d3@codesourcery.com>
Message-ID:
On Wed, May 9, 2018 at 6:35 PM, Andrew Stubbs wrote:
> Honza, Martin,
>
> Further to our conversation on IRC ...
>
> We have just completed work on a GCN3 & GCN5 port intended for running
> OpenMP and OpenACC offload kernels on AMD Fiji and Vega discrete GPUs.
> Unfortunately Carrizo is probably broken because we don't have one to test,
> and the APUs use shared memory and XNACK, which we've not paid any attention
> to.
>
> There will be a binary release available soon(ish).
>
> Apologies the development schedule has made it hard to push the work
> upstream, but now it is time.
>
> I've posted the code to Github for reference:
> https://github.com/ams-cs/gcc
> https://github.com/ams-cs/newlib
>
> We're using LLVM 6 for the assembler and linker; there's no binutils port.
>
> It should be possible to build a "standalone" amdgcn-none-amdhsa compiler
> that can run code via the included "gcn-run" loader tool (and the HSA
> runtime). This can be used to run the testsuite, with a little dejagnu
> config trickery.
>
> It should also be possible to build an x86_64-linux-gnu compiler with
> --enable-offload-target=gcn, and a matching amdgcn-none-amdhsa compiler with
> --enable-as-accelerator-for=x86_64-linux-gnu, and have them run code
> offloaded with OpenMP or OpenACC directives.
>
> The code is based on Honza's original port, rebased to GCC 7.3.
>
> I'd like to agree an upstreaming strategy that
> a) gets basic GCN support into trunk soonish. We'll need to get a few
> middle/front end patches approved, and probably update a few back-end hooks,
> but this ought to be easy enough.
> b) gets trunk OpenMP/OpenACC to work for GCN, eventually. I'm expecting some
> pain in libgomp here.
> c) gives me a stable base from which to make binary releases (i.e. not
> trunk).
> d) allows me to use openacc-gcc-8-branch without too much duplication of
> effort.
>
> How about the following strategy?
>
> 1. Create "gcn-gcc-7-branch" to archive the current work. This would be a
> source for merges (or cherry-picking), but I'd not expect much future
> development. Initially it would have the same content as the Github
> repository above.
>
> 2. Create "gcn-gcc-8-branch" with a merger of "gcc-8-branch" and
> "gcn-gcc-7-branch". This would be broken w.r.t. libgomp, initially, but get
> fixed up in time. It would receive occasional merges from the release
> branch. I expect to do GCN back-end development work here.
>
> 3. Create "gcn-openacc-gcc-8-branch" from the new "gcn-gcc-8-branch", and
> merge in "openacc-gcc-8-branch". This will hold offloading patches not
> compatible with trunk, and receive updated GCN changes via merge. I intend
> to deliver my next binary release from this branch.
>
> 4. Replace/update the existing "gcn" branch with a merger of "trunk" and
> "gcn-gcc-8-branch" (not the OpenACC branch). This would be merged to trunk,
> and possibly retired, as soon as possible. I imagine bits will have to be
> submitted as patches, and then the back-end merged as a whole.
>
> trunk
> |\
> | gcc-7-branch
> | |\
> | : gcn-gcc-7-branch
> | \
> |\ '--------.
> | gcc-8-branch |
> | | \ '------------. |
> | : openacc-gcc-8-branch gcn-gcc-8-branch
> | \ / |
> | gcn-openacc-8-branch |
> |\ ,---------------------------------'
> | gcn
> |/
> gcc-9
>
> It's slightly complex to describe, but hopefully logical and workable.
>
> Comments? Better suggestions?
Sounds good but I'd not do 1. given the github repo can serve as archiving
point, too. Having 2. doesn't sound too useful over 3. so in the end I'd
do only 3. and 4. Of course 1 and 2 might help you in doing 3 and 4.
Richard.
> --
> Andrew Stubbs
> Mentor Graphics / CodeSourcery.
From david@westcontrol.com Fri May 11 11:06:00 2018
From: david@westcontrol.com (David Brown)
Date: Fri, 11 May 2018 11:06:00 -0000
Subject: LTO vs GCC 8
In-Reply-To:
References: <7837e9b3a56c6eb8806ae42a0b2447d09b7e1078.camel@op.pl>
Message-ID: <5AF5793A.1050900@westcontrol.com>
On 11/05/18 11:19, Richard Biener wrote:
> On Thu, May 10, 2018 at 11:32 PM, Freddie Chopin wrote:
>> Hi!
>>
>> In one of my embedded projects I have an option to enable LTO. This was
>> working more or less fine for GCC 6 and GCC 7, however for GCC 8.1.0
>> (and binutils 2.30) - with the same set of options - I see something
>> like this
>>
>> -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --
>>
>> $ arm-none-eabi-g++ -Wall -Wextra -Wshadow -std=gnu++11 -mcpu=cortex-m4
>> -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -ggdb3 -O2 -flto -ffat-
>> lto-objects -fno-use-cxa-atexit -ffunction-sections -fdata-sections
>> -fno-rtti -fno-exceptions ... [include paths] ... -MD -MP -c
>> test/TestCase.cpp -o output/test/TestCase.o
>>
> Hmm, can you try without --gc-sections? "Old" GNU ld versions have
> a bug that wrecks debug info (sourceware PR20882).
>
For the Cortex-M devices (and probably many other RISC targets),
-fdata-sections comes at a big cost - it effectively blocks
-fsection-anchors and makes access to file-static data a lot bigger.
People often use -fdata-sections and -ffunction-sections along with
-Wl,--gc-sections with the aim of removing unused code and data (and
thus saving space, useful on small devices) - I would expect LTO would
manage that anyway. The other purpose of these is to improve locality
of reference - again LTO should do that for you. But even without LTO,
I find the cost of -fdata-sections high compared to -fsection-anchors.
From ams@codesourcery.com Fri May 11 11:19:00 2018
From: ams@codesourcery.com (Andrew Stubbs)
Date: Fri, 11 May 2018 11:19:00 -0000
Subject: AMD GCN port
In-Reply-To:
References: <1997f00f-0390-b0e8-fe8f-ba4fc04dd1d3@codesourcery.com>
Message-ID:
On 11/05/18 10:26, Richard Biener wrote:
> Sounds good but I'd not do 1. given the github repo can serve as archiving
> point, too. Having 2. doesn't sound too useful over 3. so in the end I'd
> do only 3. and 4. Of course 1 and 2 might help you in doing 3 and 4.
Indeed, I've been worried that I'm basically planning to expose internal
steps.
The problem I'm trying to solve with 2 is that what I need is 3, but
that means code dependencies on things I don't own, which makes it
harder to get to 4.
The other thing that's occurred to me is that with og8 being new, maybe
it's a good time to merge the GCN stuff into that, and work with the
NVidia folks to share it. [Adding Cesar and Thomas to CC.] I'm aware of
some incompatibilities with og7, but those are going to need fixing
either way.
Here's another proposal.
trunk
|\
| gcc-7-branch
| |\
| : gcn-gcc-7-branch (1 - possibly notional)
| \
|\ |
| gcc-8-branch |
| |\ /
| | gcn-gcc-8-branch (2. trunk compatible)
| | | '----------------------------.
| |\ | |
| : openacc-gcc-8-branch (3. share existing) |
| |
|\ ,------------------------------------------'
| gcn (4. temporary)
|/
gcc-9
Obviously, the description "trunk compatible" would become less true
over time, but it will be less diverged than og8. I suppose this branch
could also be notional, only named internally, though?
I guess it makes no difference to me -- I'm going to have to go through
all the steps anyway -- but it depends how transparent others would like
me to be.
Andrew
From info@tabtimer.com.au Fri May 11 12:35:00 2018
From: info@tabtimer.com.au (=?utf-8?Q?TabTimer_=2D_helping_to_keep_people_on=2Dtime?=)
Date: Fri, 11 May 2018 12:35:00 -0000
Subject: =?utf-8?Q?Your_TabTimer_newsletter_subscription?=
Message-ID:
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL:
From ams@codesourcery.com Fri May 11 13:54:00 2018
From: ams@codesourcery.com (Andrew Stubbs)
Date: Fri, 11 May 2018 13:54:00 -0000
Subject: AMD GCN port
In-Reply-To:
References: <1997f00f-0390-b0e8-fe8f-ba4fc04dd1d3@codesourcery.com>
Message-ID: <01d25d95-77b5-f15c-4366-dc40f22a8a4c@codesourcery.com>
On 11/05/18 12:18, Andrew Stubbs wrote:
> The other thing that's occurred to me is that with og8 being new, maybe
> it's a good time to merge the GCN stuff into that, and work with the
> NVidia folks to share it. [Adding Cesar and Thomas to CC.] I'm aware of
> some incompatibilities with og7, but those are going to need fixing
> either way.
I've spoken with Thomas. He's happy to take GCN patches there, or GCN
related patches anyway, so that's an option.
I can use it as my upstream, or push my changes directly.
> I guess it makes no difference to me -- I'm going to have to go through
> all the steps anyway -- but it depends how transparent others would like
> me to be.
The more I think about this, the more I'm coming to the conclusion that
nobody but me really cares about GCN for GCC 8, and nobody cares about
the development history, so I'm over-complicating my upstreaming plans.
I should just do what I need to do in my local repo, as before, and
submit a somewhat flattened patch series for inclusion in trunk in the
traditional manner, as soon as I have it.
Andrew
From freddie_chopin@op.pl Fri May 11 15:33:00 2018
From: freddie_chopin@op.pl (Freddie Chopin)
Date: Fri, 11 May 2018 15:33:00 -0000
Subject: LTO vs GCC 8
In-Reply-To:
References: <7837e9b3a56c6eb8806ae42a0b2447d09b7e1078.camel@op.pl>
Message-ID:
On Fri, 2018-05-11 at 11:19 +0200, Richard Biener wrote:
> Hmm, can you try without --gc-sections? "Old" GNU ld versions have
> a bug that wrecks debug info (sourceware PR20882).
Yes - you are right. Without --gc-sections the errors are gone. The bug
was marked as resolved and fixed a year ago, however from the comments
I presume that it was only a partial fix, so possibly 2.31 will be
working fine for arm-none-abi, right?
What is also interesting is that there was no problem for gcc 7.3 with
binutils 2.29.1 and for gcc 6.3 with binutils 2.28 - only 8.1 + 2.30
behave like this.
Is there a workaround for the problem? Maybe I could mark some sections
as KEEP() in the linker script while waiting for binutils 2.31?
Regards,
FCh
From law@redhat.com Fri May 11 15:44:00 2018
From: law@redhat.com (Jeff Law)
Date: Fri, 11 May 2018 15:44:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To:
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com>
Message-ID:
On 05/10/2018 11:45 PM, A. Skrobov wrote:
> On Fri, May 11, 2018 at 12:09 AM, Jeff Law wrote:
>>
>> My recollection is that auto-increment addressing modes should not
>> appear in the RTL in the CSE pass.
>
> Fair enough; but they're explicitly listed in the big switch block in
> hash_rtx_cb ().
> Should my added line change from "invalidate_dest (XEXP (x, 0));" to
> "gcc_unreachable ();" ?
> Such a patch wouldn't need a testcase, I suppose.
To change into a gcc_unreachable we'd need to verify that hash_rtx_cb is
never called from outside the CSE pass.
If we look in sel-sched-ir.c we see that it calls into hash_rtx_cb
(sigh, bad modularity). I'm not at all familiar with how the hashing
is used within the selective scheduler, so I can't really say what the
selective scheduler *should* be doing here.
Note that if you were generating these insns using your own port, you
can get the same effect by using a PARALLEL rather than an
auto-increment. PARALLELs are supported throughout the RTL IL.
jeff
From freddie_chopin@op.pl Fri May 11 15:50:00 2018
From: freddie_chopin@op.pl (Freddie Chopin)
Date: Fri, 11 May 2018 15:50:00 -0000
Subject: LTO vs GCC 8
In-Reply-To: <5AF5793A.1050900@westcontrol.com>
References: <7837e9b3a56c6eb8806ae42a0b2447d09b7e1078.camel@op.pl> <5AF5793A.1050900@westcontrol.com>
Message-ID:
On Fri, 2018-05-11 at 13:06 +0200, David Brown wrote:
> For the Cortex-M devices (and probably many other RISC targets),
> -fdata-sections comes at a big cost - it effectively blocks
> -fsection-anchors and makes access to file-static data a lot bigger.
> People often use -fdata-sections and -ffunction-sections along with
> -Wl,--gc-sections with the aim of removing unused code and data (and
> thus saving space, useful on small devices) - I would expect LTO
> would
> manage that anyway. The other purpose of these is to improve
> locality
> of reference - again LTO should do that for you. But even without
> LTO,
> I find the cost of -fdata-sections high compared to -fsection-
> anchors.
Unfortunatelly having LTO doesn't make -ffunction-sections + -fdata-
sections + --gc-sections useless.
My test project compiled:
- without LTO and without these attributes - 150824 B ROM + 4240 B RAM
- with LTO and without these attributes - 133812 B ROM + 4208 B RAM
- without LTO and with these attributes - 124456 B ROM + 3484 B RAM
- with LTO and with these attributes - 120280 B ROM + 3680 B RAM
As you see these attributes give much more than LTO in terms of size.
As for the -fsection-anchors I guess this has no use for non-PIC code
for arm-none-eabi. Whether I use it or not, the sizes are identical.
Regards,
FCh
From richard.guenther@gmail.com Fri May 11 16:51:00 2018
From: richard.guenther@gmail.com (Richard Biener)
Date: Fri, 11 May 2018 16:51:00 -0000
Subject: LTO vs GCC 8
In-Reply-To:
References: <7837e9b3a56c6eb8806ae42a0b2447d09b7e1078.camel@op.pl> <5AF5793A.1050900@westcontrol.com>
Message-ID: <49DC31D9-92D9-48A1-935C-4B5B8A3BE47E@gmail.com>
On May 11, 2018 5:49:44 PM GMT+02:00, Freddie Chopin wrote:
>On Fri, 2018-05-11 at 13:06 +0200, David Brown wrote:
>> For the Cortex-M devices (and probably many other RISC targets),
>> -fdata-sections comes at a big cost - it effectively blocks
>> -fsection-anchors and makes access to file-static data a lot bigger.
>> People often use -fdata-sections and -ffunction-sections along with
>> -Wl,--gc-sections with the aim of removing unused code and data (and
>> thus saving space, useful on small devices) - I would expect LTO
>> would
>> manage that anyway. The other purpose of these is to improve
>> locality
>> of reference - again LTO should do that for you. But even without
>> LTO,
>> I find the cost of -fdata-sections high compared to -fsection-
>> anchors.
>
>Unfortunatelly having LTO doesn't make -ffunction-sections + -fdata-
>sections + --gc-sections useless.
>
>My test project compiled:
>- without LTO and without these attributes - 150824 B ROM + 4240 B RAM
>- with LTO and without these attributes - 133812 B ROM + 4208 B RAM
>- without LTO and with these attributes - 124456 B ROM + 3484 B RAM
>- with LTO and with these attributes - 120280 B ROM + 3680 B RAM
>
>As you see these attributes give much more than LTO in terms of size.
>
>As for the -fsection-anchors I guess this has no use for non-PIC code
>for arm-none-eabi. Whether I use it or not, the sizes are identical.
That's an interesting result. Do you have any non-LTO objects? Basically I'm curious what ld eliminates that gcc with LTO doesn't.
As to a workaround for the ld bug you can try keeping all .debug_* sections. IIRC 2.30 has the bug fixed (on the branch).
Richard.
>Regards,
>FCh
From gccadmin@gcc.gnu.org Fri May 11 22:40:00 2018
From: gccadmin@gcc.gnu.org (gccadmin@gcc.gnu.org)
Date: Fri, 11 May 2018 22:40:00 -0000
Subject: gcc-8-20180511 is now available
Message-ID: <20180511224023.33700.qmail@sourceware.org>
Snapshot gcc-8-20180511 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/8-20180511/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 8 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-8-branch revision 260189
You'll find:
gcc-8-20180511.tar.xz Complete GCC
SHA256=a6bbccb257d46460ed93ba9fb350a5ba92a0fd888578aa52e8956f08a8d8e274
SHA1=e43fc660b66753e292ec2f2d3bfd1c19f7ba647e
Diffs from 8-20180504 are available in the diffs/ subdirectory.
When a particular snapshot is ready for public consumption the LATEST-8
link is updated and a message is sent to the gcc list. Please do not use
a snapshot before it has been announced that way.
From info@webexepert.com Sat May 12 09:41:00 2018
From: info@webexepert.com (info@webexepert.com)
Date: Sat, 12 May 2018 09:41:00 -0000
Subject: Web Listing
Message-ID:
Hello,
I am following up on an email that I sent you a few weeks ago. To recap from my last email, I came across your website and saw that there is some potential to help increase your traffic. Our offerings have the potential to help improve your current site, so you can achieve greater profitability. Please let me know a good day and time that I could contact you. With our detailed reporting, we will be able to show you exactly what needs to be done to improve your online presence. I look forward to helping your business thrive in a digital world.
Kind Regards,
Rachel
Business Development Manager
-------------------------------------------------------------------------------------
From: info@webexepert.com [mailto: info@webexepert.com]
Sent: Fri, May 11, 2018 2:54 PM
Subject: Web Listing
Hi,
Hope you are well, I was surfing through your website and realized that despite having a great design; it was not ranking on any of the search engines (Google and AOL) for most of the keywords relating to your business. I am affiliated with an SEO company helped over 200 businesses rank on the 1st Page of GOOGLE for even the most competitive Industries.
Let me know if you are interested and I will send you our company details or create a proposal so you can see exactly where you rank compared to your competitors.
I look forward to your mail.
Kind Regards,
Rachel
Business Development Manager
PS: - If this is something you are interested, please respond to this email. If this is not of your interest, don't worry, we will not email you again once you reply back me as not interested.
From tyomitch@gmail.com Sat May 12 14:21:00 2018
From: tyomitch@gmail.com (A. Skrobov)
Date: Sat, 12 May 2018 14:21:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To:
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com>
Message-ID:
> If we look in sel-sched-ir.c we see that it calls into hash_rtx_cb
> (sigh, bad modularity). I'm not at all familiar with how the hashing
> is used within the selective scheduler, so I can't really say what the
> selective scheduler *should* be doing here.
OK, I see. Now what do you think would be the best course of action?
Leave everything as it is? The selective scheduler may or may not want
these memory accesses ignored.
From richard.sandiford@linaro.org Sat May 12 16:02:00 2018
From: richard.sandiford@linaro.org (Richard Sandiford)
Date: Sat, 12 May 2018 16:02:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To: (A. Skrobov's message of "Sat, 12 May 2018 17:21:16 +0300")
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com>
Message-ID: <87d0y0q2v5.fsf@linaro.org>
"A. Skrobov" writes:
>> If we look in sel-sched-ir.c we see that it calls into hash_rtx_cb
>> (sigh, bad modularity). I'm not at all familiar with how the hashing
>> is used within the selective scheduler, so I can't really say what the
>> selective scheduler *should* be doing here.
>
> OK, I see. Now what do you think would be the best course of action?
> Leave everything as it is? The selective scheduler may or may not want
> these memory accesses ignored.
I don't think we can assert even for cse, since AIUI these codes can
still be used for stack pushes and pops.
Thanks,
Richard
From tyomitch@gmail.com Sat May 12 16:50:00 2018
From: tyomitch@gmail.com (A. Skrobov)
Date: Sat, 12 May 2018 16:50:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To: <87d0y0q2v5.fsf@linaro.org>
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com> <87d0y0q2v5.fsf@linaro.org>
Message-ID:
>>> If we look in sel-sched-ir.c we see that it calls into hash_rtx_cb
>>> (sigh, bad modularity). I'm not at all familiar with how the hashing
>>> is used within the selective scheduler, so I can't really say what the
>>> selective scheduler *should* be doing here.
>>
>> OK, I see. Now what do you think would be the best course of action?
>> Leave everything as it is? The selective scheduler may or may not want
>> these memory accesses ignored.
>
> I don't think we can assert even for cse, since AIUI these codes can
> still be used for stack pushes and pops.
But then cse would generate incorrect code when these are used?
From law@redhat.com Sat May 12 17:01:00 2018
From: law@redhat.com (Jeff Law)
Date: Sat, 12 May 2018 17:01:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To: <87d0y0q2v5.fsf@linaro.org>
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com> <87d0y0q2v5.fsf@linaro.org>
Message-ID:
On 05/12/2018 10:02 AM, Richard Sandiford wrote:
> "A. Skrobov" writes:
>>> If we look in sel-sched-ir.c we see that it calls into hash_rtx_cb
>>> (sigh, bad modularity). I'm not at all familiar with how the hashing
>>> is used within the selective scheduler, so I can't really say what the
>>> selective scheduler *should* be doing here.
>>
>> OK, I see. Now what do you think would be the best course of action?
>> Leave everything as it is? The selective scheduler may or may not want
>> these memory accesses ignored.
>
> I don't think we can assert even for cse, since AIUI these codes can
> still be used for stack pushes and pops.
No. We're not supposed to have any auto-inc insns prior to the auto-inc
pass. A stack push/pop early in the compiler would have to be
represented by a PARALLEL.
It's been this way forever. It's documented in the internals manual
somewhere.
jeff
From richard.sandiford@linaro.org Sat May 12 19:35:00 2018
From: richard.sandiford@linaro.org (Richard Sandiford)
Date: Sat, 12 May 2018 19:35:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To: (Jeff Law's message of "Sat, 12 May 2018 11:01:37 -0600")
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com> <87d0y0q2v5.fsf@linaro.org>
Message-ID: <878t8opsyv.fsf@linaro.org>
Jeff Law writes:
> On 05/12/2018 10:02 AM, Richard Sandiford wrote:
>> "A. Skrobov" writes:
>>>> If we look in sel-sched-ir.c we see that it calls into hash_rtx_cb
>>>> (sigh, bad modularity). I'm not at all familiar with how the hashing
>>>> is used within the selective scheduler, so I can't really say what the
>>>> selective scheduler *should* be doing here.
>>>
>>> OK, I see. Now what do you think would be the best course of action?
>>> Leave everything as it is? The selective scheduler may or may not want
>>> these memory accesses ignored.
>>
>> I don't think we can assert even for cse, since AIUI these codes can
>> still be used for stack pushes and pops.
> No. We're not supposed to have any auto-inc insns prior to the auto-inc
> pass. A stack push/pop early in the compiler would have to be
> represented by a PARALLEL.
>
> It's been this way forever. It's documented in the internals manual
> somewhere.
Maybe pops was a generalisation too far :-) but I was going off:
if (MEM_P (dest))
{
#ifdef PUSH_ROUNDING
/* Stack pushes invalidate the stack pointer. */
rtx addr = XEXP (dest, 0);
if (GET_RTX_CLASS (GET_CODE (addr)) == RTX_AUTOINC
&& XEXP (addr, 0) == stack_pointer_rtx)
invalidate (stack_pointer_rtx, VOIDmode);
#endif
dest = fold_rtx (dest, insn);
}
in cse_insn. These kinds of push are generated by emit_single_push_insn
during expand, so if we asserted for RTX_AUTOINC rtxes then it would
fire for this case.
Richard
From bernds_cb1@t-online.de Sat May 12 19:36:00 2018
From: bernds_cb1@t-online.de (Bernd Schmidt)
Date: Sat, 12 May 2018 19:36:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To:
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com> <87d0y0q2v5.fsf@linaro.org>
Message-ID:
On 05/12/2018 07:01 PM, Jeff Law wrote:
> No. We're not supposed to have any auto-inc insns prior to the auto-inc
> pass. A stack push/pop early in the compiler would have to be
> represented by a PARALLEL.
>
> It's been this way forever. It's documented in the internals manual
> somewhere.
Sorry, but you're misremembering this. Stack pushes/pops were always
represented with autoinc, these being the only exception to the rule you
remember. You can easily verify this by looking at a .expand dump from a
32-bit i386 compiler - I just did so with 2.95 and 6.4. It's all pre_dec
for argument passing.
Bernd
From gccadmin@gcc.gnu.org Sun May 13 22:40:00 2018
From: gccadmin@gcc.gnu.org (gccadmin@gcc.gnu.org)
Date: Sun, 13 May 2018 22:40:00 -0000
Subject: gcc-9-20180513 is now available
Message-ID: <20180513224021.84154.qmail@sourceware.org>
Snapshot gcc-9-20180513 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/9-20180513/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 9 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/trunk revision 260217
You'll find:
gcc-9-20180513.tar.xz Complete GCC
SHA256=3b297fd353637ce8af796f5ff00e504dda01cb8971062c2d33c599a3fe8c9c45
SHA1=e44f02303d748c8ea0ae908fbe4dd011aec107f8
Diffs from 9-20180506 are available in the diffs/ subdirectory.
When a particular snapshot is ready for public consumption the LATEST-9
link is updated and a message is sent to the gcc list. Please do not use
a snapshot before it has been announced that way.
From david@westcontrol.com Mon May 14 14:34:00 2018
From: david@westcontrol.com (David Brown)
Date: Mon, 14 May 2018 14:34:00 -0000
Subject: LTO vs GCC 8
In-Reply-To:
References: <7837e9b3a56c6eb8806ae42a0b2447d09b7e1078.camel@op.pl> <5AF5793A.1050900@westcontrol.com>
Message-ID: <5AF99E67.4050004@westcontrol.com>
On 11/05/18 17:49, Freddie Chopin wrote:
> On Fri, 2018-05-11 at 13:06 +0200, David Brown wrote:
>> For the Cortex-M devices (and probably many other RISC targets),
>> -fdata-sections comes at a big cost - it effectively blocks
>> -fsection-anchors and makes access to file-static data a lot bigger.
>> People often use -fdata-sections and -ffunction-sections along with
>> -Wl,--gc-sections with the aim of removing unused code and data (and
>> thus saving space, useful on small devices) - I would expect LTO
>> would
>> manage that anyway. The other purpose of these is to improve
>> locality
>> of reference - again LTO should do that for you. But even without
>> LTO,
>> I find the cost of -fdata-sections high compared to -fsection-
>> anchors.
>
> Unfortunatelly having LTO doesn't make -ffunction-sections + -fdata-
> sections + --gc-sections useless.
>
> My test project compiled:
> - without LTO and without these attributes - 150824 B ROM + 4240 B RAM
> - with LTO and without these attributes - 133812 B ROM + 4208 B RAM
> - without LTO and with these attributes - 124456 B ROM + 3484 B RAM
> - with LTO and with these attributes - 120280 B ROM + 3680 B RAM
>
> As you see these attributes give much more than LTO in terms of size.
>
Interesting. Making these sections and then using gc-sections should
only remove code that is not used - LTO should do that anyway.
Have you tried with -ffunction-sections and not -fdata-sections? It is
the -fdata-sections that ruins -fsection-anchors - the
-ffunction-sections doesn't have the same kind of cost.
>
> As for the -fsection-anchors I guess this has no use for non-PIC code
> for arm-none-eabi. Whether I use it or not, the sizes are identical.
>
No, -fsection-anchors has plenty of use for fixed-position eabi code.
Take this little example code:
static int x;
static int y;
static int z;
void foo(void) {
int t = x;
x = y;
y = z;
z = t;
}
Compiled with gcc (4.8, as that's what I had convenient) with -O2
-mcpu=cortex-m4 -mthumb and -fsection-anchors (enabled automatically
with -O2, I believe), this gives:
21 foo:
22 @ args = 0, pretend = 0, frame = 0
23 @ frame_needed = 0, uses_anonymous_args = 0
24 @ link register save eliminated.
25 0000 034B ldr r3, .L2
26 0002 93E80500 ldmia r3, {r0, r2}
27 0006 9968 ldr r1, [r3, #8]
28 0008 1A60 str r2, [r3]
29 000a 9860 str r0, [r3, #8]
30 000c 5960 str r1, [r3, #4]
31 000e 7047 bx lr
32 .L3:
33 .align 2
34 .L2:
35 0010 00000000 .word .LANCHOR0
37 .bss
38 .align 2
39 .set .LANCHOR0,. + 0
42 x:
43 0000 00000000 .space 4
46 y:
47 0004 00000000 .space 4
50 z:
51 0008 00000000 .space 4
With -fdata-sections, I get:
21 foo:
22 @ args = 0, pretend = 0, frame = 0
23 @ frame_needed = 0, uses_anonymous_args = 0
24 @ link register save eliminated.
25 0000 30B4 push {r4, r5}
26 0002 0549 ldr r1, .L2
27 0004 054B ldr r3, .L2+4
28 0006 064A ldr r2, .L2+8
29 0008 0D68 ldr r5, [r1]
30 000a 1468 ldr r4, [r2]
31 000c 1868 ldr r0, [r3]
32 000e 1560 str r5, [r2]
33 0010 1C60 str r4, [r3]
34 0012 0860 str r0, [r1]
35 0014 30BC pop {r4, r5}
36 0016 7047 bx lr
37 .L3:
38 .align 2
39 .L2:
40 0018 00000000 .word .LANCHOR0
41 001c 00000000 .word .LANCHOR1
42 0020 00000000 .word .LANCHOR2
44 .section .bss.x,"aw",%nobits
45 .align 2
46 .set .LANCHOR0,. + 0
49 x:
50 0000 00000000 .space 4
51 .section .bss.y,"aw",%nobits
52 .align 2
53 .set .LANCHOR1,. + 0
56 y:
57 0000 00000000 .space 4
58 .section .bss.z,"aw",%nobits
59 .align 2
60 .set .LANCHOR2,. + 0
63 z:
64 0000 00000000 .space 4
The code is clearly bigger and slower, and uses more anchors in the code
section.
Note that to get similar improvements with non-static data, you need
"-fno-common" - a flag that I believe should be the default for the
compiler.
From law@redhat.com Mon May 14 20:55:00 2018
From: law@redhat.com (Jeff Law)
Date: Mon, 14 May 2018 20:55:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To:
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com> <87d0y0q2v5.fsf@linaro.org>
Message-ID: <12889970-6000-3282-b6c8-531fcb826bda@redhat.com>
On 05/12/2018 01:35 PM, Bernd Schmidt wrote:
> On 05/12/2018 07:01 PM, Jeff Law wrote:
>
>> No. We're not supposed to have any auto-inc insns prior to the auto-inc
>> pass. A stack push/pop early in the compiler would have to be
>> represented by a PARALLEL.
>>
>> It's been this way forever. It's documented in the internals manual
>> somewhere.
>
> Sorry, but you're misremembering this. Stack pushes/pops were always
> represented with autoinc, these being the only exception to the rule you
> remember. You can easily verify this by looking at a .expand dump from a
> 32-bit i386 compiler - I just did so with 2.95 and 6.4. It's all pre_dec
> for argument passing.
That does sound vaguely familiar. Did we put autoinc notes on the stack
pushes?
That makes me wonder if there is a latent bug though. Consider pushing
args to a pure function. Could we then try to CSE the memory reference
and get it wrong because we haven't accounted for the autoinc?
Jeff
From rodrivg@gmail.com Mon May 14 21:32:00 2018
From: rodrivg@gmail.com (Rodrigo V. G.)
Date: Mon, 14 May 2018 21:32:00 -0000
Subject: Please support the _Atomic keyword in C++
Message-ID:
In addition to the bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932
I wanted to add some comment:
It would be very useful if the _Atomic keyword would be supported in C++.
This way the header could be included inconditionally in C++ code.
Even if it is not compatible with the C++ header, it would be useful.
Supporting the _Atomic keyword in C++ would benefit at least two cases:
- When mixing C and C++ code for interoperability (using, in C++, some
variables declared as _Atomic in a C header).
- When developing operating systems or kernels in C++, in a
freestanding environment (cross compiler), is not available,
but is.
So to correctly use things like __atomic_fetch_add in C++ in
freestanding mode, this is the only way. Otherwise one cannot use
atomics at all in these conditions.
From jwakely.gcc@gmail.com Mon May 14 22:27:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Mon, 14 May 2018 22:27:00 -0000
Subject: Please support the _Atomic keyword in C++
In-Reply-To:
References:
Message-ID:
On 14 May 2018 at 22:32, Rodrigo V. G. wrote:
> In addition to the bug:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932
> I wanted to add some comment:
>
> It would be very useful if the _Atomic keyword would be supported in C++.
> This way the header could be included inconditionally in C++ code.
> Even if it is not compatible with the C++ header, it would be useful.
>
> Supporting the _Atomic keyword in C++ would benefit at least two cases:
>
> - When mixing C and C++ code for interoperability (using, in C++, some
> variables declared as _Atomic in a C header).
>
> - When developing operating systems or kernels in C++, in a
> freestanding environment (cross compiler), is not available,
Why not? It's part of a freestanding C++ implementation.
> but is.
How? It's not part of any C++ implementation at all, freestanding or not.
> So to correctly use things like __atomic_fetch_add in C++ in
> freestanding mode, this is the only way. Otherwise one cannot use
> atomics at all in these conditions.
Why can't you use __atomic_fetch_add directly?
From jwerner@chromium.org Mon May 14 23:38:00 2018
From: jwerner@chromium.org (Julius Werner)
Date: Mon, 14 May 2018 23:38:00 -0000
Subject: Auto-generated .rodata contents and __attribute__((section))
Message-ID:
Hi,
I'm a firmware/embedded engineer and frequently run into cases where
certain parts of the code need to be placed in a special memory area (for
example, because the area that contains the other code is not yet
initialized or currently inaccessible). My go-to method to solve this is to
mark all functions and globals used by this code with
__attribute__((section)), and using a linker script to map those special
sections to the desired area. This mostly works pretty well.
However, I just found an issue with this when the functions include local
variables like this:
const int some_array[] = { 1, 2, 3, 4, 5, 6 };
In this case (and with -Os optimization), GCC seems to automatically
reserve some space in the .rodata section to place the array, and the
generated code accesses it there. Of course this breaks my use case if the
generic .rodata section is inaccessible while that function executes. I
have not found any way to work around this without either rewriting the
code to completely avoid those constructs, or manipulating sections
manually at the linker level (in particular, you can't just mark the array
itself with __attribute__((section)), since that attribute is not legal for
locals).
Is this intentional, and if so, does it make sense that it is? I can
understand that it may technically be compliant with the description of
__attribute__((section)) in the GCC manual -- but I think the use case I'm
trying to solve is one of the most common uses of that attribute, and it
seems to become completely impossible due to this. Wouldn't it make more
sense and be more useful if __attribute__((section)) meant "place
*everything* generated as part of this function source code into that
section"? Or at least offer some sort of other extension to be able to
control section placement for those special constants? (Note that GCC
usually seems to place constants for individual variables in the text
section, simply behind the epilogue of the function... so it's also quite
unclear to me why arrays get treated differently at all.)
Apart from this issue, this behavior also seems to "break"
-ffunction-sections/-fdata-sections. Even with both of those set, these
sorts of constants seem to get placed into the same big, common .rodata
section (as opposed to either .text.functionname or .rodata.functionname as
you'd expect). That means that they won't get collected when linking the
binary with --gc-sections and will bloat the code size for projects that
link a lot of code opportunistically and rely on --gc-sections to drop
everything that's not needed for the current configuration.
Is there some clever trick that I missed to work around this, or is this
really not possible with the current GCC? And if so, would you agree that
this is a valid problem that GCC should provide a solution for (in some
form or another)?
Thanks,
Julius
From bernds_cb1@t-online.de Mon May 14 23:58:00 2018
From: bernds_cb1@t-online.de (Bernd Schmidt)
Date: Mon, 14 May 2018 23:58:00 -0000
Subject: Possible bug in cse.c affecting pre/post-modify mem access
In-Reply-To: <12889970-6000-3282-b6c8-531fcb826bda@redhat.com>
References: <49cab185-65cc-5fe7-9fe8-d31758ab752c@redhat.com> <87d0y0q2v5.fsf@linaro.org> <12889970-6000-3282-b6c8-531fcb826bda@redhat.com>
Message-ID: <3ecad6c8-c4c8-5a66-a5e4-af8c9614af7c@t-online.de>
On 05/14/2018 10:55 PM, Jeff Law wrote:
> That does sound vaguely familiar. Did we put autoinc notes on the stack
> pushes?
Not as far as I recall. I only see REG_ARGS_SIZE notes in the dumps.
> That makes me wonder if there is a latent bug though. Consider pushing
> args to a pure function. Could we then try to CSE the memory reference
> and get it wrong because we haven't accounted for the autoinc?
Can't know for sure but one would hope something would test for
side_effects_p.
Bernd
From richard.guenther@gmail.com Tue May 15 09:29:00 2018
From: richard.guenther@gmail.com (Richard Biener)
Date: Tue, 15 May 2018 09:29:00 -0000
Subject: Auto-generated .rodata contents and __attribute__((section))
In-Reply-To:
References:
Message-ID:
On Tue, May 15, 2018 at 1:38 AM Julius Werner wrote:
> Hi,
> I'm a firmware/embedded engineer and frequently run into cases where
> certain parts of the code need to be placed in a special memory area (for
> example, because the area that contains the other code is not yet
> initialized or currently inaccessible). My go-to method to solve this is
to
> mark all functions and globals used by this code with
> __attribute__((section)), and using a linker script to map those special
> sections to the desired area. This mostly works pretty well.
> However, I just found an issue with this when the functions include local
> variables like this:
> const int some_array[] = { 1, 2, 3, 4, 5, 6 };
> In this case (and with -Os optimization), GCC seems to automatically
> reserve some space in the .rodata section to place the array, and the
> generated code accesses it there. Of course this breaks my use case if the
> generic .rodata section is inaccessible while that function executes. I
> have not found any way to work around this without either rewriting the
> code to completely avoid those constructs, or manipulating sections
> manually at the linker level (in particular, you can't just mark the array
> itself with __attribute__((section)), since that attribute is not legal
for
> locals).
> Is this intentional, and if so, does it make sense that it is? I can
> understand that it may technically be compliant with the description of
> __attribute__((section)) in the GCC manual -- but I think the use case I'm
> trying to solve is one of the most common uses of that attribute, and it
> seems to become completely impossible due to this. Wouldn't it make more
> sense and be more useful if __attribute__((section)) meant "place
> *everything* generated as part of this function source code into that
> section"? Or at least offer some sort of other extension to be able to
> control section placement for those special constants? (Note that GCC
> usually seems to place constants for individual variables in the text
> section, simply behind the epilogue of the function... so it's also quite
> unclear to me why arrays get treated differently at all.)
> Apart from this issue, this behavior also seems to "break"
> -ffunction-sections/-fdata-sections. Even with both of those set, these
> sorts of constants seem to get placed into the same big, common .rodata
> section (as opposed to either .text.functionname or .rodata.functionname
as
> you'd expect). That means that they won't get collected when linking the
> binary with --gc-sections and will bloat the code size for projects that
> link a lot of code opportunistically and rely on --gc-sections to drop
> everything that's not needed for the current configuration.
> Is there some clever trick that I missed to work around this, or is this
> really not possible with the current GCC? And if so, would you agree that
> this is a valid problem that GCC should provide a solution for (in some
> form or another)?
I think you are asking for per-function constant pool sections. Because
we generally cannot avoid the need of a constant pool and dependent
on the target that is always global. Note with per-function constant
pools you will not benefit from constant pool entry merging across
functions. I'm also not aware of any non-target-specific (and thus not
implemented on some targets) option to get these.
Richard.
> Thanks,
> Julius
From rodrivg@gmail.com Tue May 15 10:01:00 2018
From: rodrivg@gmail.com (Rodrigo V. G.)
Date: Tue, 15 May 2018 10:01:00 -0000
Subject: Please support the _Atomic keyword in C++
In-Reply-To:
References:
Message-ID:
On Tue, May 15, 2018 at 12:27 AM, Jonathan Wakely wrote:
> On 14 May 2018 at 22:32, Rodrigo V. G. wrote:
>> In addition to the bug:
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932
>> I wanted to add some comment:
>>
>> It would be very useful if the _Atomic keyword would be supported in C++.
>> This way the header could be included inconditionally in C++ code.
>> Even if it is not compatible with the C++ header, it would be useful.
>>
>> Supporting the _Atomic keyword in C++ would benefit at least two cases:
>>
>> - When mixing C and C++ code for interoperability (using, in C++, some
>> variables declared as _Atomic in a C header).
>>
>> - When developing operating systems or kernels in C++, in a
>> freestanding environment (cross compiler), is not available,
>
> Why not? It's part of a freestanding C++ implementation.
When building a cross compiler as indicated in:
https://wiki.osdev.org/GCC_Cross-Compiler#GCC
it does not install the header.
>> but is.
>
> How? It's not part of any C++ implementation at all, freestanding or not.
As far as I can see the can be included from C++ code
(also in the cross compiler).
Only that it complains about _Atomic and _Bool so it does not work.
So _Atomic and _Bool seem to be the missing pieces.
>> So to correctly use things like __atomic_fetch_add in C++ in
>> freestanding mode, this is the only way. Otherwise one cannot use
>> atomics at all in these conditions.
>
> Why can't you use __atomic_fetch_add directly?
I tried to use __atomic_fetch_add in C++ with a volatile (non _Atomic) variable,
and it seems to generate the same assembler code.
The only difference that I saw was that with _Atomic
it generates a "mfence" instruction after initialization but with
volatile it does not.
So I think it might not provide the same guarantees.
(Sorry, I forgot to cc the list, now I do cc)
From aph@redhat.com Tue May 15 10:44:00 2018
From: aph@redhat.com (Andrew Haley)
Date: Tue, 15 May 2018 10:44:00 -0000
Subject: Please support the _Atomic keyword in C++
In-Reply-To:
References:
Message-ID: <76df5a25-9eeb-975a-869b-ba6a0259ea25@redhat.com>
On 05/15/2018 11:01 AM, Rodrigo V. G. wrote:
> I tried to use __atomic_fetch_add in C++ with a volatile (non _Atomic) variable,
> and it seems to generate the same assembler code.
> The only difference that I saw was that with _Atomic
> it generates a "mfence" instruction after initialization but with
> volatile it does not.
That's what should happen on x86.
> So I think it might not provide the same guarantees.
I think it does.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd.
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
From jwakely.gcc@gmail.com Tue May 15 10:50:00 2018
From: jwakely.gcc@gmail.com (Jonathan Wakely)
Date: Tue, 15 May 2018 10:50:00 -0000
Subject: Please support the _Atomic keyword in C++
In-Reply-To:
References: