On 11/25/2015 05:08 PM, Richard Sandiford wrote:
Also, using a string like that rather than some kind of
identifier or a define_icode_attr maybe isn't the best approach?

By "some kind of identifier" do you just mean replacing "code,alternative"
with a string that doesn't have a comma?

Yeah. It really looks too much like the definition of attribute values IMO.

The problem with define_icode_attr is that you get combinatorial
explosion with the type of the return value.  At the moment we just have
integers and enums (which can be defined by define_enum_attr as well as
define_attr), but who knows what we'll have in future? :-)

Maybe

(define_typed_attr {enum,int} {insn,icode,icodealt}
 [all the usual stuff])


Bernd


Reply via email to