From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nr9Ep-00014A-O6 for qemu-devel@nongnu.org; Mon, 15 Mar 2010 08:17:39 -0400 Received: from [199.232.76.173] (port=49394 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nr9Eo-000140-D1 for qemu-devel@nongnu.org; Mon, 15 Mar 2010 08:17:38 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nr9En-0003Xc-6A for qemu-devel@nongnu.org; Mon, 15 Mar 2010 08:17:38 -0400 Received: from pasmtpb.tele.dk ([80.160.77.98]:55459) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nr9Em-0003XE-T8 for qemu-devel@nongnu.org; Mon, 15 Mar 2010 08:17:37 -0400 Received: from firewall (0x535c82dc.virnxx18.dynamic.dsl.tele.dk [83.92.130.220]) by pasmtpB.tele.dk (Postfix) with ESMTP id DF8B6E303E5 for ; Mon, 15 Mar 2010 13:17:32 +0100 (CET) Date: Mon, 15 Mar 2010 13:17:32 +0100 From: Lars Munch Message-ID: <20100315121732.GA8895@firewall> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] linux-user: use arm features based on cpu model List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Use arm features based on cpu model. The hardcoded feature list gave problems in the setjmp/longjmp functions of glibc since it tried to use VFP instructions even though I specified a pxa270 as cpu model. Signed-off-by: Lars Munch --- linux-user/elfload.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 91eea62..79af51d 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -333,10 +333,12 @@ enum ARM_HWCAP_ARM_VFPv3D16 = 1 << 13, }; -#define ELF_HWCAP (ARM_HWCAP_ARM_SWP | ARM_HWCAP_ARM_HALF \ - | ARM_HWCAP_ARM_THUMB | ARM_HWCAP_ARM_FAST_MULT \ - | ARM_HWCAP_ARM_FPA | ARM_HWCAP_ARM_VFP \ - | ARM_HWCAP_ARM_NEON | ARM_HWCAP_ARM_VFPv3 ) +#define ELF_HWCAP get_elf_hwcap() + +static uint32_t get_elf_hwcap(void) +{ + return thread_env->features; +} #endif -- 1.7.0