From patchwork Fri Sep 28 00:04:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187591 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 E18CC2C00B7 for ; Fri, 28 Sep 2012 10:04:20 +1000 (EST) Received: from localhost ([::1]:38963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THO43-0002cM-2u for incoming@patchwork.ozlabs.org; Thu, 27 Sep 2012 20:04:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THO3v-0002c0-Lv for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:04:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THO3t-0005Hc-P4 for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:04:11 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:50719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THO3t-0005HP-Ib for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:04:09 -0400 Received: by pbbrp2 with SMTP id rp2so4337062pbb.4 for ; Thu, 27 Sep 2012 17:04:08 -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=yxcTA/bKCEDLCHT+vF4xnH+BqJBejHCTTedndeIOWoU=; b=AooaMa2CZ1ni4LruwBQKKziNZ+ryiWs5rFfJX5TmM0XcecwOb/iKH+A8KeQdd/iKng H4wevM+PBAkDN8h8N0zzRYADKTw8UqupXbfdfAb7ml5AJdAwDn6vyYyi0rxvUofrXPJr M2mW+OFs07Nr8BA94vBQxbkxc/zuS+yLAttw5o55Ur33kKucYJ/fCkfX5X2Lf86yQJ4p x3OvaC+onP8GkEzIackhx3rdeLo4bUWB8vxjPnwEgq9XLsIoOdu4MOJGVCZpySTXyh8g 8g4MhvU6Eh/RW62aMp2ryEb9+mrwXaMycN3nHvZV6yCSvfR2Fhc1l1cjgYelm/1jLCZ4 x6KA== Received: by 10.68.226.100 with SMTP id rr4mr15779994pbc.143.1348790648926; Thu, 27 Sep 2012 17:04:08 -0700 (PDT) Received: from anchor.twiddle.home.com ([173.160.232.49]) by mx.google.com with ESMTPS id it5sm4589260pbc.10.2012.09.27.17.04.07 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 17:04:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 Sep 2012 17:04:05 -0700 Message-Id: <1348790645-25736-1-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1348785610-23418-1-git-send-email-rth@twiddle.net> References: <1348785610-23418-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.160.45 Cc: Alexander Graf Subject: [Qemu-devel] [PATCH 071/147] 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 6c2f455..8bfc6f9 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -508,4 +508,6 @@ C(0xac00, STNSM, SI, Z, la1, 0, 0, 0, stnosm, 0) /* STORE THEN OR SYSTEM MASK */ C(0xad00, STOSM, SI, Z, la1, 0, 0, 0, stnosm, 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 ae56a51..4195c7e 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1073,34 +1073,6 @@ static void disas_e3(CPUS390XState *env, DisasContext* s, int op, int r1, tcg_temp_free_i64(addr); } -#ifndef CONFIG_USER_ONLY -static void disas_e5(CPUS390XState *env, 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(CPUS390XState *env, DisasContext *s, int op, int r1, int r3, int b2, int d2) { @@ -1996,15 +1968,6 @@ static void disas_s390_insn(CPUS390XState *env, DisasContext *s) | ((insn << 4) & 0xff000)) << 12)) >> 12; disas_e3(env, s, op, r1, x2, b2, d2 ); break; -#ifndef CONFIG_USER_ONLY - case 0xe5: - /* Test Protection */ - check_privileged(s); - insn = ld_code6(env, s->pc); - debug_insn(insn); - disas_e5(env, s, insn); - break; -#endif case 0xeb: insn = ld_code6(env, s->pc); debug_insn(insn); @@ -3387,6 +3350,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));