From patchwork Tue Jun 20 08:25:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694441 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp186449wrm; Tue, 20 Jun 2023 01:28:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4iMM35TmFTjtg5zFmtRv7E4P2xODcut/CWRqRZtn1qhAjx6sDSsFL7DMckWGCK8UVFJuE+ X-Received: by 2002:ac8:590b:0:b0:3ef:6818:c937 with SMTP id 11-20020ac8590b000000b003ef6818c937mr16476675qty.1.1687249708637; Tue, 20 Jun 2023 01:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687249708; cv=none; d=google.com; s=arc-20160816; b=WntjRtociOc0b9ijjzT/ua27eEPNem1Sbi4cg8xIwKheMJO6ysEodp82hZRG2hyLGR L5wOFEs8Mz68rph6NbjGAkW3rTzaj8BNvskOpddmBzWTrZaWWWyrP9Ag70JygYQCJMXh lQkO1vU97xaH/PtPoH/P0lLDLj0NHRCp/rJaIQAfl1Jy7DQ/FEWaDSawrOULgFdTa8Ev l21vkshghZpRlthX6EdViKYI4Q6jV0xR9AjBaxq7diGuBr6cQfwWJRO0c7NtufRxyG/E sGUMooSin8QT1/rogw5GrSuydOcOD1MIaHwSZM0MwvWlUGwMq3jTHhEJjHpPVGVtvWpK OvUA== 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:cc:to :from:dkim-signature; bh=SqGgOkt5DlDOa0sDWBCeSGba/OHMB4venmdJ5cMC57o=; b=UZ457LVrTjmBbA7IBW8zC7JmuQTg+Be1gJHmQEvxYdN002Kwnv9nrkErIfYH+dzoOX gD2ba9c/BYKEhJtPD515LhCwq7SHdFuZHU548XezuaIshCWLKZGjedfqtZVHO8eRJ7Oy 8hYPVjhKA5TC4gUZERa/2RgZES07YRy5TBQZ5EZXQ8ETGxk1czuWqBJiu2ey4e9vUC5c h4hsDJOiYxJU+PhZPxSRzL8zcmvYm+jDjtSsqhBJ4n4/CsguDDFgOz22T0yZZ0a5ompn WvXG6Z4cWu5DYAXfX+2qMh3qpLiCLbSuBNTyPi4937ZzxdtJ0ieHNqx96ZAWGmrkVlMB Ru7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CBIIhq5c; 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 d11-20020a05622a15cb00b003f6aa29b61dsi585244qty.99.2023.06.20.01.28.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jun 2023 01:28:28 -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=CBIIhq5c; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBWh5-0003pH-3o; Tue, 20 Jun 2023 04:26:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBWgx-0003nC-7m for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:26:26 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBWgu-00065n-BO for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:26:22 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-986d871a9beso570000166b.1 for ; Tue, 20 Jun 2023 01:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687249578; x=1689841578; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SqGgOkt5DlDOa0sDWBCeSGba/OHMB4venmdJ5cMC57o=; b=CBIIhq5c4Sc0YgqspcVfnExTewAe8ErzVMsuAzxxaHMSN29W+alzF7GNbPnnkCxQg2 cwbySKWqs5lSPTTQv7YF3D0b7TcDxMwI7tbpJC1ZhQE8r4RPCg1RIO/vtkbQc4tomHl3 2Qq124eskCUTrSvUCAP/OYEja8Ymm5Oqye1/yYeIAv5ljLILN7quPDUyKkGts/tYX0zU iPccjKe/C+ZZxcat7cfxpbOcwcAywNyC+FrBAweWUD+VoIwhfvLywuoAfCE3xcPhrspz ReJmhJA8+7SsnqpdYblWq7x/BVXYnLlITDxZ+hpgGt7XvB7opAc0b0ODeXHBtp3EwtuD SyvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687249578; x=1689841578; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SqGgOkt5DlDOa0sDWBCeSGba/OHMB4venmdJ5cMC57o=; b=Ruv6QD8q+tFey7VsaDsoSjXoWxvcxnhg4gY0ZAK3PNRiX7oSfwfOJu2p6Z11z3fva1 HZRSaEf2ZE6//VfOMVZa4nbJN/XQZF5Ybjp7nYiEKy3KDMzFkv/7N7sz9zrT2aIH7jR6 PDXyAU3t50bKxYS2dhsD4sj/rVYPuxXTQq3Hd9F6aQoXsNYkV+rTfTMHoTgK/v/m3Mis /ZmR/8mgsHQNyhDoIvzu1Kwo7xc+SwGYjvEyi3hAXDHP1St3OnU5cx6THQ8RoaBuAFGw wxejwfz9PGAdiSy5xvXuFv+nwOONd0OIWVpgycjFHnXl95Yl0d3Le+R1lvBBtIwGcTjM ESUQ== X-Gm-Message-State: AC+VfDwYg7ELI3qRk581nE5qszxay+5HlohibCZsYv8DOfpVYtd4QR1m FlWURyMhKSyxv+5FcF9Wf1q0BNXMh4ZsHAoG8tZx0aGh X-Received: by 2002:a17:907:6e1f:b0:988:eb17:d052 with SMTP id sd31-20020a1709076e1f00b00988eb17d052mr2593454ejc.56.1687249577698; Tue, 20 Jun 2023 01:26:17 -0700 (PDT) Received: from stoup.lan ([176.176.183.29]) by smtp.gmail.com with ESMTPSA id z19-20020a170906669300b00977c7566ccbsm935901ejo.164.2023.06.20.01.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 01:26:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 04/16] target/i386: Simplify i386_tr_init_disas_context() Date: Tue, 20 Jun 2023 10:25:59 +0200 Message-Id: <20230620082611.770620-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620082611.770620-1-richard.henderson@linaro.org> References: <20230620082611.770620-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-ej1-x635.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-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Since cpu_mmu_index() is well-defined for user-only, we can remove the surrounding #ifdef'ry entirely. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230613133347.82210-2-philmd@linaro.org> Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 5cf14311a6..08c4cab73f 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -6914,10 +6914,7 @@ static void i386_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) dc->cc_op_dirty = false; dc->popl_esp_hack = 0; /* select memory access functions */ - dc->mem_index = 0; -#ifdef CONFIG_SOFTMMU dc->mem_index = cpu_mmu_index(env, false); -#endif dc->cpuid_features = env->features[FEAT_1_EDX]; dc->cpuid_ext_features = env->features[FEAT_1_ECX]; dc->cpuid_ext2_features = env->features[FEAT_8000_0001_EDX];