Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0YGe-0006On-V0 for qemu-devel@nongnu.org; Wed, 21 Oct 2009 06:18:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0YGZ-0006L5-GB for qemu-devel@nongnu.org; Wed, 21 Oct 2009 06:18:07 -0400 Received: from [199.232.76.173] (port=43283 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0YGZ-0006Kw-3O for qemu-devel@nongnu.org; Wed, 21 Oct 2009 06:18:03 -0400 Received: from smtp.nokia.com ([192.100.122.233]:27361 helo=mgw-mx06.nokia.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N0YGY-0000Wz-91 for qemu-devel@nongnu.org; Wed, 21 Oct 2009 06:18:02 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9LAHguq013263 for ; Wed, 21 Oct 2009 13:17:59 +0300 From: Date: Wed, 21 Oct 2009 12:17:45 +0200 Message-ID: <45F683F1-AC7E-4700-8615-FEB548311484@nokia.com> Content-Language: en-US Content-Type: multipart/mixed; boundary="_002_45F683F1AC7E47008615FEB548311484nokiacom_" MIME-Version: 1.0 Subject: [Qemu-devel] [PATCH 04/12] target-arm: allow modifying vfp fpexc en bit only List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --_002_45F683F1AC7E47008615FEB548311484nokiacom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable All other bits except for the EN in the VFP FPEXC register are defined =20 as subarchitecture specific and real functionality for any of the =20 other bits has not been implemented in QEMU. However, current code =20 allows modifying all bits in the VFP FPEXC register leading to =20 problems when guest code is writing 1's to the subarchitecture =20 specific bits and checking whether the bits stay up to verify the =20 existence of functionality which in fact does not exist in QEMU. Signed-off-by: Juha Riihim=E4ki --- diff --git a/target-arm/translate.c b/target-arm/translate.c index d027572..07ee638 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -2788,6 +2788,9 @@ static int disas_vfp_insn(CPUState * env, =20 DisasContext *s, uint32_t insn) case ARM_VFP_FPEXC: if (IS_USER(s)) return 1; + /* TODO: VFP subarchitecture support. + * For now, keep the EN bit only */ + tcg_gen_andi_i32(tmp, tmp, 1 << 30); store_cpu_field(tmp, vfp.xregs[rn]); gen_lookup_tb(s); break; --_002_45F683F1AC7E47008615FEB548311484nokiacom_ Content-Type: application/octet-stream; name="translate.c.vfpfpexc.diff" Content-Description: translate.c.vfpfpexc.diff Content-Disposition: attachment; filename="translate.c.vfpfpexc.diff"; size=739; creation-date="Wed, 21 Oct 2009 12:17:29 GMT"; modification-date="Wed, 21 Oct 2009 12:17:29 GMT" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3RhcmdldC1hcm0vdHJhbnNsYXRlLmMgYi90YXJnZXQtYXJtL3RyYW5zbGF0 ZS5jDQppbmRleCBkMDI3NTcyLi4wN2VlNjM4IDEwMDY0NA0KLS0tIGEvdGFyZ2V0LWFybS90cmFu c2xhdGUuYw0KKysrIGIvdGFyZ2V0LWFybS90cmFuc2xhdGUuYw0KQEAgLTI3ODgsNiArMjc4OCw5 IEBAIHN0YXRpYyBpbnQgZGlzYXNfdmZwX2luc24oQ1BVU3RhdGUgKiBlbnYsIERpc2FzQ29udGV4 dCAqcywgdWludDMyX3QgaW5zbikNCiAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIEFSTV9W RlBfRlBFWEM6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChJU19VU0VSKHMpKQ0K ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDE7DQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC8qIFRPRE86IFZGUCBzdWJhcmNoaXRlY3R1cmUgc3VwcG9ydC4NCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICogRm9yIG5vdywga2VlcCB0aGUgRU4gYml0IG9u bHkgKi8NCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGNnX2dlbl9hbmRpX2kzMih0bXAs IHRtcCwgMSA8PCAzMCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JlX2NwdV9m aWVsZCh0bXAsIHZmcC54cmVnc1tybl0pOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBn ZW5fbG9va3VwX3RiKHMpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCg== --_002_45F683F1AC7E47008615FEB548311484nokiacom_--