From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 3B07B3857427 for ; Thu, 12 May 2022 07:32:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B07B3857427 Received: by mail-lf1-x136.google.com with SMTP id i10so7458092lfg.13 for ; Thu, 12 May 2022 00:32:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=J71NwFs2fD1cSqkEJ0GM8ivh06voLKkva41X0M2wDvo=; b=7PktgLeGrpKDPXT9W6uKDgjg4kOJHvqijQyMiG2Y0tceuXNU3sX2thG8JJv1i4TJFD Dx6ffGJucrHDVZgFR3XOQEohpO/xUHUzaKyHFxrrqkyvixbF6UTlMoZJbwe+m6d+Z2oS ObcLUOaOJfM0XhJWrZRZeVIs1+Ob5w/bogYBYgtdKd0owBoU1lzc1k7Vp/6EhWzN8iX1 85VnFAFUsBot1z1AEfusUDoJdGhMhxgv4wNTAc7b9p/FYP6GBMm4s1PUWJ0R10hUW1Au EtlwlDdTZT7PM/b8JRPwKfS9/5sjPn4rDh27gb3nSuy/AAA9ptr5J9wFM40deFLMWdRG 9wwQ== X-Gm-Message-State: AOAM530NFmMtbRO13JpQTAOs4oOjUQ8p3dDnJbE3/9puEWlAsFLvLU7m 3u0XjJSQ/uAGENJASsAuY7zGNiDXjgsiSA== X-Google-Smtp-Source: ABdhPJwycv+rUvFTyiVZAR+sUNL2RezTXIY6NPiu1Pd7YFdCEz9MQSZ91EmEF4c0/sz69Y5BF15R5Q== X-Received: by 2002:ac2:51a5:0:b0:471:f81a:6685 with SMTP id f5-20020ac251a5000000b00471f81a6685mr22460307lfk.182.1652340735714; Thu, 12 May 2022 00:32:15 -0700 (PDT) Received: from localhost.localdomain (broadband-188-32-220-29.ip.moscow.rt.ru. [188.32.220.29]) by smtp.gmail.com with ESMTPSA id m14-20020a19434e000000b0047255d21192sm649413lfj.193.2022.05.12.00.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 00:32:15 -0700 (PDT) Sender: Dmitry Selyutin From: Dmitry Selyutin To: binutils@sourceware.org Subject: [PATCH v2 2/2] gas/write: extend fx_pcrel_adjust to 16 bits Date: Thu, 12 May 2022 10:32:12 +0300 Message-Id: <20220512073212.64309-2-ghostmansd@gmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220512073212.64309-1-ghostmansd@gmail.com> References: <20220512073212.64309-1-ghostmansd@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Thu, 12 May 2022 07:32:18 -0000 PowerPC code stores operand index into fx_pcrel_adjust field of fix struct. Once count of PowerPC operands exceeds an 8-bit integer, the code won't be able to store operand index anymore. This patch extends the aforementioned field to 16 bits, exactly like the ppc_opindex_t type; the missing 8 bits are taken from the fx_unused field. --- gas/write.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gas/write.h b/gas/write.h index 501bdd828f..5469dce445 100644 --- a/gas/write.h +++ b/gas/write.h @@ -52,6 +52,12 @@ struct fix /* These small fields are grouped together for compactness of this structure, and efficiency of access on some architectures. */ + /* pc-relative offset adjust (only used by some CPU specific code) */ + int fx_pcrel_adjust : 16; + + /* How many bytes are involved? */ + unsigned fx_size : 8; + /* Is this a pc-relative relocation? */ unsigned fx_pcrel : 1; @@ -73,13 +79,7 @@ struct fix unsigned fx_tcbit2 : 1; /* Spare bits. */ - unsigned fx_unused : 10; - - /* pc-relative offset adjust (only used by some CPU specific code) */ - int fx_pcrel_adjust : 8; - - /* How many bytes are involved? */ - unsigned fx_size : 8; + unsigned fx_unused : 2; bfd_reloc_code_real_type fx_r_type; -- 2.36.0