From patchwork Wed Nov 6 13:04:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 178691 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp588419ilf; Wed, 6 Nov 2019 05:12:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwy6xWpYQ97URPpjNvfwSIWm2Hy+q1IxkCOfw1bDAp/wJLsXCXIqYaYkMIODIVBb69JOSV7 X-Received: by 2002:a50:d7c9:: with SMTP id m9mr2607993edj.93.1573045936819; Wed, 06 Nov 2019 05:12:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573045936; cv=none; d=google.com; s=arc-20160816; b=kD7FokHKJxuf4EqDhXlCV0LdMUKh+dPFpiXkn8JVobmuHhIpCpfdxkcJO2gc/mvhST khUYQTryEs82aNveT+19aL9/MuWn2BJEfNvd5R2qYyKTr976In5rPWDgz8pzZ57uev8l D8oekHrVfO7lkGj9ixBFia1tmkOAIt/2Q3mBNIqlG1QcCWpQCtuqjKmv7WnzMBk9Gotw yu2w4NmT92PMiqV9BfvGpuRW4AtsZQhwDY+EW/3Z3X1owIBh52vQFuXYkJmoIws5TQWn qjYEp8gKJ04VyAXviCLD24g6wzdXZDvy+X0pmdY+kjkVLi5kFaxKmG1Zm2OnglM4c3zo W/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=p40Pa87LJUVJxYlcAWYnNeHeQq7IFVjh00J/2+b0tNQ=; b=cwXhWeIAarV3SGixe16a6YGM1UoifJ4SnVJ8DgNw9sluHcJyJpJGhn/qpZm1+RYZvI KeIV+hlWiLhT2vjNZ5R22DtqcTm0hffIf2eqTDM9j7ricq8u+2cs2MxrmF8QuiLTk1Da sAT8eXLE45K1HLrSGApW5W1CtTgm7EZwtqrLUbsmZvQQnVq5Ayl1tYd5Wp5ge+/mYYUP OeQ4eXU+5FtG5DqUt3rYcp6pbxytE7lpxsyyXDXvJgxmRMo0BVp58ObHDLsyHxvsVmcU 2XR4VcZ7Up+oO9nNphJGgplNP+g2vIZzfjSqhKFDJupQj+Lirz/D5YGls8VPDEa7DObL x3SA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s24si9006069ejb.45.2019.11.06.05.12.16 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Nov 2019 05:12:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:57900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSL6d-0003sD-9A for patch@linaro.org; Wed, 06 Nov 2019 08:12:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36497) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSKzx-0003Yq-D8 for qemu-devel@nongnu.org; Wed, 06 Nov 2019 08:05:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSKzv-0002ys-Qy for qemu-devel@nongnu.org; Wed, 06 Nov 2019 08:05:21 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:57175) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSKzv-0002y3-HF for qemu-devel@nongnu.org; Wed, 06 Nov 2019 08:05:19 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N4i3j-1hkzWM2Av1-011kB0; Wed, 06 Nov 2019 14:05:17 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 13/13] linux-user/alpha: Set r20 secondary return value Date: Wed, 6 Nov 2019 14:04:56 +0100 Message-Id: <20191106130456.6176-14-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191106130456.6176-1-laurent@vivier.eu> References: <20191106130456.6176-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:sT58QnB+9d3LffVxpnM5Qac7Rc7XxNgy+jbm6hcpvpCOZtG5bCa Xk0r88/fTxQXxtQGImnrI0Juy3vZimxPwTHS2X5Rbj7FeZr39RLaLdNrHDZTBrDJOzlF1lz f7lExXIb919ZyTBKXsjAAF1GGgU3+Zr3qX5SQxbrzdiekbxo9c2unQUCI9r2JHgIVNZ08NM TIgV+ouom55nFs9eoodMA== X-UI-Out-Filterresults: notjunk:1; V03:K0:85v3dB7Rzso=:aRwOqgolEVh7fzd222PCJ7 4ZIEFhuVbHwj9aaaRbm8O3+49AsBoVe3NbWBl5CtG+DWT0sCEyiyT+pueSh8JnmGvM+qR4MlH VwU8hTPhYpIoLhPyhrSgZjnO25cAbS5tEZPhf1ZtDZereh7XNaBwQ3ntozyiZU/P7nOQSvTjh fQhFhQ2uWZ2I76etvxlzmtlyaEaxbYTZiznS5IOidiksU3gnG9oul2FmC84zqyxKrW8jT5Prq c/A5hbnqwDpu4Q5u1PtEwrlJvSJDdci8WExzIo2+6FtoFtSPaH3l89mJCjOsIxCAUUN9zIXIp JhMrsKug9xRm78/HCE+diyTewdT9WTyjoSgAdO4uHCtnhn6+8zQ+vfgT8HdhqQVN7NzBOQkEf ok6ydOkFYlBs+sJVT6s3OG2Atjt3Pnf34r+a5AvHFgvl4R0hzJ0VcI6n45ZgEpFSZ0X2+eYJR NnED1yu1c28dDBkqEHdl+1z4OYD68MG5rsHZqVQa5f3zyuDPYg9dxbOSoY4IT+Pr2ADq+6rq2 /fiYfbkdAGYk80HCGt9X2keG2wIr7ZTK3Ur7L/LcBu2es7GM2LuhhGTlE4u12NZF5SP3D3zZU 4ssejeP30UeYRfKZ3W07hbWXSspYdsSiq/BIYXBtCKs9H5+WNnQlA3RC5LGHcnOia15CfdrTc Lov7WUmRgjfErsfbcK8TDGtNefGkdb7eyIGr2PVkMLYOlANQWujgepK0t58xnDwIpxid/+xKQ KcusbiSYUh80Ex/1q75PHrT9BLNcmJ538cBbc3Q5Tq20N5nq+mrCZyB/Bz8KcwFkvRJnS6yiw fvJoe5Dvr8nRLXCwiGjoK92X9jCsJY+E7kAT4TbcM+72t+lDn0rKwewEjt0Nsm67swAPi1ggA pGVyAlJyMW9a25Srebqw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.135 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Riku Voipio , Mark Cave-Ayland , Laurent Vivier , =?utf-8?q?Alex_Benn=C3=A9e?= , Artyom Tarasenko Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson This value is not, as far as I know, used by any linux software, but it is set by the kernel and is part of the ABI. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20191106113318.10226-13-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/alpha/target_cpu.h | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.21.0 diff --git a/linux-user/alpha/target_cpu.h b/linux-user/alpha/target_cpu.h index dd25e18f47fb..ad408ab5cc8e 100644 --- a/linux-user/alpha/target_cpu.h +++ b/linux-user/alpha/target_cpu.h @@ -27,10 +27,19 @@ static inline void cpu_clone_regs_child(CPUAlphaState *env, target_ulong newsp, } env->ir[IR_V0] = 0; env->ir[IR_A3] = 0; + env->ir[IR_A4] = 1; /* OSF/1 secondary return: child */ } static inline void cpu_clone_regs_parent(CPUAlphaState *env, unsigned flags) { + /* + * OSF/1 secondary return: parent + * Note that the kernel does not do this if SETTLS, because the + * settls argument register is still live after copy_thread. + */ + if (!(flags & CLONE_SETTLS)) { + env->ir[IR_A4] = 0; + } } static inline void cpu_set_tls(CPUAlphaState *env, target_ulong newtls)