Creating the target machine and the sub-targetSo far, we’ve implemented the instruction selection classes and a couple of other classes.…