Date: Sun, 24 Sep 2017 18:06:19 -0700 From: <soralx@cydem.org> To: <jkim@FreeBSD.org> Cc: <vbox@FreeBSD.org> 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>
index | next in thread | previous in thread | raw e-mail
> > 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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170924180619.23e149be>
