Commit Graph

21 Commits

Author SHA1 Message Date
Michael Munday
361a298371 Add lhi instruction and fix immediate parsing.
We were reading immediate values as hexadecimal values, really we
want the default to be decimal unless the immediate has a '0x' prefix.
2016-12-12 14:38:55 -05:00
Michael Munday
111b62229a Define DASM_CHECKS when running tests. 2016-12-09 14:38:37 -05:00
Michael Munday
d472a3cc1c Add support for .type directives. 2016-12-08 15:29:26 -05:00
ketank-new
1f034811a3 Updated comment for test jmp_fwd() 2016-12-08 10:22:28 +05:30
Michael Munday
106718249e Add support for SS-a instructions.
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.
2016-12-07 16:56:00 -05:00
Michael Munday
8281c33747 Comment out failing tests for now. 2016-12-07 14:06:37 -05:00
ketank-new
79cc499172 Update test_z_inst.c
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
2016-12-07 14:11:20 +05:30
ketank-new
22f4e6a170 Update test_z_inst.c
Added another test for forward jump
2016-12-07 13:13:55 +05:30
Michael Munday
a03638880c Re-order test function. 2016-12-06 15:45:06 -05:00
Michael Munday
155577093a Add test for PC-style labels.
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:
}
2016-12-06 15:41:11 -05:00
Michael Munday
c688a0a3ab Add support for brasl instruction.
Important for calling subroutines.
2016-12-06 14:38:11 -05:00
Michael Munday
3ae1c4fd6b Support floating point register arguments.
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.
2016-12-06 13:15:29 -05:00
Michael Munday
e3ab67aed4 Support forward local branches. 2016-12-06 11:57:48 -05:00
Michael Munday
b24d490a42 Fix test table (needed comma at end of line to compile).
Also, re-align table columns.
2016-12-06 09:16:30 -05:00
ketank-new
7c79bbc768 Update test_z_inst.c
Added test case for add immediate 16 bits RI-a 
Added test case for add immediate 32 bits RIL-a
2016-12-06 14:11:30 +05:30
Michael Munday
73ad6dc77d Add support for jumps to local labels.
Currently limited to 16-bits ONLY.

Allows code like:

|1:
| ...
| j <1
2016-12-05 17:27:24 -05:00
Michael Munday
be3efbc65a Add simple tests for RX and RXY style instructions.
Also changed the test function signature to int64_t fn(int64_t, int64_t)
to make it easier to test 64-bit operations.
2016-12-05 14:51:48 -05:00
Michael Munday
54199bd9bc Clean up test file and add script to run tests.
./run.sh will now execute the tests. It is a very simple setup
currently, and is limited to linux on s390x. Enough to get started
with.
2016-12-05 14:02:58 -05:00
ketank-new
17d91e2f0c Update test_z_inst.c
changed code to in the form of a test table
currently handles RR based , addition, subtraction and multiply test
2016-12-05 13:46:44 +05:30
ketank-new
f0cc29436c Update test_z_inst.c
added functionality to test different modes of same instruction type
2016-12-02 15:46:45 +05:30
ketank-new
1d960f2286 Create test_z_inst.c
Added examples folder 
Added test code to test basic instructions like add , sub and msr
This code is in processes of further expansion and tuning
2016-12-02 15:21:18 +05:30