From owner-svn-src-head@freebsd.org Tue Mar 28 18:09:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3182AD221D1; Tue, 28 Mar 2017 18:09:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 013B8D96; Tue, 28 Mar 2017 18:09:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SI92S7011781; Tue, 28 Mar 2017 18:09:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SI92Ck011780; Tue, 28 Mar 2017 18:09:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201703281809.v2SI92Ck011780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 28 Mar 2017 18:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316100 - head/sys/boot/i386/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 18:09:03 -0000 Author: imp Date: Tue Mar 28 18:09:01 2017 New Revision: 316100 URL: https://svnweb.freebsd.org/changeset/base/316100 Log: Remove -fno-guess-branch-probability and -fno-unit-at-a-time. bde enabled -fno-guess-branch-probability in 2003, well before our current compiler was imported. At the time it produced weirdly orded code. It no longer does that. It also saves 0-4 bytes depending on other options. kan disabled unit-at-a-time in 2004 because it badly mangled boot2 so it wouldn't work. That too was before the 4.2.1 compiler, where it no longer does that. This saves 44 bytes. I had planned to document why they were needed, but when I discovered their antiquity, I removed them and boot2 still works and is smaller. In qemu, the old and new boot2's behaved identically. These are gcc specific hacks, and won't affect clang-built boot2 at all. Modified: head/sys/boot/i386/boot2/Makefile Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Tue Mar 28 17:37:49 2017 (r316099) +++ head/sys/boot/i386/boot2/Makefile Tue Mar 28 18:09:01 2017 (r316100) @@ -38,8 +38,6 @@ CFLAGS= -fomit-frame-pointer \ -Winline CFLAGS.gcc+= -Os \ - -fno-guess-branch-probability \ - -fno-unit-at-a-time \ --param max-inline-insns-single=100 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201 CFLAGS.gcc+= -mno-align-long-strings