Class pz390
java.lang.Object
pz390
pz390 is the processor emulator component of z390 which is called from
ez390 to execute 390 code loaded in memory. Both ez390 and pz390 call
sz390 svc component to perform os functions such as memory allocation and
loading.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) intvariable(package private) intvariable(package private) ByteBuffervariable(package private) byte[]variable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigInteger[]variable(package private) BigIntegervariable(package private) BigIntegervariable(package private) byte[]byte bit count lookup table(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) Datevariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) int[]variable(package private) booleanvariable(package private) longvariable(package private) int[]variable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) int[]variable(package private) booleanvariable(package private) longvariable(package private) int[]variable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigDecimal[]variable(package private) intvariable(package private) BigDecimalvariable(package private) bytevariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) RoundingMode[]RPI 1125 use array for BFP context(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) doublevariable(package private) doublevariable(package private) longvariable(package private) longvariable(package private) MathContext[]variable(package private) MathContextvariable(package private) intvariable(package private) intvariable(package private) BigIntegervariable(package private) longvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) longvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) MathContext[]variable(package private) bytevariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) RoundingMode[]variable(package private) intvariable(package private) MathContextvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) MathContext[]variable(package private) MathContextvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) floatvariable(package private) floatvariable(package private) intvariable(package private) intvariable(package private) MathContext[]variable(package private) MathContextvariable(package private) intvariable(package private) intvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) MathContext[]variable(package private) doublevariable(package private) doublevariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) longvariable(package private) BigDecimalvariable(package private) longvariable(package private) MathContext[]variable(package private) MathContextvariable(package private) intvariable(package private) intvariable(package private) BigIntegervariable(package private) longvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) longvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) MathContext[]variable(package private) MathContextvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) doublevariable(package private) doublevariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) MathContextvariable(package private) boolean[]variable(package private) boolean[]variable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) doublevariable(package private) doublevariable(package private) doublevariable(package private) doublevariable(package private) ByteBuffervariable(package private) BigDecimal[]variable(package private) byte[]16 fp registers with eb, db, and bd co-regs to avoid conversions when possible fp_ctl defines fp reg state as follows: 0 = fp_ctl_ld no co-reg defined (set by LE,LD) 1 = fp_ctl_eb set for EB float operations 2 = fp_ctl_db set for EH, DH, DB operations 3 = fp_ctl_bd set for LH, LB operations Notes: LE and LD set fp_reg with fp_ctl_ld STE and STD store from fp_reg or co_reg fp_reg is indexed by reg * 8 byte index fp_ctl and co-regs are indexed by reg #(package private) byte[]variable(package private) double[]variable(package private) float[]variable(package private) byte[]variable(package private) floatvariable(package private) floatvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) booleanvariable(package private) bytevariable(package private) bytevariable(package private) longvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) shortvariable(package private) shortvariable(package private) shortvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) bytevariable(package private) longvariable(package private) ByteBuffervariable(package private) byte[]variable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) intvariable(package private) longvariable(package private) bytevariable(package private) ByteBuffervariable(package private) byte[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) longvariable(package private) int[]variable(package private) int[]opcode lookup tables unique to ez390(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) int[]variable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) int[]variable(package private) int[]variable(package private) ByteBuffervariable(package private) byte[]variable(package private) boolean[]variable(package private) ByteBuffervariable(package private) byte[]variable(package private) intvariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) bytevariable(package private) bytevariable(package private) booleanvariable(package private) charvariable(package private) booleanvariable(package private) Stringvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) int[]variable(package private) int[]variable(package private) intvariable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) ByteBuffervariable(package private) byte[]variable(package private) intvariable(package private) intretaddr holds return address for instructions that form a return address(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) booleanvariable(package private) intvariable(package private) sz390variable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) ByteBuffervariable(package private) byte[]variable(package private) int[]variable(package private) bytevariable(package private) byte[]variable(package private) tz390variable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigIntegervariable(package private) byte[]variable(package private) ByteBuffervariable(package private) byte[]variable(package private) ByteBuffervariable(package private) byte[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) byte[]variable(package private) intvariable(package private) intvariable(package private) booleanvariable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidshift right or left to align unnormailized mantissa to db normalized format where first bit is assumed.bytes_to_hex(ByteBuffer bytes, int byte_start, int byte_length, int chunk) Format bytes into hex stringprivate voidraise ineact exception if fp_rbdv1 not = fp_rbdv2private voidcheck for DB overflow or underflowprivate voidcheck for DB overflow or underflowprivate voidcheck for DDTR overflow or underflowprivate voidcheck for DD overflow or underflowprivate voidcheck for DH overflow or underflowprivate voidcheck for DH overflow or underflowprivate voidcheck for EB overflow or underflowprivate voidcheck for EB overflow or underflowprivate voidcheck for EH overflow or underflowprivate voidcheck for EH overflow or underflowprivate voidcheck for LB overflow or underflowprivate voidcheck for LB overflow or underflowprivate voidcheck for DXTR overflow or underflowprivate voidcheck for LD overflow or underflowprivate voidcheck for LH overflow or underflowprivate voidcheck for LH overflow or underflowprivate voidrestore ex target instruction 2nd byteprivate voidexecute Compare Characters Longprivate voidexecute Compare Characters Long Extendedprivate voidexec_clm()execute Compare Logical under Maskprivate voidexecute Compare Logical STringprivate voidexecute Compare Until Substring Equalprivate voidexec_ed_edmk(boolean edmk_store) execute ED or EDMK with store into r1
Notes: mask must be EBCDIC in both modes output translated to ASCII if ascii modeprivate voidexec_ex(int target_addr, int ilc) share code for EX and EXRLprivate voidexec_icm()exec icmh, icmy, or icm using rv1, db2_loc
Notes: psw_cc = 0 all inserted bits 0 or mask 0 psw_cc = 1 if first inserted bit 1 psw_cc = 2 if first inserted bit 0 and not all 0private voidmove from bd2_loc to bd1_loc for length rflen
Notes: Used by MVC and MVCOSprivate voidexecute MoVe Characters Longprivate voidexecute MoVe Characters Long Extendedprivate voidperform floating point operation If r0 bit 32 is on, check if function supported and set r1 rc = 0 else r1 = 3 if r0 bit 32 zero, perform floating point function: bits 33-39 = operation x'01' = convert radix (FP0+2 = FP4+6) bits 40-47 = first operand type bits 48-55 = second operand type bit 56 = inexact suppression control bit 57 = alternate exception action control bits 58-59 = target radix dependent controls bits 60-63 = rounding methodvoidexecute 390 code at psw_addr in mem[]private voidexecute SeaRch STringprivate voidexecute STore Characters under Maskprivate voidexec_trt_ext(boolean reversed) perform TRTE or TRTREprivate voidperform UNPKAprivate voidadd LH at rf1 to fp_big_int1 unnormalized and update tz390.fp_sign high bit if change
Notes: LH at rf1 stored in fp_big_int2 and fp_exp2 for addprivate voidadd unnormalized HFP DH fp_long1 = fp_long1 + fp_long2 and set psw_ccprivate voidadd unnormalized HFP DH fp_long1 = fp_long1 + fp_long2 and set psw=ccprivate voidfp_bd_to_dh_wreg(BigDecimal fp_bd) convert fp_bd to dh format in work_reg binary format
calc tz390.fp_exp and big_dec2 such that: big_dec1 = big_dec2 * 2 ** tz390.fp_exp
tz390.fp_exp = log(big_dec1) / log(2)
Since the exponent of LH/LB values can exceed the range of double, the log of big_dec1 is calculated using equivalent form log(x*10*scale) = log(x_man) + scale * log(10)
tz390.fp_exp must then be offset by the number of bits in the required mantissa in order to retain significant bits when big_dec2 is converted to big_int format.private voidfp_bd_to_lx_wreg(int fp_type, BigDecimal fp_bd) convert fp_bd to lh/lb format based ib fp_type in work_reg binary format
calc tz390.fp_exp and big_dec2 such that: * big_dec1 = big_dec2 * 2 ** tz390.fp_exp
tz390.fp_exp = log(big_dec1) / log(2)
Since the exponent of LH/LB values can exceed the range of double, the log of big_dec1 is calculated using equivalent form log(x*10*scale) = log(x_man) + scale * log(10)
tz390.fp_exp must then be offset by the number of bits in the required mantissa in order to retain significant bits when big_dec2 is converted to big_int format.voidfp_bd_to_wreg(int fp_type, BigDecimal fp_bd) store DD, DH, ED, LB, LD, LH RPI 514, RPI 821 add DH format in 16 byte fp_work_reg from big decimalprivate voidfp_bi_to_wreg(byte[] store_bytes, int store_offset, BigInteger big_int, int store_length) copy big integer bytes to work reg with work reg size up to 16private voidfp_copy_reg(int index1, int index2) copy fp reg for LD or LXD RPI 816private BigDecimalfp_ctl_reg_to_bd(int fp_ctl_index) return BigDecimal from fp_reg cacheprivate Doublefp_ctl_reg_to_db(int fp_ctl_index) return double from fp_regprivate Floatfp_ctl_reg_to_eb(int fp_ctl_index) return float from fp_regintfp_db_to_eh(double db1) convert db float to eh intprivate BigDecimalfp_dd_to_bd(ByteBuffer fp_buff, int fp_index) convert DD format to big decimalprivate BigDecimalfp_dh_to_bd(long dh1) convert DH long hex format to BigDecimal in order to preserve 56 mantissa bits (double has 52)private BigDecimalfp_ed_to_bd(ByteBuffer fp_buff, int fp_index) convert ED format to big decimalprivate doublefp_eh_reg_to_db(int eh1) convert EH format to doubleprivate BigDecimalfp_eh_to_bd(ByteBuffer eh1_buff, int eh1_index) convert EH in fp_reg or mem to big_decprivate BigDecimalfp_get_bd_from_db(ByteBuffer fp_buff, int fp_index) get big decimal from DB long bin in fp_reg or mem.fp_get_bd_from_dd(ByteBuffer fp_buff, int fp_index) get big decimal from ED dpd long in fp_reg or mem 1.fp_get_bd_from_dh(ByteBuffer fp_buff, int fp_index) get big decimal from DH long hex in fp_reg or mem.private BigDecimalfp_get_bd_from_eb(ByteBuffer fp_buff, int fp_index) get big decimal from DB long bin in fp_reg or mem.fp_get_bd_from_ed(ByteBuffer fp_buff, int fp_index) get big decimal from ED dpd short in fp_reg or mem 1.private BigDecimalfp_get_bd_from_eh(ByteBuffer fp_buff, int fp_index) get big decimal from EH short hex in fp_reg or mem.fp_get_bd_from_lb(ByteBuffer fp_buff, int fp_index) get big decimal from LH extended binary in fp_reg or mem.fp_get_bd_from_ld(ByteBuffer fp_buff, int fp_index) get big decimal from LD dpd extended in fp_reg or mem.fp_get_bd_from_lh(ByteBuffer fp_buff, int fp_index) get big decimal from LH extended hex in fp_reg or mem.private BigDecimalfp_get_bd_rnd_int(byte fp_class, int rnd_mode) get bd rounded to integer from fp_bd_int_rnd[]
Notes: For BFP - mode = 0-3 For DFP - mode - 0-7private voidset fp_rbdv1 to square root of fp_rbdv2
Notes: Return 0 for 0 and issue data exception if negative. Scale number to within double range to calc estimate to 14 decimal places. Use Newton Rapson iteration to reduce error to fp_lxg_context limit.private voidset fp_big_int2, fp_exp2, fp_sign2 from rf1 DHprivate voidset fp_big_int2, fp_exp2, fp_sign2 from rf1 LHprivate intreturn psw_cc for db add/sub result fp_rdv1 and raise BFP sig, ovf, or unf exceptionsprivate intfp_get_db_comp_cc(double db1, double db2) return psw_cc for DB double comparedoublefp_get_db_from_db(ByteBuffer fp_buff, int fp_index) get double from DB Long binary in fp_reg or mem.private doublefp_get_db_from_eb(ByteBuffer fp_buff, int fp_index) get double from EB short binary in fp_reg or mem.doublefp_get_db_from_eh(ByteBuffer fp_buff, int fp_index) get double from EH short hex in fp_reg or mem.private doublefp_get_db_from_lh(ByteBuffer fp_buff, int fp_index) get double from LH ext hex in fp_reg or mem.private intfp_get_dd_comp_cc(BigDecimal dd1, BigDecimal dd2) return psw_cc for DD compare with or without signalprivate intreturn psw_cc for bd add/sub result fp_rdv1 and raise sig, ovf, or unf exceptionsprivate intreturn psw_cc for dh add/sub result fp_rbdv1 and raise HFP sig, ovf, or unf exceptionsprivate intfp_get_dh_comp_cc(BigDecimal bd1, BigDecimal bd2) return psw_cc for DH big decimal compareprivate intreturn psw_cc for fp divide to integerprivate intreturn psw_cc for eb add/sub result fp_rev1 and raise BFP sig, ovf, or unf exceptionsprivate intfp_get_eb_comp_cc(float eb1, float eb2) return psw_cc for float comparefloatfp_get_eb_from_eb(ByteBuffer fp_buff, int fp_index) get float for EB from fp_reg or mem.private intreturn psw_cc for eh add/sub result fp_rdv1 and raise HFP sig, ovf, or unf exceptionsprivate intfp_get_eh_comp_cc(double db1, double db2) return psw_cc for EH double compareprivate intreturn psw_cc for lb add/sub result fp_rbdv1 and raise BFP sig, ovf, or unf exceptionsprivate intfp_get_lb_comp_cc(BigDecimal bd1, BigDecimal bd2) return psw_cc for big decimal compareprivate intfp_get_ld_comp_cc(BigDecimal ld1, BigDecimal ld2) return psw_cc for LD compare with or without signalprivate intreturn psw_cc for lh add/sub result fp_rbdv1 * and raise HFP sig, ovf, or unf exceptionsprivate intfp_get_lh_comp_cc(BigDecimal bd1, BigDecimal bd2) return psw_cc for LH big decimal compareprivate intfp_get_rnd_mode(byte fp_class, int rnd_mode) return requested rounding mode 0-7 based on explicit rounding mode request 0 - use default for fp_class 1 - use round near half nzero (bfp only) 4-7 - maps to 0-3 for bfp 8-15- maps to 0-8 for dfpprivate BigDecimalfp_lb_to_bd(ByteBuffer lb1_buff, int lb1_index) convert LB in fp_reg or mem to big_dec
first get sign bit and 15 bit exponentprivate BigDecimalfp_ld_to_bd(ByteBuffer fp_buff, int fp_index) convert LD format to big decimalprivate BigDecimalfp_lh_to_bd(ByteBuffer lh1_buff, int lh1_index) convert LH in fp_reg or mem to big_dec
first copy 112 bit mantissa into 15 byte array with leading 0 byte and convert to bd1 big decimal with 128 bit precisionprivate voidfp_load_ctl(int fp_ctl_index1, byte reg_type1, int fp_ctl_type2, int fp_buff_index2, byte reg_type2) load fp control register from register memory or other fp control registerprivate voidfp_load_ctl_from_ext_reg(int fp_ctl_index1, byte reg_type1, ByteBuffer reg_buff2, int reg_buff_index2, byte reg_type2) load fp_ctl reg1 from fp_reg2 external formatprivate voidfp_load_mem(ByteBuffer mem_buff, int reg_buff_index1, byte reg_type1, int mem_index2, byte mem_type2) load fp_reg memory without conversionprivate voidfp_load_reg(int reg_buff_index1, byte reg_type1, ByteBuffer reg_buff2, int reg_buff_index2, byte reg_type2) Load fp_ctl from fp_reg or fp_ctl Load fp_reg from memory with no conversion
Notes: bd1/bd2 co-reg pair being partially replaced is discarded without conversion.private voidmultiply fp_long2 and fp_long3 dh unnormalized and set fp_big_int1 and tz390.fp_exp and tz390.fp_sign high bitprivate voidfp_put_bd(int fp_index, byte reg_type, BigDecimal reg_value) store bd co-reg as DD, DH, LD, LH or LB and set type for reg pairprivate voidstore tz390 fp_big_int1 with tz390.fp_exp and tz390.fp_sign high bit in tz390 fp_work_reg in LH formatprivate voidfp_put_db(int fp_index, byte reg_type, double reg_value) store db co-reg as EH, DH, or DB and set type (EH used double due to exponent range of float is too small.private voidfp_put_eb(int fp_index, byte reg_type, float reg_value) store float co-reg as EB and set type
Notes: Only tz390.fp_eb_type uses float co-reg due to exponent range exceeded for tz390.fp_eh_typeprivate voidfp_reset_reg(int reg_ctl_index, byte ctl_type, byte reg_type) reset register and co-reg to specified typevoidfp_store_reg(ByteBuffer reg_buff, int reg_index) convert co-reg back to fp_reg storage format for use by STE or STD.private voidstore fp zero in tz390.fp_workregintget_big_int_comp_cc(BigInteger big_int1, BigInteger big_int2) return psw cc for big int comparisonget_fp_long_hex(int reg_index) Format fp reg into 16 byte hex string after flushing co-reg
Note:
This trace function slows down fp by adding extra conversions.get_ins_hex(int ins_loc) return 2, 4, or 6 byte hex instructionget_ins_name(int ins_loc) return opcode or ????? for given op1 and op2get_ins_target(int ins_loc) return hex ins plus ins name with 1 spaceprivate intcheck rv3 = rv1 + rv2 for fixed overflow and set psw_cc or gen fixed exceptionprivate intget_int_comp_cc(int int1, int int2) return psw_cc for int compareprivate intset psw_carry and return cc for logical add as follows: rv1 == 0 carry == 0 - cc0 rv1 != 0 carry == 0 - cc1 rv1 == 0 carry == 1 - cc2 rv1 != 0 carry == 1 - cc3 Notes: rvw = r1 input rv2 = r2 input rv1 = result r1 R1 = RW + R2 R1:+ RW:+ R2:+ NC R1:+ RW:+ R2:- C R1:+ RW:- R2:+ C R1:+ RW:- R2:- C R1:- RW:+ R2:+ NC R1:- RW:+ R2:- NC R1:- RW:- R2:+ NC R1:- RW:- R2:- Cprivate intget_int_log_comp_cc(int int1, int int2) return psw_cc for integer logical compareprivate intreturn cc for logical subtract as follows: rv1 == 0 borrow == 1 - cc0 (slb only) rv1 != 0 borrow == 1 - cc1 rv1 == 0 borrow == 0 - cc2 rv1 != 0 borrow == 0 - cc3 Notes: rvw = r1 input rv2 = r2 input rv1 = resultprivate intset psw_carry and return cc for logical add with signed value in rv2.private intcheck rv3 = rv1 - rv2 for fixed overflow and set psw_cc or gen fixed exceptionprivate intcheck rlv3 = rlv1 + rlv2 for fixed overflow and set psw_cc or gen fixed exceptionintget_long_comp_cc(long long1, long long2) return psw_cc for long compareget_long_hex(long work_long) Format long into 16 byte hex stringprivate intset psw_carry and return cc for logical add as follows: rlv1 == 0 carry == 0 - cc0 rlv1 != 0 carry == 0 - cc1 rlv1 == 0 carry == 1 - cc2 rlv1 != 0 carry == 1 - cc3private intget_long_log_comp_cc(long long1, long long2) return psw_cc for long logical compareprivate intreturn cc for logical subtract as follows: rlv borrow rlv == 0 borrow == 1 - cc0 (slb only) rlv != 0 borrow == 1 - cc1 rlv == 0 borrow == 0 - cc2 rlv != 0 borrow == 0 - cc3 Notes: rlvw = orig.private intset psw_carry and return cc for logical add with signed value in rv2.private intcheck rlv3 = rlv1 - rlv2 for fixed overflow and set psw_cc or gen fixed exceptionprivate longreturn long from mem.getLong(xbd2_loc) else return -1 and avoid trap for LA etc.private booleanget_pd(ByteBuffer pd_buff, int pdf_loc, int pdf_len) Convert pd field to BigInt or Long in pdf_big_int or pdf_long.
Notes: Set true if ok Set pd_cc 0 = ok 1 = sign invalid 2 = digit invalid Raise 0C7 if not TP opcode If pdf_signed = false, return positive value including low digit if pdf_signed = true and pdf_ignore_sign = true then ignore sign and set positive Add support for up to 34 digits using 3 segments (16+16+2) Calculate number of leftmost zeros RPI 2013booleanReturn true if ok else false. Set pdf_is_big to true or false and set pdf_big_int1 and pdf_big_int2 or pdf_long1 and pdf_long2 Set pdf_leftmost_zeros to 1st operand number of leftmost zeros.private byte[]get_signed_bytes(byte[] data_byte, int data_offset, int data_len) return byte array with signed 2's complement.private intget_sla32(int int_reg, int shift_count) return int shifted left arith and set psw_ccprivate longget_sla64(long long_reg, int shift_count) return long_reg shifted left arith and set psw_ccprivate intget_sra32(int int_reg, int shift_count) return int shifted right arith and set psw_ccprivate intget_tm_mem_cc(int mem, int mask) return psw_cc dor TM, TMYprivate intget_tm_reg_cc(int reg, int mask) return psw_cc for TMHH, THHL, TMLH, TMLLprivate byte[]get_unsigned_bytes(byte[] data_byte, int data_offset, int data_len) return byte array with leading 0 byte followed by data bytes.private voidinit_ar()init ar regs to x'F4'private voidinit_fpr()init fpr regs to x'F5'
init fp constants that use tz390 shared variablesprivate voidinit_gpr()init gpr regs to x'F4'private voidinit_mem()allocate memory and initialize as follows: Set cvt pointer at 16 Set zcvt_ipl_pgm to name of opt_ipl pgm name if any to run via link svc 6 Set zcvt_user_pgm to name of user initial program to run via link svc Set mem_fqe_ptr to point to free queue with all of available memory for use by svc 4 getmain and svc 5 freemain MEM(MB) defaults to 1 MB but can be set to any value up to available memory on machine.private voidadd all opcodes to key index table for use by trace and test options
Notes: Verify tz390 and ptz390 trace type tables match trace and test do lookup by hex for display test break on opcode does lookup by name to get hex code for break op_type_index is used by test break on opcode to get opcode2 offset and maskvoidinit_pz390(tz390 shared_tz390, sz390 shared_sz390) init tz390private voidins_01XX()opcodes x'0100' - x'01FF'private voidopcodes x'A400' - x'A4FF' for Vector Facilityprivate voidins_A5XX()opcodes x'A50' - x'A5F'private voidopcodes x'A500' - x'A5FF' for Vector Facilityprivate voidopcodes x'A600' - x'A6FF' for Vector Facilityprivate voidins_A7XX()opcodes x'A70' - x'A7F'private voidins_B2XX()opcodes x'B200' - x'B2FF'private voidins_B3XX()opcodes x'B300' - x'B3FF'private voidins_B9XX()opcodes x'B900' - x'B9FF'private voidins_C0XX()opcodes x'C00' - x'C0F'private voidins_C2XX()opcodes x'C20' - x'C2F'private voidins_C4XX()opcodes x'C40' - x'C4F'private voidins_C6XX()opcodes x'C60' - x'C6F'private voidins_C8XX()opcodes x'C80' - x'C8F'private voidins_CCXX()opcodes x'CC0' - x'CCF'private voidins_E0X()opcodes x'E00' - x'E0F'private voidins_E3XX()opcodes x'E300' - x'E3FF'private voidopcodes x'E400' - x'E4FF' for Vector Facilityprivate voidins_E5XX()opcodes x'E500' - x'E5FF'private voidins_E6XX()opcodes x'E600' - x'E6FF' for Vector Facilityprivate voidins_EBXX()opcodes x'EB00' - x'EBFF'private voidins_ECXX()opcodes x'EC00' - x'ECFF'private voidins_EDXX()opcodes x'ED00' - x'EDFF'private voidexec opcodes x'00 - x'3F'private voidexcute instr x'40' - x'7F'private voidexecute opcodes x'80' - x'BF'private voidexec instr.private voidinstruction setup routine for optype DMprivate voidinstruction setup routine for optype Eprivate voidinstruction setup routine for optype Iprivate voidinstruction setup routine for optype IEprivate voidinstruction setup routine for optype MIIprivate voidinstruction setup routine for optype RIprivate voidinstruction setup routine for optype RIEprivate voidinstruction setup routine for optype RIE2private voidinstruction setup routine for optype RIE4private voidinstruction setup routine for optype RIE6private voidinstruction setup routine for optype RIE8private voidinstruction setup routine for optype RIE9private voidinstruction setup routine for optype RILprivate voidinstruction setup routine for optype RRprivate voidinstruction setup routine for optype RRDprivate voidinstruction setup routine for optype RREprivate voidinstruction setup routine for optype RRF3private voidinstruction setup routine for optype RRF4private voidinstruction setup routine for optype RRFAprivate voidinstruction setup routine for optype RRFBprivate voidinstruction setup routine for optype RRFcprivate voidinstruction setup routine for optype RRFEprivate voidinstruction setup routine for optype RRRprivate voidinstruction setup routine for optype RRS1private voidinstruction setup routine for optype RRS3private voidinstruction setup routine for optype RSprivate voidinstruction setup routine for optype RS for shift instructionsprivate voidinstruction setup routine for optype RSIprivate voidinstruction setup routine for optype RSLaprivate voidinstruction setup routine for optype RSLbprivate voidinstruction setup routine for optype RSYprivate voidinstruction setup routine for optype RSY for rotate instructionsprivate voidinstruction setup routine for optype RXprivate voidinstruction setup routine for optype RXEprivate voidinstruction setup routine for optype RXFprivate voidinstruction setup routine for optype RXF - exception casesprivate voidinstruction setup routine for optype RXSSprivate voidinstruction setup routine for optype RXYprivate voidinstruction setup routine for optype Sprivate voidinstruction setup routine for optype S0private voidinstruction setup routine for optype SIprivate voidinstruction setup routine for optype SILprivate voidinstruction setup routine for optype SIYprivate voidinstruction setup routine for optype SMIprivate voidinstruction setup routine for optype SSprivate voidinstruction setup routine for optype SSEprivate voidinstruction setup routine for optype SSFprivate voidinstruction setup routine for optype SSF2private voidinstruction setup routine for optype SSPprivate voidinstruction setup routine for optype VRSprivate voidinstruction setup routine for optype VRXprivate voidinstruction setup routine for optype VSprivate voidinstruction setup routine for optype VSIprivate intint_rotate_left(int value, int n) rotate int n bits left (0-31)private longlong_rotate_left(long value, int n) rotate long n bits left (0-63)private longlong_rotate_right(long value, int n) rotate long right n bits 0-83private voidpop psw and regs on PC stackvoidset psw_loc and turn on psw_retry if any of the following conditions found: If psw_pic has corresponding psw_pgm_mask bit off, continue at next instruction. If psw_pic has corresponding bit on in ESPIE PIE mask bits, restart at espie_exit if defined. If estae_exit defined, then restart at estae_exit. If option test on else issue svc_abend for psw_pic code.private voidpush_pc_stack(boolean pc_type, int link_addr) push psw and regs on Program Call stackprivate voidput_pd(byte[] pd_stor, int pdf_loc, int pdf_len) if pdf_is_big store pdf_big_int value into pd field and set pd_cc else store pdf_long into pdf field and set pd_cc.
Notes: If pdf_signed is false store unsigned value with low order digit in low nibble, and do not set psw_cc. If pdf_trunc, truncate to fit else raise pgm exception.private voidrtn for rre/rrf op type A instr.private voidrtn for rrr op type A instr.private voidrisb_rotate_insert_high(boolean high) rotate and insert in high or low 32 bits with optional zeros for non select bitsprivate voidset flags, masks, and rotateprivate voidroute for rre/rrf op type A instr set alt fp_bfp_rnd if not 0 and issue S0c4 if alt_fpe_mode for nowprivate voidroute for rre/rrf op type A instr set alt fp_dfp_rnd if not 0 and issue S0c4 if alt_fpe_mode for nowprivate voidroute for rrr op type A instr set alt fp_dfp_rnd if not 0 and issue S0c4 if alt_fpe_mode for nowprivate voidset_fpc_reg(int fpc_reg) set fpc reg and bfp/dfp rounding for LFPC, LFAS, and SFASR
Notes: LFAS and SFASR signalling not supported for nowvoidset_psw_amode(int amode_bit) set psw_amode (24/31/64) based on amode low bit and high bitvoidset_psw_check(int pic_type) set psw_pic interruption type if pgm mask type interrupt if mask bit 0, set CC3 and continue.voidset_psw_loc(int addr) set psw_loc based on psw_amode and turn off ex_mode and add space if trace onprivate voidset risb_zero true if r4 high bit on (bit 24)private voidinitialize zcvt_epie and pass addr to espie exit via r1voidinitialize zcvt_sdwa and pass addr to estae exit via r1private voidtrace instruction based on opcode_typevoidset opcode1 and opcode2 from psw_loc and then execute setup routine with trace on to generate formated instruction traceprivate Stringreturn extended svc trace information including svc function name and any key parms available such as pgm name or ddname where appropriatevoidcalled for ESPIE and ABEND to update PSA pgm old psw and instr.
-
Field Details
-
max_pc_stk
int max_pc_stkvariable -
max_reg_off
int max_reg_offvariable -
tz390
tz390 tz390variable -
sz390
sz390 sz390variable -
cur_date
Date cur_datevariable -
ibm_mil
long ibm_milvariable -
java_mil
long java_milvariable -
ibm_ms
long ibm_msvariable -
test_trace_count
int test_trace_countvariable -
trace_psw
boolean trace_pswvariable -
ins_trace_line
String ins_trace_linevariable -
cpu_id
long cpu_idvariable -
psw_loc
int psw_locvariable -
psw_problem_state
boolean psw_problem_statevariable -
psw_problem_mode
boolean psw_problem_modevariable -
psw_supervisor_mode
boolean psw_supervisor_modevariable -
psw_short
int psw_shortvariable -
ins_short0
short ins_short0variable -
ins_short1
short ins_short1variable -
ins_short2
short ins_short2variable -
long_high_bit
long long_high_bitvariable -
int_high_bit
int int_high_bitvariable -
max_pos_int
int max_pos_intvariable -
min_neg_int
int min_neg_intvariable -
max_pos_long
long max_pos_longvariable -
min_neg_long
long min_neg_longvariable -
max_srp_long
long max_srp_longvariable -
min_srp_long
long min_srp_longvariable -
bi_max_pos_long
BigInteger bi_max_pos_longvariable -
bd_max_pos_long
BigDecimal bd_max_pos_longvariable -
bd_min_neg_long
BigDecimal bd_min_neg_longvariable -
bd_max_log_long
BigDecimal bd_max_log_longvariable -
bi_min_neg_long
BigInteger bi_min_neg_longvariable -
bi_max_pos_int
BigInteger bi_max_pos_intvariable -
bi_min_neg_int
BigInteger bi_min_neg_intvariable -
long_num_bits
long long_num_bitsvariable -
long_low32_bits
long long_low32_bitsvariable -
long_low48_bits
long long_low48_bitsvariable -
long_high32_bits
long long_high32_bitsvariable -
long_sign_bits
long long_sign_bitsvariable -
long_zone_ones
long long_zone_onesvariable -
long_num_ones
long long_num_onesvariable -
psw_amode24
int psw_amode24variable -
psw_amode31
int psw_amode31variable -
psw_amode64
int psw_amode64variable -
psw_amode
int psw_amodevariable -
psw_amode24_high_bits
int psw_amode24_high_bitsvariable -
psw_amode31_high_bits
int psw_amode31_high_bitsvariable -
psw_amode_high_bits
int psw_amode_high_bitsvariable -
psw_amode24_bit
int psw_amode24_bitvariable -
psw_amode31_bit
int psw_amode31_bitvariable -
psw_amode_bit
int psw_amode_bitvariable -
psw_extended_amode64_bit
int psw_extended_amode64_bitvariable -
psw_extended_amode64_on
int psw_extended_amode64_onvariable -
psw_extended_amode64_off
int psw_extended_amode64_offvariable -
psw_extended_amode_bit
int psw_extended_amode_bitvariable -
cur_stck
long cur_stckvariable -
last_stck
long last_stckvariable -
psw_cc0
int psw_cc0variable -
psw_cc1
int psw_cc1variable -
psw_cc2
int psw_cc2variable -
psw_cc3
int psw_cc3variable -
psw_cc_code
int[] psw_cc_codevariable -
psw_cc_mask
int[] psw_cc_maskvariable -
psw_cc_equal
int psw_cc_equalvariable -
psw_cc_low
int psw_cc_lowvariable -
psw_cc_high
int psw_cc_highvariable -
psw_cc_ovf
int psw_cc_ovfvariable -
psw_cc
int psw_ccvariable -
psw_pgm_mask_fix
int psw_pgm_mask_fixvariable -
psw_pgm_mask_dec
int psw_pgm_mask_decvariable -
psw_pgm_mask_exp
int psw_pgm_mask_expvariable -
psw_pgm_mask_sig
int psw_pgm_mask_sigvariable -
psw_pgm_mask
int psw_pgm_maskvariable -
max_trace_table
byte max_trace_tablevariable -
trace_table_index
byte trace_table_indexvariable -
trace_table_addr
int[] trace_table_addrvariable -
trace_table_next
byte[] trace_table_nextvariable -
fp_fpc_mask_inv
int fp_fpc_mask_invvariable -
fp_fpc_mask_div
int fp_fpc_mask_divvariable -
fp_fpc_mask_ovf
int fp_fpc_mask_ovfvariable -
fp_fpc_mask_unf
int fp_fpc_mask_unfvariable -
fp_fpc_mask_sig
int fp_fpc_mask_sigvariable -
fp_dd_mod_bi
BigInteger fp_dd_mod_bivariable -
fp_ld_mod_bi
BigInteger fp_ld_mod_bivariable -
alt_rnd_mode
int alt_rnd_modevariable -
alt_fpe_mode
int alt_fpe_modevariable -
fp_bfp_rnd_mask
int fp_bfp_rnd_maskvariable -
fp_bfp_rnd_not
int fp_bfp_rnd_notvariable -
fp_bfp_rnd_even
int fp_bfp_rnd_evenvariable -
fp_bfp_rnd_zero
int fp_bfp_rnd_zerovariable -
fp_bfp_rnd_pi
int fp_bfp_rnd_pivariable -
fp_bfp_rnd_ni
int fp_bfp_rnd_nivariable -
fp_bfp_rnd
int fp_bfp_rndvariable -
fp_bfp_rnd_default
int fp_bfp_rnd_defaultvariable -
fp_dfp_rnd_mask
int fp_dfp_rnd_maskvariable -
fp_dfp_rnd_not
int fp_dfp_rnd_notvariable -
fp_rnd_near_even
int fp_rnd_near_evenvariable -
fp_rnd_zero
int fp_rnd_zerovariable -
fp_rnd_pi
int fp_rnd_pivariable -
fp_rnd_ni
int fp_rnd_nivariable -
fp_rnd_near_nzero
int fp_rnd_near_nzerovariable -
fp_rnd_near_zero
int fp_rnd_near_zerovariable -
fp_rnd_nzero
int fp_rnd_nzerovariable -
fp_rnd_shorter
int fp_rnd_shortervariable -
fp_sig_req
int fp_sig_reqvariable -
fp_sig_dig
int fp_sig_digvariable -
fp_dfp_rnd
int fp_dfp_rndvariable -
fp_dfp_rnd_default
int fp_dfp_rnd_defaultvariable -
fp_fpc_reg
int fp_fpc_regvariable -
fp_dxc_dec
int fp_dxc_decvariable -
fp_dxc_it
int fp_dxc_itvariable -
fp_dxc_ii
int fp_dxc_iivariable -
fp_dxc_ue
int fp_dxc_uevariable -
fp_dxc_uit
int fp_dxc_uitvariable -
fp_dxc_uii
int fp_dxc_uiivariable -
fp_dxc_oe
int fp_dxc_oevariable -
fp_dxc_oit
int fp_dxc_oitvariable -
fp_dxc_oii
int fp_dxc_oiivariable -
fp_dxc_div
int fp_dxc_divvariable -
fp_dxc_oper
int fp_dxc_opervariable -
fp_dxc_trap
int fp_dxc_trapvariable -
fp_dxc
int fp_dxcvariable -
fp_dfp_digits
String fp_dfp_digitsvariable -
ast_xdump_addr
int ast_xdump_addrvariable -
ast_xdump_len
int ast_xdump_lenvariable -
ast_xread_tiot
int ast_xread_tiotvariable -
ast_xprnt_tiot
int ast_xprnt_tiotvariable -
ast_xpnch_tiot
int ast_xpnch_tiotvariable -
ast_xget_tiot
int ast_xget_tiotvariable -
ast_xput_tiot
int ast_xput_tiotvariable -
ast_xread_dcb
int ast_xread_dcbvariable -
ast_xprnt_dcb
int ast_xprnt_dcbvariable -
ast_xpnch_dcb
int ast_xpnch_dcbvariable -
ast_xget_dcb
int ast_xget_dcbvariable -
ast_xput_dcb
int ast_xput_dcbvariable -
ast_file_line
String ast_file_linevariable -
psw_check
boolean psw_checkvariable -
psw_abend
boolean psw_abendvariable -
fp_signal
boolean fp_signalvariable -
psw_pic_exit
int psw_pic_exitvariable -
psw_pic_io
int psw_pic_iovariable -
psw_pic_oper
int psw_pic_opervariable -
psw_pic_priv
int psw_pic_privvariable -
psw_pic_exec
int psw_pic_execvariable -
psw_pic_prot
int psw_pic_protvariable -
psw_pic_addr
int psw_pic_addrvariable -
psw_pic_spec
int psw_pic_specvariable -
psw_pic_data
int psw_pic_datavariable -
psw_pic_fx_ovf
int psw_pic_fx_ovfvariable -
psw_pic_fx_div
int psw_pic_fx_divvariable -
psw_pic_pd_ovf
int psw_pic_pd_ovfvariable -
psw_pic_pd_div
int psw_pic_pd_divvariable -
psw_pic_fp_ovf
int psw_pic_fp_ovfvariable -
psw_pic_fp_unf
int psw_pic_fp_unfvariable -
psw_pic_fp_sig
int psw_pic_fp_sigvariable -
psw_pic_fp_div
int psw_pic_fp_divvariable -
psw_pic_spec_op
int psw_pic_spec_opvariable -
psw_pic_timeout
int psw_pic_timeoutvariable -
psw_pic_gm_err
int psw_pic_gm_errvariable -
psw_pic_link_err
int psw_pic_link_errvariable -
psw_pic_no_mem
int psw_pic_no_memvariable -
psw_pic_fm_err
int psw_pic_fm_errvariable -
psw_pic_bad_mem
int psw_pic_bad_memvariable -
psw_pic_stkerr
int psw_pic_stkerrvariable -
psw_pic_operr
int psw_pic_operrvariable -
psw_pic_interr
int psw_pic_interrvariable -
psw_pic_memerr
int psw_pic_memerrvariable -
psw_pic_waiterr
int psw_pic_waiterrvariable -
psw_pic_error
int psw_pic_errorvariable -
psw_pic
int psw_picvariable -
psw_carry
int[] psw_carryvariable -
psw_borrow
int[] psw_borrowvariable -
psw_ins_len
byte psw_ins_lenvariable -
last_psw_ins_len
byte last_psw_ins_lenvariable -
opcode1
int opcode1variable -
opcode2
int opcode2variable -
opcode_clc
int opcode_clcvariable -
opcode_srp
int opcode_srpvariable -
opcode2_offset_e
int opcode2_offset_evariable -
opcode2_offset_ri
int opcode2_offset_rivariable -
opcode2_offset_rie
int opcode2_offset_rievariable -
opcode2_offset_ril
int opcode2_offset_rilvariable -
opcode2_offset_rrf
int opcode2_offset_rrfvariable -
opcode2_offset_rre
int opcode2_offset_rrevariable -
opcode2_offset_rsl
int opcode2_offset_rslvariable -
opcode2_offset_rsy
int opcode2_offset_rsyvariable -
opcode2_offset_rxf
int opcode2_offset_rxfvariable -
opcode2_offset_rxe
int opcode2_offset_rxevariable -
opcode2_offset_rxy
int opcode2_offset_rxyvariable -
opcode2_offset_s
int opcode2_offset_svariable -
opcode2_offset_siy
int opcode2_offset_siyvariable -
opcode2_offset_sse
int opcode2_offset_ssevariable -
opcode2_offset_ssf
int opcode2_offset_ssfvariable -
opcode2_offset_vqst
int opcode2_offset_vqstvariable -
opcode2_offset_vqv
int opcode2_offset_vqvvariable -
opcode2_offset_vst
int opcode2_offset_vstvariable -
opcode2_offset_vv
int opcode2_offset_vvvariable -
opcode2_offset_vrre
int opcode2_offset_vrrevariable -
opcode2_offset_vrse
int opcode2_offset_vrsevariable -
opcode2_offset_vrx
int opcode2_offset_vrxvariable -
opcode2_offset_vs
int opcode2_offset_vsvariable -
opcode2_offset_vvr
int opcode2_offset_vvrvariable -
opcode2_offset_vvs
int opcode2_offset_vvsvariable -
dup_opcodes
int dup_opcodesvariable -
max_espie
int max_espievariable -
tot_espie
int tot_espievariable -
espie_psw_cc
int espie_psw_ccvariable -
espie_psw_amode
int espie_psw_amodevariable -
espie_psw_amode_bit
int espie_psw_amode_bitvariable -
espie_last_ins_cnt
long espie_last_ins_cntvariable -
espie_exit_running
boolean espie_exit_runningvariable -
espie_pie
int[] espie_pievariable -
espie_exit
int[] espie_exitvariable -
espie_parm
int[] espie_parmvariable -
max_estae
int max_estaevariable -
tot_estae
int tot_estaevariable -
estae_psw_cc
int estae_psw_ccvariable -
estae_psw_amode
int estae_psw_amodevariable -
estae_psw_amode_bit
int estae_psw_amode_bitvariable -
estae_last_ins_cnt
long estae_last_ins_cntvariable -
estae_exit_running
boolean estae_exit_runningvariable -
estae_exit
int[] estae_exitvariable -
estae_parm
int[] estae_parmvariable -
estae_link
int[] estae_linkvariable -
if1
int if1variable -
if2
int if2variable -
if3
int if3variable -
if4
int if4variable -
if5
int if5variable -
sv1
int sv1variable -
rflen
int rflenvariable -
rflen1
int rflen1variable -
rflen2
int rflen2variable -
rf1
int rf1variable -
rf2
int rf2variable -
rf3
int rf3variable -
mf1
int mf1variable -
mf2
int mf2variable -
mf3
int mf3variable -
mf4
int mf4variable -
mask_bits
int[] mask_bitsvariable -
rv1
int rv1variable -
rv2
int rv2variable -
rv3
int rv3variable -
rvw
int rvwvariable -
rlv1
long rlv1variable -
rlv2
long rlv2variable -
rlv3
long rlv3variable -
rlvw
long rlvwvariable -
bf1
int bf1variable -
df1
int df1variable -
xf1
int xf1variable -
xf2
int xf2variable -
bf2
int bf2variable -
df2
int df2variable -
bf3
int bf3variable -
df3
int df3variable -
bd3_loc
int bd3_locvariable -
bd1_loc
int bd1_locvariable -
bd2_loc
int bd2_locvariable -
bf4
int bf4variable -
df4
int df4variable -
bd4_loc
int bd4_locvariable -
bd1_start
int bd1_startvariable -
bd2_start
int bd2_startvariable -
xbd2_loc
int xbd2_locvariable -
xbd1_loc
int xbd1_locvariable -
bd1_end
int bd1_endvariable -
string_eod
byte string_eodvariable -
test_control
byte test_controlvariable -
test_byte1
byte test_byte1variable -
test_byte2
byte test_byte2variable -
function_byte1
byte function_byte1variable -
function_byte2
byte function_byte2variable -
string_eod_found
boolean string_eod_foundvariable -
fields_equal
boolean fields_equalvariable -
bd2_end
int bd2_endvariable -
data_len
int data_lenvariable -
pad_len
int pad_lenvariable -
fill_char
byte fill_charvariable -
fill_mem_char
byte fill_mem_charvariable -
fill_reg_char
byte fill_reg_charvariable -
ex_mode
boolean ex_modevariable -
ex_opcode1
int ex_opcode1variable -
exrl_opcode1
int exrl_opcode1variable -
exrl_opcode2
int exrl_opcode2variable -
ex_mod_byte
byte ex_mod_bytevariable -
ex_psw_return
int ex_psw_returnvariable -
ex_psw_ilc
int ex_psw_ilcvariable -
pd_bytes
byte[] pd_bytesvariable -
pd_byte
ByteBuffer pd_bytevariable -
zone_bytes
byte[] zone_bytesvariable -
zone_byte_zone
byte zone_byte_zonevariable -
zone_len
int zone_lenvariable -
zone_index
int zone_indexvariable -
zone_sign_zero
boolean zone_sign_zerovariable -
pdf_str
String pdf_strvariable -
pdf_str_len
int pdf_str_lenvariable -
pdf_zeros
int pdf_zerosvariable -
pdf_leftmost_zeros
int pdf_leftmost_zerosvariable -
pdf_leftmost_zeros1
int pdf_leftmost_zeros1variable -
pdf_sign
char pdf_signvariable -
pdf_trunc
boolean pdf_truncvariable -
pdf_zone
int pdf_zonevariable -
pdf_next_out
byte pdf_next_outvariable -
pdf_next_in
byte pdf_next_invariable -
pdf_next_right
boolean pdf_next_rightvariable -
big_int
BigInteger big_intvariable -
big_int1
BigInteger big_int1variable -
big_int2
BigInteger big_int2variable -
pdf_is_big
boolean pdf_is_bigvariable -
pdf_signed
boolean pdf_signedvariable -
pdf_ignore_sign
boolean pdf_ignore_signvariable -
pdf_big_int
BigInteger pdf_big_intvariable -
pdf_big_int1
BigInteger pdf_big_int1variable -
pdf_big_int2
BigInteger pdf_big_int2variable -
pdf_long
long pdf_longvariable -
pdf_long1
long pdf_long1variable -
pdf_long2
long pdf_long2variable -
big_int_array
BigInteger[] big_int_arrayvariable -
pd_cc
int pd_ccvariable -
rsbg_test
boolean rsbg_testvariable -
rsbg_zero
boolean rsbg_zerovariable -
rsbg_mask_zeros
long rsbg_mask_zerosvariable -
rsbg_mask_ones
long rsbg_mask_onesvariable -
risb_zero
boolean risb_zerovariable -
risb_mask_zeros
int risb_mask_zerosvariable -
risb_mask_ones
int risb_mask_onesvariable -
reg_byte
byte[] reg_bytevariable -
reg
ByteBuffer regvariable -
reg_len
int reg_lenvariable -
work_reg_byte
byte[] work_reg_bytevariable -
work_reg
ByteBuffer work_regvariable -
log_reg_byte
byte[] log_reg_bytevariable -
log_reg
ByteBuffer log_regvariable -
r0
int r0variable -
r1
int r1variable -
r2
int r2variable -
r3
int r3variable -
r4
int r4variable -
r5
int r5variable -
r6
int r6variable -
r7
int r7variable -
r8
int r8variable -
r9
int r9variable -
r10
int r10variable -
r11
int r11variable -
r12
int r12variable -
r13
int r13variable -
r14
int r14variable -
r15
int r15variable -
fp_reg_byte
byte[] fp_reg_byte16 fp registers with eb, db, and bd co-regs to avoid conversions when possible fp_ctl defines fp reg state as follows:- 0 = fp_ctl_ld no co-reg defined (set by LE,LD)
- 1 = fp_ctl_eb set for EB float operations
- 2 = fp_ctl_db set for EH, DH, DB operations
- 3 = fp_ctl_bd set for LH, LB operations
- LE and LD set fp_reg with fp_ctl_ld
- STE and STD store from fp_reg or co_reg
- fp_reg is indexed by reg * 8 byte index
- fp_ctl and co-regs are indexed by reg #
-
fp_reg
ByteBuffer fp_regvariable -
trace_reg_byte
byte[] trace_reg_bytevariable -
trace_reg
ByteBuffer trace_regvariable -
fp_ctl_ld
byte fp_ctl_ldvariable -
fp_ctl_eb
byte fp_ctl_ebvariable -
fp_ctl_db
byte fp_ctl_dbvariable -
fp_ctl_bd1
byte fp_ctl_bd1variable -
fp_ctl_bd2
byte fp_ctl_bd2variable -
fp_reg_type
byte[] fp_reg_typevariable -
fp_reg_ctl
byte[] fp_reg_ctlvariable -
fp_reg_eb
float[] fp_reg_ebvariable -
fp_reg_db
double[] fp_reg_dbvariable -
fp_reg_bd
BigDecimal[] fp_reg_bdvariable -
work_fp_reg_byte
byte[] work_fp_reg_bytevariable -
work_fp_reg
ByteBuffer work_fp_regvariable -
fp_pair_type
boolean[] fp_pair_typevariable -
fp_pair_valid
boolean[] fp_pair_validvariable -
ar_reg_byte
byte[] ar_reg_bytevariable -
ar_reg
ByteBuffer ar_regvariable -
ar_reg_len
int ar_reg_lenvariable -
lrv1
long lrv1variable -
fp_rev1
float fp_rev1variable -
fp_rev2
float fp_rev2variable -
fp_rdv1
double fp_rdv1variable -
fp_rdv2
double fp_rdv2variable -
fp_rdv3
double fp_rdv3variable -
fp_rdv4
double fp_rdv4variable -
fp_rbdv1
BigDecimal fp_rbdv1variable -
fp_rbdv2
BigDecimal fp_rbdv2variable -
fp_rbdv3
BigDecimal fp_rbdv3variable -
fp_bd_half
BigDecimal fp_bd_halfvariable -
fp_bd_two
BigDecimal fp_bd_twovariable -
fp_bd_int_rem
BigDecimal[] fp_bd_int_remvariable -
fp_bd_inc
BigDecimal fp_bd_incvariable -
fp_bd_sqrt_scale
int fp_bd_sqrt_scalevariable -
work_fp_bi1_bytes
byte[] work_fp_bi1_bytesvariable -
work_fp_bi1
BigInteger work_fp_bi1variable -
work_fp_bd1
BigDecimal work_fp_bd1variable -
work_fp_bd2
BigDecimal work_fp_bd2variable -
long_dh_zero
long long_dh_zerovariable -
long_dh_exp_bits
long long_dh_exp_bitsvariable -
long_dh_man_bits
long long_dh_man_bitsvariable -
fp_round
int fp_roundvariable -
long_work
long long_workvariable -
long_sign
long long_signvariable -
long_exp
long long_expvariable -
long_man
long long_manvariable -
long_db_exp_bits
long long_db_exp_bitsvariable -
long_db_one_bits
long long_db_one_bitsvariable -
long_db_one_bit
long long_db_one_bitvariable -
long_db_man_bits
long long_db_man_bitsvariable -
int_eh_exp_bits
int int_eh_exp_bitsvariable -
int_eh_zero
int int_eh_zerovariable -
int_work
int int_workvariable -
int_man
int int_manvariable -
int_eh_man_bits
int int_eh_man_bitsvariable -
fp_dhg_context
MathContext fp_dhg_contextvariable -
fp_lxg_context
MathContext fp_lxg_contextvariable -
fp_dbg_context
MathContext fp_dbg_contextvariable -
fp_ebg_context
MathContext fp_ebg_contextvariable -
fp_dh_context
MathContext fp_dh_contextvariable -
fp_lh_context
MathContext fp_lh_contextvariable -
fp_ld_context
MathContext fp_ld_contextvariable -
fp_bfp_rnd_mode
RoundingMode[] fp_bfp_rnd_modeRPI 1125 use array for BFP context -
fp_db_rnd_context
MathContext[] fp_db_rnd_contextvariable -
fp_eb_rnd_context
MathContext[] fp_eb_rnd_contextvariable -
fp_lb_rnd_context
MathContext[] fp_lb_rnd_contextvariable -
fp_hfp_class
byte fp_hfp_classvariable -
fp_bfp_class
byte fp_bfp_classvariable -
fp_dfp_class
byte fp_dfp_classvariable -
fp_dfp_rnd_mode
RoundingMode[] fp_dfp_rnd_modevariable -
fp_dd_rnd_context
MathContext[] fp_dd_rnd_contextvariable -
fp_ed_rnd_context
MathContext[] fp_ed_rnd_contextvariable -
fp_ld_rnd_context
MathContext[] fp_ld_rnd_contextvariable -
fp_dh_rnd_context
MathContext[] fp_dh_rnd_contextvariable -
fp_log2
double fp_log2variable -
fp_log10
double fp_log10variable -
fp_bd
BigDecimal fp_bdvariable -
fp_big_dec2
BigDecimal fp_big_dec2variable -
fp_big_dec3
BigDecimal fp_big_dec3variable -
fp_big_int1
BigInteger fp_big_int1variable -
fp_big_int2
BigInteger fp_big_int2variable -
fp_big_int_one_bits
BigInteger fp_big_int_one_bitsvariable -
fp_big_int_lx_man_bits
BigInteger fp_big_int_lx_man_bitsvariable -
fp_big_int_dh_man_bits
BigInteger fp_big_int_dh_man_bitsvariable -
fp_int1
int fp_int1variable -
fp_int2
int fp_int2variable -
fp_int_eb_one_bits
int fp_int_eb_one_bitsvariable -
fp_int_eb_man_bits
int fp_int_eb_man_bitsvariable -
fp_int_eh_man_bits
int fp_int_eh_man_bitsvariable -
fp_long1
long fp_long1variable -
fp_long2
long fp_long2variable -
fp_long3
long fp_long3variable -
fp_exp1
byte fp_exp1variable -
fp_exp2
byte fp_exp2variable -
fp_exp3
byte fp_exp3variable -
fp_sign1
byte fp_sign1variable -
fp_sign2
byte fp_sign2variable -
fp_sign3
byte fp_sign3variable -
fp_long_db_one_bits
long fp_long_db_one_bitsvariable -
fp_long_db_man_bits
long fp_long_db_man_bitsvariable -
fp_long_dh_man_bits
long fp_long_dh_man_bitsvariable -
fp_eb_pos_inf
int fp_eb_pos_infvariable -
fp_eb_neg_inf
int fp_eb_neg_infvariable -
fp_db_pos_inf
long fp_db_pos_infvariable -
fp_db_neg_inf
long fp_db_neg_infvariable -
fp_dd_pos_inf
long fp_dd_pos_infvariable -
fp_dd_neg_inf
long fp_dd_neg_infvariable -
fp_lb_pos_inf
long fp_lb_pos_infvariable -
fp_lb_neg_inf
long fp_lb_neg_infvariable -
fp_ld_pos_inf
long fp_ld_pos_infvariable -
fp_ld_neg_inf
long fp_ld_neg_infvariable -
fp_eb_min
float fp_eb_minvariable -
fp_eb_max
float fp_eb_maxvariable -
fp_db_min
double fp_db_minvariable -
fp_db_max
double fp_db_maxvariable -
fp_eh_min
double fp_eh_minvariable -
fp_eh_max
double fp_eh_maxvariable -
fp_dh_min
BigDecimal fp_dh_minvariable -
fp_dh_max
BigDecimal fp_dh_maxvariable -
fp_lh_min
BigDecimal fp_lh_minvariable -
fp_lh_max
BigDecimal fp_lh_maxvariable -
fp_lb_min
BigDecimal fp_lb_minvariable -
fp_lb_neg_zero
BigDecimal fp_lb_neg_zerovariable -
fp_lb_max
BigDecimal fp_lb_maxvariable -
fp_dd_pos_max
BigDecimal fp_dd_pos_maxvariable -
fp_dd_pos_min
BigDecimal fp_dd_pos_minvariable -
fp_dd_neg_max
BigDecimal fp_dd_neg_maxvariable -
fp_dd_neg_min
BigDecimal fp_dd_neg_minvariable -
fp_ed_pos_max
BigDecimal fp_ed_pos_maxvariable -
fp_ed_pos_min
BigDecimal fp_ed_pos_minvariable -
fp_ed_neg_max
BigDecimal fp_ed_neg_maxvariable -
fp_ed_neg_min
BigDecimal fp_ed_neg_minvariable -
fp_ld_pos_max
BigDecimal fp_ld_pos_maxvariable -
fp_ld_pos_min
BigDecimal fp_ld_pos_minvariable -
fp_ld_neg_max
BigDecimal fp_ld_neg_maxvariable -
fp_ld_neg_min
BigDecimal fp_ld_neg_minvariable -
fp_dd_exp_min
int fp_dd_exp_minvariable -
fp_dd_exp_max
int fp_dd_exp_maxvariable -
fp_ed_exp_min
int fp_ed_exp_minvariable -
fp_ed_exp_max
int fp_ed_exp_maxvariable -
fp_ld_exp_min
int fp_ld_exp_minvariable -
fp_ld_exp_max
int fp_ld_exp_maxvariable -
cur_pc_stk
int cur_pc_stkvariable -
cur_pc_stk_reg
int cur_pc_stk_regvariable -
pc_stk_reg_byte
byte[] pc_stk_reg_bytevariable -
pc_stk_reg
ByteBuffer pc_stk_regvariable -
pc_stk_psw_loc
int[] pc_stk_psw_locvariable -
pc_stk_psw_cc
int[] pc_stk_psw_ccvariable -
pc_stk_type_pc
boolean[] pc_stk_type_pcvariable -
mem24_start
int mem24_startvariable -
mem24_line
int mem24_linevariable -
mem_byte
byte[] mem_bytevariable -
mem
ByteBuffer memvariable -
dsa24_start
int dsa24_startvariable -
dsa24_end
int dsa24_endvariable -
dsa31_start
int dsa31_startvariable -
dsa31_end
int dsa31_endvariable -
tot_mem
int tot_memvariable -
tot_mem_alloc
int tot_mem_allocvariable -
psa_cvt
int psa_cvtvariable -
psa_svc_old_psw
int psa_svc_old_pswvariable -
psa_svc_new_psw
int psa_svc_new_pswvariable -
psa_pgm_old_psw
int psa_pgm_old_pswvariable -
psa_pgm_nwq_paq
int psa_pgm_nwq_paqvariable -
psa_cvt2
int psa_cvt2variable -
psa_psw_ins_len
int psa_psw_ins_lenvariable -
psa_len
int psa_lenvariable -
zcvt_start
int zcvt_startvariable -
zcvt_user_pgm
int zcvt_user_pgmvariable -
zcvt_ipl_pgm
int zcvt_ipl_pgmvariable -
zcvt_fqe24
int zcvt_fqe24variable -
zcvt_fqe31
int zcvt_fqe31variable -
zcvt_exit
int zcvt_exitvariable -
zcvt_tget_ecb
int zcvt_tget_ecbvariable -
zcvt_save
int zcvt_savevariable -
zcvt_stimer_save
int zcvt_stimer_savevariable -
zcvt_exec_parma
int zcvt_exec_parmavariable -
zcvt_exec_parm
int zcvt_exec_parmvariable -
zcvt_epie
int zcvt_epievariable -
zcvt_sdwa
int zcvt_sdwavariable -
zcvt_comrg
int zcvt_comrgvariable -
cvt_start
int cvt_startvariable -
cvt_date
int cvt_datevariable -
cvt_dcb
int cvt_dcbvariable -
cvt_cde
int cvt_cdevariable -
cde_cdchain
int cde_cdchainvariable -
cde_cdname
int cde_cdnamevariable -
cde_cdentpt
int cde_cdentptvariable -
cde_cduse
int cde_cdusevariable -
cde_cdloadpt
int cde_cdloadptvariable -
cde_cdmodlen
int cde_cdmodlenvariable -
cde_len
int cde_lenvariable -
zcvt_comrg_jobdate
int zcvt_comrg_jobdatevariable -
zcvt_comrg_comname
int zcvt_comrg_comnamevariable -
epie_id
int epie_idvariable -
epie_parm
int epie_parmvariable -
epie_psw
int epie_pswvariable -
epie_ilc
int epie_ilcvariable -
epie_inc
int epie_incvariable -
epie_flags
int epie_flagsvariable -
epie_gpr
int epie_gprvariable -
sdwa_parm
int sdwa_parmvariable -
sdwa_cmp
int sdwa_cmpvariable -
sdwa_psw
int sdwa_pswvariable -
sdwa_xpad
int sdwa_xpadvariable -
sdwa_ptrs
int sdwa_ptrsvariable -
sdwa_xeme
int sdwa_xemevariable -
sdwa_rc4
int sdwa_rc4variable -
sdwa_g64
int sdwa_g64variable -
bit_cnt
byte[] bit_cntbyte bit count lookup table -
op_type_offset
int[] op_type_offsetopcode lookup tables unique to ez390 -
op_type_mask
int[] op_type_maskvariable -
opcode2_offset
int[] opcode2_offsetvariable -
opcode2_mask
int[] opcode2_maskvariable -
retaddr
int retaddrretaddr holds return address for instructions that form a return address
-
-
Constructor Details
-
pz390
public pz390()Dummy constructor - no initialization needed
-
-
Method Details
-
exec_pz390
public void exec_pz390()execute 390 code at psw_addr in mem[] -
ins_lt_40
private void ins_lt_40()exec opcodes x'00 - x'3F' -
ins_lt_80
private void ins_lt_80()excute instr x'40' - x'7F' -
ins_lt_c0
private void ins_lt_c0()execute opcodes x'80' - x'BF' -
ins_lt_ff
private void ins_lt_ff()exec instr. x'C0'- x'FF' -
ins_01XX
private void ins_01XX()opcodes x'0100' - x'01FF' -
ins_A4XX_VF
private void ins_A4XX_VF()opcodes x'A400' - x'A4FF' for Vector Facility -
ins_A5XX
private void ins_A5XX()opcodes x'A50' - x'A5F' -
ins_A5XX_VF
private void ins_A5XX_VF()opcodes x'A500' - x'A5FF' for Vector Facility -
ins_A6XX_VF
private void ins_A6XX_VF()opcodes x'A600' - x'A6FF' for Vector Facility -
ins_A7XX
private void ins_A7XX()opcodes x'A70' - x'A7F' -
ins_B2XX
private void ins_B2XX()opcodes x'B200' - x'B2FF' -
ins_B3XX
private void ins_B3XX()opcodes x'B300' - x'B3FF' -
ins_B9XX
private void ins_B9XX()opcodes x'B900' - x'B9FF' -
ins_C0XX
private void ins_C0XX()opcodes x'C00' - x'C0F' -
ins_C2XX
private void ins_C2XX()opcodes x'C20' - x'C2F' -
ins_C4XX
private void ins_C4XX()opcodes x'C40' - x'C4F' -
ins_C6XX
private void ins_C6XX()opcodes x'C60' - x'C6F' -
ins_CCXX
private void ins_CCXX()opcodes x'CC0' - x'CCF' -
ins_C8XX
private void ins_C8XX()opcodes x'C80' - x'C8F' -
ins_E0X
private void ins_E0X()opcodes x'E00' - x'E0F' -
ins_E3XX
private void ins_E3XX()opcodes x'E300' - x'E3FF' -
ins_E4XX_VF
private void ins_E4XX_VF()opcodes x'E400' - x'E4FF' for Vector Facility -
ins_E5XX
private void ins_E5XX()opcodes x'E500' - x'E5FF' -
ins_E6XX
private void ins_E6XX()opcodes x'E600' - x'E6FF' for Vector Facility -
ins_EBXX
private void ins_EBXX()opcodes x'EB00' - x'EBFF' -
ins_ECXX
private void ins_ECXX()opcodes x'EC00' - x'ECFF' -
ins_EDXX
private void ins_EDXX()opcodes x'ED00' - x'EDFF' -
ins_setup_dm
private void ins_setup_dm()instruction setup routine for optype DM -
ins_setup_e
private void ins_setup_e()instruction setup routine for optype E -
ins_setup_i
private void ins_setup_i()instruction setup routine for optype I -
ins_setup_mii
private void ins_setup_mii()instruction setup routine for optype MII -
ins_setup_ri
private void ins_setup_ri()instruction setup routine for optype RI -
ins_setup_rie
private void ins_setup_rie()instruction setup routine for optype RIE -
ins_setup_rie2
private void ins_setup_rie2()instruction setup routine for optype RIE2 -
ins_setup_rie4
private void ins_setup_rie4()instruction setup routine for optype RIE4 -
ins_setup_rie6
private void ins_setup_rie6()instruction setup routine for optype RIE6 -
ins_setup_rie8
private void ins_setup_rie8()instruction setup routine for optype RIE8 -
ins_setup_rie9
private void ins_setup_rie9()instruction setup routine for optype RIE9 -
ins_setup_rrs1
private void ins_setup_rrs1()instruction setup routine for optype RRS1 -
ins_setup_rrs3
private void ins_setup_rrs3()instruction setup routine for optype RRS3 -
ins_setup_ril
private void ins_setup_ril()instruction setup routine for optype RIL -
ins_setup_rr
private void ins_setup_rr()instruction setup routine for optype RR -
ins_setup_ie
private void ins_setup_ie()instruction setup routine for optype IE -
ins_setup_rre
private void ins_setup_rre()instruction setup routine for optype RRE -
ins_setup_rrd
private void ins_setup_rrd()instruction setup routine for optype RRD -
ins_setup_rrfa
private void ins_setup_rrfa()instruction setup routine for optype RRFA -
ins_setup_rrfb
private void ins_setup_rrfb()instruction setup routine for optype RRFB -
ins_setup_rrfe
private void ins_setup_rrfe()instruction setup routine for optype RRFE -
ins_setup_rrf3
private void ins_setup_rrf3()instruction setup routine for optype RRF3 -
ins_setup_rrf4
private void ins_setup_rrf4()instruction setup routine for optype RRF4 -
ins_setup_RRFc
private void ins_setup_RRFc()instruction setup routine for optype RRFc -
ins_setup_rrr
private void ins_setup_rrr()instruction setup routine for optype RRR -
ins_setup_rs
private void ins_setup_rs()instruction setup routine for optype RS -
ins_setup_rs_shift
private void ins_setup_rs_shift()instruction setup routine for optype RS for shift instructions -
ins_setup_rsi
private void ins_setup_rsi()instruction setup routine for optype RSI -
ins_setup_rsla
private void ins_setup_rsla()instruction setup routine for optype RSLa -
ins_setup_rslb
private void ins_setup_rslb()instruction setup routine for optype RSLb -
ins_setup_rsy
private void ins_setup_rsy()instruction setup routine for optype RSY -
ins_setup_rsy_shift
private void ins_setup_rsy_shift()instruction setup routine for optype RSY for rotate instructions -
ins_setup_rx
private void ins_setup_rx()instruction setup routine for optype RX -
ins_setup_rxss
private void ins_setup_rxss()instruction setup routine for optype RXSS -
ins_setup_rxf
private void ins_setup_rxf()instruction setup routine for optype RXF -
ins_setup_rxf_shift
private void ins_setup_rxf_shift()instruction setup routine for optype RXF - exception cases -
ins_setup_rxe
private void ins_setup_rxe()instruction setup routine for optype RXE -
ins_setup_rxy
private void ins_setup_rxy()instruction setup routine for optype RXY -
ins_setup_s
private void ins_setup_s()instruction setup routine for optype S -
ins_setup_s0
private void ins_setup_s0()instruction setup routine for optype S0 -
ins_setup_si
private void ins_setup_si()instruction setup routine for optype SI -
ins_setup_sil
private void ins_setup_sil()instruction setup routine for optype SIL -
ins_setup_siy
private void ins_setup_siy()instruction setup routine for optype SIY -
ins_setup_smi
private void ins_setup_smi()instruction setup routine for optype SMI -
ins_setup_ssp
private void ins_setup_ssp()instruction setup routine for optype SSP -
ins_setup_ss
private void ins_setup_ss()instruction setup routine for optype SS -
ins_setup_sse
private void ins_setup_sse()instruction setup routine for optype SSE -
ins_setup_ssf
private void ins_setup_ssf()instruction setup routine for optype SSF -
ins_setup_ssf2
private void ins_setup_ssf2()instruction setup routine for optype SSF2 -
ins_setup_vrx
private void ins_setup_vrx()instruction setup routine for optype VRX -
ins_setup_vs
private void ins_setup_vs()instruction setup routine for optype VS -
ins_setup_vsi
private void ins_setup_vsi()instruction setup routine for optype VSI -
ins_setup_vrs
private void ins_setup_vrs()instruction setup routine for optype VRS -
get_ins_name
return opcode or ????? for given op1 and op2- Parameters:
ins_loc- instruction address- Returns:
- opcode mnemonic as a string
-
set_psw_check
public void set_psw_check(int pic_type) set psw_pic interruption type if pgm mask type interrupt if mask bit 0, set CC3 and continue. if espie exit defined, exit to it else set psw_check for exit to abend handler- Parameters:
pic_type- ???
-
psw_pic_handler
public void psw_pic_handler()set psw_loc and turn on psw_retry if any of the following conditions found:- If psw_pic has corresponding psw_pgm_mask bit off, continue at next instruction.
- If psw_pic has corresponding bit on in ESPIE PIE mask bits, restart at espie_exit if defined.
- If estae_exit defined, then restart at estae_exit.
- If option test on
- else issue svc_abend for psw_pic code.
-
setup_espie_exit
private void setup_espie_exit()initialize zcvt_epie and pass addr to espie exit via r1 -
update_psa
public void update_psa()called for ESPIE and ABEND to update PSA pgm old psw and instr. len- store FLCPOPSW+2=00CCMMMM
- store FLCPOPSW+3=interrupt code
- store FLCPOPSW+4=addr with amode high bit
- store FLCPIILC+0=instruction length
-
setup_estae_exit
public void setup_estae_exit()initialize zcvt_sdwa and pass addr to estae exit via r1 -
set_psw_amode
public void set_psw_amode(int amode_bit) set psw_amode (24/31/64) based on amode low bit and high bit- Parameters:
amode_bit- integer with amode bits.
-
set_psw_loc
public void set_psw_loc(int addr) set psw_loc based on psw_amode and turn off ex_mode and add space if trace on- Parameters:
addr- address
-
get_tm_mem_cc
private int get_tm_mem_cc(int mem, int mask) return psw_cc dor TM, TMY- Parameters:
mem- memory valuemask- mask value- Returns:
- condition code
-
get_tm_reg_cc
private int get_tm_reg_cc(int reg, int mask) return psw_cc for TMHH, THHL, TMLH, TMLL- Parameters:
reg- register valuemask- mask value- Returns:
- condition code
-
get_sla32
private int get_sla32(int int_reg, int shift_count) return int shifted left arith and set psw_cc- Parameters:
int_reg- integer value from registershift_count- shift count- Returns:
- result value
-
get_sla64
private long get_sla64(long long_reg, int shift_count) return long_reg shifted left arith and set psw_cc- Parameters:
long_reg- long integer value from registershift_count- shift count- Returns:
- result value
-
get_sra32
private int get_sra32(int int_reg, int shift_count) return int shifted right arith and set psw_cc- Parameters:
int_reg- integer value from registershift_count- shift count- Returns:
- result value
-
get_int_log_add_cc
private int get_int_log_add_cc()set psw_carry and return cc for logical add as follows:- rv1 == 0 carry == 0 - cc0
- rv1 != 0 carry == 0 - cc1
- rv1 == 0 carry == 1 - cc2
- rv1 != 0 carry == 1 - cc3
- rvw = r1 input
- rv2 = r2 input
- rv1 = result r1
- R1:+ RW:+ R2:+ NC
- R1:+ RW:+ R2:- C
- R1:+ RW:- R2:+ C
- R1:+ RW:- R2:- C
- R1:- RW:+ R2:+ NC
- R1:- RW:+ R2:- NC
- R1:- RW:- R2:+ NC
- R1:- RW:- R2:- C
- Returns:
- condition code
-
get_int_lsi_add_cc
private int get_int_lsi_add_cc()set psw_carry and return cc for logical add with signed value in rv2. For negative rv2, the carry bit may indicate borrow.- rv1 == 0 carry/borrow == 0 - cc0
- rv1 != 0 carry/borrow == 0 - cc1
- rv1 == 0 carry/borrow == 1 - cc2
- rv1 !- 0 carry/borrow == 1 - cc3
- rvw = r1 input
- rv2 = r2 input
- rv1 = result r1
- R1:+ RW:+ R2:+ NC
- R1:+ RW:+ R2:- NB
- R1:+ RW:- R2:+ C
- R1:+ RW:- R2:- NB
- R1:- RW:+ R2:+ NC
- R1:- RW:+ R2:- B
- R1:- RW:- R2:+ NC
- R1:- RW:- R2:- NB
- Returns:
- condition code
-
get_long_lsi_add_cc
private int get_long_lsi_add_cc()set psw_carry and return cc for logical add with signed value in rv2. For negative rv2, the carry bit may indicate borrow.- rlv1 == 0 carry/borrow 0 - cc0
- rlv1 != 0 carry/borrow 0 - cc1
- rlv1 == 0 carry/borrow 1 - cc2
- rlv1 != 0 carry/borrow 1 - cc3
- rlvw = r1 input
- rlv2 = r2 input
- rlv1 = result r1
- R1:+ RW:+ R2:+ NC
- R1:+ RW:+ R2:- NB
- R1:+ RW:- R2:+ C
- R1:+ RW:- R2:- NB
- R1:- RW:+ R2:+ NC
- R1:- RW:+ R2:- B
- R1:- RW:- R2:+ NC
- R1:- RW:- R2:- NB
- Returns:
- condition code
-
get_long_log_add_cc
private int get_long_log_add_cc()set psw_carry and return cc for logical add as follows:- rlv1 == 0 carry == 0 - cc0
- rlv1 != 0 carry == 0 - cc1
- rlv1 == 0 carry == 1 - cc2
- rlv1 != 0 carry == 1 - cc3
- Returns:
- condition code
-
get_int_log_sub_cc
private int get_int_log_sub_cc()return cc for logical subtract as follows:- rv1 == 0 borrow == 1 - cc0 (slb only)
- rv1 != 0 borrow == 1 - cc1
- rv1 == 0 borrow == 0 - cc2
- rv1 != 0 borrow == 0 - cc3
- rvw = r1 input
- rv2 = r2 input
- rv1 = result
- Returns:
- condition code
-
get_long_log_sub_cc
private int get_long_log_sub_cc()return cc for logical subtract as follows:- rlv borrow
- rlv == 0 borrow == 1 - cc0 (slb only)
- rlv != 0 borrow == 1 - cc1
- rlv == 0 borrow == 0 - cc2
- rlv != 0 borrow == 0 - cc3
- rlvw = orig. rlv1
- rlv1 = result
- rlv2 = orig. rlv2
- Returns:
- condition code
-
get_unsigned_bytes
private byte[] get_unsigned_bytes(byte[] data_byte, int data_offset, int data_len) return byte array with leading 0 byte followed by data bytes. This array format is used to initialize BigInteger with logical unsigned value.
2022-02-21 dsh issue 300 support unsigned with leading x'00'- Parameters:
data_byte- input byte arraydata_offset- offset of data in data_byte arraydata_len- length of data to use- Returns:
- byte array
-
get_signed_bytes
private byte[] get_signed_bytes(byte[] data_byte, int data_offset, int data_len) return byte array with signed 2's complement. This array format is used to initialize BigInteger value.
2022-02-21 dsh issue 300 fix to support 2s complement negative numbers- Parameters:
data_byte- input byte arraydata_offset- offset of data in data_byte arraydata_len- length of data to use- Returns:
- byte array
-
fp_bi_to_wreg
private void fp_bi_to_wreg(byte[] store_bytes, int store_offset, BigInteger big_int, int store_length) copy big integer bytes to work reg with work reg size up to 16- Parameters:
store_bytes- byte array to store intostore_offset- offset in array where to storebig_int- big-int value to be storedstore_length- nr of bytes to store
-
exec_clcl
private void exec_clcl()execute Compare Characters Long -
exec_clcle
private void exec_clcle()execute Compare Characters Long Extended -
exec_clm
private void exec_clm()execute Compare Logical under Mask -
exec_clst
private void exec_clst()execute Compare Logical STring -
exec_cuse
private void exec_cuse()execute Compare Until Substring Equal -
exec_srst
private void exec_srst()execute SeaRch STring -
exec_stcm
private void exec_stcm()execute STore Characters under Mask -
exec_trt_ext
private void exec_trt_ext(boolean reversed) perform TRTE or TRTRE- Parameters:
reversed- reversal option
-
exec_unpka
private void exec_unpka()perform UNPKA -
exec_icm
private void exec_icm()exec icmh, icmy, or icm using rv1, db2_loc
Notes:- psw_cc = 0 all inserted bits 0 or mask 0
- psw_cc = 1 if first inserted bit 1
- psw_cc = 2 if first inserted bit 0 and not all 0
-
exec_mvcl
private void exec_mvcl()execute MoVe Characters Long -
exec_mvcle
private void exec_mvcle()execute MoVe Characters Long Extended -
exec_mvc_rflen
private void exec_mvc_rflen()move from bd2_loc to bd1_loc for length rflen
Notes:- Used by MVC and MVCOS
-
push_pc_stack
private void push_pc_stack(boolean pc_type, int link_addr) push psw and regs on Program Call stack- Parameters:
pc_type- type of PClink_addr- linkage address
-
pop_pc_stack
private void pop_pc_stack()pop psw and regs on PC stack -
get_ins_target
return hex ins plus ins name with 1 space- Parameters:
ins_loc- instruction address- Returns:
- instruction data in hex with instruction mnemonic appended
-
get_ins_hex
return 2, 4, or 6 byte hex instruction- Parameters:
ins_loc- instruction address- Returns:
- instruction data in hex
-
get_fp_long_hex
Format fp reg into 16 byte hex string after flushing co-reg
Note:
This trace function slows down fp by adding extra conversions.- Parameters:
reg_index- register index- Returns:
- hexadecimal string
-
get_long_hex
Format long into 16 byte hex string- Parameters:
work_long- value to convert- Returns:
- hexadecimal string
-
trace_psw
public void trace_psw()set opcode1 and opcode2 from psw_loc and then execute setup routine with trace on to generate formated instruction trace -
trace_svc
return extended svc trace information including svc function name and any key parms available such as pgm name or ddname where appropriate- Returns:
- descriptive text
-
get_big_int_comp_cc
return psw cc for big int comparison- Parameters:
big_int1- operand1 valuebig_int2- operand2 value- Returns:
- condition code
-
get_long_add_cc
private int get_long_add_cc()check rlv3 = rlv1 + rlv2 for fixed overflow and set psw_cc or gen fixed exception- Returns:
- condition code
-
get_long_sub_cc
private int get_long_sub_cc()check rlv3 = rlv1 - rlv2 for fixed overflow and set psw_cc or gen fixed exception- Returns:
- condition code
-
get_long_comp_cc
public int get_long_comp_cc(long long1, long long2) return psw_cc for long compare- Parameters:
long1- operand1long2- operand2- Returns:
- condition code
-
get_int_add_cc
private int get_int_add_cc()check rv3 = rv1 + rv2 for fixed overflow and set psw_cc or gen fixed exception- Returns:
- condition code
-
get_int_sub_cc
private int get_int_sub_cc()check rv3 = rv1 - rv2 for fixed overflow and set psw_cc or gen fixed exception- Returns:
- condition code
-
get_int_comp_cc
private int get_int_comp_cc(int int1, int int2) return psw_cc for int compare- Parameters:
int1- operand1int2- operand2- Returns:
- condition code
-
check_bd12_exact
private void check_bd12_exact()raise ineact exception if fp_rbdv1 not = fp_rbdv2 -
check_eb_mpy
private void check_eb_mpy()check for EB overflow or underflow -
check_eh_mpy
private void check_eh_mpy()check for EH overflow or underflow -
check_db_mpy
private void check_db_mpy()check for DB overflow or underflow -
check_dd_mpy
private void check_dd_mpy()check for DD overflow or underflow -
check_dh_mpy
private void check_dh_mpy()check for DH overflow or underflow -
check_lb_mpy
private void check_lb_mpy()check for LB overflow or underflow -
check_ld_mpy
private void check_ld_mpy()check for LD overflow or underflow -
check_lh_mpy
private void check_lh_mpy()check for LH overflow or underflow -
check_eb_div
private void check_eb_div()check for EB overflow or underflow -
check_eh_div
private void check_eh_div()check for EH overflow or underflow -
check_db_div
private void check_db_div()check for DB overflow or underflow -
check_dd_div
private void check_dd_div()check for DDTR overflow or underflow -
check_dh_div
private void check_dh_div()check for DH overflow or underflow -
check_lb_div
private void check_lb_div()check for LB overflow or underflow -
check_ld_div
private void check_ld_div()check for DXTR overflow or underflow -
check_lh_div
private void check_lh_div()check for LH overflow or underflow -
fp_get_di_cc
private int fp_get_di_cc()return psw_cc for fp divide to integer- Returns:
- condition code
-
fp_get_eb_comp_cc
private int fp_get_eb_comp_cc(float eb1, float eb2) return psw_cc for float compare- Parameters:
eb1- operand1eb2- operand2- Returns:
- condition code
-
fp_get_eb_add_sub_cc
private int fp_get_eb_add_sub_cc()return psw_cc for eb add/sub result fp_rev1 and raise BFP sig, ovf, or unf exceptions- Returns:
- condition code
-
fp_get_db_comp_cc
private int fp_get_db_comp_cc(double db1, double db2) return psw_cc for DB double compare- Parameters:
db1- operand1db2- operand2- Returns:
- condition code
-
fp_get_eh_comp_cc
private int fp_get_eh_comp_cc(double db1, double db2) return psw_cc for EH double compare- Parameters:
db1- operand1db2- operand2- Returns:
- condition code
-
fp_get_dd_comp_cc
return psw_cc for DD compare with or without signal- Parameters:
dd1- operand1dd2- operand2- Returns:
- condition code
-
fp_get_ld_comp_cc
return psw_cc for LD compare with or without signal- Parameters:
ld1- operand1ld2- operand2- Returns:
- condition code
-
fp_get_eh_add_sub_cc
private int fp_get_eh_add_sub_cc()return psw_cc for eh add/sub result fp_rdv1 and raise HFP sig, ovf, or unf exceptions- Returns:
- condition code
-
fp_get_dh_add_sub_cc
private int fp_get_dh_add_sub_cc()return psw_cc for dh add/sub result fp_rbdv1 and raise HFP sig, ovf, or unf exceptions- Returns:
- condition code
-
fp_get_db_add_sub_cc
private int fp_get_db_add_sub_cc()return psw_cc for db add/sub result fp_rdv1 and raise BFP sig, ovf, or unf exceptions- Returns:
- condition code
-
fp_get_lb_comp_cc
return psw_cc for big decimal compare- Parameters:
bd1- operand1bd2- operand2- Returns:
- condition code
-
fp_get_dh_comp_cc
return psw_cc for DH big decimal compare- Parameters:
bd1- operand1bd2- operand2- Returns:
- condition code
-
fp_get_lh_comp_cc
return psw_cc for LH big decimal compare- Parameters:
bd1- operand1bd2- operand2- Returns:
- condition code
-
fp_get_lh_add_sub_cc
private int fp_get_lh_add_sub_cc()return psw_cc for lh add/sub result fp_rbdv1 * and raise HFP sig, ovf, or unf exceptions- Returns:
- condition code
-
fp_get_lb_add_sub_cc
private int fp_get_lb_add_sub_cc()return psw_cc for lb add/sub result fp_rbdv1 and raise BFP sig, ovf, or unf exceptions- Returns:
- condition code
-
fp_get_dfp_add_sub_cc
private int fp_get_dfp_add_sub_cc()return psw_cc for bd add/sub result fp_rdv1 and raise sig, ovf, or unf exceptions- Returns:
- condition code
-
get_int_log_comp_cc
private int get_int_log_comp_cc(int int1, int int2) return psw_cc for integer logical compare- Parameters:
int1- operand1int2- operand2- Returns:
- condition code
-
get_long_log_comp_cc
private int get_long_log_comp_cc(long long1, long long2) return psw_cc for long logical compare- Parameters:
long1- operand1long2- operand2- Returns:
- condition code
-
fp_get_eb_from_eb
get float for EB from fp_reg or mem. If fp_reg then check for co-reg to avoid conversion.
Notes:- float is used to support EB only.
- EH is supported using double since exponent (4*0x7f) exceeds EB (0xff).
- Parameters:
fp_buff- byte bufferfp_index- index to input data- Returns:
- floating point number
-
fp_get_db_from_eh
get double from EH short hex in fp_reg or mem. If fp_reg, then check for double co-reg to avoid conversion.- Parameters:
fp_buff- byte bufferfp_index- index to input data- Returns:
- double floating point number
-
fp_get_db_from_eb
get double from EB short binary in fp_reg or mem. If fp_reg, then check for float co-reg to avoid conversion- Parameters:
fp_buff- buffer holding input datafp_index- ???- Returns:
- double floating point number
-
fp_get_db_from_db
get double from DB Long binary in fp_reg or mem. If fp_reg, then check for float co-reg to avoid conversion.- Parameters:
fp_buff- buffer holding input datafp_index- ???- Returns:
- double floating point number
-
fp_get_db_from_lh
get double from LH ext hex in fp_reg or mem. If fp_reg, then check for bd co-reg to avoid external conversion- Parameters:
fp_buff- buffer holding input datafp_index- ???- Returns:
- double floating point number
-
fp_add_unnorm_dh
private void fp_add_unnorm_dh()add unnormalized HFP DH fp_long1 = fp_long1 + fp_long2 and set psw_cc -
fp_add_unnorm_eh
private void fp_add_unnorm_eh()add unnormalized HFP DH fp_long1 = fp_long1 + fp_long2 and set psw=cc -
fp_mpy_unnorm_dh
private void fp_mpy_unnorm_dh()multiply fp_long2 and fp_long3 dh unnormalized and set fp_big_int1 and tz390.fp_exp and tz390.fp_sign high bit -
fp_add_bi_unnorm_dh
private void fp_add_bi_unnorm_dh()add LH at rf1 to fp_big_int1 unnormalized and update tz390.fp_sign high bit if change
Notes:- LH at rf1 stored in fp_big_int2 and fp_exp2 for add
-
fp_get_bi_unnorm_lh
private void fp_get_bi_unnorm_lh()set fp_big_int2, fp_exp2, fp_sign2 from rf1 LH -
fp_get_bi_unnorm_dh
private void fp_get_bi_unnorm_dh()set fp_big_int2, fp_exp2, fp_sign2 from rf1 DH -
fp_get_bd_sqrt
private void fp_get_bd_sqrt()set fp_rbdv1 to square root of fp_rbdv2
Notes:- Return 0 for 0 and issue data exception if negative.
- Scale number to within double range to calc estimate to 14 decimal places.
- Use Newton Rapson iteration to reduce error to fp_lxg_context limit.
-
fp_get_bd_from_lh
get big decimal from LH extended hex in fp_reg or mem. If fp_reg, then check for big dec co-reg to avoid conversion.- Parameters:
fp_buff- byte array holding input valuefp_index- address of input data in fp_buff- Returns:
- BigDecimal value
-
fp_get_bd_from_lb
get big decimal from LH extended binary in fp_reg or mem. If fp_reg, then check for big dec co-reg to avoid conversion.- Parameters:
fp_buff- byte array holding input valuefp_index- address of input data in fp_buff- Returns:
- BigDecimal value
-
fp_get_bd_from_ed
get big decimal from ED dpd short in fp_reg or mem 1. If fp_reg, then check for big dec co-reg to avoid conversion- Parameters:
fp_buff- byte array holding input valuefp_index- address of input data in fp_buff- Returns:
- BigDecimal value
-
fp_get_bd_from_dd
get big decimal from ED dpd long in fp_reg or mem 1. If fp_reg, then check for big dec co-reg to avoid conversion- Parameters:
fp_buff- byte array holding input valuefp_index- address of input data in fp_buff- Returns:
- BigDecimal value
-
fp_get_bd_from_ld
get big decimal from LD dpd extended in fp_reg or mem. If fp_reg, then check for big dec co-reg to avoid conversion.- Parameters:
fp_buff- byte array holding input valuefp_index- address of input data in fp_buff- Returns:
- BigDecimal value
-
fp_ctl_reg_to_eb
return float from fp_reg- Parameters:
fp_ctl_index- probably offset in fp register array (reg nr * 8)- Returns:
- float value
-
fp_ctl_reg_to_db
return double from fp_reg- Parameters:
fp_ctl_index- probably offset in fp register array (reg nr * 8)- Returns:
- float value
-
fp_ctl_reg_to_bd
return BigDecimal from fp_reg cache- Parameters:
fp_ctl_index- probably offset in fp register array (reg nr * 8)- Returns:
- BigDecimal value
-
fp_get_bd_from_dh
get big decimal from DH long hex in fp_reg or mem. If fp_reg, then check for big dec co-reg to avoid conversion.- Parameters:
fp_buff- buffer holding inout datafp_index- probably memory address or register number`- Returns:
- BigDecimal value
-
fp_get_bd_from_db
get big decimal from DB long bin in fp_reg or mem. If fp_reg, then check for big dec co-reg to avoid conversion.- Parameters:
fp_buff- buffer holding inout datafp_index- probably memory address or register number`- Returns:
- BigDecimal value
-
fp_copy_reg
private void fp_copy_reg(int index1, int index2) copy fp reg for LD or LXD RPI 816- Parameters:
index1- operand 1 register numberindex2- operand 2 register number
-
set_fpc_reg
private void set_fpc_reg(int fpc_reg) set fpc reg and bfp/dfp rounding for LFPC, LFAS, and SFASR
Notes:- LFAS and SFASR signalling not supported for now
- Parameters:
fpc_reg- ??
-
fp_get_bd_rnd_int
get bd rounded to integer from fp_bd_int_rnd[]
Notes:- For BFP - mode = 0-3
- For DFP - mode - 0-7
- Parameters:
fp_class- floating classrnd_mode- rounding mode- Returns:
- BigDecimal value
-
fp_get_rnd_mode
private int fp_get_rnd_mode(byte fp_class, int rnd_mode) return requested rounding mode 0-7 based on explicit rounding mode request- 0 - use default for fp_class
- 1 - use round near half nzero (bfp only)
- 4-7 - maps to 0-3 for bfp
- 8-15- maps to 0-8 for dfp
- Parameters:
fp_class- floating classrnd_mode- rounding mode- Returns:
- integer value
-
fp_get_bd_from_eb
get big decimal from DB long bin in fp_reg or mem. If fp_reg, then check for big dec co-reg to avoid conversion.- Parameters:
fp_buff- buffer holding input datafp_index- ???- Returns:
- BigDecimal value
-
fp_get_bd_from_eh
get big decimal from EH short hex in fp_reg or mem. If fp_reg, then check for big dec co-reg to avoid conversion.- Parameters:
fp_buff- buffer holding input datafp_index- ???- Returns:
- BigDecimal value
-
fp_put_eb
private void fp_put_eb(int fp_index, byte reg_type, float reg_value) store float co-reg as EB and set type
Notes:- Only tz390.fp_eb_type uses float co-reg due to exponent range exceeded for tz390.fp_eh_type
- Parameters:
fp_index- index (register number * 8)reg_type- register type codereg_value- value to store
-
fp_put_db
private void fp_put_db(int fp_index, byte reg_type, double reg_value) store db co-reg as EH, DH, or DB and set type (EH used double due to exponent range of float is too small.- Parameters:
fp_index- index (register number * 8)reg_type- register type codereg_value- value to store
-
fp_put_bd
store bd co-reg as DD, DH, LD, LH or LB and set type for reg pair- Parameters:
fp_index- index (register number * 8)reg_type- register type codereg_value- value to store
-
fp_load_reg
private void fp_load_reg(int reg_buff_index1, byte reg_type1, ByteBuffer reg_buff2, int reg_buff_index2, byte reg_type2) Load fp_ctl from fp_reg or fp_ctl Load fp_reg from memory with no conversion
Notes:- bd1/bd2 co-reg pair being partially replaced is discarded without conversion.
- This function is called recursively when two co-registers of different types are involved.
- Parameters:
reg_buff_index1- ??reg_type1- ??reg_buff2- ??reg_buff_index2- ??reg_type2- ??
-
fp_load_mem
private void fp_load_mem(ByteBuffer mem_buff, int reg_buff_index1, byte reg_type1, int mem_index2, byte mem_type2) load fp_reg memory without conversion- Parameters:
mem_buff- ??reg_buff_index1- ??reg_type1- ??mem_index2- ??mem_type2- ??
-
fp_load_ctl
private void fp_load_ctl(int fp_ctl_index1, byte reg_type1, int fp_ctl_type2, int fp_buff_index2, byte reg_type2) load fp control register from register memory or other fp control register- Parameters:
fp_ctl_index1- ??reg_type1- ??fp_ctl_type2- ??fp_buff_index2- ??reg_type2- ??
-
fp_load_ctl_from_ext_reg
private void fp_load_ctl_from_ext_reg(int fp_ctl_index1, byte reg_type1, ByteBuffer reg_buff2, int reg_buff_index2, byte reg_type2) load fp_ctl reg1 from fp_reg2 external format- Parameters:
fp_ctl_index1- ??reg_type1- ??reg_buff2- ??reg_buff_index2- ??reg_type2- ??
-
fp_reset_reg
private void fp_reset_reg(int reg_ctl_index, byte ctl_type, byte reg_type) reset register and co-reg to specified type- Parameters:
reg_ctl_index- ??ctl_type- ??reg_type- ??
-
fp_store_work_zero
private void fp_store_work_zero()store fp zero in tz390.fp_workreg -
fp_store_reg
convert co-reg back to fp_reg storage format for use by STE or STD. If byte buffer is not fp_reg, copy fp_reg to byte buffer if needed for use in non destructive trace out of regs.- Parameters:
reg_buff- register bufferreg_index- probably offset in reg_buff (register number * 8)
-
fp_ed_to_bd
convert ED format to big decimal- Parameters:
fp_buff- buffer with input datafp_index- offset of input data within fp_buff- Returns:
- BigDecimal value
-
fp_dd_to_bd
convert DD format to big decimal- Parameters:
fp_buff- buffer with input datafp_index- offset of input data within fp_buff- Returns:
- BigDecimal value
-
fp_ld_to_bd
convert LD format to big decimal- Parameters:
fp_buff- buffer with input datafp_index- offset of input data within fp_buff- Returns:
- BigDecimal value
-
fp_eh_reg_to_db
private double fp_eh_reg_to_db(int eh1) convert EH format to double- Parameters:
eh1- input value- Returns:
- double float value
-
fp_dh_to_bd
convert DH long hex format to BigDecimal in order to preserve 56 mantissa bits (double has 52)- Parameters:
dh1- input value- Returns:
- BigDecimal float value
-
align_db_first_bit
private void align_db_first_bit()shift right or left to align unnormailized mantissa to db normalized format where first bit is assumed. -
fp_db_to_eh
public int fp_db_to_eh(double db1) convert db float to eh int- Parameters:
db1- input data- Returns:
- integer value
-
fp_eh_to_bd
convert EH in fp_reg or mem to big_dec- Parameters:
eh1_buff- buffer holding input dataeh1_index- ??- Returns:
- BigDecimal float value
-
fp_lh_to_bd
convert LH in fp_reg or mem to big_dec
first copy 112 bit mantissa into 15 byte array with leading 0 byte and convert to bd1 big decimal with 128 bit precision- Parameters:
lh1_buff- buffer holding input datalh1_index- ??- Returns:
- BigDecimal float value
-
fp_lb_to_bd
convert LB in fp_reg or mem to big_dec
first get sign bit and 15 bit exponent- Parameters:
lb1_buff- buffer holding input datalb1_index- ??- Returns:
- BigDecimal float value
-
fp_bd_to_wreg
store DD, DH, ED, LB, LD, LH RPI 514, RPI 821 add DH format in 16 byte fp_work_reg from big decimal- Parameters:
fp_type- type codefp_bd- BigDecimal value
-
fp_bd_to_dh_wreg
convert fp_bd to dh format in work_reg binary format
calc tz390.fp_exp and big_dec2 such that: big_dec1 = big_dec2 * 2 ** tz390.fp_exp
tz390.fp_exp = log(big_dec1) / log(2)
Since the exponent of LH/LB values can exceed the range of double, the log of big_dec1 is calculated using equivalent form log(x*10*scale) = log(x_man) + scale * log(10)
tz390.fp_exp must then be offset by the number of bits in the required mantissa in order to retain significant bits when big_dec2 is converted to big_int format. The exponent is also reduced by 1 for assumed bit in binary formats plus 1 additional to insure rounding for irrational values is done by shifting right.- Parameters:
fp_bd- BigDecimal value
-
fp_bd_to_lx_wreg
convert fp_bd to lh/lb format based ib fp_type in work_reg binary format
calc tz390.fp_exp and big_dec2 such that: * big_dec1 = big_dec2 * 2 ** tz390.fp_exp
tz390.fp_exp = log(big_dec1) / log(2)
Since the exponent of LH/LB values can exceed the range of double, the log of big_dec1 is calculated using equivalent form log(x*10*scale) = log(x_man) + scale * log(10)
tz390.fp_exp must then be offset by the number of bits in the required mantissa in order to retain significant bits when big_dec2 is converted to big_int format. The exponent is also reduced by 1 for assumed bit in binary formats plus 1 additional to insure rounding for irrational values is done by shifting right.- Parameters:
fp_type- floating point type codefp_bd- BigDecimal input value
-
fp_put_bi_to_lh_wreg
private void fp_put_bi_to_lh_wreg()store tz390 fp_big_int1 with tz390.fp_exp and tz390.fp_sign high bit in tz390 fp_work_reg in LH format -
exec_ed_edmk
private void exec_ed_edmk(boolean edmk_store) execute ED or EDMK with store into r1
Notes:- mask must be EBCDIC in both modes
- output translated to ASCII if ascii mode
- Parameters:
edmk_store- boolean to indicate whether or not to store into R1
-
exec_ex
private void exec_ex(int target_addr, int ilc) share code for EX and EXRL- Parameters:
target_addr- target addressilc- instruction length code
-
get_pdf_ints
public boolean get_pdf_ints()- Return true if ok else false.
- Set pdf_is_big to true or false and set pdf_big_int1 and pdf_big_int2 or pdf_long1 and pdf_long2
- Set pdf_leftmost_zeros to 1st operand number of leftmost zeros.
- Returns:
- true if successful, false otherwise
-
get_pd
Convert pd field to BigInt or Long in pdf_big_int or pdf_long.
Notes:- Set true if ok
- Set pd_cc
- 0 = ok
- 1 = sign invalid
- 2 = digit invalid
- Raise 0C7 if not TP opcode
- If pdf_signed = false, return positive value including low digit
- if pdf_signed = true and pdf_ignore_sign = true then ignore sign and set positive
- Add support for up to 34 digits using 3 segments (16+16+2)
- Calculate number of leftmost zeros RPI 2013
- Parameters:
pd_buff- byte buffer holding packed decimal input datapdf_loc- location of pd field within pd_buffpdf_len- length of pd field- Returns:
- true if successful, false otherwise
-
put_pd
private void put_pd(byte[] pd_stor, int pdf_loc, int pdf_len) if pdf_is_big store pdf_big_int value into pd field and set pd_cc else store pdf_long into pdf field and set pd_cc.
Notes:- If pdf_signed is false store unsigned value with low order digit in low nibble, and do not set psw_cc.
- If pdf_trunc, truncate to fit else raise pgm exception.
- Parameters:
pd_stor- byte array to store intopdf_loc- location in pd_stor where to storepdf_len- pdf_len length of area to store into
-
ex_restore
private void ex_restore()restore ex target instruction 2nd byte -
bytes_to_hex
Format bytes into hex string- Parameters:
bytes- byte array holding input databyte_start- address of data to convertbyte_length- length of data to convertchunk- size of each chunk in the output string- Returns:
- string of hexadecimal digits
-
init_pz390
init tz390- Parameters:
shared_tz390- shared tz390 objectshared_sz390- shared sz390 object
-
init_gpr
private void init_gpr()init gpr regs to x'F4' -
init_ar
private void init_ar()init ar regs to x'F4' -
init_fpr
private void init_fpr()init fpr regs to x'F5'
init fp constants that use tz390 shared variables -
init_opcode_keys
private void init_opcode_keys()add all opcodes to key index table for use by trace and test options
Notes:- Verify tz390 and ptz390 trace type tables match
- trace and test do lookup by hex for display
- test break on opcode does lookup by name to get hex code for break
- op_type_index is used by test break on opcode to get opcode2 offset and mask
-
init_mem
private void init_mem()allocate memory and initialize as follows:- Set cvt pointer at 16
- Set zcvt_ipl_pgm to name of opt_ipl pgm name if any to run via link svc 6
- Set zcvt_user_pgm to name of user initial program to run via link svc
- Set mem_fqe_ptr to point to free queue with all of available memory for use by svc 4 getmain and svc 5 freemain
- MEM(MB) defaults to 1 MB but can be set to any value up to available memory on machine. See TEST\TESTMEM1 for test of ABOVE/BELOW GETMAIN using MEM(32) to allocate 16MB below and 16 MB above
- If less than 16 MB allocated 31 bit fqe is set to 0 and RMODE31 requests use memory below the line
- Add 16 bytes to physical mem_byte array allocated to allow get_pd to fetch 16 bytes from last byte in memory for 1-8 byte packed decimal field
- The default J2RE maximum memory available is limited by default to small fraction of total memory to prevent stalling OS or other J2RE applications running. To override default set -Xmx option at startup of J2RE. For example, add -Xmx500000000 to z390.bat to allow allocating up to 500 MB but don't allocate all of it or other J2RE application such as IE may stall or abort.
-
trace_ins
private void trace_ins()trace instruction based on opcode_type -
get_long_xbd2
private long get_long_xbd2()return long from mem.getLong(xbd2_loc) else return -1 and avoid trap for LA etc.- Returns:
- long value
-
rsbg_setup_and_rotate
private void rsbg_setup_and_rotate()set flags, masks, and rotate -
risb_rotate_insert_high
private void risb_rotate_insert_high(boolean high) rotate and insert in high or low 32 bits with optional zeros for non select bits- Parameters:
high- indicates high or low half of register
-
long_rotate_left
private long long_rotate_left(long value, int n) rotate long n bits left (0-63)- Parameters:
value- value to be rotatedn- shift amount in bits- Returns:
- long result value
-
long_rotate_right
private long long_rotate_right(long value, int n) rotate long right n bits 0-83- Parameters:
value- value to be rotatedn- shift amount in bits- Returns:
- long result value
-
int_rotate_left
private int int_rotate_left(int value, int n) rotate int n bits left (0-31)- Parameters:
value- value to be rotatedn- shift amount in bits- Returns:
- integer result value
-
exec_pfpo
private void exec_pfpo()perform floating point operation- If r0 bit 32 is on, check if function supported and set r1 rc = 0 else r1 = 3
- if r0 bit 32 zero, perform
floating point function:
- bits 33-39 = operation x'01' = convert radix (FP0+2 = FP4+6)
- bits 40-47 = first operand type
- bits 48-55 = second operand type
- bit 56 = inexact suppression control
- bit 57 = alternate exception action control
- bits 58-59 = target radix dependent controls
- bits 60-63 = rounding method
-
set_risb_zero
private void set_risb_zero()set risb_zero true if r4 high bit on (bit 24) -
set_bfp_alt_mode_rr
private void set_bfp_alt_mode_rr()route for rre/rrf op type A instr set alt fp_bfp_rnd if not 0 and issue S0c4 if alt_fpe_mode for now -
reset_bfp_alt_mode
private void reset_bfp_alt_mode()rtn for rre/rrf op type A instr. -
set_dfp_alt_mode_rr
private void set_dfp_alt_mode_rr()route for rre/rrf op type A instr set alt fp_dfp_rnd if not 0 and issue S0c4 if alt_fpe_mode for now -
set_dfp_alt_mode_rrr
private void set_dfp_alt_mode_rrr()route for rrr op type A instr set alt fp_dfp_rnd if not 0 and issue S0c4 if alt_fpe_mode for now -
reset_dfp_alt_mode
private void reset_dfp_alt_mode()rtn for rrr op type A instr.
-