From patchwork Sat Apr 30 17:53:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 568143 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp7369499map; Sat, 30 Apr 2022 10:55:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWXwxRZks/qygdjp8SblZf6QpvJb2LZY9WfqgiYFKQ3OZRREEfodx2QcyPNK/jksRIEAFu X-Received: by 2002:ad4:5dce:0:b0:446:74be:a494 with SMTP id m14-20020ad45dce000000b0044674bea494mr4061780qvh.84.1651341300879; Sat, 30 Apr 2022 10:55:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651341300; cv=none; d=google.com; s=arc-20160816; b=oAwEhjMOPWqxp27eGJk43qHM4z1FG1TT7Zy1ZsAb+9EPyZBFjZKchLFxG1mhDiyuEC kt2Z0wT7XVVsjYtzkmlSLMfos9ngP+EOO4/VdmxdKRlsZZtrf33jWaOjF6OJch21yg1R ZWYC3RhwxRPzHzihfXD6o5XwcWnX+p9ECTh9Y0wTuf63sNesSROjm8VwDm0f7uQmlZpO OrnvEj9fherhHxc1bjhy2FbR0JFm3BYJ/Cck1XgupfsxmiTazIbSkfQEdbck4Pqi+tnV IsCQ26c2rarnYB2S8ogy/T7eBim8m+ldaQlpfIs8Rjbj8Tx/CVuJOVen+8kurie2eW1v Ik5Q== 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:message-id:date:subject:to:from:dkim-signature; bh=QvqCzpSbp/v60qq8pQb1YIj+QHxKN4+LamQEcdg6DwQ=; b=b/qs2kmjChSyIcrJqmURavNZTl/zo86auJESbuk6Bbl5AJctCAUX3Y5BXRSe5dUvvD 2uvAMGsheT5d5oWO3x2tOiStHfziF9XM5+/0nDeysRbtYwrowaIoHBVYbdh2U6pyawmN 5CABUs34F7dlHGJtFbfAOmyf2BSe8GRyzmwORARZ3ZJj4h3ILOkU2ugUwpgx3SWnJGD9 D1LdQQ3/7FYU3NN744YPadOAMyY71FasN8rLMMGYnP3KI2vlFFQNI3pTwAu42UjS7Pru wtNzTjdqd/bQRtl3EfmlukUfkrCGACFfpyGIsTDFhr17EwfTzIqXgoM/zvc2u4E1qCQl F9yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lOVO9nYB; 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 jk9-20020ad45d49000000b0045a8515cbcasi173050qvb.329.2022.04.30.10.55.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Apr 2022 10:55:00 -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=lOVO9nYB; 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]:33440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkrJ6-0004Tf-Df for patch@linaro.org; Sat, 30 Apr 2022 13:55:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkrHv-0004Sx-C7 for qemu-devel@nongnu.org; Sat, 30 Apr 2022 13:53:47 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:39751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkrHt-00080l-Hn for qemu-devel@nongnu.org; Sat, 30 Apr 2022 13:53:46 -0400 Received: by mail-pj1-x102d.google.com with SMTP id a15-20020a17090ad80f00b001dc2e23ad84so1090025pjv.4 for ; Sat, 30 Apr 2022 10:53:44 -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:mime-version :content-transfer-encoding; bh=QvqCzpSbp/v60qq8pQb1YIj+QHxKN4+LamQEcdg6DwQ=; b=lOVO9nYB5m4+ZzUBf4RAoCdALxXFArsuTx6V5T6bE8Q9KbouOIvMe79RJnlEHjfdMe s1vxwvDX2AGhHql+anmCUM6g2sOfkiBuV5umjtnDo/THjrGEeYjwyxVantbZ6vw9v4k4 RFkUj6lNhQWQzCG3SxtLCG5df9VsIEC9El5ddToGjETgxZNvHB2263TahRqZ4aNFh1YN G6oh+Mq8l/FVLADjI4iW0qLdMwj2zWoLHHSPBDW2gdfcXDaLwA/ZSD5sDvvrTFHplMIn OzhaKgn89yZJAZC5dVsk32sk24Zr4CHnC1+JbEhudQpeMvev2pAeSnoVpXOJ1c9vjzc1 KxTA== 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:mime-version :content-transfer-encoding; bh=QvqCzpSbp/v60qq8pQb1YIj+QHxKN4+LamQEcdg6DwQ=; b=MNnO5wtnaUQJhInCqsdVFIXWlZhlY1jm97l8otmwCiKHmoWmfyJ3m1ticSUsa+WcL1 5/AZk+nVjSa57TwEZebCfV1KDzEadZo+FqPBaUJQQWkZaRfuR9avXQWsYwPV6Gr4r5Nr hUKaMUh6fHowq1qg2P/Vg5Fxqknnq4RlkirckWq5K1HUCoKni+/42c6KPeKKZ8koVxOL /hqJ7a25AMXgskoFC2QttEdC/HLSqM5MRVm3CLppMGmXl/lG3kc49MOelIrHKqZrkTqp k5PrZesgs6xf9gBoU3YksuDPovciRPPutp22nzVtszmQtCrRllAlXYTKE5yaBzkklqQQ FN/w== X-Gm-Message-State: AOAM531Lh2TTgZWgs1DsbigO+Y8adB3wMshPJH2+cd1AAqQSA4OZQsN6 luGuQrUy4yUmQ9su1WJ+ZAIJY0Or8MMm0w== X-Received: by 2002:a17:90a:e517:b0:1d7:5bbd:f9f0 with SMTP id t23-20020a17090ae51700b001d75bbdf9f0mr5012432pjy.77.1651341223516; Sat, 30 Apr 2022 10:53:43 -0700 (PDT) Received: from stoup.. ([71.212.142.129]) by smtp.gmail.com with ESMTPSA id 5-20020a170902c20500b0015e8d4eb282sm1740910pll.204.2022.04.30.10.53.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 10:53:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 00/17] target/m68k: Conditional traps + trap cleanup Date: Sat, 30 Apr 2022 10:53:25 -0700 Message-Id: <20220430175342.370628-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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" Changes for v4: - Rebase, which requires QEMU_NORETURN -> G_NORETURN. - Cast -4096 to abi_ulong for print_syscall_err. r~ v1: https://lore.kernel.org/qemu-devel/20211130103752.72099-1-richard.henderson@linaro.org/ v2: https://lore.kernel.org/qemu-devel/20211202204900.50973-1-richard.henderson@linaro.org/ v3: https://lore.kernel.org/qemu-devel/20220316055840.727571-1-richard.henderson@linaro.org/ Richard Henderson (17): target/m68k: Raise the TRAPn exception with the correct pc target/m68k: Switch over exception type in m68k_interrupt_all target/m68k: Fix coding style in m68k_interrupt_all linux-user/m68k: Handle EXCP_TRAP1 through EXCP_TRAP15 target/m68k: Remove retaddr in m68k_interrupt_all target/m68k: Fix address argument for EXCP_CHK target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0 target/m68k: Fix address argument for EXCP_TRACE target/m68k: Fix stack frame for EXCP_ILLEGAL target/m68k: Implement TRAPcc target/m68k: Implement TPF in terms of TRAPcc target/m68k: Implement TRAPV target/m68k: Implement FTRAPcc tests/tcg/m68k: Add trap.c linux-user/strace: Fix print_syscall_err linux-user/strace: Adjust get_thread_area for m68k target/m68k: Mark helper_raise_exception as noreturn target/m68k/cpu.h | 8 ++ target/m68k/helper.h | 14 +-- linux-user/m68k/cpu_loop.c | 11 +- linux-user/strace.c | 4 +- target/m68k/cpu.c | 1 + target/m68k/op_helper.c | 173 ++++++++++++++++-------------- target/m68k/translate.c | 190 ++++++++++++++++++++++++--------- tests/tcg/m68k/trap.c | 129 ++++++++++++++++++++++ linux-user/strace.list | 5 + tests/tcg/m68k/Makefile.target | 3 + 10 files changed, 394 insertions(+), 144 deletions(-) create mode 100644 tests/tcg/m68k/trap.c