svn commit: r358439 - head/sys/amd64/include

Mark Millard marklmi at yahoo.com
Mon Mar 2 20:30:03 UTC 2020


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/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp
clang-7: warning: argument unused during compilation: '--param inline-unit-growth=100' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '--param large-function-growth=1000' [-Wunused-command-line-argument]
In file included from /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp:38:
In file included from /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/include/VBox/Graphics/VBoxVideoIPRT.h:32:
In file included from /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/include/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 '=@cce' in asm
ATOMIC_CMPSET(char);
^
/usr/include/machine/atomic.h:205:4: note: expanded from macro 'ATOMIC_CMPSET'
       : "=@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:230:1: error: invalid output constraint '=@cce' in asm
/usr/include/machine/atomic.h:222:4: note: expanded from macro 'ATOMIC_CMPSET'
       : "=@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:231:1: error: invalid output constraint '=@cce' in asm
ATOMIC_CMPSET(short);
^
/usr/include/machine/atomic.h:205:4: note: expanded from macro 'ATOMIC_CMPSET'
       : "=@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:231:1: error: invalid output constraint '=@cce' in asm
/usr/include/machine/atomic.h:222:4: note: expanded from macro 'ATOMIC_CMPSET'
       : "=@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:232:1: error: invalid output constraint '=@cce' in asm
ATOMIC_CMPSET(int);
^
/usr/include/machine/atomic.h:205:4: note: expanded from macro 'ATOMIC_CMPSET'
       : "=@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:232:1: error: invalid output constraint '=@cce' in asm
/usr/include/machine/atomic.h:222:4: note: expanded from macro 'ATOMIC_CMPSET'
       : "=@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:233:1: error: invalid output constraint '=@cce' in asm
ATOMIC_CMPSET(long);
^
/usr/include/machine/atomic.h:205:4: note: expanded from macro 'ATOMIC_CMPSET'
       : "=@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:233:1: error: invalid output constraint '=@cce' in asm
/usr/include/machine/atomic.h:222:4: note: expanded from macro 'ATOMIC_CMPSET'
       : "=@cce" (res),                /* 0 */         \
         ^
/usr/include/machine/atomic.h:280:4: error: invalid output constraint '=@ccc' in asm
       : "=@ccc" (res),                /* 0 */
         ^
/usr/include/machine/atomic.h:296:4: error: invalid output constraint '=@ccc' in asm
       : "=@ccc" (res),                /* 0 */
         ^
/usr/include/machine/atomic.h:312:4: error: invalid output constraint '=@ccc' in asm
       : "=@ccc" (res),                /* 0 */
         ^
/usr/include/machine/atomic.h:328:4: error: invalid output constraint '=@ccc' in asm
       : "=@ccc" (res),                /* 0 */
         ^

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



More information about the svn-src-head mailing list