From patchwork Mon Aug 22 23:32:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 599224 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp2039496mae; Mon, 22 Aug 2022 16:47:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR4sB4IyqpDc/zgGePs/i2P+mdG5WjWzuXDzrTDULuJfHdslBiAbEGMPTv6TQerTXf33kz8K X-Received: by 2002:ac8:5fcc:0:b0:343:4dd6:b388 with SMTP id k12-20020ac85fcc000000b003434dd6b388mr17379668qta.586.1661212074078; Mon, 22 Aug 2022 16:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661212074; cv=none; d=google.com; s=arc-20160816; b=uH2NJTpgg3qYKJd7HJlGcLcKr1V3KtSngMrHHPwaZ6wgXkHtKXjtAcdVJuNspJxlFo L8o8k2LjcYLRYxuE9xLkDHCSlRGjQYo6RAWjmlvW0r5LoSsgRfHysubeTl8+oLkrIx4F 1cEJCVyrSDqL1Skp6xovWfZc68WsS5H3AeCdub7oDRjWPanum5wAmLt0ha1e+/BV51AK 4zkBpgHmupuUqFy20eDs+28pdjD6tRse9Ehj5cqizvBbRzEH2j76cKkEpl3/oZWGaijo JXGgotPL94ThbF7elhOGReA/XUCsX7lJXTl/DF59ez7khFqLuMb+qF0kKFXVR69yHxGe N7zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=I0Ab1V06eTSd++du4BEeVdBOxUXl44KJmulBDPQpHyo=; b=cX4nbIScvY8Znil7GeQjzk2+lTXS3akMg2sW1jCwjOnI6AUykRKaH+lPjzDgrsXoJz Aum3AtDVD4AVCaCjibbJU0Ch9CS6R1MihGH/jEq7MHnmnYndVirZIjKDC++CJkMGr1fK 64iTmxpv/GDlZ2pg1TcV8gnVHXT1YPMCgSqJeNcWGafexXXK6/gnkGCFBG6EAC/AhxWn wo9WLbyriGXVrrJNZ8Sy6oNHt27YJPEwSbWwD5JBmLL3rbsb0fEnj/b1y/8Q8FJzqHcL 8vMoALevyJwUy7NNT6XKq45ffcIBpjlrY9A/5BsHGsq0zE7Ugm/gMPJpB1hZJR9iVaxI LEnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vy7AWQbX; 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 l8-20020a37f908000000b006bc10febc4csi2138218qkj.346.2022.08.22.16.47.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Aug 2022 16:47:54 -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=vy7AWQbX; 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]:52544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQH97-0005Ej-LN for patch@linaro.org; Mon, 22 Aug 2022 19:47:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQGv8-0005fZ-Ct for qemu-devel@nongnu.org; Mon, 22 Aug 2022 19:33:26 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:46998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQGv6-0007En-S4 for qemu-devel@nongnu.org; Mon, 22 Aug 2022 19:33:26 -0400 Received: by mail-pj1-x1036.google.com with SMTP id o14-20020a17090a0a0e00b001fabfd3369cso12914423pjo.5 for ; Mon, 22 Aug 2022 16:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc; bh=I0Ab1V06eTSd++du4BEeVdBOxUXl44KJmulBDPQpHyo=; b=vy7AWQbXlkrOh8piRh00fhrNK7cu6sSMKdQiSQKGLxjF2nZCvIsY5GpbuhJuwSpq1b QsXWvbT9DfB+FG6+Fo9fW11kJwBbu8RwgG82nARZUqPGCuEX3SiIDB4yXpmv7trzyJda +vikdE6NtOK1UL1zc50qIIDaxEtPhay4BXggpPccTKizBBOl9i2cImDzKeszk5ZLgNF7 PhJUNWVw05VyQSAmQRCe09l4CBwgfoB6vgI92VEyszCbcjm88OozCT+lYijE+TKpq+3E eQMay81xAJnQtCgYZExFjgmtaKAYRk3JRp4BQu6cRqXDGrYr+YIfYjCBjvfQTHr871SB ZQ2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc; bh=I0Ab1V06eTSd++du4BEeVdBOxUXl44KJmulBDPQpHyo=; b=XUmHiTR9WCo15FH8KvOAJMxktrf7qtN3kkraB2atwzsReKOXWnZs1VjdvgNSnR5Nlp fHY7CH8dqxvPrhVw+6xyTeLm5+I6QZcDhKLie9GIp0siVl9y/dyoY9Vyr62P6G8yOpK9 thQ6ZOxZzmBcgj951J/Bd+5A6NfLDHoo6qj5G3C7TtfJuCBtdic2NdwxqNz9v6inr0du 2pr2OtUDrCKWZHvhxFk+iNeEqB2s0zTKoCpOC6ufZ2nWjOlMIYNcsy4yetPWn5NbIYr1 rDTOniw7jv+m/nnssJFBWmUjvj4EyE5Hki52PWvsL9I8iNpte2bHF7/XFtZ2/nagQUUs CVYw== X-Gm-Message-State: ACgBeo25yhIlNGoh0dR6+wk3OaE5JXDdkYeFmFA1JWPOx7whyPzINDbp LgIFToiZkSbvlwe7Syo+n52JrATC5v3yEQ== X-Received: by 2002:a17:902:cec1:b0:16d:c4f2:66c5 with SMTP id d1-20020a170902cec100b0016dc4f266c5mr21734687plg.20.1661211203606; Mon, 22 Aug 2022 16:33:23 -0700 (PDT) Received: from stoup.. ([2602:47:d49d:ec01:c3f1:b74f:5edd:63af]) by smtp.gmail.com with ESMTPSA id 82-20020a621555000000b0053655af14easm5133124pfv.45.2022.08.22.16.33.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 16:33:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 03/22] target/i386: Remove cur_eip, next_eip arguments to gen_interrupt Date: Mon, 22 Aug 2022 16:32:59 -0700 Message-Id: <20220822233318.1728621-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220822233318.1728621-1-richard.henderson@linaro.org> References: <20220822233318.1728621-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" All callers pass s->base.pc_next and s->pc, which we can just as well compute within the function. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index f6a861e10c..d3b16ea28c 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -2602,13 +2602,12 @@ static void gen_unknown_opcode(CPUX86State *env, DisasContext *s) /* an interrupt is different from an exception because of the privilege checks */ -static void gen_interrupt(DisasContext *s, int intno, - target_ulong cur_eip, target_ulong next_eip) +static void gen_interrupt(DisasContext *s, int intno) { gen_update_cc_op(s); - gen_jmp_im(s, cur_eip); - gen_helper_raise_interrupt(cpu_env, tcg_const_i32(intno), - tcg_const_i32(next_eip - cur_eip)); + gen_jmp_im(s, s->base.pc_next - s->cs_base); + gen_helper_raise_interrupt(cpu_env, tcg_constant_i32(intno), + tcg_constant_i32(s->pc - s->base.pc_next)); s->base.is_jmp = DISAS_NORETURN; } @@ -7194,12 +7193,12 @@ static bool disas_insn(DisasContext *s, CPUState *cpu) } break; case 0xcc: /* int3 */ - gen_interrupt(s, EXCP03_INT3, s->base.pc_next - s->cs_base, s->pc - s->cs_base); + gen_interrupt(s, EXCP03_INT3); break; case 0xcd: /* int N */ val = x86_ldub_code(env, s); if (check_vm86_iopl(s)) { - gen_interrupt(s, val, s->base.pc_next - s->cs_base, s->pc - s->cs_base); + gen_interrupt(s, val); } break; case 0xce: /* into */