[PATCH, ppc] Allow IMM8 operands to accept both signed and unsigned values

Jan Beulich jbeulich@suse.com
Thu May 19 05:58:00 GMT 2016


>>> 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



More information about the Binutils mailing list