From patchwork Wed Nov 6 11:33:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 178678 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp487782ilf; Wed, 6 Nov 2019 03:44:53 -0800 (PST) X-Google-Smtp-Source: APXvYqwDJjH1iavBfHWAXPVRmxlEfUHcKcwtWM6IVe5OvmKNFlpX1j+Wh0XbH7STzGHmmAQiv3no X-Received: by 2002:a37:9c8d:: with SMTP id f135mr1551697qke.431.1573040693670; Wed, 06 Nov 2019 03:44:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573040693; cv=none; d=google.com; s=arc-20160816; b=M9XKFshtokpwozSPNYumYIJAVbyf91K1cLkbruYvMfBz/Il7+r0+yjNcc/ZmQgZq+R YvVZIlqfiIMfXxzqZPcgZP+deYJzZdihb16PhrJO0A9Qkx8lGyaeJLs+3ijmnzu/Hkg9 IrJUdBeWi6Cbj831Sp7O2FZHka1HTbJhCMIzmQJ+JURedvgiM7Y96JC7RwHw3yDKuLtg mfxzb9WaviNS00gTZrTBKahOI7wPP3Y+ChSHydMC3tEQ+5JK0HvY8QU8LkYMgc1OAoDd LcEWAv+nj6WU++pJcUnYqi/SNTqOmi/0MLHV+jPM76M5ctTmIGKl7o58PlROuicCsv3n 8C9A== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=YkY1QSHXx8tcEh42Bbj6ykJYD8SvmEqcbVRa0x3ucZs=; b=foo/uwrIUsHrDXimhNMPgN2ypL9otvmYlWJuqPv2RFwEso5LP0vRrxoGzRTEu7m9Sb cUY1pkSPoGlG8V0t8sPSlg+0KZ82ORquZuUiKKSP0ZytOUoKPpBUYjHj7dik7fyN61qS kHCXCm7KpXrxq5DCzHlaworGJqhtKI3OC71i2zDWon9LwqceU6hK9Mbp235nynTNYY7P 3uTK0cbT+lh8S8jsLiUYUQo3XmpYCyxoet5oEsKaXNkE5DPM0VGirDhwd74Vj+atdTYV VjXSvoSgI9EQt4fBoiDRkWHlSkIB38NmTLhF1MxkDYvQesJUpqfDC9dmSPTQ6bXTSmYr UNDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RRii2qO0; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z128si17206758qkd.143.2019.11.06.03.44.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Nov 2019 03:44:53 -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; dkim=pass header.i=@linaro.org header.s=google header.b=RRii2qO0; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSJk4-0000t5-PR for patch@linaro.org; Wed, 06 Nov 2019 06:44:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38000) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSJZP-000458-31 for qemu-devel@nongnu.org; Wed, 06 Nov 2019 06:33:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSJZM-0007aY-Pj for qemu-devel@nongnu.org; Wed, 06 Nov 2019 06:33:50 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:37956) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSJZM-0007Zi-JP for qemu-devel@nongnu.org; Wed, 06 Nov 2019 06:33:48 -0500 Received: by mail-wr1-x441.google.com with SMTP id j15so4669808wrw.5 for ; Wed, 06 Nov 2019 03:33:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YkY1QSHXx8tcEh42Bbj6ykJYD8SvmEqcbVRa0x3ucZs=; b=RRii2qO01P4d996eFNKftljSnF0hFDrKtvwW8xabNlr1GvNP1cUEVVoUP1f39hQbHx QRV+o4q2pkap50DTD7Mvml4q72Di7afet65XytMpvbZUl25pnbq2TtdniJq8EqXMORpJ JImXVr0SMJB7NZZa1yxunrK4jNXFIku7QIOMricijBVSjQa/5IUZim21vovapFH42W8q 9esCUGG0lVu+SVwXTAnpdyZx1wa3adk9NJ4fJu1YogIfH8NxvvNQzivkJzds1TV71+mU 1dsmgw8qzC2+lxhLCpHcer5XnMgOpft/XaZy05OggRxrQWFT14WQkGGDqgPNydemeWO6 7fFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YkY1QSHXx8tcEh42Bbj6ykJYD8SvmEqcbVRa0x3ucZs=; b=cZoAuM7A3qPhe+n/IQyYMur0bUt9S9TlceEODM0pGnOAjJkbd4FYAuBL6sxThRqFxE 95Bgdr1YdWX6NsQwimuaNraJJbAwyjoFZx28iA3vGB9bOeuDdCaGu0DHXxHhAO50amnh +ZsIdvogHuQBqp+a9rApc+X/pbUdnRYa7WwZpRcyBijrIta0j9j241RACkKqVSdij9tW dFahjXdERQY1ETA99NsnlUTx6f0i4RW7EwY2euykNA5Xw54HrHL9FMnsGzLRSRv1bkAg gQPD/kWsFDM+WtcQdNWDVuFPH8SB2MRDrPbInDFhD0A/2VeE5DCWczHBddMvjFlGmfft +RCA== X-Gm-Message-State: APjAAAVlcf73SkMMC7unWwpLPR1fgVo7VvIrZE8Xjk9jmRCO4zG88t/K WwUTQN9YHpEL8Or3FK7yoSczGQJrGkYaFA== X-Received: by 2002:adf:ee10:: with SMTP id y16mr2158630wrn.67.1573040025980; Wed, 06 Nov 2019 03:33:45 -0800 (PST) Received: from localhost.localdomain (31.red-176-87-122.dynamicip.rima-tde.net. [176.87.122.31]) by smtp.gmail.com with ESMTPSA id q124sm1776907wme.13.2019.11.06.03.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 03:33:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 12/12] linux-user/alpha: Set r20 secondary return value Date: Wed, 6 Nov 2019 12:33:18 +0100 Message-Id: <20191106113318.10226-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191106113318.10226-1-richard.henderson@linaro.org> References: <20191106113318.10226-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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: <20191025113921.9412-13-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/alpha/target_cpu.h | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.17.1 diff --git a/linux-user/alpha/target_cpu.h b/linux-user/alpha/target_cpu.h index dd25e18f47..ad408ab5cc 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)