Open astrelsky opened 5 years ago
I would not do sub-constructor matches with an "|". Seems rather confusing too. You have actions and context on both sub-constructors, what if it matches both, add the pcode and actions for both? Not even sure that works (as you mention ;-) ) This shouldn't be allowed in sleigh, but everything can't be caught. I suppose the SleighEditor in eclipse could catch it and make it an error.
Split the base constructor into two with VUFLAGS in one and vuinst in the other.
I would not do sub-constructor matches with an "|". Seems rather confusing too. You have actions and context on both sub-constructors, what if it matches both, add the pcode and actions for both? Not even sure that works (as you mention ;-) ) This shouldn't be allowed in sleigh, but everything can't be caught. I suppose the SleighEditor in eclipse could catch it and make it an error.
Split the base constructor into two with VUFLAGS in one and vuinst in the other.
They can't both match, it's impossible. microMode is a context register. VUFLAGS requires microMode=1 while vuinst requires microMode=0.
The only real difference between the two is that when microMode=1 flag registers are set for cop2 which also gets reflected at the end of the mnemonic and when microMode=0 the prime bits are fixed, vuco=1 and 'v' is a prefix of the instruction.
I currently have them split up its just a lot of duplication.
Describe the bug Using | in a sleigh bit pattern requires that both tables match for the entire pattern to match.
To Reproduce Steps to reproduce the behavior:
Expected behavior | to match the pattern if at least one of the tables match.
Environment (please complete the following information):
Additional context Here is the sleigh declaration:
Additional Table declarations incase they are needed for reference:
Here is the debug instruction parse output of the instruction that should match.
I would also like to mention that replacing (vuinst | VUFLAGS) with say UPPER and declaring UPPER as the following results in running out of heap memory when compiling.