From patchwork Wed May 19 18:30:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 442477 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1588319jac; Wed, 19 May 2021 11:43:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMKRXAHwerYVjTVr3Jzg0JGDxI8aMFy0+mVu2eIoBCUrxUjVyLhy8KEH97tnWxgX2j3FLo X-Received: by 2002:a05:6e02:2192:: with SMTP id j18mr430919ila.223.1621449810068; Wed, 19 May 2021 11:43:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621449810; cv=none; d=google.com; s=arc-20160816; b=l8/2u0AKwz+8M80Nw6Y73+NyYoAsw4OCHQclDPFAQSY8GNjnJ5tvwNr0SH4J/EuGVr Fg/aKNwRRQkMl0kWklbBbdiXe4Ohr9IWpMwnHmpWOJ+50ilQzADA31mgHdA/uSxQ8aYf VYjAQ4NrS4jrNMba46I4q7b6XY08F7szvhaJz1wJlNTbq6VtagAxXZKLwuUuHqoXonPu Sy2esUPtSa7mIIan6ObE6qo2zkIBM6Dg4xlHowE/lIuaHfG5Ny20vNvlXdBvBjf0x2Ne zUIZtRa5Wv8rsBP/YhnW5fUL8ABNq97WqKLsljBdFU7r9QOl6bg07AgOE/UwskOlyC5Q JcjQ== 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=8VIKm9TP9R9oeV0rPUDGQSAoAin6wclJNR1errvIaDs=; b=mYijuickvXXhoidbsWZgbNMV3po7oj7Oj1vzC33LcoCG1f1/0rujcS32OtQN3k3NT9 XfjX3O4C/dF1tyYTYrH4aXD1Rodl1X3mbxT/YdY1N5/AHz1nPXaWL8vflHB93EwGTdqD fF1+82myobRT4YixyK9Dgjuyr8/hWB9y0/x/1zkQySakhGMVJO3uywaTxDhQsjHNNtyI BPIB7UNYLfSKNgMKA/s7GoTPWHb9ByB3tdRzADalfrh31v5EirE7Ch8KfAtLtBSmEAYp YHhNG0XxcX+gc2DhsKSWi3motDR7FFkB2BuRvGeL25lICcCb0059nfM4S+RjxqApCc0E +oDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=njwVGGVf; 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 s6si99184jao.56.2021.05.19.11.43.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 May 2021 11:43:30 -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=njwVGGVf; 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]:38752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljRAH-0001Yj-DU for patch@linaro.org; Wed, 19 May 2021 14:43:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljQyk-0004Ed-72 for qemu-devel@nongnu.org; Wed, 19 May 2021 14:31:34 -0400 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]:41597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ljQyY-0005lO-C9 for qemu-devel@nongnu.org; Wed, 19 May 2021 14:31:33 -0400 Received: by mail-oi1-x22f.google.com with SMTP id c3so13977025oic.8 for ; Wed, 19 May 2021 11:31:20 -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=8VIKm9TP9R9oeV0rPUDGQSAoAin6wclJNR1errvIaDs=; b=njwVGGVfHfsTCzmj2UZdKfKnTV/n2TZK77JDZDVqdtHXeWJhJqW/vtCsPITGRhBCdX /vWTnzMAvhI/joyazkkp/wI2ljKwNerrsuuiKIHj+22wZXYrFq9msWYkDyTnkDJpTGv9 SxNv5oKC1tnhmSO/jT/EZ2YkfgjglvLFtDN+QXoTdgiZNG5+/BMKmOmlo4/sAdRCvwWE w68U0pVuV7+Ejz+YAgqSYdKYs5CNkSa2T2keeiWvfHRMv28GWGo0/ytPbc0ZLWSJ3U2u ZivKj4pwub3pD8qcXh4Bh17dp6AOgkHCTrfWWfez0yW/D/wVVJVt8YyrZlnMW0qpuWOy P0uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8VIKm9TP9R9oeV0rPUDGQSAoAin6wclJNR1errvIaDs=; b=VZMByBpAs+xqq7CabceovtkfQOPYDvLtnE+DKp8JPGVwyNu5RYyypT9gCWWdKdmLE+ 8xjeQsNJynF03dnk6yo4zCmIGEcemKLC35l6WRETOxDWOYvDoGlAXsuAO8Cjo6O1cRMC i4lE6NMP16CCNVi2v8hyL624V0PJp1zA1qt86RoSWQoJ4G/ITPvozTTJCyzd+lRMOijc b9k+Ecz3WtkEIAPFcOT6mbk2x1iybGRg06xghzW93r7CzGTY0RMOWD4OekTH1qr+/tRK 6j6CejZwBwVGLHY+Z+Y8nk++6jZEFA3dWQBXk5em3rwpZh6r7qqNdZu30Rkw+BA6L741 kBYw== X-Gm-Message-State: AOAM531xdJvS3b1+9xVup0Hl4y3+9LsH2F8P8cTHzMxAYr3YmiPGKGjf 9vJFl8oti2JdqMaoBNlegy8hOjbeWqu/wsUu X-Received: by 2002:a05:6808:128b:: with SMTP id a11mr531117oiw.88.1621449080026; Wed, 19 May 2021 11:31:20 -0700 (PDT) Received: from localhost.localdomain ([45.235.253.15]) by smtp.gmail.com with ESMTPSA id l9sm28428oou.43.2021.05.19.11.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 11:31:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 28/50] target/i386: Reorder DisasContext members Date: Wed, 19 May 2021 13:30:28 -0500 Message-Id: <20210519183050.875453-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210519183050.875453-1-richard.henderson@linaro.org> References: <20210519183050.875453-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22f; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22f.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Paolo Bonzini Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Sort all of the single-byte members to the same area of the structure, eliminating 8 bytes of padding. Signed-off-by: Richard Henderson Reviewed-by: Paolo Bonzini Message-Id: <20210514151342.384376-29-richard.henderson@linaro.org> --- target/i386/tcg/translate.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) -- 2.25.1 diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 226fb62ccb..5c321b338e 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -76,20 +76,24 @@ static TCGv_i64 cpu_bndu[4]; typedef struct DisasContext { DisasContextBase base; - /* current insn context */ - int8_t override; /* -1 if no override, else R_CS, R_DS, etc */ - uint8_t prefix; + target_ulong pc; /* pc = eip + cs_base */ + target_ulong pc_start; /* pc at TB entry */ + target_ulong cs_base; /* base of CS segment */ + MemOp aflag; MemOp dflag; - target_ulong pc_start; - target_ulong pc; /* pc = eip + cs_base */ - /* current block context */ - target_ulong cs_base; /* base of CS segment */ + + int8_t override; /* -1 if no override, else R_CS, R_DS, etc */ + uint8_t prefix; #ifndef CONFIG_USER_ONLY uint8_t cpl; /* code priv level */ uint8_t iopl; /* i/o priv level */ #endif + uint8_t vex_l; /* vex vector length */ + uint8_t vex_v; /* vex vvvv register, without 1's complement. */ + uint8_t popl_esp_hack; /* for correct popl with esp base handling */ + uint8_t rip_offset; /* only used in x86_64, but left for simplicity */ #ifdef TARGET_X86_64 uint8_t rex_r; @@ -97,16 +101,13 @@ typedef struct DisasContext { uint8_t rex_b; bool rex_w; #endif - uint8_t vex_l; /* vex vector length */ - uint8_t vex_v; /* vex vvvv register, without 1's complement. */ - CCOp cc_op; /* current CC operation */ - bool cc_op_dirty; bool jmp_opt; /* use direct block chaining for direct jumps */ bool repz_opt; /* optimize jumps within repz instructions */ + bool cc_op_dirty; + + CCOp cc_op; /* current CC operation */ int mem_index; /* select memory access functions */ uint32_t flags; /* all execution flags */ - uint8_t popl_esp_hack; /* for correct popl with esp base handling */ - uint8_t rip_offset; /* only used in x86_64, but left for simplicity */ int cpuid_features; int cpuid_ext_features; int cpuid_ext2_features;