From patchwork Sun Sep 9 21:05:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 182709 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4FF372C00A5 for ; Mon, 10 Sep 2012 08:50:11 +1000 (EST) Received: from localhost ([::1]:35582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAqKP-0005jQ-F2 for incoming@patchwork.ozlabs.org; Sun, 09 Sep 2012 18:50:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAoj4-0008MM-Fq for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAoj3-00068V-87 for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:30 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:63059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAoj3-0005pO-0v for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:29 -0400 Received: by mail-pz0-f45.google.com with SMTP id n15so968311dad.4 for ; Sun, 09 Sep 2012 14:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=3jA/JI+3ENz9kIHUePMPGd9dmhpBhglgAjo3wMuUnyE=; b=GFJgAVx7QPDTjZa/g1X5jBluVoK+YX4np3kfTsyX8XlgcbyouhQvLlXLqcxygr5NVt 0/22zSkbUWVma9QZfk5h5JJQkterOnZNtQmJPwIJiX/xExXTFMmyLQmCD9Z8eOXiBrG3 fXVT0PkXciKZ2Cl0LINflwWyOWIBBpLGPDrt/81K/M7FJ2aVLwB5LJbAgWj44J5l56cr WX8ZLNVA7BqW+Je6P8ATwruHqVYvCRD0U1AUPsl3BU5sSr+7+f8ld//UEwhSYXn4QmFn QynOF7onkwlW82ofD5z/x1gT8KlyozkY3vadheiIX7SArBhh0t+PrjbDCYgJ6GrQZIfR o1vQ== Received: by 10.66.88.39 with SMTP id bd7mr18053611pab.50.1347224848793; Sun, 09 Sep 2012 14:07:28 -0700 (PDT) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id tw5sm662053pbc.48.2012.09.09.14.07.28 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Sep 2012 14:07:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 9 Sep 2012 14:05:22 -0700 Message-Id: <1347224784-19472-65-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1347224784-19472-1-git-send-email-rth@twiddle.net> References: <1347224784-19472-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.45 Cc: Alexander Graf Subject: [Qemu-devel] [PATCH 064/126] target-s390: Convert TPROT X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Richard Henderson --- target-s390x/insn-data.def | 2 ++ target-s390x/translate.c | 47 ++++++++++------------------------------------ 2 files changed, 12 insertions(+), 37 deletions(-) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index 7f50fc7..92dbf26 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -508,4 +508,6 @@ C(0xac00, STNSM, SI, Z, la1, 0, new, m1_8, stnsm, 0) /* STORE THEN OR SYSTEM MASK */ C(0xad00, STOSM, SI, Z, la1, 0, new, m1_8, stosm, 0) +/* TEST PROTECTION */ + C(0xe501, TPROT, SSE, Z, la1, a2, 0, 0, tprot, 0) #endif /* CONFIG_USER_ONLY */ diff --git a/target-s390x/translate.c b/target-s390x/translate.c index e545ed4..7a912ca 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1070,34 +1070,6 @@ static void disas_e3(DisasContext* s, int op, int r1, int x2, int b2, int d2) tcg_temp_free_i64(addr); } -#ifndef CONFIG_USER_ONLY -static void disas_e5(DisasContext* s, uint64_t insn) -{ - TCGv_i64 tmp, tmp2; - int op = (insn >> 32) & 0xff; - - tmp = get_address(s, 0, (insn >> 28) & 0xf, (insn >> 16) & 0xfff); - tmp2 = get_address(s, 0, (insn >> 12) & 0xf, insn & 0xfff); - - LOG_DISAS("disas_e5: insn %" PRIx64 "\n", insn); - switch (op) { - case 0x01: /* TPROT D1(B1),D2(B2) [SSE] */ - /* Test Protection */ - potential_page_fault(s); - gen_helper_tprot(cc_op, tmp, tmp2); - set_cc_static(s); - break; - default: - LOG_DISAS("illegal e5 operation 0x%x\n", op); - gen_illegal_opcode(s); - break; - } - - tcg_temp_free_i64(tmp); - tcg_temp_free_i64(tmp2); -} -#endif - static void disas_eb(DisasContext *s, int op, int r1, int r3, int b2, int d2) { TCGv_i64 tmp; @@ -1989,15 +1961,6 @@ static void disas_s390_insn(DisasContext *s) | ((insn << 4) & 0xff000)) << 12)) >> 12; disas_e3(s, op, r1, x2, b2, d2 ); break; -#ifndef CONFIG_USER_ONLY - case 0xe5: - /* Test Protection */ - check_privileged(s); - insn = ld_code6(s->pc); - debug_insn(insn); - disas_e5(s, insn); - break; -#endif case 0xeb: insn = ld_code6(s->pc); debug_insn(insn); @@ -3307,6 +3270,16 @@ static ExitStatus op_svc(DisasContext *s, DisasOps *o) return EXIT_NORETURN; } +#ifndef CONFIG_USER_ONLY +static ExitStatus op_tprot(DisasContext *s, DisasOps *o) +{ + potential_page_fault(s); + gen_helper_tprot(cc_op, o->addr1, o->in2); + set_cc_static(s); + return NO_EXIT; +} +#endif + static ExitStatus op_tr(DisasContext *s, DisasOps *o) { TCGv_i32 l = tcg_const_i32(get_field(s->fields, l1));