Record the discovered VPT blocks while checking for validity and, for now, only handle blocks that begin with VPST and not VPT. We're now allowing more than one instruction to define vpr, but each block must somehow be predicated using the vctp. This leaves us with several scenarios which need fixing up:
- A VPT block with is only predicated by the vctp and has no internal vpr defs.
- A VPT block which is only predicated by the vctp but has an internal vpr def.
- A VPT block which is predicated upon the vctp as well as another vpr def.
- A VPT block which is not predicated upon a vctp, but contains it and all instructions within the block are predicated upon in.
The changes needed are, for:
- The easy one, just remove the vpst and unpredicate the instructions in the block.
- Remove the vpst and unpredicate the instructions up to the internal vpr def. Need insert a new vpst to predicate the remaining instructions.
- No nothing.
- The vctp will be inside a vpt and the instruction will be removed, so adjust the size of the mask on the vpst.
Can you add some comments what a VPTBlock is? For example, is it exactly the same as in the ArmARM, or slightly different? Are there any restrictions on the number of instructions in this block, so probably good to assert that in addInst?