https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64003

--- Comment #19 from Jeffrey A. Law <law at redhat dot com> ---
I was thinking more along the lines of documented in the texi documention for
Length attributes.    Useful to have in sh.md, but better documented in a
location that is more likely to be read.

I don't think that inlining ix86_bnd_prefixed_insn_p in the attribute stuff is
really wise.

Are you suggesting that we can put in a dummy clause similar to the sh or pa
ports to resolve this issue?

For reference the PA port's hack looks like:

   (set (attr "length")
        (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
              (symbol_ref "pa_attr_length_call (insn, 0)")))])

The result of this hack is that during shortening these insns are considered as
having a fixed length (8 bytes).  So we might overestimte their actual size and
generate more long branches than necessary.  We have the length right by final,
so the final version may be shorter than the conservative estimate during
shorten-branches.

Reply via email to