From patchwork Sat Apr 30 17:53:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 568153 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp7373426map; Sat, 30 Apr 2022 11:02:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdi2XJHd/Y/b85jQGi0Q2JSy2Im2/KokRP/wQQ6ANN98OnG8atcmNzaVcy0zvlNZa48yXy X-Received: by 2002:ac8:5950:0:b0:2f3:9101:e0d4 with SMTP id 16-20020ac85950000000b002f39101e0d4mr4341645qtz.613.1651341767703; Sat, 30 Apr 2022 11:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651341767; cv=none; d=google.com; s=arc-20160816; b=WbO8zzSQ4enGHJLrETBR5NO86xEXvw0FpH0dyLiz7HHCB2dnNco+IyFN8i8mPnj3dC XgOh/W1SxLAD8X/3OSAGtOepiwgyIkO2yNlnzBMh5RdaYnMidR8316cxpRklwsr4yi4a gRX7Rp713zvZ3OWT/HfYEj5W8cx48pYRithVfUEbX5H6M63UYg286MfDoE84bWZM4NIP rB2v24zD7oPKtOO8OzZFaKd72FaFPSYlrjMlPG3s3GWrkG8KTuBrdxbSMRf0qVGPNj6R 2/c1pKmWHtJOngLpw+CekCe1NsI9SJ+3zcMqTLLzWCr+NsyVkrQXhRziOK4dAM9gnKws nHkg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=oRQ/mar5G+infSJc2ilEsVMhvFAJHQK4f6Z4DpycXng=; b=W7YdzDM8vXUAqLEFhw476eGCdJbMYPDVNQf66LeWwk1i0uDRw1vasNBPdKBE1Tf/08 M5FBx7JYciizBCX3PVm4T5TmKspMcmcUGEd4W1uT0Ug8P2GCE7Axl6YtHGLrspFq7cQi OBTboSEzudZbVQhm6m5HXwCkkZDKQyzJG+/pOg7OTzfURey0VNZ/zuB0o3pGEDMH16No hodd7jVS7kYgu3Hx/4CurCFcPD+tH+Dno8MqRl3UhGqXkDqdEu8+zCTRTTjmLtGhCpTe I5vObBFWX6GNbjU3OpqgVipH7l4PIO7sHvxqPr6Aac/nBR7eHqOqWPSA0lQfXjONEpEq YBCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B5EzusbR; 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 js2-20020a0562142aa200b0044410c8ee72si4052628qvb.381.2022.04.30.11.02.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Apr 2022 11:02:47 -0700 (PDT) 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=B5EzusbR; 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]:50828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkrQd-0007l2-9R for patch@linaro.org; Sat, 30 Apr 2022 14:02:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkrI5-0004gD-3k for qemu-devel@nongnu.org; Sat, 30 Apr 2022 13:53:57 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:43668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkrI3-00083U-6R for qemu-devel@nongnu.org; Sat, 30 Apr 2022 13:53:56 -0400 Received: by mail-pg1-x534.google.com with SMTP id q76so5757643pgq.10 for ; Sat, 30 Apr 2022 10:53:54 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=oRQ/mar5G+infSJc2ilEsVMhvFAJHQK4f6Z4DpycXng=; b=B5EzusbRaKIs5/osk46dWpWhp1IBzqQJUhC8miGqWyYajWJuQ4oqw3uDzJiezGKFnV I4XLJEi+aM/FQj63yzOL90tqGKwAuZjGzJapv/Ynj1reZZkxjK+jB3Qk7fO3OGeVOB4t fRABalxbQWBQOOajpsYIEk3VLVr4U3XyOdiFgN/q04NWJhyYvZMppBfDzGYBbP25JiRG JH6oPjtnnNxnnSATcj9Ove8cIcwk55KBVcQkQM3FBR8W/WsMoORLfqx++rKhdOby7B+Y 7zV2kc6s5ZmgE5Cs1Fpy0LF5lXVHf3pIaJbTUTooPPzAjJwnPW+QKLGomnsLa4Yb54H5 b54Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oRQ/mar5G+infSJc2ilEsVMhvFAJHQK4f6Z4DpycXng=; b=7TO063OiQgM0pbfcwJGDm3IPm/rOdC6jD6LYLL7VlfcWnsV3g5HIhMO+4YPr1VXeWP Ou2IW7BArnbiRBmMnfs3pUE3wF7Vx2XXNyYPtV1AtzFCf5R2fCtQGegPwZI2CEPrOp54 bMahrCpEq+B06G8AQt1ZHN7Dm5y2A5rFWnrWfDTBHHTqxXSV/2ki8/1g+L88g8eRBZwG G1E4VA8xScfBMNQS5oBoPva6Pmycy3heFO/qnfoC5nOgnita4qMgJaCTE2/Sy+OzNUAF NNiMKEZ1SjQ7KpfRThs8KktpB7pdS0ErOeJKa6Eq14LYALUbVpw+c3H5w/sKQxT0U3vN eljw== X-Gm-Message-State: AOAM533HH7uCmJ5h6wY9AYkd1ZiYhwWEVWArcHpeZfQMYc5n845Og71Y cgoKjoDQ/rdyzFs6K1JACX4fAU/ECEKsJw== X-Received: by 2002:a63:18f:0:b0:37c:4671:a2ce with SMTP id 137-20020a63018f000000b0037c4671a2cemr3888862pgb.429.1651341233958; Sat, 30 Apr 2022 10:53:53 -0700 (PDT) Received: from stoup.. ([71.212.142.129]) by smtp.gmail.com with ESMTPSA id 5-20020a170902c20500b0015e8d4eb282sm1740910pll.204.2022.04.30.10.53.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 10:53:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 11/17] target/m68k: Implement TPF in terms of TRAPcc Date: Sat, 30 Apr 2022 10:53:36 -0700 Message-Id: <20220430175342.370628-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220430175342.370628-1-richard.henderson@linaro.org> References: <20220430175342.370628-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" TPF stands for "trap false", and is a long-form nop for ColdFire. Re-use the immediate consumption code from trapcc; the insn will already expand to a nop because of the TCG_COND_NEVER test within do_trapcc. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- target/m68k/translate.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index c4fe8abc03..bb5ed1b7b1 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -3075,22 +3075,6 @@ DISAS_INSN(addsubq) tcg_temp_free(dest); } -DISAS_INSN(tpf) -{ - switch (insn & 7) { - case 2: /* One extension word. */ - s->pc += 2; - break; - case 3: /* Two extension words. */ - s->pc += 4; - break; - case 4: /* No extension words. */ - break; - default: - disas_undef(env, s, insn); - } -} - DISAS_INSN(branch) { int32_t offset; @@ -6099,7 +6083,7 @@ void register_m68k_insns (CPUM68KState *env) INSN(scc, 50c0, f0c0, M68000); /* Scc.B */ INSN(dbcc, 50c8, f0f8, M68000); INSN(trapcc, 50f8, f0f8, TRAPCC); - INSN(tpf, 51f8, fff8, CF_ISA_A); + INSN(trapcc, 51f8, fff8, CF_ISA_A); /* TPF (trapf) */ /* Branch instructions. */ BASE(branch, 6000, f000);