This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH, ppc] Allow IMM8 operands to accept both signed and unsigned values
- From: "Jan Beulich" <jbeulich at suse dot com>
- To: <amodra at gmail dot com>
- Cc: <binutils at sourceware dot org>,<bergner at vnet dot ibm dot com>
- Date: Wed, 18 May 2016 23:58:23 -0600
- Subject: Re: [PATCH, ppc] Allow IMM8 operands to accept both signed and unsigned values
- Authentication-results: sourceware.org; auth=none
- References: <1463173058 dot 4256 dot 45 dot camel at vnet dot ibm dot com> <573AEB5B02000078000EBFB6 at prv-mh dot provo dot novell dot com> <20160518023724 dot GI24091 at bubble dot grove dot modra dot org> <573C53E902000078000EC6E2 at prv-mh dot provo dot novell dot com> <20160519044846 dot GU24091 at bubble dot grove dot modra dot org>
>>> Alan Modra <amodra@gmail.com> 05/19/16 6:50 AM >>>
>@@ -493,10 +494,16 @@ const struct powerpc_operand powerpc_operands[] =
>SI field, only negated. */
>#define NSI NBI + 1
>{ 0xffff, 0, insert_nsi, extract_nsi,
>- PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
>+ PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
>+
>+ /* The NSI field in a D form instruction when we accept a wide range
>+ of positive values. */
>+#define NSISIGNOPT NSI + 1
>+ { 0xffff, 0, NULL, NULL,
>+ PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
Does this work without using an insertion function negating the intended value
(as it looks re-using {insert,extract}_nsi() should be okay)?
Jan