This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unexpected NOP encodings


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]