public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: "Guillermo E. Martinez" <guillermo.e.martinez@oracle.com>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org, cgen@sourceware.org
Subject: Re: Compute correct mask and values when offset in define-ifield is not 0
Date: Fri, 6 Jan 2023 01:59:39 -0600	[thread overview]
Message-ID: <20230106075939.jxsf32av4bzysyqo@kamehouse> (raw)
In-Reply-To: <Y7dw54NPcDJZkBSk@squeak.grove.modra.org>

Hello Alan,

On Fri, Jan 06, 2023 at 11:22:55AM +1030, Alan Modra wrote:
> Updating the copyright dates this year reminded me that I have a cgen
> patch of yours, commit d1dd5fcc38ea, reverted in order to build
> binutils.  Without the reversion there are 10 or so errors like
> .../opcodes/bpf-opc.c:57:11: error: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709486335’ to ‘4294902015’ [-Werror=overflow]
>    57 |   64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
>       |           ^~~~~~~~~~~~~~~~~~
> 
> What's more, if I build with --disable-werror, then the following
> testsuite fails show up:
> gas/
> +FAIL: eBPF CALL instruction
> +FAIL: eBPF CALL instruction, big endian

Ooh, sorry for inconvenience. This is because CGEN patch (d1dd5fcc38ea)
revealed an disassemble error in binutils for eBPF `call' instructions
constructed by expressions using symbols (BPF_PSEUDO_CALL), and the use of
a wrong size type to handle the mask CGEN instruction format.

I posted a patch to fix it:
	https://sourceware.org/pipermail/binutils/2023-January/125517.html

> ld/
> +FAIL: CALL with disp32 reloc
> +FAIL: CALL with disp32 reloc and addend
> +FAIL: CALL check unsigned underflow
> 
> All caused by failure of call insns to disassemble with your patch
> applied.  Please fix, or revert in the cgen sources.
> 
> -- 
> Alan Modra
> Australia Development Lab, IBM

Apologies and Kind regards,
guillermo

      reply	other threads:[~2023-01-06  7:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06  0:52 Alan Modra
2023-01-06  7:59 ` Guillermo E. Martinez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230106075939.jxsf32av4bzysyqo@kamehouse \
    --to=guillermo.e.martinez@oracle.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=cgen@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).