* Re: Compute correct mask and values when offset in define-ifield is not 0
@ 2023-01-06 0:52 Alan Modra
2023-01-06 7:59 ` Guillermo E. Martinez
0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2023-01-06 0:52 UTC (permalink / raw)
To: Guillermo E. Martinez; +Cc: binutils, cgen
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
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Compute correct mask and values when offset in define-ifield is not 0
2023-01-06 0:52 Compute correct mask and values when offset in define-ifield is not 0 Alan Modra
@ 2023-01-06 7:59 ` Guillermo E. Martinez
0 siblings, 0 replies; 2+ messages in thread
From: Guillermo E. Martinez @ 2023-01-06 7:59 UTC (permalink / raw)
To: Alan Modra; +Cc: binutils, cgen
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-06 7:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 0:52 Compute correct mask and values when offset in define-ifield is not 0 Alan Modra
2023-01-06 7:59 ` Guillermo E. Martinez
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).