From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id AA8963857404 for ; Wed, 11 May 2022 16:40:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AA8963857404 Received: by mail-ej1-x629.google.com with SMTP id n10so5217526ejk.5 for ; Wed, 11 May 2022 09:40:05 -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=lt4zX/W8y6O+xZZDEnjEAD4ejDuP0hUI4+h0ao5n+0w=; b=eY0+Cznn/F1ojDK4KY6cDgU51zvG+BDbqn0ThN8xpMYzw5biSwSYfLRBijKAAuxjRl XV3AklHGzxsan19ANQU3fVkGMl+bGFiLC3F4y1XH630ISPUivYF8IoRbd4UwnFCPosHJ 6w7p6KEueIOcPVh/araBj2Jy3ITBySzwMpPpy2sN5RPv6rnVMxOvtnVsOnFZbdCeLHM2 5K3oFMVPbMAiwJkGWQcxMi90z1tk/s8fJPkGg+Gypqpvmy8vxFLmgfA/eSTPGbo0hMJH uC82mWTVrDkIZ5sNaSrAH037NY1X5I58DEbqDZ6X1kV/0yBuz2zF6N38cKP9MkhL6S54 FXKg== X-Gm-Message-State: AOAM533IO4o6FYkOprBPrgx2rUANyJMdIVRfu/Lu4QJi6XpUe6c22I6X yQBZHCTUy1ohPQJHSp79f0MD1EeQVumpAOBQ0bs= X-Google-Smtp-Source: ABdhPJzjIRYunTgWFBEhW6irVn2HC67RB8sNky6jhcH3EW6y4VFMb8n7pUVtemwHvU67Hc1txoOwMXAXqEiyNCu1Yic= X-Received: by 2002:a17:906:9748:b0:6fa:8c68:af0e with SMTP id o8-20020a170906974800b006fa8c68af0emr13105227ejy.153.1652287204404; Wed, 11 May 2022 09:40:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dmitry Selyutin Date: Wed, 11 May 2022 19:39:28 +0300 Message-ID: Subject: Re: PPC binutils opcodes To: Alan Modra Cc: binutils@sourceware.org, Luke Kenneth Casson Leighton Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 11 May 2022 16:40:07 -0000 On Wed, May 11, 2022 at 4:13 PM Alan Modra wrote: > Increasing the size of fx_pcrel_adjust should be fine, adjusting the > assertion and removing the silly mask to 8 bits. Another option > is to add a field to tc-ppc.h:_ppc_fix_extra and use that instead of > fx_pcrel_adjust in tc-ppc.c. As I've just found, to my confusion, we actually have a way to reach the desired goal by simpler actions. Right above fx_pcrel_adjust, there's yet another 10-bit field, called fx_unused. It's indeed not used yet. I suggest allocating 8 bits out of it, and make opindex at include/opcode/ppc.h:powerpc_opcode an unsigned short (or, ideally, I suggest using uint16_t: ppc.h already uses stdint.h anyway). We could use less bits than 8, but, since the operand size is going to take at least 16 bits anyway and to avoid similar problems in the future. Hopefully 16 bits will be sufficient. I'll prepare the patch. Alan, could you, please, help me with tests I need to check? It'd be great if there's some CI to use: my environment is somewhat rusty and slow.