From patchwork Mon Jun 5 16:52:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9766943 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9619A6034B for ; Mon, 5 Jun 2017 17:02:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83A0E27F10 for ; Mon, 5 Jun 2017 17:02:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7891B27FAC; Mon, 5 Jun 2017 17:02:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F3DFD27F10 for ; Mon, 5 Jun 2017 17:02:04 +0000 (UTC) Received: from localhost ([::1]:34395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHvOF-0003Qr-VT for patchwork-qemu-devel@patchwork.kernel.org; Mon, 05 Jun 2017 13:02:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHvFf-0004qQ-FW for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:53:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHvFe-00045s-JE for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:53:11 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:35060) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHvFe-00045h-F2 for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:53:10 -0400 Received: by mail-qt0-x242.google.com with SMTP id x58so9855148qtc.2 for ; Mon, 05 Jun 2017 09:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=VTys9b260WXaNigHz+cJ6xOm4WSKOGskR6vDD3gF7oM=; b=uICNl6FTFFhMQB+6EO+0k+Lad+VFfwAzEZGgx6LnE3oUyMi9g++Vr3W9T1+wpM0bbP aBI2cL7lBBm6vRga4jenSPoEqdLuG2LKJOuHuZkp+LlSn+f4FwKicOO/ue04pScG507F ved7h1kOTZ+MH1tfFz3pT26BEEtdBNOfeMPg4YRrQ9wpu/hdJ8cpWpUjZk+SGFj882hR fjeh+DktMPJZ2Egx6bTGjUkR+DTvCT5xK04CGWqW58jOTjGDenq3YddlsPjBoGKX0oc4 icENZ/SbvVjyIh+slCBEJD6YYq2fM1ZkA1PqcMTQFMgjbubcb6uQeHQcuYXX582mWSch /hrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=VTys9b260WXaNigHz+cJ6xOm4WSKOGskR6vDD3gF7oM=; b=slBn+oFuyl2LNHPRBveNWdgW6OEFVn92V5WX5QzONJFLYUruu3P/icy82dsKANyP3s GH2pD8svOTOpXipVKaf7AoQE8+Vz4X770kRL+ntv+CpohUCj+ZUFAaG4HlYGWKlx3zGk 56aA06JntlT+vKhmfZiciWfGCK903IhiKrrBydggDp6SrM1NgkO9i50xOwigG7l9f3xB fR6xJoYx2s7pj0I1e0+zl6li0AfL2Ry7b9+oXKph98f/UVJT1qLhztgFveRAnP66vLqC V0GgUISAth1g4Xu0A6/FSwxXuWnpGtATUt22OFefX9F9C/OjIAlWUN//VSGoyt3Omf7R MsUg== X-Gm-Message-State: AKS2vOyfy5wEx5X9UoJqmURx4qG7MNWtmz3jhFhpV/lbRCD2SQGyPopz ypCyzayB0jXqcfD7ffE= X-Received: by 10.55.11.142 with SMTP id 136mr25507035qkl.142.1496681589712; Mon, 05 Jun 2017 09:53:09 -0700 (PDT) Received: from bigtime.twiddle.net.com ([2602:47:d954:1500:5e51:4fff:fe40:9c64]) by smtp.gmail.com with ESMTPSA id c6sm1637044qtb.56.2017.06.05.09.53.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2017 09:53:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 5 Jun 2017 09:52:32 -0700 Message-Id: <20170605165233.4135-26-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170605165233.4135-1-rth@twiddle.net> References: <20170605165233.4135-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::242 Subject: [Qemu-devel] [PULL 25/26] target/alpha: Implement WTINT inline 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 Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Richard Henderson --- target/alpha/translate.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index df5d695..4523c4c 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -1157,6 +1157,7 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int palcode) #ifndef CONFIG_USER_ONLY /* Privileged PAL code */ if (palcode < 0x40 && (ctx->tb->flags & TB_FLAGS_USER_MODE) == 0) { + TCGv tmp; switch (palcode) { case 0x01: /* CFLUSH */ @@ -1182,10 +1183,8 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int palcode) offsetof(CPUAlphaState, sysval)); break; - case 0x35: { + case 0x35: /* SWPIPL */ - TCGv tmp; - /* Note that we already know we're in kernel mode, so we know that PS only contains the 3 IPL bits. */ tcg_gen_ld8u_i64(ctx->ir[IR_V0], cpu_env, @@ -1197,7 +1196,6 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int palcode) tcg_gen_st8_i64(tmp, cpu_env, offsetof(CPUAlphaState, ps)); tcg_temp_free(tmp); break; - } case 0x36: /* RDPS */ @@ -1220,6 +1218,14 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int palcode) -offsetof(AlphaCPU, env) + offsetof(CPUState, cpu_index)); break; + case 0x3E: + /* WTINT */ + tmp = tcg_const_i64(1); + tcg_gen_st32_i64(tmp, cpu_env, -offsetof(AlphaCPU, env) + + offsetof(CPUState, halted)); + tcg_gen_movi_i64(ctx->ir[IR_V0], 0); + return gen_excp(ctx, EXCP_HALTED, 0); + default: palcode &= 0x3f; goto do_call_pal; @@ -1369,7 +1375,7 @@ static ExitStatus gen_mtpr(DisasContext *ctx, TCGv vb, int regno) tmp = tcg_const_i64(1); tcg_gen_st32_i64(tmp, cpu_env, -offsetof(AlphaCPU, env) + offsetof(CPUState, halted)); - return gen_excp(ctx, EXCP_HLT, 0); + return gen_excp(ctx, EXCP_HALTED, 0); case 252: /* HALT */