Date: Mon, 25 Sep 2017 17:50:58 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: soralx@cydem.org Cc: vbox@FreeBSD.org Subject: Re: [virtualbox-ose] Build failure: global register variable Message-ID: <6b02f95f-207b-0f55-8e30-11512979804e@FreeBSD.org> In-Reply-To: <20170924180619.23e149be@mscad14> References: <20170917195419.431341e7@mscad14> <20170920191710.58d335df@mscad14> <20170921160000.689755f8@mscad14> <5c68323f-5fed-342b-ad92-e74d178f9daf@FreeBSD.org> <20170924180619.23e149be@mscad14>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2nm70CfCPXuLwQqmOidkbnURD84n3NHvx Content-Type: multipart/mixed; boundary="p078gD22HjDb8LmkwwT3pcKwb517hWKfx"; protected-headers="v1" From: Jung-uk Kim <jkim@FreeBSD.org> To: soralx@cydem.org Cc: vbox@FreeBSD.org Message-ID: <6b02f95f-207b-0f55-8e30-11512979804e@FreeBSD.org> Subject: Re: [virtualbox-ose] Build failure: global register variable References: <20170917195419.431341e7@mscad14> <20170920191710.58d335df@mscad14> <20170921160000.689755f8@mscad14> <5c68323f-5fed-342b-ad92-e74d178f9daf@FreeBSD.org> <20170924180619.23e149be@mscad14> In-Reply-To: <20170924180619.23e149be@mscad14> --p078gD22HjDb8LmkwwT3pcKwb517hWKfx Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 09/24/2017 21:06, soralx@cydem.org wrote: >> 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-os= e >>> 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= =2E >>> 864 if (RegName.equals("rsp") || RegName.equals("rbp")) { >>> 865 // Check that the register size is 64-bit. >>> 866 HasSizeMismatch =3D RegSize !=3D 64; >>> 867 return true; >>> 868 } =20 >> >> Please try the attached patch. >=20 > 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. Committed (r450636), thanks! For more detailed information, please read the commit log. https://svnweb.freebsd.org/changeset/ports/450636 Jung-uk Kim --p078gD22HjDb8LmkwwT3pcKwb517hWKfx-- --2nm70CfCPXuLwQqmOidkbnURD84n3NHvx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlnJelAACgkQfJ+WJvzb 8UYOCwf8DEXRczq1P/qfiV4+4JQ3Ji8kTc2djm7mOUQChnU8KauTvYaN3WWqjf+t nM2xtbhxQ7Iw/ANzm3BBWpsiooIKuoc2pELHGK4wLSQcgVC1eRKP1tCLKT5v3+Rm 1pbVX86/5RCjNcxl5H6c6Hifvnw4YgXCOBuPUu1rWvPZNVcMD/PE+gAgp75UVAAM LCCAFZoCPEA9AJO5jvww32r6B1Ehhb1uI1pd+LFkIxiGlxwIvtLqYzMda1xTCymk HdAblSt6e7J7WQ+7aFeafl1KEgMZISXWrDxLLpBZnewgFnQbKZB9IvclvnLJiI5t m+KTSnbPDOj2VZCmqPboGdiskCVvcA== =KWiT -----END PGP SIGNATURE----- --2nm70CfCPXuLwQqmOidkbnURD84n3NHvx--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6b02f95f-207b-0f55-8e30-11512979804e>