From patchwork Thu Oct 3 15:55:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 20788 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 099FA25CAB for ; Thu, 3 Oct 2013 15:55:45 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id lf12sf3688339vcb.10 for ; Thu, 03 Oct 2013 08:55:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=h1kYw1NOykhzlfHuf8bfRlMpJwY+a8lq60KtdidWd84=; b=Q+ib3Sy08FOAAM46gZ2r1LEICe0DB+bs5939//Q8mbSbvegvzGi9l+4eIlzONOR1fa 6x3vpMYq6VJbvOKPrudLy0CqemdnLdc9WMyypifFTTcPzag/6AfW9vtMC8QboR4wfH5i RkQgf7UUtD+UgQlQ/NfQAU9vDZSCGXu53/34mUyrGwlH6hwmGZl0NOptPBsCEhQADDnz qHF1+2hvfnypzN8lWihqvK9tE4Vi8BjUBWPTyjdiTTH9UaLWntCHxpvDmgDjQ6afQJF3 MGicrS1MQJIPRA4cHPzctDv1/qpafNK64rRKlqm6EJaSekMMsXymXBlYIxZAF61DO8XE dpLA== X-Received: by 10.236.101.103 with SMTP id a67mr7524562yhg.25.1380815745519; Thu, 03 Oct 2013 08:55:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.104.84 with SMTP id gc20ls966375qeb.96.gmail; Thu, 03 Oct 2013 08:55:45 -0700 (PDT) X-Received: by 10.220.145.75 with SMTP id c11mr526140vcv.30.1380815745411; Thu, 03 Oct 2013 08:55:45 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id 10si1878481vcs.105.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:55:45 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so1607337vbg.39 for ; Thu, 03 Oct 2013 08:55:45 -0700 (PDT) X-Gm-Message-State: ALoCoQmlDfftUKOXfpU1OlU3hV75RNbtwKMJ8LSdDdiUrDWCTEfYF0U6iBjv3bhp1oAfw/frc8kc X-Received: by 10.58.187.47 with SMTP id fp15mr2336251vec.22.1380815745276; Thu, 03 Oct 2013 08:55:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp189053vcz; Thu, 3 Oct 2013 08:55:44 -0700 (PDT) X-Received: by 10.14.180.73 with SMTP id i49mr4485869eem.55.1380815743574; Thu, 03 Oct 2013 08:55:43 -0700 (PDT) Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by mx.google.com with ESMTPS id f3si6541376eet.269.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:55:43 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.50 is neither permitted nor denied by best guess record for domain of will.newton@linaro.org) client-ip=74.125.83.50; Received: by mail-ee0-f50.google.com with SMTP id d51so1198246eek.9 for ; Thu, 03 Oct 2013 08:55:43 -0700 (PDT) X-Received: by 10.15.98.9 with SMTP id bi9mr4015544eeb.67.1380815742915; Thu, 03 Oct 2013 08:55:42 -0700 (PDT) Received: from localhost.localdomain (cpc6-seac21-2-0-cust453.7-2.cable.virginmedia.com. [82.1.113.198]) by mx.google.com with ESMTPSA id h45sm17231119eeg.5.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:55:42 -0700 (PDT) Message-ID: <524D937C.1040702@linaro.org> Date: Thu, 03 Oct 2013 16:55:40 +0100 From: Will Newton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: qemu-devel@nongnu.org CC: patches@linaro.org Subject: [PATCH 1/2] target-arm: Move call to disas_vfp_insn out of disas_coproc_insn. X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Floating point is an extension to the instruction set rather than a coprocessor, so call it directly from the ARM and Thumb decode functions. Signed-off-by: Will Newton --- target-arm/translate.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 998bde2..2c1458a 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -6299,9 +6299,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn) return disas_dsp_insn(env, s, insn); } return 1; - case 10: - case 11: - return disas_vfp_insn (env, s, insn); default: break; } @@ -6756,6 +6753,11 @@ static void disas_arm_insn(CPUARMState * env, DisasContext *s) goto illegal_op; return; } + if ((insn & 0x0f000e10) == 0x0e000a00) { + /* VFP. */ + if (disas_vfp_insn(env, s, insn)) + goto illegal_op; + } if (((insn & 0x0f30f000) == 0x0510f000) || ((insn & 0x0f30f010) == 0x0710f000)) { if ((insn & (1 << 22)) == 0) { @@ -8036,9 +8038,15 @@ static void disas_arm_insn(CPUARMState * env, DisasContext *s) case 0xc: case 0xd: case 0xe: - /* Coprocessor. */ - if (disas_coproc_insn(env, s, insn)) + if (((insn >> 8) & 0xe) == 10) { + /* VFP. */ + if (disas_vfp_insn(env, s, insn)) { + goto illegal_op; + } + } else if (disas_coproc_insn(env, s, insn)) { + /* Coprocessor. */ goto illegal_op; + } break; case 0xf: /* swi */ @@ -8768,6 +8776,10 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw insn = (insn & 0xe2ffffff) | ((insn & (1 << 28)) >> 4) | (1 << 28); if (disas_neon_data_insn(env, s, insn)) goto illegal_op; + } else if (((insn >> 8) & 0xe) == 10) { + if (disas_vfp_insn(env, s, insn)) { + goto illegal_op; + } } else { if (insn & (1 << 28)) goto illegal_op;