diff --git a/src/az390.java b/src/az390.java index 702f34b04..2ad81bd4c 100644 --- a/src/az390.java +++ b/src/az390.java @@ -419,7 +419,11 @@ public class az390 implements Runnable { * 2022-05-10 AFK #398 fix typo in error message * 2022-05-12 DSH #325 issue error 54 invalid DC field terminator if not '..' for BDEFHLPXZ * 2022-06-10 DSH z16 #423 correct rotate instruction errors reported by Dan Greiner - ***************************************************** + * 2022-06-27 DSH z16 #424 add BFP constants INF, NAN, QNAN, SNAN, DMIN + * See POP 13 pages 9-5 and 19-4 + * 2022-07-03 DSH #414 add 30 new z16 instructions also see + * 2022-08-01 DSH #414 correct instruction formats VRI-f VRR-j and VRR-k + ***************************************************** * Global variables last rpi *****************************************************/ tz390 tz390 = null; @@ -1788,7 +1792,9 @@ else if (tz390.op_trace_type[index]==30) && !tz390.op_name[index].equals("RSCH") && !tz390.op_name[index].equals("SCHM") && !tz390.op_name[index].equals("SAL") - && !tz390.op_name[index].equals("XSCH")) + && !tz390.op_name[index].equals("XSCH") + && !tz390.op_name[index].equals("LBEAR") // DSH #414 z16 + ) {entry=entry+" D2(B2)"; } break; @@ -2629,7 +2635,9 @@ private void process_bal_op(){ loc_len = 4; get_hex_op(1,4); get_hex_zero(2); - if (bal_op.equals("PALB") // RPI 277 + if (bal_op.equals("NNPA")){ // DSH #414 z16 + get_hex_zero(2); + } else if (bal_op.equals("PALB") // RPI 277 || bal_op.equals("PCKMO") // RPI 1125 || bal_op.equals("PCC")){ // RPI 1125 get_hex_zero(2); @@ -2815,8 +2823,12 @@ private void process_bal_op(){ loc_len = 6; get_hex_op(1,2); get_hex_bdddhh2(); - skip_comma(); - get_hex_byte(); + if (!bal_abort && exp_next_char(',')){ // DSH #414 z16 add support for EB71 LPSWEY D1(B1) witn no second opr + skip_comma(); + get_hex_byte(); + } else { + get_hex_zero(2); + } obj_code = obj_code.substring(0,2) + obj_code.substring(8,10) + obj_code.substring(2,8); get_hex_op(3,2); check_end_parms(); @@ -3023,13 +3035,17 @@ private void process_bal_op(){ loc_start = loc_ctr; loc_len = 4; get_hex_op(1,4); - get_hex_reg(); + get_hex_reg(); // r1 skip_comma(); - get_hex_reg(); + get_hex_reg(); // r3 skip_comma(); - get_hex_reg(); - skip_comma(); - get_hex_reg(); + get_hex_reg(); // r2 + if (!bal_abort && exp_next_char(',')){ // DSH #414 z16 make M4 optional for RDP + skip_comma(); + get_hex_reg(); // M4 + } else { + get_hex_zero(1); + } obj_code = obj_code.substring(0,4) // oooo + obj_code.substring(5,6) // r3 + obj_code.substring(7,8) // m4 @@ -3580,27 +3596,36 @@ private void process_bal_op(){ skip_comma(); get_hex_byte(); // I3 if (tz390.opt_traceall){ // DSHX debug RXSBGT - tz390.put_trace("RNSBG/RXSBG I3=" + exp_val + "obj_code=" + obj_code); + tz390.put_trace("RISBG/RNSBG/RXSBG I3=" + exp_val + "obj_code=" + obj_code); } if (!bal_abort && bal_op.length() == 6 && bal_op.charAt(5) == 'T'){ // turn on test bit if OP=?????T obj_code = obj_code.substring(0,obj_code.length()-2) + tz390.get_hex(((int)exp_val | (int)0x80),2); // DSH z16 #423 change + to | } - skip_comma(); - get_hex_byte(); // I4 - if (!bal_abort // RPI 1164 WAS 6 - && bal_op.charAt(bal_op.length()-1) == 'Z'){ // turn on XZERO bit if OP=??????Z // RPI 1164 RISBG/RISBGN - obj_code = obj_code.substring(0,obj_code.length()-2) + tz390.get_hex(((int)exp_val | (int)0x80),2); // DSH z16 #423 change + to | - } - if (exp_text.length() > exp_index - && exp_text.charAt(exp_index) == ','){ - skip_comma(); - get_hex_byte(); // I5 - } else { - get_hex_zero(2); // I5 default 0 rotate RPI 1164 was 1 - } - } + + if (tz390.op_code[bal_op_index].length() == 9){ //$i4i5 extension for SLLHH etc. DSH #414 z16 + // extended op (get i4,i5 from op_code "oooo33i4i5" + int i4 = Integer.valueOf(tz390.op_code[bal_op_index].substring(5,7)); + int i5 = Integer.valueOf(tz390.op_code[bal_op_index].substring(7,9)); + obj_code = obj_code + tz390.get_hex(i4,2); + obj_code = obj_code + tz390.get_hex(i5,2); + } else { + skip_comma(); + get_hex_byte(); // I4 + if (!bal_abort // RPI 1164 WAS 6 + && bal_op.charAt(bal_op.length()-1) == 'Z'){ // turn on XZERO bit if OP=??????Z // RPI 1164 RISBG/RISBGN + obj_code = obj_code.substring(0,obj_code.length()-2) + tz390.get_hex(((int)exp_val | (int)0x80),2); // DSH z16 #423 change + to | + } + if (exp_text.length() > exp_index + && exp_text.charAt(exp_index) == ','){ + skip_comma(); + get_hex_byte(); // I5 + } else { + get_hex_zero(2); // I5 default 0 rotate RPI 1164 was 1 + } + } + } get_hex_op(3,2); // OP2 check_end_parms(); put_obj_text(); @@ -4152,6 +4177,8 @@ private void process_bal_op(){ put_obj_text(); break; case 81: // "E649=VLIP,81,737", // E649 VRIh VLIP V1,I2,I3 RPI 2202 + // map E672 and E670 VRIf into oo1230miixoo + // map E772, e786, e787 VRId into oo1230iimxoo // map V1,R3,D2(B2) into oo03bddd1x00 bal_op_ok = true; loc_ctr = (loc_ctr+1)/2*2; @@ -4159,7 +4186,9 @@ private void process_bal_op(){ loc_len = 6; get_hex_op(1,2); // oo get_hex_vreg(1); // V1 - if (tz390.op_code[bal_op_index].substring(0,4).equals("E772") // E772 VRId VERIM V1,V2,V3,I4,M5 RPI 2202 + if (tz390.op_code[bal_op_index].substring(0,4).equals("E672") // E672 VRIf VSRPR V1,V2,V3,I4,M5 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E670") // E670 VRIf VPKZR V1,V2,V3,I4,M5 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E772") // E772 VRId VERIM V1,V2,V3,I4,M5 RPI 2202 || tz390.op_code[bal_op_index].substring(0,4).equals("E786") // E786 VRId VSLD V1,V2,V3,I4 RPI 2202 || tz390.op_code[bal_op_index].substring(0,4).equals("E787")) { // E787 VRId VSRD V1,V2,V3,I4 RPI 2202 skip_comma(); @@ -4168,17 +4197,25 @@ private void process_bal_op(){ get_hex_vreg(3); // V3 get_hex_zero(1); skip_comma(); - get_hex_byte(); // I4 - if ((tz390.op_code[bal_op_index].length() == 5)) { - get_hex_op(5,1); // M5 - } else { - if (!bal_abort && exp_next_char(',')){ - skip_comma(); - get_hex_reg(); // M4 - } else { - get_hex_zero(1); - } - } + get_hex_byte(); + if ((tz390.op_code[bal_op_index].length() == 5)) { + get_hex_op(5,1); // M5 + } else { // I4 + if (!bal_abort && exp_next_char(',')){ + skip_comma(); + get_hex_reg(); // M5 + } else { + get_hex_zero(1); // M5 + } + } + if (tz390.op_code[bal_op_index].substring(0,4).equals("E672") // E672 VRIf VSRPR V1,V2,V3,I4,M5 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E670")){ // E670 VRIf VPKZR V1,V2,V3,I4,M5 DSH #414 z16 + // VRIf so reverse i4 and m5 + // map E672 and E670 VRIf into oo1230miixoo + obj_code = obj_code.substring(0,6) // oo1230 + + obj_code.substring(8,9) // M3 + + obj_code.substring(6,8); // I3 + } } else if (tz390.op_code[bal_op_index].substring(0,4).equals("E777")) { // E777 VLId VSLDB V1,V2,V3,I4 RPI 2202 skip_comma(); get_hex_vreg(2); // V2 @@ -4348,21 +4385,39 @@ private void process_bal_op(){ skip_comma(); get_hex_reg(); // M3 get_hex_zero(2); - } else if (tz390.op_code[bal_op_index].substring(0,4).equals("E750") // E750 VRRa VPOPCT V1,V2,M3 + } else if ( tz390.op_code[bal_op_index].substring(0,4).equals("E654") // E654 VRRk VUPKZH V1,V2,M3 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E65C") // E65C VRRk VUPKZL V1,V2,M3 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E651") // E651 VRRk VCLZDP V1,V2,M3 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E750") // E750 VRRa VPOPCT V1,V2,M3 || tz390.op_code[bal_op_index].substring(0,4).equals("E752") // E752 VRRa VCTZ V1,V2,M3 || tz390.op_code[bal_op_index].substring(0,4).equals("E753") // E752 VRRa VCLZ V1,V2,M3 || tz390.op_code[bal_op_index].substring(0,4).equals("E75F")){ // E75F VRRa VSEG V1,V2,M3 get_hex_vreg(1); // V1 skip_comma(); - get_hex_vreg(2); // V2 - get_hex_zero(4); - if (!bal_abort && exp_next_char(',')){ - skip_comma(); - get_hex_reg(); // M3 - } else { - get_hex_op(5,1); // M3 - } - } else if (tz390.op_code[bal_op_index].substring(0,4).equals("E760") // E760 VRRc VMRL V1,V2,V3,M4 + get_hex_vreg(2); // V2 + // DSH #414 if VRRk format oo1200m00xoo vs oo120000mx00 + if ( tz390.op_code[bal_op_index].substring(0,4).equals("E654") // E654 VRRk VUPKZH V1,V2,M3 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E65C") // E65C VRRk VUPKZL V1,V2,M3 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E651")){ // E651 VRRk VCLZDP V1,V2,M3 DSH #414 z16 + get_hex_zero(2); + if (!bal_abort && exp_next_char(',')){ + skip_comma(); + get_hex_reg(); // M3 + get_hex_zero(2); + } else { + get_hex_op(5,1); // M3 + } + } else { + get_hex_zero(4); + if (!bal_abort && exp_next_char(',')){ + skip_comma(); + get_hex_reg(); // M3 + } else { + get_hex_op(5,1); // M3 + } + } + } else if ( tz390.op_code[bal_op_index].substring(0,4).equals("E67D") // E67D VRRj VCSPH V1,V2,V3,M4 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E760") // E760 VRRc VMRL V1,V2,V3,M4 || tz390.op_code[bal_op_index].substring(0,4).equals("E761") // E761 VRRc VMRH V1,V2,V3,M4 || tz390.op_code[bal_op_index].substring(0,4).equals("E764") // E764 VRRc VSUM V1,V2,V3,M4 || tz390.op_code[bal_op_index].substring(0,4).equals("E765") // E765 VRRc VSUMG V1,V2,V3,M4 @@ -4397,18 +4452,36 @@ private void process_bal_op(){ get_hex_vreg(2); // V2 skip_comma(); get_hex_vreg(3); // V3 - get_hex_zero(3); - if (!bal_abort && exp_next_char(',')){ - skip_comma(); + if ( tz390.op_code[bal_op_index].substring(0,4).equals("E67D")){ + // VRRj map oo1230m00xoo DSH #414 + get_hex_zero(1); + if (!bal_abort && exp_next_char(',')){ + skip_comma(); get_hex_reg(); // M4 - } else { + } else { if ((tz390.op_code[bal_op_index].length() == 5)) { get_hex_op(5,1); // M4 } else { get_hex_zero(1); } - } - } else if (tz390.op_code[bal_op_index].substring(0,4).equals("E7E2") // E7E2 VRRc VFS V1,V2,V3,M4,M5 + } + get_hex_zero(2); + } else { + // VRRc map oo123000mxoo + get_hex_zero(3); + if (!bal_abort && exp_next_char(',')){ + skip_comma(); + get_hex_reg(); // M4 + } else { + if ((tz390.op_code[bal_op_index].length() == 5)) { + get_hex_op(5,1); // M4 + } else { + get_hex_zero(1); + } + } + } + } else if (tz390.op_code[bal_op_index].substring(0,4).equals("E675") // E675 VRRc VCRNF V1,V2,V3,M4,M5 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E7E2") // E7E2 VRRc VFS V1,V2,V3,M4,M5 || tz390.op_code[bal_op_index].substring(0,4).equals("E7E3") // E7E3 VRRc VFA V1,V2,V3,M4,M5 || tz390.op_code[bal_op_index].substring(0,4).equals("E7E5") // E7E5 VRRc VFD V1,V2,V3,M4,M5 || tz390.op_code[bal_op_index].substring(0,4).equals("E7E7")) { // E7E7 VRRc VFM V1,V2,V3,M4,M5 @@ -4488,7 +4561,8 @@ private void process_bal_op(){ + obj_code.substring(8,9) // m6 + obj_code.substring(7,8) // m5 + obj_code.substring(6,7); // m4 - } else if (tz390.op_code[bal_op_index].substring(0,4).equals("E762") // E762 VRRf VLVGP V1,R2,R3 RPI 2202 + } else if ( tz390.op_code[bal_op_index].substring(0,4).equals("E67C") // E67C VRRf VSCSHP V1,V2,V3 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E762") // E762 VRRf VLVGP V1,R2,R3 RPI 2202 || tz390.op_code[bal_op_index].substring(0,4).equals("E766") // E766 VRRc VCKSM V1,V2,V3 RPI 2202 || tz390.op_code[bal_op_index].substring(0,4).equals("E768") // E768 VRRc VN V1,V2,V3 RPI 2202 || tz390.op_code[bal_op_index].substring(0,4).equals("E769") // E769 VRRc VNC V1,V2,V3 RPI 2202 @@ -4553,7 +4627,11 @@ private void process_bal_op(){ + obj_code.substring(8,9) // m5 + obj_code.substring(7,8) // m4 + obj_code.substring(6,7); // m3 - } else if ( tz390.op_code[bal_op_index].substring(0,4).equals("E7C0") // E7C0 VRRa VCLFP/VCLGD V1,V2,M3,M4,M5 + } else if ( tz390.op_code[bal_op_index].substring(0,4).equals("E655") // DSH #414 VCNF V1,V2,M3,M4 + || tz390.op_code[bal_op_index].substring(0,4).equals("E65D") // DSH #414 VCFN V1,V2,M3,M4 + || tz390.op_code[bal_op_index].substring(0,4).equals("E656") // DSH #414 VCLFNH V1,V2,M3,M4 + || tz390.op_code[bal_op_index].substring(0,4).equals("E65E") // DSH #414 VCLFNL V1,V2,M3,M4 + || tz390.op_code[bal_op_index].substring(0,4).equals("E7C0") // E7C0 VRRa VCLFP/VCLGD V1,V2,M3,M4,M5 || tz390.op_code[bal_op_index].substring(0,4).equals("E7C1") // E7C1 VRRa VCDLG V1,V2,M3,M4,M5 || tz390.op_code[bal_op_index].substring(0,4).equals("E7C2") // E7C2 VRRa VCGD V1,V2,M3,M4,M5 || tz390.op_code[bal_op_index].substring(0,4).equals("E7C3") // E7C3 VRRa VCDG V1,V2,M3,M4,M5 @@ -4572,7 +4650,8 @@ private void process_bal_op(){ || tz390.op_code[bal_op_index].substring(0,4).equals("E7D9") // E7D9 VRRa VECL V1,V2,M3 || tz390.op_code[bal_op_index].substring(0,4).equals("E7DB") // E7DB VRRa VEC V1,V2,M3 || tz390.op_code[bal_op_index].substring(0,4).equals("E7DE") // E7DE VRRa VLC V1,V2,M3 - || tz390.op_code[bal_op_index].substring(0,4).equals("E7DF")) { // E7DF VRRa VLP V1,V2,M3 + || tz390.op_code[bal_op_index].substring(0,4).equals("E7DF") + ) { // E7DF VRRa VLP V1,V2,M3 get_hex_vreg(1); // V1 skip_comma(); get_hex_vreg(2); // V2 @@ -4627,7 +4706,8 @@ private void process_bal_op(){ + obj_code.substring(8,9) // m5 + obj_code.substring(7,8) // m4 + obj_code.substring(6,7); // m3 - } else if (tz390.op_code[bal_op_index].substring(0,4).equals("E780") // E780 VRRb VFEE V1,V2,V3,M4,M5 + } else if ( tz390.op_code[bal_op_index].substring(0,4).equals("E674") // E674 VRRb VSCHP V1,V2,V3,M4,M5 DSH #414 z16 + || tz390.op_code[bal_op_index].substring(0,4).equals("E780") // E780 VRRb VFEE V1,V2,V3,M4,M5 || tz390.op_code[bal_op_index].substring(0,4).equals("E781") // E781 VRRb VFENE V1,V2,V3,M4,M5 || tz390.op_code[bal_op_index].substring(0,4).equals("E782") // E782 VRRb VFAE V1,V2,V3,M4,M5 || tz390.op_code[bal_op_index].substring(0,4).equals("E795") // E795 VRRb VPKLS V1,V2,V3,M4,M5 @@ -10837,6 +10917,8 @@ private void fp_get_hex(){ * set based on explicit decimal poiint * with significant trailing decimal places * including zeros else use 0. RPI 790 + * 5. Add issue #424 BFP constants INF, NAN, QNAN, SNAN, DMIN + * See POP 13 pages 9-5 and 19-4 * * First convert string constant to positive * big_dec1 value with sufficent sig. bits. @@ -10923,6 +11005,196 @@ private void fp_get_hex(){ dc_hex = "8" + dc_hex.substring(1); } return; + + } else if (fp_text.toUpperCase().equals("(INF)")){ // #423 + switch (tz390.fp_type){ // gen (min) hex for tz390.fp_type + case 0: // tz390.fp_db_type s1,e11,m52 with assumed 1 + dc_hex = "7FF0000000000000"; + break; + case 1: // tz390.fp_dd_type s1,cf5,bxcf8,ccf50 + dc_hex = "EEEEEEEEEEEEEEEE"; + break; + case 2: // tz390.fp_dh_type s1,e7,m56 with hex exp + dc_hex = "EEEEEEEEEEEEEEEE"; + break; + case 3: // tz390.fp_eb_type s1,e7,m24 with assumed 1 + dc_hex = "7F000000"; + break; + case 4: // tz390.fp_dd_type s1,cf5,bxcf6,ccf20 + dc_hex = "EEEEEEEE"; + break; + case 5: // tz390.fp_eh_type s1,e7,m24 with hex exp + dc_hex = "EEEEEEEE"; + break; + case 6: // tz390.fp_lb_type s1,e15,m112 with assumed 1 + dc_hex = "7FFF0000000000000000000000000000"; + break; + case 7: // tz390.fp_ld_type s1,cf5,bxcf12,ccf110 + dc_hex = "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"; // RPI 407 + break; + case 8: // tz390.fp_lh_type s1,e7,m112 with split hex + dc_hex = "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"; + break; + case 9: // tz390.fp_lq_type quad word RPI 1108 + dc_hex = "00000000000000000000000000000000"; + break; + } + if (fp_sign == '-'){ + dc_hex = "8" + dc_hex.substring(1); + } + return; + + } else if (fp_text.toUpperCase().equals("(NAN)")){ // #423 + switch (tz390.fp_type){ // gen (min) hex for tz390.fp_type + case 0: // tz390.fp_db_type s1,e11,m52 with assumed 1 + dc_hex = "7FF8000000000000"; + break; + case 1: // tz390.fp_dd_type s1,cf5,bxcf8,ccf50 + dc_hex = "EEEEEEEEEEEEEEEE"; + break; + case 2: // tz390.fp_dh_type s1,e7,m56 with hex exp + dc_hex = "EEEEEEEEEEEEEEEE"; + break; + case 3: // tz390.fp_eb_type s1,e7,m24 with assumed 1 + dc_hex = "7F800000"; + break; + case 4: // tz390.fp_dd_type s1,cf5,bxcf6,ccf20 + dc_hex = "EEEEEEEE"; // RPI 407 + break; + case 5: // tz390.fp_eh_type s1,e7,m24 with hex exp + dc_hex = "EEEEEEEE"; + break; + case 6: // tz390.fp_lb_type s1,e15,m112 with assumed 1 + dc_hex = "7FFF8000000000000000000000000000"; + break; + case 7: // tz390.fp_ld_type s1,cf5,bxcf12,ccf110 + dc_hex = "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"; // RPI 407 + break; + case 8: // tz390.fp_lh_type s1,e7,m112 with split hex + dc_hex = "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"; + break; + case 9: // tz390.fp_lq_type quad word RPI 1108 + dc_hex = "00000000000000000000000000000000"; + break; + } + if (fp_sign == '-'){ + dc_hex = "8" + dc_hex.substring(1); + } + return; + + } else if (fp_text.toUpperCase().equals("(QNAN)")){ // #423 + switch (tz390.fp_type){ // gen (min) hex for tz390.fp_type + case 0: // tz390.fp_db_type s1,e11,m52 with assumed 1 + dc_hex = "7FF8000000000000"; + break; + case 1: // tz390.fp_dd_type s1,cf5,bxcf8,ccf50 + dc_hex = "EEEEEEEEEEEEEEEE"; + break; + case 2: // tz390.fp_dh_type s1,e7,m56 with hex exp + dc_hex = "EEEEEEEEEEEEEEEE"; + break; + case 3: // tz390.fp_eb_type s1,e7,m24 with assumed 1 + dc_hex = "7F800000"; + break; + case 4: // tz390.fp_dd_type s1,cf5,bxcf6,ccf20 + dc_hex = "EEEEEEEE"; + break; + case 5: // tz390.fp_eh_type s1,e7,m24 with hex exp + dc_hex = "EEEEEEEE"; + break; + case 6: // tz390.fp_lb_type s1,e15,m112 with assumed 1 + dc_hex = "7FFF8000000000000000000000000000"; + break; + case 7: // tz390.fp_ld_type s1,cf5,bxcf12,ccf110 + dc_hex = "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"; + break; + case 8: // tz390.fp_lh_type s1,e7,m112 with split hex + dc_hex = "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"; + break; + case 9: // tz390.fp_lq_type quad word RPI 1108 + dc_hex = "00000000000000000000000000000000"; + break; + } + if (fp_sign == '-'){ + dc_hex = "8" + dc_hex.substring(1); + } + return; + + } else if (fp_text.toUpperCase().equals("(SNAN)")){ // #423 + switch (tz390.fp_type){ // gen (min) hex for tz390.fp_type + case 0: // tz390.fp_db_type s1,e11,m52 with assumed 1 + dc_hex = "7FFF7FFFFFFFFFFF"; + break; + case 1: // tz390.fp_dd_type s1,cf5,bxcf8,ccf50 + dc_hex = "EEEEEEEEEEEEEEEE"; + break; + case 2: // tz390.fp_dh_type s1,e7,m56 with hex exp + dc_hex = "EEEEEEEEEEEEEEEE"; + break; + case 3: // tz390.fp_eb_type s1,e7,m24 with assumed 1 + dc_hex = "7F7FFFFF"; + break; + case 4: // tz390.fp_dd_type s1,cf5,bxcf6,ccf20 + dc_hex = "EEEEEEEE"; // RPI 407 + break; + case 5: // tz390.fp_eh_type s1,e7,m24 with hex exp + dc_hex = "EEEEEEEE"; + break; + case 6: // tz390.fp_lb_type s1,e15,m112 with assumed 1 + dc_hex = "7FFF7FFFFFFFFFFFFFFFFFFFFFFFFFFF"; + break; + case 7: // tz390.fp_ld_type s1,cf5,bxcf12,ccf110 + dc_hex = "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"; // RPI 407 + break; + case 8: // tz390.fp_lh_type s1,e7,m112 with split hex + dc_hex = "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"; + break; + case 9: // tz390.fp_lq_type quad word RPI 1108 + dc_hex = "00000000000000000000000000000000"; + break; + } + if (fp_sign == '-'){ + dc_hex = "8" + dc_hex.substring(1); + } + return; + + } else if (fp_text.toUpperCase().equals("(DMIN)")){ + switch (tz390.fp_type){ // gen (DMIN) hex for tz390.fp_type + case 0: // tz390.fp_db_type s1,e11,m52 with assumed 1 + dc_hex = "0000000000000001"; + break; + case 1: // tz390.fp_dd_type s1,cf5,bxcf8,ccf50 + dc_hex = "0000000000000001"; // RPI 407 + break; + case 2: // tz390.fp_dh_type s1,e7,m56 with hex exp + dc_hex = "0000000000000001"; + break; + case 3: // tz390.fp_eb_type s1,e7,m24 with assumed 1 + dc_hex = "00000001"; + break; + case 4: // tz390.fp_dd_type s1,cf5,bxcf6,ccf20 + dc_hex = "00000001"; // RPI 407 + break; + case 5: // tz390.fp_eh_type s1,e7,m24 with hex exp + dc_hex = "00000001"; + break; + case 6: // tz390.fp_lb_type s1,e15,m112 with assumed 1 + dc_hex = "00000000000000000000000000000001"; + break; + case 7: // tz390.fp_ld_type s1,cf5,bxcf12,ccf110 + dc_hex = "00000000000000000000000000000001"; // RPI 407 + break; + case 8: // tz390.fp_lh_type s1,e7,m112 with split hex + dc_hex = "00000000000000007200000000000001"; + break; + case 9: // tz390.fp_lq_type quad word RPI 1108 + dc_hex = "00000000000000000000000000000000"; + break; + } + if (fp_sign == '-'){ + dc_hex = "8" + dc_hex.substring(1); + } + return; } else { log_error(112,"unrecognized floating point constant " + fp_text); } diff --git a/src/tz390.java b/src/tz390.java index 271bfeaee..a2f0bb7de 100644 --- a/src/tz390.java +++ b/src/tz390.java @@ -314,7 +314,8 @@ public class tz390 { * 2021-09-07 dsh #230 fix E7CC option, fix E7C0-E7C7 OR 8 with operand * 2022-01-16 DSH #343 increase maxline from 200000 to 400000 for rpi\zivp.asm from Dan Greiner * 2022-01-22 DSH #335 acall - restored APARM used to set &(acall)(n) just before aentry - * 2022-03-26 DSH #375 change APARM opcode directive from APARM to ACALLPRM + * 2022-03-26 DSH #375 change APARM opcode directive from APARM to ACALLPRM + * 2022-07-03 DSH #414 add 30 new z16 instructions with Z16, ZSA, and UNI optables ******************************************************** * Shared z390 tables (last RPI) *****************************************************/ @@ -1710,7 +1711,7 @@ public class tz390 { String[] op_table_370_notsupported = // Table added for RPI 1209A {"RIO S 9C02 D2(B2)", "CLRCH S 9F01 D2(B2)", - "CONCS S B200 D2(B2)", + // DSH #414 new z16 LBEAR replaces old nonsupported "CONCS S B200 D2(B2)", "DISCS S B201 D2(B2)", }; String[] op_table_XA = // Table added for RPI 1209A @@ -2463,6 +2464,39 @@ public class tz390 { "TBEGINC SIL E561 D1(B1),I2", // RPI 1209K "TEND S B2F8 --", // RPI 1209K }; + String[] op_table_z16 = // DSH #414 30 new opcodes for z16 + { + "B200=LBEAR,7,70", + "C09=LFI,16,160", + "C0F=LLGFI,16,160", + "EB71=LPSWEY,21,212", + "B93B=NNPA,14,144", + "B28F=QPACI,7,70", + "B98B=RDP,30,300", + "EC5D$3100=SLLHH,52,400", + "EC5D$3132=SLLHL,52,400", + "EC51$3132=SLLLH,52,400", + "EC5D$3100=SRLHH,52,400", + "EC5D$3132=SRLHL,52,400", + "EC51$3132=SRLLH,52,400", + "B201=STBEAR,7,70", + "E65D=VCFN,82,738", + "E656=VCLFNH,82,738", + "E65E=VCLFNL,82,738", + "E651=VCLZDP,82,738", + "E655=VCNF,82,738", + "E675=VCRNF,82,738", + "E67D=VCSPH,82,738", + "E670=VPKZR,81,737", + "E6743=VSCHDP,82,738", + "E674=VSCHP,82,738", + "E6742=VSCHSP,82,738", + "E6744=VSCHXP,82,738", + "E67C=VSCSHP,82,738", + "E672=VSRPR,81,737", + "E654=VUPKZH,82,738", + "E65C=VUPKZL,82,738", + }; String[] op_table_Z15 = // dsh table added for RPI 2202 { "B2E8=PPA,40,151", // B2E8 RRFc 40,151 PPA R1,R2,M3 2202 @@ -3075,7 +3109,7 @@ public class tz390 { "E7D72=VUPHF,82,738", // E7D72 VRRa VUPHF V1,V2 RPI 2202 "E7D8=VTM,82,738", // E7D8 VRRa VTM V1,V2 RPI 2202 "E7D9=VECL,82,738", // E7D9 VRRa VECL V1,V2,M3 RPI 2202 - "E7D90=VECLB,82,738", // E7D90 VRRa VECLB V1,V2 RPI 2202 + "E7D90=VECLB,82,738", // E7D90 VRRa VECLB V1,V2 RPI 2202v1,v2,m3 "E7D91=VECLH,82,738", // E7D91 VRRa VECLH V1,V2 RPI 2202 "E7D92=VECLF,82,738", // E7D92 VRRa VECLF V1,V2 RPI 2202 "E7D93=VECLG,82,738", // E7D93 VRRa VECLG V1,V2 RPI 2202 @@ -3841,6 +3875,25 @@ public void create_opcodes() // Routine added for RPI 1209 process_opcodes(op_table_ZS3); process_opcodes(op_table_ZS4); process_opcodes(op_table_Z15); // rpi 2202 + // no z16 for z15 process_opcodes(op_table_z16); // DSH2 #414 + process_opcodes(op_table_DOS_directives); + process_opcodes(op_table_370_directives); + } + if ((opt_optable.equals("Z16")) + |(opt_optable.equals("ZSA"))) // DSH #414 + {process_opcodes(op_table_DOS); + if (opt_allow) // RPI 1209N + {process_opcodes(op_table_DOS_obsolete); // RPI 1209N + } // RPI 1209N + process_opcodes(op_table_370); + process_opcodes(op_table_XA); + process_opcodes(op_table_ESA); + process_opcodes(op_table_ZOP); + process_opcodes(op_table_YOP); + process_opcodes(op_table_ZS3); + process_opcodes(op_table_ZS4); + process_opcodes(op_table_Z15); // rpi 2202 + process_opcodes(op_table_z16); // DSH #414 process_opcodes(op_table_DOS_directives); process_opcodes(op_table_370_directives); } @@ -3860,6 +3913,7 @@ public void create_opcodes() // Routine added for RPI 1209 process_opcodes(op_table_ZS3); process_opcodes(op_table_ZS4); process_opcodes(op_table_Z15); // rpi 2202 + process_opcodes(op_table_z16); // DSH #414 process_opcodes(op_table_UNI); process_opcodes(op_table_DOS_directives); process_opcodes(op_table_370_directives); @@ -3880,6 +3934,7 @@ public void create_opcodes() // Routine added for RPI 1209 process_opcodes(op_table_ZS3); process_opcodes(op_table_ZS4); process_opcodes(op_table_Z15); // rpi 2202 + process_opcodes(op_table_z16); // DSH #414 process_opcodes(op_table_UNI); // process_opcodes(op_table_ASSIST); // RPI 1209M process_opcodes(op_table_z390); @@ -4505,6 +4560,8 @@ else if (opt_machine.equals("ZSERIES-4")) } else if (opt_machine.equals("Z15")) // rpi 2202 {} + else if (opt_machine.equals("Z16")) // DSH #414 + {} else {abort_error(778,"MACHINE("+opt_machine+") not supported"); } @@ -4770,6 +4827,9 @@ else if (opt_machine.equals("ZSERIES-4")) else if (opt_machine.contentEquals("Z15")) {opt_optable = "Z15"; // rpi 2202 } + else if (opt_machine.contentEquals("Z16")) // DSH #414 + {opt_optable = "Z16"; // DSH #414 + } else {add_invalid_option(opt_file_name,opt_file_line,token); } @@ -4892,6 +4952,7 @@ else if (opt_machine.contentEquals("Z15")) && opt_optable.equals("ZS3") != true && opt_optable.equals("ZS4") != true && opt_optable.contentEquals("Z15") != true // rpi 2202 + && opt_optable.contentEquals("Z16") != true // DSH2 #414 && opt_optable.equals("Z390") != true ) {add_invalid_option(opt_file_name,opt_file_line,token);