On Thu, Aug 20, 2020 at 1:53 AM Andrew Stubbs <a...@codesourcery.com> wrote: > > On 20/08/2020 06:40, Senthil Kumar Selvaraj via Gcc wrote: > > What I didn't understand was the (set-attr "cc<cccc><ccnz><ccnzvc>") > > part - as far I can tell, this results in (set_attr "cc_enabled" ...) in > > all of the three substituted patterns, so I wondered why not just have > > (set_attr "cc_enabled" ...) in the original define_insn instead. > > > > I now realize that with (set-attr "cc<cccc><ccnz><ccnzvc>"), the original > > unsubstituted pattern will have only a (set_attr "cc" ...) and would > > therefore not match the attr check for "enabled" - correctly so, as the > > original insn pattern clobbers CRIS_CC0_REGNUM. Did I get that right? > > The best (only?) way to understand define_subst is to read the expanded > machine description. This is not written anywhere, by default, but > there's a way to get it. > > cd <build>/gcc > make mddump > less tmp-mddump.md > > Not only are all the define_subst expanded, but so are all the other > iterators.
Shouldn't it be documented? -- H.J.