From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 902423858002 for ; Mon, 29 Mar 2021 13:00:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 902423858002 Received: by mail-ot1-x329.google.com with SMTP id k14-20020a9d7dce0000b02901b866632f29so12192835otn.1 for ; Mon, 29 Mar 2021 06:00:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=styOnt7OkndWjJqmXZ9dFhTE/uLfG9WUDOkJ5uJzUjU=; b=mgJBR8GN3twt9bap1Qbsfu0t4KUVa9EahJxtafkQ13FVStWo6OR6rQw34EYRAUXeCt Br3+Q0kdE13USlX9M5rv5Yr9BWmskTb9SDArUvQh5GrQQ9UAD6GfTDW6HtaFFwuhfE1T o9vTouhEZMpWAUlD4t+6Dk1ap1AFevsQSPOA2WcEMgnu0yh9dNamk1xK/tWSyxdUUrs7 LkzXywcK2Ysaoa4BBK19wzZGfNcpEBp6GzBeV21Mz3b/EOs3ByER9wSZrBmKXxcU0PLm 1i4OZ3phgIDCb116Vb2MnJX8jxiTv/IqMXkyWpYRLr69bi1jULw8G5qOKx2pGlwIX1zG Qq9g== X-Gm-Message-State: AOAM532RiYxghwAjUdDCn3CEHpF7lu/e1hUa54X2uyoL/hY+Dv+nkl03 QFImAJNKWtAHCXJ9q7enHBpBpJdVsex4oBpIXqHMwS/YgFGjxw== X-Google-Smtp-Source: ABdhPJxlnCmW9dLpAbbm0YeBEfMKm02917KQgeeLWBn9Yb9RZ5HZbTqHqUtTkAbF039YePgE3GQVJlqCWrurL8mv5fA= X-Received: by 2002:a9d:600a:: with SMTP id h10mr22228523otj.90.1617022841629; Mon, 29 Mar 2021 06:00:41 -0700 (PDT) MIME-Version: 1.0 References: <287ad145-1fe3-2477-327a-30e8d45a4be7@suse.com> <379a1b1a-f48f-3070-ee76-1b460450d518@suse.com> In-Reply-To: <379a1b1a-f48f-3070-ee76-1b460450d518@suse.com> From: "H.J. Lu" Date: Mon, 29 Mar 2021 06:00:05 -0700 Message-ID: Subject: Re: [PATCH 2/6] x86: shrink some struct insn_template fields To: Jan Beulich Cc: Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3028.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2021 13:00:50 -0000 On Fri, Mar 26, 2021 at 3:50 AM Jan Beulich wrote: > > Now that all base opcodes are only at most 2 bytes in size, shrink its > template field to just as much. By also shrinking extension_opcode and > operands to just what they really need, we can free up an entire 32-bit > slot (plus 4 left bits past the bitfields themselves). > > At present this alters sizeof(struct insn_template) only for 32-bit > builds. In 64-bit builds it instead leaves a padding hole that will > allow to buffer future growth of other fields (opcode_modifier, > cpu_flags, operand_types[]). > > opcodes/ > 2021-03-XX Jan Beulich > > * i386-opc.h (struct insn_template): Shrink base_opcode to 16 > bits. Shrink extension_opcode to 9 bits. Make it signed. Change > value of None. Shrink operands to 3 bits. > --- > Code-generation wise it may be better to move the signed > extension_opcode field last within the containing 32-bit slot. > extension_opcode should be next to opcode in template. -- H.J.