unexpected NOP encodings

Jan Beulich JBeulich@suse.com
Tue Jun 25 07:01:00 GMT 2019


>>> On 25.06.19 at 05:36, <amodra@gmail.com> wrote:
>  void
>  ppc_handle_align (struct frag *fragP)
>  {
>    valueT count = (fragP->fr_next->fr_address
>  		  - (fragP->fr_address + fragP->fr_fix));
> +  char *dest = fragP->fr_literal + fragP->fr_fix;
> +  enum ppc_nop_encoding_for_rs_align_code nop_select = *dest & 0xff;
> +
> +  /* Pad with zeros if not inserting a whole number of instructions.
> +     We could pad with zeros up to an instruction boundary then follow
> +     with nops but odd counts indicate data in an executable section
> +     so padding with zeros is most appropriate.  */
> +  if (count == 0
> +      || nop_select == PPC_NOP_VLE ? (count & 1) != 0 : (count & 3) != 0)

Did you mean to put parentheses around the ?: expression?

Jan




More information about the Binutils mailing list