From patchwork Sun Mar 2 19:36:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25577 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AA201206F9 for ; Sun, 2 Mar 2014 19:36:46 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wo20sf16118470obc.10 for ; Sun, 02 Mar 2014 11:36:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=G1FVnbFxwTYsa5sVUteK2cfWcS0XnNmiMIm5REwnNNY=; b=XfsGKzLURw63Mm3lc+qTceYKfq6d6R7i/vy+0sXLkjHyoFUtvLZS1V4vblmZurXY3p 0sRlI6bmF+xJ3sVmBfuaKEHmvCqOQqJMDRcG0JwOQtzicTqtOA1xWbUbP+nG++W+tsoK kmRQLQOVuQY4i8BU2GcbUKHgGWhCe78Tws6bv35h5Aw5Wf2lVsjiRvyz5RAP/w4UdNfL FrFfvURbZN5fEWHa/c/nQRXBFxZb87lZl9xYUcp/tTEKRcQSbIPSuFoXLPlYJeHRl9VA oRZ5gLE/Md2hhKtcCjxAiTwsxZPqnzQhZuOwV4B1ow3TJldF/VzrFgE621S5tdSV9aYJ ZVTw== X-Gm-Message-State: ALoCoQlG50deZDVe8K4f7DIkSvU4TLtwzLtA0vI5G1/PrqEklS4YdBfFxa367BLpbExOTd6ouiCp X-Received: by 10.43.100.129 with SMTP id cw1mr8773795icc.30.1393789005672; Sun, 02 Mar 2014 11:36:45 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.100.146 with SMTP id s18ls1881296qge.8.gmail; Sun, 02 Mar 2014 11:36:45 -0800 (PST) X-Received: by 10.221.22.71 with SMTP id qv7mr778917vcb.34.1393789005513; Sun, 02 Mar 2014 11:36:45 -0800 (PST) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id b7si2477787vej.108.2014.03.02.11.36.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Mar 2014 11:36:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id la4so2711101vcb.7 for ; Sun, 02 Mar 2014 11:36:45 -0800 (PST) X-Received: by 10.58.49.129 with SMTP id u1mr13962453ven.0.1393789005382; Sun, 02 Mar 2014 11:36:45 -0800 (PST) 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.130.193 with SMTP id u1csp8755vcs; Sun, 2 Mar 2014 11:36:45 -0800 (PST) X-Received: by 10.194.58.19 with SMTP id m19mr11767292wjq.30.1393789004569; Sun, 02 Mar 2014 11:36:44 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id fb9si6765610wjc.40.2014.03.02.11.36.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 02 Mar 2014 11:36:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WKCBm-0007nl-ID; Sun, 02 Mar 2014 19:36:42 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Michael Matz , Andreas Schwab , Riku Voipio Subject: [PATCH 1/5] linux-user/signal.c: Fix AArch64 big-endian FP register restore Date: Sun, 2 Mar 2014 19:36:38 +0000 Message-Id: <1393789002-29960-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393789002-29960-1-git-send-email-peter.maydell@linaro.org> References: <1393789002-29960-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 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: , Fix the loop restoring the FP registers from the signal frame to match the one used when setting up the signal frame, so that it handles TARGET_WORDS_BIGENDIAN being set. Signed-off-by: Peter Maydell --- linux-user/signal.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 04638e2..29734b2 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -1233,8 +1233,14 @@ static int target_restore_sigframe(CPUARMState *env, return 1; } - for (i = 0; i < 32 * 2; i++) { - __get_user(env->vfp.regs[i], &aux->fpsimd.vregs[i]); + for (i = 0; i < 32; i++) { +#ifdef TARGET_WORDS_BIGENDIAN + __get_user(env->vfp.regs[i * 2], &aux->fpsimd.vregs[i * 2 + 1]); + __get_user(env->vfp.regs[i * 2 + 1], &aux->fpsimd.vregs[i * 2]); +#else + __get_user(env->vfp.regs[i * 2], &aux->fpsimd.vregs[i * 2]); + __get_user(env->vfp.regs[i * 2 + 1], &aux->fpsimd.vregs[i * 2 + 1]); +#endif } __get_user(fpsr, &aux->fpsimd.fpsr); vfp_set_fpsr(env, fpsr);