From patchwork Sun Jan 28 23:15:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 126125 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp1987878ljd; Sun, 28 Jan 2018 15:46:06 -0800 (PST) X-Google-Smtp-Source: AH8x225HcbJ6pQu/8Q4T2dIowBub2dhPui4E06lfaIwvG7kAL9K8AykBr/RK6q7+pxjxehOpfsX/ X-Received: by 10.129.99.65 with SMTP id x62mr15742780ywb.125.1517183166550; Sun, 28 Jan 2018 15:46:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517183166; cv=none; d=google.com; s=arc-20160816; b=eXaKTQSDtzl/xQ706TGaPp23WwSFkC12YSAicneIffmbZ/yW86RLbQoZSoodPQi2c/ yQUEZUAdf4d3aTvW15d2O9Ty3Hx5dO/DFfFM1ydgElvToTd38/hbflJWQBPy2yXiVXt7 7uX0tlh8VSqExeCOjQbUr3mP1q1T5KAdm5NJ4YM5+V8qpB4YftdenDH8NKVfy6jWqJrk /WZ2m3uch1d+AZ1mNEt43g9y1OGtfj4xke6ikDlXRi/0YJq/tJwuB2VdsoTdwkMDLN6R ZcUSbsZTtTnNR++qS5LTVyvxkJqezn4+FMuTUZ+ON4Vq6QYwm+li7axT0XFvd3IlTkm0 TYzA== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=riVkqWj2V4rUtQRTP3OOrzMkWn1EMy0FQkn8R9nvamI=; b=goeuSgrNDThivUVOdfOrVavrpq9CbQj8wAVRAtKUghdt5VJz48WJlDi0y3MdNK01IG sFNn0UFy8WiAmIIU1Bl0LoZv8Im2csWkPbH784xDqy4Q6K/b5timm4w0kR7QSQgCx1RN wn1E7FnPgHaH6mFNAmfQV1GLWXwumRUUl1B2/DbajBBNTe5hwfHYrA30K1wLxuZl4Pm9 tm7WcoSxR1fpQ9KSzL3+ItRDXStgxR2EcYn1+KNXpaqR1N3TFm8jlug4yt+f+WtDOLWm vRCXvUU9iFeawmoQVZlAH8Fw7m9ZB1jMJmxpBoFhYdci0dPtB3zThF+hKZChITH4tQGq /FcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ETsVzGId; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id r12si1782169ywc.14.2018.01.28.15.46.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 28 Jan 2018 15:46:06 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ETsVzGId; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efweE-0000D2-0z for patch@linaro.org; Sun, 28 Jan 2018 18:46:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efwBW-000398-Ct for qemu-devel@nongnu.org; Sun, 28 Jan 2018 18:16:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efwBV-0000Qt-HB for qemu-devel@nongnu.org; Sun, 28 Jan 2018 18:16:26 -0500 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:41266) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efwBV-0000PI-AO for qemu-devel@nongnu.org; Sun, 28 Jan 2018 18:16:25 -0500 Received: by mail-pg0-x241.google.com with SMTP id 136so3001518pgd.8 for ; Sun, 28 Jan 2018 15:16:25 -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=riVkqWj2V4rUtQRTP3OOrzMkWn1EMy0FQkn8R9nvamI=; b=ETsVzGIdR3ckSrC9mx2eUpkkWmz7AUywkfJtrIMQRR9koromW5Knkefs9RO79q5qEC k/4rFU1t5xaKt0hsGaM0toSzWyXGi9ix57PebrNh4+lJHySDZNWQq7LxU1ciQPBmR2N7 exRX+WYMITh3/koAhewqhQkiPw2fP6UB6NBYE= 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=riVkqWj2V4rUtQRTP3OOrzMkWn1EMy0FQkn8R9nvamI=; b=e+iBOEi2SnBS6XYWksGjqX2m339Ae2i1rxmhFvGXrupqqTxREkqI5SavrWEUs+jCpw aj4sdxyO/YCJ6GR/zMJM8Dz8gfHh8EEYnLW/diVzV7WjDLIIJMVNzne1EqdPh2hRL7zD BPW8sj5VMuTh97PVfQ/xEby+0avqaHGEpUGpalyr2rBC+cXh4zWGlrsINVpMeNEJpHGG ACsCa3y0GqJTKsWMzRKIphyhr3d8rp1kB1J7RP5Lbzfi1ZXGJFpx3ZanqOT8mKQtdRf9 287xnXmse9AwUZL8gfnQghLdsLui7n9XF9C94WeIDhGQXvsgYBYVDpqxjng/FzGP4nYG EgnQ== X-Gm-Message-State: AKwxytf/kpe/FUBP/7YTXXZMNpT0tUr6Cl0PfaPIla5cKBIfP8Hczggb hBPdROqjypiRAc+3PIgivNAXhmQeTMM= X-Received: by 10.98.80.20 with SMTP id e20mr24926576pfb.148.1517181384147; Sun, 28 Jan 2018 15:16:24 -0800 (PST) Received: from cloudburst.twiddle.net (174-21-6-47.tukw.qwest.net. [174.21.6.47]) by smtp.gmail.com with ESMTPSA id r27sm26949344pfj.75.2018.01.28.15.16.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jan 2018 15:16:23 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 28 Jan 2018 15:15:20 -0800 Message-Id: <20180128231528.22719-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180128231528.22719-1-richard.henderson@linaro.org> References: <20180128231528.22719-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::241 Subject: [Qemu-devel] [PULL v4 35/43] target/hppa: Implement LDSID for system mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Helge Deller Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Helge Deller Signed-off-by: Helge Deller Message-Id: <20180102203145.GA17059@ls3530.fritz.box> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- 2.14.3 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 3327c085ff..cf67ca026e 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2211,8 +2211,20 @@ static DisasJumpType trans_ldsid(DisasContext *ctx, uint32_t insn, unsigned rt = extract32(insn, 0, 5); TCGv_reg dest = dest_gpr(ctx, rt); - /* Since we don't implement space registers, this returns zero. */ +#ifdef CONFIG_USER_ONLY + /* We don't implement space registers in user mode. */ tcg_gen_movi_reg(dest, 0); +#else + unsigned rb = extract32(insn, 21, 5); + unsigned sp = extract32(insn, 14, 2); + TCGv_i64 t0 = tcg_temp_new_i64(); + + tcg_gen_mov_i64(t0, space_select(ctx, sp, load_gpr(ctx, rb))); + tcg_gen_shri_i64(t0, t0, 32); + tcg_gen_trunc_i64_reg(dest, t0); + + tcg_temp_free_i64(t0); +#endif save_gpr(ctx, rt, dest); cond_free(&ctx->null_cond);