From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 0567C385DC3A; Thu, 12 May 2022 07:42:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0567C385DC3A Received: by mail-ej1-x630.google.com with SMTP id l18so8452263ejc.7; Thu, 12 May 2022 00:42:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Kb/ZitcnB4mJxKjeySX5pQ+ka50jyxZgn/D7lXLKRi0=; b=RtkR/rlAaRuAq6VZwuRJGpBS7AdoeID5Vc7splDYJwLV1Crm/XuDqN09OZz63tzIyC vH1/oZAHD9K07WvVQvHeQBzGAd7Ph355Noo3/9SwoCdj4zcpQEoPk6LwwsNdW9KkRJS0 l/FA5PpLPghOET/PW5OdO+Wp23Lk590KkiUcVMN/97iZ7z6CC1l53iC71po2i9yUuE8Y 3FyQHeaE4hKL0tvMgqyvjkbLWEBZLal0PTRFxdsjkF4p5l2aqVlxdNro8paWuzmXZ48e nERY830ecM0t+MJYkcWcOwWZpA5gyqo5AbB+dKfql7NyJL3DJsoSHHm/H5MZr3+uRsmV sOoA== X-Gm-Message-State: AOAM533/EiFfbgnqdstqBCCe64yFTyl2LCBghz+flgvNsszz+eMyTQ+p a0ugGHQfnGtKVG29Bu+mlC0y/x7XSgHW5XyVr58= X-Google-Smtp-Source: ABdhPJxpCSE7iq2HpOX5M6BgOXTiWuwkiL6s7OX+Oe+O8QakpVPvVLqty5Jv2pVYKf6ikrXid0V+Nk0bkncjioT1Y3M= X-Received: by 2002:a17:907:9626:b0:6f4:2d7e:6430 with SMTP id gb38-20020a170907962600b006f42d7e6430mr28488387ejc.113.1652341320747; Thu, 12 May 2022 00:42:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dmitry Selyutin Date: Thu, 12 May 2022 10:41:24 +0300 Message-ID: Subject: Re: [PATCH 1/2] ppc: extend opindex to 16 bits To: Alan Modra Cc: binutils@sourceware.org, gdb-patches@sourceware.org, Luke Kenneth Casson Leighton Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.5 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, 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:42:03 -0000 On Thu, May 12, 2022 at 3:13 AM Alan Modra wrote: > Huh? What makes you say that? That was my first impression, since the only negative value I found was -1, and I initially thought that was just a placeholder value. Thank you for noticing that! I changed the wording so that we only stress that this is signed and (for now?) 16-bit. > Also, your patch misses changing the following. The existing 0xff > mask was from a time when fx_pcrel_adjust was a signed char. > > int opindex = fixP->fx_pcrel_adjust & 0xff; > > This could be any of > int opindex = fixP->fx_pcrel_adjust & 0xffff; > int opindex = (uint16_t) fixP->fx_pcrel_adjust; > uint16_t opindex = fixP->fx_pcrel_adjust; > Which you choose is a matter of style. Thank you! Since PPC code now has the typedef, I updated the patch to use `(ppc_opindex_t)fixP->fx_pcrel_adjust` form.