Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Mar 2020 12:29:55 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        Konstantin Belousov <kib@freebsd.org>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r358439 - head/sys/amd64/include
Message-ID:  <4ED174D6-EBC4-4F0D-B9C5-639E10016C4D@yahoo.com>
References:  <4ED174D6-EBC4-4F0D-B9C5-639E10016C4D.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov kostikbel at gmail.com wrote on
Mon Mar 2 18:27:05 UTC 2020 ":

> On Mon, Mar 02, 2020 at 09:13:53AM -0800, Ryan Libby wrote:
> > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov <melifaro at =
ipfw.ru> wrote:
> > >
> > > 28.02.2020, 18:32, "Ryan Libby" <rlibby at freebsd.org>:
> > > > Author: rlibby
> > > > Date: Fri Feb 28 18:32:36 2020
> > > > New Revision: 358439
> > > > URL: https://svnweb.freebsd.org/changeset/base/358439
> > > >
> > > > Log:
> > > >   amd64 atomic.h: minor codegen optimization in flag access
> > > >
> > > >   Previously the pattern to extract status flags from inline =
assembly
> > > >   blocks was to use setcc in the block to write the flag to a =
register.
> > > >   This was suboptimal in a few ways:
> > > >    - It would lead to code like: sete %cl; test %cl; jne, i.e. a =
flag
> > > >      would just be loaded into a register and then reloaded to a =
flag.
> > > >    - The setcc would force the block to use an additional =
register.
> > > >    - If the client code didn't care for the flag value then the =
setcc
> > > >      would be entirely pointless but could not be eliminated by =
the
> > > >      optimizer.
> > > >
> > > >   A more modern inline asm construct (since gcc 6 and clang 9) =
allows for
> > > This effectively restricts kernel builds by all older compilers.
> > > Is there any chance of making it conditional depending on the =
compiler version/features?
> What is the older compiler you need to use for base system ?
> And why ?

[A copy of something I sent to svn-src-head and rlibby a on Feb 29
that showed the example of 2 ports failing to build on FreeBSD build
servers, where the server sent out the notice of the failure.]

head -r358439 breaks unmodified ports that use, for example, clang70 and
clang++70:

=
https://lists.freebsd.org/pipermail/freebsd-emulation/2020-February/017672=
.html
=
https://lists.freebsd.org/pipermail/freebsd-emulation/2020-February/017675=
.html

show things like . . .

kBuild: Compiling HGSMIGuestR0Lib - =
/wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/s=
rc/VBox/GuestHost/HGSMI/HGSMICommon.cpp
clang-7: warning: argument unused during compilation: '--param =
inline-unit-growth=3D100' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '--param =
large-function-growth=3D1000' [-Wunused-command-line-argument]
In file included from =
/wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/s=
rc/VBox/GuestHost/HGSMI/HGSMICommon.cpp:38:
In file included from =
/wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/i=
nclude/VBox/Graphics/VBoxVideoIPRT.h:32:
In file included from =
/wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/i=
nclude/iprt/string.h:45:
In file included from /usr/src/sys/sys/libkern.h:41:
In file included from /usr/src/sys/sys/systm.h:44:
/usr/include/machine/atomic.h:230:1: error: invalid output constraint =
'=3D@cce' in asm
ATOMIC_CMPSET(char);
^
/usr/include/machine/atomic.h:205:4: note: expanded from macro =
'ATOMIC_CMPSET'
       : "=3D@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:230:1: error: invalid output constraint =
'=3D@cce' in asm
/usr/include/machine/atomic.h:222:4: note: expanded from macro =
'ATOMIC_CMPSET'
       : "=3D@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:231:1: error: invalid output constraint =
'=3D@cce' in asm
ATOMIC_CMPSET(short);
^
/usr/include/machine/atomic.h:205:4: note: expanded from macro =
'ATOMIC_CMPSET'
       : "=3D@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:231:1: error: invalid output constraint =
'=3D@cce' in asm
/usr/include/machine/atomic.h:222:4: note: expanded from macro =
'ATOMIC_CMPSET'
       : "=3D@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:232:1: error: invalid output constraint =
'=3D@cce' in asm
ATOMIC_CMPSET(int);
^
/usr/include/machine/atomic.h:205:4: note: expanded from macro =
'ATOMIC_CMPSET'
       : "=3D@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:232:1: error: invalid output constraint =
'=3D@cce' in asm
/usr/include/machine/atomic.h:222:4: note: expanded from macro =
'ATOMIC_CMPSET'
       : "=3D@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:233:1: error: invalid output constraint =
'=3D@cce' in asm
ATOMIC_CMPSET(long);
^
/usr/include/machine/atomic.h:205:4: note: expanded from macro =
'ATOMIC_CMPSET'
       : "=3D@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:233:1: error: invalid output constraint =
'=3D@cce' in asm
/usr/include/machine/atomic.h:222:4: note: expanded from macro =
'ATOMIC_CMPSET'
       : "=3D@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:280:4: error: invalid output constraint =
'=3D@ccc' in asm
       : "=3D@ccc" (res),                /* 0 */
         ^
/usr/include/machine/atomic.h:296:4: error: invalid output constraint =
'=3D@ccc' in asm
       : "=3D@ccc" (res),                /* 0 */
         ^
/usr/include/machine/atomic.h:312:4: error: invalid output constraint =
'=3D@ccc' in asm
       : "=3D@ccc" (res),                /* 0 */
         ^
/usr/include/machine/atomic.h:328:4: error: invalid output constraint =
'=3D@ccc' in asm
       : "=3D@ccc" (res),                /* 0 */
         ^

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ED174D6-EBC4-4F0D-B9C5-639E10016C4D>