Open shuffle2 opened 1 year ago
Just a guess that it's not liking the tokens without a =RHS
, since they're operands in the bit pattern, not constraints.
The with
description has this sentence:
The listed constraints take the form described in Section 7.4, “The Bit Pattern Section”
Which states:
The patterns required for processor specifications can almost always be described as a mask and value pair.
I've updated the title to be more accurate about the terminology. I still think this would be a nice feature to have, although I've since worked around it and it's only a minor inconvenience.
Although the pcode is invalid I have been able to reproduce. I will have to defer back to @caheckman for his insight on this.
Yes, your observation is correct. The "with" clause in SLEIGH can currently only take constraints like "isa=0" not the unadorned symbols like "u20_24 & u15_19" in the example. We will consider this a new feature request.
Describe the bug
I'm trying to write a processor extension. My slaspec contains the following:
I receive errors like the following:
Expected behavior From the documentation, I would expect this to work (the
with
blocks prefixing patterns to the patterns defined by the nested constructors). Is there some trick to get it to work? Is it supposed to work like that?Looking at the documentation a bit closer, it seems like a constraint without a comparison is considered a definition as opposed to a pattern, and suspiciously the example in the
with
section does not show definition syntax being used. However, I don't really understand why this shouldn't be allowed / why it doesn't work - it seems useful and would unify the behavior.Environment (please complete the following information):