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

Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amylaar at gcc dot gnu.org

--- Comment #16 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #14)

> Is this documented anywhere?  I certainly don't recall this restriction, but
> it does answer one of the questions I'd been kicking around in my head.

I've put a comment into sh.md to that effect - can't put a link to the
gcc-cvs archive here because the code is from 1998, but here's an excerpt:

;; ??? This should use something like *branch_p (minus (match_dup 0) (pc)),
;; but getattrtab doesn't understand this.
(define_attr "length" ""
  (cond [(eq_attr "type" "cbranch")
         (cond [(eq_attr "short_cbranch_p" "yes")
                (const_int 2)
                (eq_attr "med_cbranch_p" "yes")
                (const_int 6)
                (eq_attr "braf_cbranch_p" "yes")
                (const_int 12)
;; ??? using pc is not computed transitively.
                (ne (match_dup 0) (match_dup 0))
                (const_int 14)
...

The (ne (match_dup 0) (match_dup 0)) clause tells genattrtab that this
cond form is length-varying.

I had a patch to clear this up with a usable & documented interface:
https://gcc.gnu.org/ml/gcc-patches/2012-11/msg00473.html
It got stuck in code review, so it's now a local patch in the
Synopsys toolchains.

Reply via email to