So it appears my modifications to
blog.sh do work. Except I have a script
So source register copying will essentially just be slightly complex. One thing I must consider is that the implementation of the RISC code will need a shifted store for the most part.
Also, today is the first day of fall.
But anyway, the RISC writer will need an abstract method for copying a value from a register to memory along with also a byte shift and byte count.
RISCWriter will need to handle endianess also as it cannot just copy the
values as is. The copying logic in this case would be a bit complex however.
One thing though is that storing values onto the stack could get a bit ugly in
some cases. For example, 64-bit values would have to be written in their correct
byte order. So I suppose for the
RISCWriter I can get the word size of the CPU.
So this means that the CPU endianess needs to go into the native code and not the base of the JIT.
Probably another thing to do would be to instead of for the ABI, having all of
those arguments for passing, just have a common interface for such things. I
can then have the
JITTriplet implement that interface. This way I can have a
somewhat common configuration system. Alternatively this new interface can be
final (which it should be) and
JITTriplet can just return the native code
specific stuff (which may be better than an interface).
The question is, what do I call the new class? Perhaps
the even shorter
It can actually become the architecture portion of the triplet since I would be using that information for the most part. Then the triplet class can just use that code for the architecture portion. So there would be code moving over for the most part.
Also, JITTriplet should not equal against String.
So following this, when I return that is, I will need to make it so
NativeABI and similar use the new
NativeTarget for information such as
floating point type, endianess, and the bit size. This way it is just set
via the target and not needlessly duplicated. Then the ABI factory creation
methods then just get NativeTarget instead. This will make adding new ABIs
much simpler since only a single argument has to be passed.