This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: general_operand not validating "(const_int 65535 [0xffff])"
- From: Julian Brown <julian at codesourcery dot com>
- To: Jozef Lawrynowicz <jozef dot l at mittosystems dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Wed, 9 Oct 2019 14:56:17 +0100
- Subject: Re: general_operand not validating "(const_int 65535 [0xffff])"
- Ironport-sdr: cW440tVfCBp1rAhMjktVlDLZ2GJr5+1DmnQVffElyWFy8eL8GnAoqWdZBdkyoi9t9VmJJUMC4k yv8vGa6yDkXY+JFzfTCdIhiKWTE8IVZsHnXUulJsgzufWyGIe1f3ISXSqmDuHnImlxw5rUkqNK ODvM/lSUcJ9MVZzxIH6/MHzdEuK3oz1lUV2Z3NEqaOPUVwaDgWinswY2dg49xJcRrP/oGt0wOu 4NgtyREJ4V1S+m6sZHhVtxMVhOiCtmyzDPNFI7fycri5tOvz/6Spz7WDWkzsg+Hl3x/nVStzo/ VGM=
- Ironport-sdr: wjyrqaXeztZeuqaUuT7iOif8EVI/rtife25j5HpV/5Ei93Lmvafw5MseXBtZ/S1TIz3yx5Tb2b 5sT5nARV/q3KMBaFVtZ3N4mOalSTkChkO8wPVUpVLMByxp9mg5BE1RjQTPbguiAPkS/09CgEmF VwuAjr/5RWDhH8ZhCN8XTiw4zV4QRi9Nuqht55TxpJA554WAAJ6xyGQkmM4SfVl/+MdP3omAxd l0YcQJ3LnQSzWJabHtcwXTkfo/kvoG2bYrQQqMp8K08drYHC8aJrZdwyyWEM+exYPK7mkdT2ip OLw=
- References: <20191009144042.69ed6fdd@jozef-kubuntu>
On Wed, 9 Oct 2019 14:40:42 +0100
Jozef Lawrynowicz <jozef.l@mittosystems.com> wrote:
> Constants generated for modes with fewer bits than in HOST_WIDE_INT
> must be sign extended to full width (e.g., with gen_int_mode). For
> constants for modes with more bits than in HOST_WIDE_INT the implied
> high order bits of that con- stant are copies of the top bit. Note
> however that values are neither inherently signed nor inherently
> unsigned; where necessary, signedness is determined by the rtl
> operation instead.
>
> Can anyone offer any further insight? Do I just need to track down
> what is generating this const_int and fix that?
I think you need to change a GEN_INT(x) into a gen_int_mode(x, HImode),
somewhere.
HTH,
Julian