I've disabled both the JIT and FFI for now. I've also stripped almost
all of the assembly out of vm_s390x.dasc, leaving only labels for the
most part. This is enough to get LuaJIT to compile but of course if
you try and run it it will explode.
The idea now is to re-add enough functionality to get a very basic
Lua program to run.
Currently I am not able to test the functionality of this mode, need some help in that.
Also for the time being I have created different function for parsing, we can merge that later, just to make sure SS-a doesnt break, I have not merged this since I was not able to test it.
Let me know your comments on this
I've also changed the template parser so that it can handle suffixes
which are longer than 1 character. The suffix for SS-a instructions
is "SS-a". We could change this again later.
Currently only "maer" is implemented. I am not able to get this working, don't know if I am missing out something, or we need to add some more functionality for RRD.
Added comments to fwd_jmp
added test for RRD based test case add_rrd()---> functionality to be tested
added test for RR based test case load_test()--> test fails
These are labels which are given a numeric value. For example, the
following code would generate PC labels 0 to 4:
for (int i = 0; i < 5; i++) {
|=>i:
}
It would be nice to verify that floating-point/general-purpose
registers are indeed expected by the instruction, but for now treat
them both the same so we can use floating-point instructions.
Currently only afi instruction is encoded, will be adding other instructions too. For encoding we are running out of characters so was planning to append the complete modes (RXa or rxa) which one do you think is better, and also thinking of just adding remaining instruction modes as well, which we don't support as of now. Let me know if you want me to add those, or we will wait for sometime before we add those.
A style thing. I find it easier to read this way.
i.e. do:
while(1) {
if (blah) {
...
continue;
}
... // big switch statement
}
instead of:
while(1) {
if (blah) {
...
} else {
... // big switch statement
}
}
I did this mostly to get rid of the annoying tabs/spaces mix in this
file. It has the side effect of forcing newlines before statements
which I think is a better style (and not particularly inconsistent
with the original which used both styles). Other than that I've tried
to match the original style as closely as possible.
Generated with this command:
indent -i2 -brs -cli0 -br -ce -npcs -nbc -di1 -npsl -ncs dasm_s390x.h
The masking in immediate mode might not be proper. I could understand that you had masked 12bits and then 8bits to get the displacement in place for 20-bit displacement ( cp[-2] |= n&0xfff; cp[-1] |= (n>>4)&0xff00;) But in my case I need all the 32bits, so not sure how to go about it. Currently I have just used "n" since no point in "and with 0xffff" But I am getting core dump. Please Let me know your comments on these.