DISCLAIMER: These notes are from the defunct k8 project which precedes SquirrelJME. The notes for SquirrelJME start on 2016/02/26! The k8 project was effectively a Java SE 8 operating system and as such all of the notes are in the context of that scope. That project is no longer my goal as SquirrelJME is the spiritual successor to it.
PowerPC has 1,141 operation instructions. So adding all of these by hand would take quite some time. Since there are so many operations I will need some kind of helper program to clean things up and output the operation table.
Good thing for scripts because otherwise adding all of these instructions will take days to type out. However, the operations will need parameters and such added to them.
All of the operations should be generated with enough information now.
Looks like the list of PowerPC operations will be 20,000 lines long. It happens. That will be a gigantic pain however, because that would be a huge file to commit and one small change would require a new file to exist. It would also be very hard to find any instructions in it quickly. I suppose the best way to go is through the hairball generation which can just put the code in where it is expected to go in.
Only two things use the hairball generator currently, but so far those two uses are very handy.
Running the generator causes a shimmering effect in wmforkplop. I must be calling sed and grep many times over. I was hoping that today I would be generating instructions for PowerPC, I suppose not.
Appears the generation code works. And the class file for the instructions is 768,394 bytes. Almost nearly a memory of dynamically generating code. The good thing is that no extra objects are used at all and it is all handled by method handles so to speak. In fact the class is the first class that is looked at is the PowerPCInstruction. It fails with a NPE in the constant pool handler. The class kind of pushes the limits. Now x86 will probably be much much more intense. But at least with this code I can test my Java class loading code.