From owner-freebsd-emulation@freebsd.org Mon Sep 25 01:06:28 2017 Return-Path: Delivered-To: freebsd-emulation@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 B7AEEE062AF for ; Mon, 25 Sep 2017 01:06:28 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 9B94268B7C for ; Mon, 25 Sep 2017 01:06:28 +0000 (UTC) (envelope-from soralx@cydem.org) Received: by mailman.ysv.freebsd.org (Postfix) id 9B0DEE062AE; Mon, 25 Sep 2017 01:06:28 +0000 (UTC) Delivered-To: emulation@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 9AC09E062AC for ; Mon, 25 Sep 2017 01:06:28 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7512668B7B for ; Mon, 25 Sep 2017 01:06:28 +0000 (UTC) (envelope-from soralx@cydem.org) Received: by freefall.freebsd.org (Postfix) id BCBBB25D7; Mon, 25 Sep 2017 01:06:27 +0000 (UTC) Delivered-To: vbox@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id A33C725D6; Mon, 25 Sep 2017 01:06:27 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from smtp.triumf.ca (smtp.triumf.ca [142.90.100.188]) by mx1.freebsd.org (Postfix) with ESMTP id D7F0D68B79; Mon, 25 Sep 2017 01:06:26 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from mscad14 (mscad14.triumf.ca [142.90.115.36]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.triumf.ca (Postfix) with ESMTP id B8CD2F804; Sun, 24 Sep 2017 18:06:20 -0700 (PDT) Date: Sun, 24 Sep 2017 18:06:19 -0700 From: To: Cc: Subject: Re: [virtualbox-ose] Build failure: global register variable Message-ID: <20170924180619.23e149be@mscad14> In-Reply-To: <5c68323f-5fed-342b-ad92-e74d178f9daf@FreeBSD.org> References: <20170917195419.431341e7@mscad14> <20170920191710.58d335df@mscad14> <20170921160000.689755f8@mscad14> <5c68323f-5fed-342b-ad92-e74d178f9daf@FreeBSD.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; amd64-portbld-freebsd9.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 25 Sep 2017 10:46:26 +0000 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2017 01:06:28 -0000 > > Alternatively, one can try changing 'r14' to 'rbp' in definition > > of "AREG0" for amd64 at src/recompiler/dyngen-exec.h:81. This is > > the only place where gcc is needed, as clang cannot handle r14 > > for now [0]. > > > > I recompiled kBuild with clang, and succeeded compiling virtualbox-ose > > with 'r14' to 'rbp' change. It seems to work normally, but I don't > > know what are the performance implications of using up rbp. > > > > [0] clang/lib/Basic/Targets/X86.h: > > 860 bool validateGlobalRegisterVariable(StringRef RegName, > > unsigned RegSize, 861 bool > > &HasSizeMismatch) const override { 862 // rsp and rbp are the > > only 64-bit registers the x86 backend can currently 863 // handle. > > 864 if (RegName.equals("rsp") || RegName.equals("rbp")) { > > 865 // Check that the register size is 64-bit. > > 866 HasSizeMismatch = RegSize != 64; > > 867 return true; > > 868 } > > Please try the attached patch. Thanks for the patch! I gave it a quick try (not an extensive test), and VirtualBox, compiled fully with clang, seems to work as usual. > Jung-uk Kim -- [SorAlx] ridin' VN2000 Classic LT