From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by sourceware.org (Postfix) with ESMTPS id 2DD773851C08 for ; Mon, 1 Jun 2020 07:31:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2DD773851C08 Received: by mail-pj1-x1044.google.com with SMTP id nm22so3953203pjb.4 for ; Mon, 01 Jun 2020 00:31:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=NHY9OAW91xHKOwgKiRo+Fjj+YAI1VJkD+m04S6dm8ZU=; b=psaFa6jdmw2qLeX3r0d7UbQk95h5MGEGZa7Eb5zwbQucmlC8XCME11phyutc38xB+v sg0YZtpi2IKon+sY/DsuX5KbEOkYwxjqlyJs2E7WtKvq0/GiWPDiDVIS15++ni7WCZ59 y27PIYLnUGsCBax5JZZC8fKXKLK7y0TIDMaeGWZaoZl/KdbhUS5qnNb0cWVbRSA2EF6V +Unj/Fwm/mJD2TFZ5o4AvO2s+VueIMR1tUbZwtgMg4IlEztNyHkQ/j2HSzESDhPIDIE4 8Zi2orkgr1QUYXkPh4RRk2ge0OyP4H2JyT5dFFjmlus5NDp0PgoHA7KgF4mdyX+ZrAlA M5KA== X-Gm-Message-State: AOAM5329hDoatyH9/8vBlb2lZljyciPtzYBe6llm7tHMCDlqOBnwIPHz VHW5veHrxcSYNSK79iahWzo= X-Google-Smtp-Source: ABdhPJwJpQOXavixDiQ8nrpj0AtwQIDfdFZwLxB/SSf3MxAeHpQXdThwr+xspiOXxXU7IV/32Ax7kw== X-Received: by 2002:a17:902:fe10:: with SMTP id g16mr3520549plj.53.1590996685141; Mon, 01 Jun 2020 00:31:25 -0700 (PDT) Received: from bubble.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id b11sm13624348pfd.178.2020.06.01.00.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 00:31:24 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id AAE57889AD; Mon, 1 Jun 2020 17:01:20 +0930 (ACST) Date: Mon, 1 Jun 2020 17:01:20 +0930 From: Alan Modra To: "Jose E. Marchesi" Cc: binutils@sourceware.org Subject: Re: [PATCH 2/3] opcodes: discriminate endianness and insn-endianness in CGEN ports Message-ID: <20200601073120.GL5475@bubble.grove.modra.org> References: <20200529170820.3875-1-jose.marchesi@oracle.com> <20200529170820.3875-3-jose.marchesi@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200529170820.3875-3-jose.marchesi@oracle.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-8.0 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, 01 Jun 2020 07:31:27 -0000 On Fri, May 29, 2020 at 07:08:19PM +0200, Jose E. Marchesi via Binutils wrote: > @@ -906,13 +907,15 @@ gas_cgen_md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) > { > CGEN_INSN_INT insn_value = > cgen_get_insn_value (cd, (unsigned char *) where, > - CGEN_INSN_BITSIZE (insn)); > + CGEN_INSN_BITSIZE (insn), > + cd->endian); > > /* ??? 0 is passed for `pc'. */ > errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields, > &insn_value, (bfd_vma) 0); > cgen_put_insn_value (cd, (unsigned char *) where, > - CGEN_INSN_BITSIZE (insn), insn_value); > + CGEN_INSN_BITSIZE (insn), insn_value, > + cd->endian); > } > #else > /* ??? 0 is passed for `pc'. */ The above looks to be a typo. Shouldn't you be using instruction endianness here when modifying instruction operand fields? The same question applies for tc-bpf.c and tc-mep changes. -- Alan Modra Australia Development Lab, IBM