Class pz390


public class pz390 extends Object
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 Details

    • max_pc_stk

      int max_pc_stk
      variable
    • max_reg_off

      int max_reg_off
      variable
    • tz390

      tz390 tz390
      variable
    • sz390

      sz390 sz390
      variable
    • cur_date

      Date cur_date
      variable
    • ibm_mil

      long ibm_mil
      variable
    • java_mil

      long java_mil
      variable
    • ibm_ms

      long ibm_ms
      variable
    • test_trace_count

      int test_trace_count
      variable
    • trace_psw

      boolean trace_psw
      variable
    • ins_trace_line

      String ins_trace_line
      variable
    • cpu_id

      long cpu_id
      variable
    • psw_loc

      int psw_loc
      variable
    • psw_problem_state

      boolean psw_problem_state
      variable
    • psw_problem_mode

      boolean psw_problem_mode
      variable
    • psw_supervisor_mode

      boolean psw_supervisor_mode
      variable
    • psw_short

      int psw_short
      variable
    • ins_short0

      short ins_short0
      variable
    • ins_short1

      short ins_short1
      variable
    • ins_short2

      short ins_short2
      variable
    • long_high_bit

      long long_high_bit
      variable
    • int_high_bit

      int int_high_bit
      variable
    • max_pos_int

      int max_pos_int
      variable
    • min_neg_int

      int min_neg_int
      variable
    • max_pos_long

      long max_pos_long
      variable
    • min_neg_long

      long min_neg_long
      variable
    • max_srp_long

      long max_srp_long
      variable
    • min_srp_long

      long min_srp_long
      variable
    • bi_max_pos_long

      BigInteger bi_max_pos_long
      variable
    • bd_max_pos_long

      BigDecimal bd_max_pos_long
      variable
    • bd_min_neg_long

      BigDecimal bd_min_neg_long
      variable
    • bd_max_log_long

      BigDecimal bd_max_log_long
      variable
    • bi_min_neg_long

      BigInteger bi_min_neg_long
      variable
    • bi_max_pos_int

      BigInteger bi_max_pos_int
      variable
    • bi_min_neg_int

      BigInteger bi_min_neg_int
      variable
    • long_num_bits

      long long_num_bits
      variable
    • long_low32_bits

      long long_low32_bits
      variable
    • long_low48_bits

      long long_low48_bits
      variable
    • long_high32_bits

      long long_high32_bits
      variable
    • long_sign_bits

      long long_sign_bits
      variable
    • long_zone_ones

      long long_zone_ones
      variable
    • long_num_ones

      long long_num_ones
      variable
    • psw_amode24

      int psw_amode24
      variable
    • psw_amode31

      int psw_amode31
      variable
    • psw_amode64

      int psw_amode64
      variable
    • psw_amode

      int psw_amode
      variable
    • psw_amode24_high_bits

      int psw_amode24_high_bits
      variable
    • psw_amode31_high_bits

      int psw_amode31_high_bits
      variable
    • psw_amode_high_bits

      int psw_amode_high_bits
      variable
    • psw_amode24_bit

      int psw_amode24_bit
      variable
    • psw_amode31_bit

      int psw_amode31_bit
      variable
    • psw_amode_bit

      int psw_amode_bit
      variable
    • psw_extended_amode64_bit

      int psw_extended_amode64_bit
      variable
    • psw_extended_amode64_on

      int psw_extended_amode64_on
      variable
    • psw_extended_amode64_off

      int psw_extended_amode64_off
      variable
    • psw_extended_amode_bit

      int psw_extended_amode_bit
      variable
    • cur_stck

      long cur_stck
      variable
    • last_stck

      long last_stck
      variable
    • psw_cc0

      int psw_cc0
      variable
    • psw_cc1

      int psw_cc1
      variable
    • psw_cc2

      int psw_cc2
      variable
    • psw_cc3

      int psw_cc3
      variable
    • psw_cc_code

      int[] psw_cc_code
      variable
    • psw_cc_mask

      int[] psw_cc_mask
      variable
    • psw_cc_equal

      int psw_cc_equal
      variable
    • psw_cc_low

      int psw_cc_low
      variable
    • psw_cc_high

      int psw_cc_high
      variable
    • psw_cc_ovf

      int psw_cc_ovf
      variable
    • psw_cc

      int psw_cc
      variable
    • psw_pgm_mask_fix

      int psw_pgm_mask_fix
      variable
    • psw_pgm_mask_dec

      int psw_pgm_mask_dec
      variable
    • psw_pgm_mask_exp

      int psw_pgm_mask_exp
      variable
    • psw_pgm_mask_sig

      int psw_pgm_mask_sig
      variable
    • psw_pgm_mask

      int psw_pgm_mask
      variable
    • max_trace_table

      byte max_trace_table
      variable
    • trace_table_index

      byte trace_table_index
      variable
    • trace_table_addr

      int[] trace_table_addr
      variable
    • trace_table_next

      byte[] trace_table_next
      variable
    • fp_fpc_mask_inv

      int fp_fpc_mask_inv
      variable
    • fp_fpc_mask_div

      int fp_fpc_mask_div
      variable
    • fp_fpc_mask_ovf

      int fp_fpc_mask_ovf
      variable
    • fp_fpc_mask_unf

      int fp_fpc_mask_unf
      variable
    • fp_fpc_mask_sig

      int fp_fpc_mask_sig
      variable
    • fp_dd_mod_bi

      BigInteger fp_dd_mod_bi
      variable
    • fp_ld_mod_bi

      BigInteger fp_ld_mod_bi
      variable
    • alt_rnd_mode

      int alt_rnd_mode
      variable
    • alt_fpe_mode

      int alt_fpe_mode
      variable
    • fp_bfp_rnd_mask

      int fp_bfp_rnd_mask
      variable
    • fp_bfp_rnd_not

      int fp_bfp_rnd_not
      variable
    • fp_bfp_rnd_even

      int fp_bfp_rnd_even
      variable
    • fp_bfp_rnd_zero

      int fp_bfp_rnd_zero
      variable
    • fp_bfp_rnd_pi

      int fp_bfp_rnd_pi
      variable
    • fp_bfp_rnd_ni

      int fp_bfp_rnd_ni
      variable
    • fp_bfp_rnd

      int fp_bfp_rnd
      variable
    • fp_bfp_rnd_default

      int fp_bfp_rnd_default
      variable
    • fp_dfp_rnd_mask

      int fp_dfp_rnd_mask
      variable
    • fp_dfp_rnd_not

      int fp_dfp_rnd_not
      variable
    • fp_rnd_near_even

      int fp_rnd_near_even
      variable
    • fp_rnd_zero

      int fp_rnd_zero
      variable
    • fp_rnd_pi

      int fp_rnd_pi
      variable
    • fp_rnd_ni

      int fp_rnd_ni
      variable
    • fp_rnd_near_nzero

      int fp_rnd_near_nzero
      variable
    • fp_rnd_near_zero

      int fp_rnd_near_zero
      variable
    • fp_rnd_nzero

      int fp_rnd_nzero
      variable
    • fp_rnd_shorter

      int fp_rnd_shorter
      variable
    • fp_sig_req

      int fp_sig_req
      variable
    • fp_sig_dig

      int fp_sig_dig
      variable
    • fp_dfp_rnd

      int fp_dfp_rnd
      variable
    • fp_dfp_rnd_default

      int fp_dfp_rnd_default
      variable
    • fp_fpc_reg

      int fp_fpc_reg
      variable
    • fp_dxc_dec

      int fp_dxc_dec
      variable
    • fp_dxc_it

      int fp_dxc_it
      variable
    • fp_dxc_ii

      int fp_dxc_ii
      variable
    • fp_dxc_ue

      int fp_dxc_ue
      variable
    • fp_dxc_uit

      int fp_dxc_uit
      variable
    • fp_dxc_uii

      int fp_dxc_uii
      variable
    • fp_dxc_oe

      int fp_dxc_oe
      variable
    • fp_dxc_oit

      int fp_dxc_oit
      variable
    • fp_dxc_oii

      int fp_dxc_oii
      variable
    • fp_dxc_div

      int fp_dxc_div
      variable
    • fp_dxc_oper

      int fp_dxc_oper
      variable
    • fp_dxc_trap

      int fp_dxc_trap
      variable
    • fp_dxc

      int fp_dxc
      variable
    • fp_dfp_digits

      String fp_dfp_digits
      variable
    • ast_xdump_addr

      int ast_xdump_addr
      variable
    • ast_xdump_len

      int ast_xdump_len
      variable
    • ast_xread_tiot

      int ast_xread_tiot
      variable
    • ast_xprnt_tiot

      int ast_xprnt_tiot
      variable
    • ast_xpnch_tiot

      int ast_xpnch_tiot
      variable
    • ast_xget_tiot

      int ast_xget_tiot
      variable
    • ast_xput_tiot

      int ast_xput_tiot
      variable
    • ast_xread_dcb

      int ast_xread_dcb
      variable
    • ast_xprnt_dcb

      int ast_xprnt_dcb
      variable
    • ast_xpnch_dcb

      int ast_xpnch_dcb
      variable
    • ast_xget_dcb

      int ast_xget_dcb
      variable
    • ast_xput_dcb

      int ast_xput_dcb
      variable
    • ast_file_line

      String ast_file_line
      variable
    • psw_check

      boolean psw_check
      variable
    • psw_abend

      boolean psw_abend
      variable
    • fp_signal

      boolean fp_signal
      variable
    • psw_pic_exit

      int psw_pic_exit
      variable
    • psw_pic_io

      int psw_pic_io
      variable
    • psw_pic_oper

      int psw_pic_oper
      variable
    • psw_pic_priv

      int psw_pic_priv
      variable
    • psw_pic_exec

      int psw_pic_exec
      variable
    • psw_pic_prot

      int psw_pic_prot
      variable
    • psw_pic_addr

      int psw_pic_addr
      variable
    • psw_pic_spec

      int psw_pic_spec
      variable
    • psw_pic_data

      int psw_pic_data
      variable
    • psw_pic_fx_ovf

      int psw_pic_fx_ovf
      variable
    • psw_pic_fx_div

      int psw_pic_fx_div
      variable
    • psw_pic_pd_ovf

      int psw_pic_pd_ovf
      variable
    • psw_pic_pd_div

      int psw_pic_pd_div
      variable
    • psw_pic_fp_ovf

      int psw_pic_fp_ovf
      variable
    • psw_pic_fp_unf

      int psw_pic_fp_unf
      variable
    • psw_pic_fp_sig

      int psw_pic_fp_sig
      variable
    • psw_pic_fp_div

      int psw_pic_fp_div
      variable
    • psw_pic_spec_op

      int psw_pic_spec_op
      variable
    • psw_pic_timeout

      int psw_pic_timeout
      variable
    • psw_pic_gm_err

      int psw_pic_gm_err
      variable
    • psw_pic_no_mem

      int psw_pic_no_mem
      variable
    • psw_pic_fm_err

      int psw_pic_fm_err
      variable
    • psw_pic_bad_mem

      int psw_pic_bad_mem
      variable
    • psw_pic_stkerr

      int psw_pic_stkerr
      variable
    • psw_pic_operr

      int psw_pic_operr
      variable
    • psw_pic_interr

      int psw_pic_interr
      variable
    • psw_pic_memerr

      int psw_pic_memerr
      variable
    • psw_pic_waiterr

      int psw_pic_waiterr
      variable
    • psw_pic_error

      int psw_pic_error
      variable
    • psw_pic

      int psw_pic
      variable
    • psw_carry

      int[] psw_carry
      variable
    • psw_borrow

      int[] psw_borrow
      variable
    • psw_ins_len

      byte psw_ins_len
      variable
    • last_psw_ins_len

      byte last_psw_ins_len
      variable
    • opcode1

      int opcode1
      variable
    • opcode2

      int opcode2
      variable
    • opcode_clc

      int opcode_clc
      variable
    • opcode_srp

      int opcode_srp
      variable
    • opcode2_offset_e

      int opcode2_offset_e
      variable
    • opcode2_offset_ri

      int opcode2_offset_ri
      variable
    • opcode2_offset_rie

      int opcode2_offset_rie
      variable
    • opcode2_offset_ril

      int opcode2_offset_ril
      variable
    • opcode2_offset_rrf

      int opcode2_offset_rrf
      variable
    • opcode2_offset_rre

      int opcode2_offset_rre
      variable
    • opcode2_offset_rsl

      int opcode2_offset_rsl
      variable
    • opcode2_offset_rsy

      int opcode2_offset_rsy
      variable
    • opcode2_offset_rxf

      int opcode2_offset_rxf
      variable
    • opcode2_offset_rxe

      int opcode2_offset_rxe
      variable
    • opcode2_offset_rxy

      int opcode2_offset_rxy
      variable
    • opcode2_offset_s

      int opcode2_offset_s
      variable
    • opcode2_offset_siy

      int opcode2_offset_siy
      variable
    • opcode2_offset_sse

      int opcode2_offset_sse
      variable
    • opcode2_offset_ssf

      int opcode2_offset_ssf
      variable
    • opcode2_offset_vqst

      int opcode2_offset_vqst
      variable
    • opcode2_offset_vqv

      int opcode2_offset_vqv
      variable
    • opcode2_offset_vst

      int opcode2_offset_vst
      variable
    • opcode2_offset_vv

      int opcode2_offset_vv
      variable
    • opcode2_offset_vrre

      int opcode2_offset_vrre
      variable
    • opcode2_offset_vrse

      int opcode2_offset_vrse
      variable
    • opcode2_offset_vrx

      int opcode2_offset_vrx
      variable
    • opcode2_offset_vs

      int opcode2_offset_vs
      variable
    • opcode2_offset_vvr

      int opcode2_offset_vvr
      variable
    • opcode2_offset_vvs

      int opcode2_offset_vvs
      variable
    • dup_opcodes

      int dup_opcodes
      variable
    • max_espie

      int max_espie
      variable
    • tot_espie

      int tot_espie
      variable
    • espie_psw_cc

      int espie_psw_cc
      variable
    • espie_psw_amode

      int espie_psw_amode
      variable
    • espie_psw_amode_bit

      int espie_psw_amode_bit
      variable
    • espie_last_ins_cnt

      long espie_last_ins_cnt
      variable
    • espie_exit_running

      boolean espie_exit_running
      variable
    • espie_pie

      int[] espie_pie
      variable
    • espie_exit

      int[] espie_exit
      variable
    • espie_parm

      int[] espie_parm
      variable
    • max_estae

      int max_estae
      variable
    • tot_estae

      int tot_estae
      variable
    • estae_psw_cc

      int estae_psw_cc
      variable
    • estae_psw_amode

      int estae_psw_amode
      variable
    • estae_psw_amode_bit

      int estae_psw_amode_bit
      variable
    • estae_last_ins_cnt

      long estae_last_ins_cnt
      variable
    • estae_exit_running

      boolean estae_exit_running
      variable
    • estae_exit

      int[] estae_exit
      variable
    • estae_parm

      int[] estae_parm
      variable
    • if1

      int if1
      variable
    • if2

      int if2
      variable
    • if3

      int if3
      variable
    • if4

      int if4
      variable
    • if5

      int if5
      variable
    • sv1

      int sv1
      variable
    • rflen

      int rflen
      variable
    • rflen1

      int rflen1
      variable
    • rflen2

      int rflen2
      variable
    • rf1

      int rf1
      variable
    • rf2

      int rf2
      variable
    • rf3

      int rf3
      variable
    • mf1

      int mf1
      variable
    • mf2

      int mf2
      variable
    • mf3

      int mf3
      variable
    • mf4

      int mf4
      variable
    • mask_bits

      int[] mask_bits
      variable
    • rv1

      int rv1
      variable
    • rv2

      int rv2
      variable
    • rv3

      int rv3
      variable
    • rvw

      int rvw
      variable
    • rlv1

      long rlv1
      variable
    • rlv2

      long rlv2
      variable
    • rlv3

      long rlv3
      variable
    • rlvw

      long rlvw
      variable
    • bf1

      int bf1
      variable
    • df1

      int df1
      variable
    • xf1

      int xf1
      variable
    • xf2

      int xf2
      variable
    • bf2

      int bf2
      variable
    • df2

      int df2
      variable
    • bf3

      int bf3
      variable
    • df3

      int df3
      variable
    • bd3_loc

      int bd3_loc
      variable
    • bd1_loc

      int bd1_loc
      variable
    • bd2_loc

      int bd2_loc
      variable
    • bf4

      int bf4
      variable
    • df4

      int df4
      variable
    • bd4_loc

      int bd4_loc
      variable
    • bd1_start

      int bd1_start
      variable
    • bd2_start

      int bd2_start
      variable
    • xbd2_loc

      int xbd2_loc
      variable
    • xbd1_loc

      int xbd1_loc
      variable
    • bd1_end

      int bd1_end
      variable
    • string_eod

      byte string_eod
      variable
    • test_control

      byte test_control
      variable
    • test_byte1

      byte test_byte1
      variable
    • test_byte2

      byte test_byte2
      variable
    • function_byte1

      byte function_byte1
      variable
    • function_byte2

      byte function_byte2
      variable
    • string_eod_found

      boolean string_eod_found
      variable
    • fields_equal

      boolean fields_equal
      variable
    • bd2_end

      int bd2_end
      variable
    • data_len

      int data_len
      variable
    • pad_len

      int pad_len
      variable
    • fill_char

      byte fill_char
      variable
    • fill_mem_char

      byte fill_mem_char
      variable
    • fill_reg_char

      byte fill_reg_char
      variable
    • ex_mode

      boolean ex_mode
      variable
    • ex_opcode1

      int ex_opcode1
      variable
    • exrl_opcode1

      int exrl_opcode1
      variable
    • exrl_opcode2

      int exrl_opcode2
      variable
    • ex_mod_byte

      byte ex_mod_byte
      variable
    • ex_psw_return

      int ex_psw_return
      variable
    • ex_psw_ilc

      int ex_psw_ilc
      variable
    • pd_bytes

      byte[] pd_bytes
      variable
    • pd_byte

      ByteBuffer pd_byte
      variable
    • zone_bytes

      byte[] zone_bytes
      variable
    • zone_byte_zone

      byte zone_byte_zone
      variable
    • zone_len

      int zone_len
      variable
    • zone_index

      int zone_index
      variable
    • zone_sign_zero

      boolean zone_sign_zero
      variable
    • pdf_str

      String pdf_str
      variable
    • pdf_str_len

      int pdf_str_len
      variable
    • pdf_zeros

      int pdf_zeros
      variable
    • pdf_leftmost_zeros

      int pdf_leftmost_zeros
      variable
    • pdf_leftmost_zeros1

      int pdf_leftmost_zeros1
      variable
    • pdf_sign

      char pdf_sign
      variable
    • pdf_trunc

      boolean pdf_trunc
      variable
    • pdf_zone

      int pdf_zone
      variable
    • pdf_next_out

      byte pdf_next_out
      variable
    • pdf_next_in

      byte pdf_next_in
      variable
    • pdf_next_right

      boolean pdf_next_right
      variable
    • big_int

      BigInteger big_int
      variable
    • big_int1

      BigInteger big_int1
      variable
    • big_int2

      BigInteger big_int2
      variable
    • pdf_is_big

      boolean pdf_is_big
      variable
    • pdf_signed

      boolean pdf_signed
      variable
    • pdf_ignore_sign

      boolean pdf_ignore_sign
      variable
    • pdf_big_int

      BigInteger pdf_big_int
      variable
    • pdf_big_int1

      BigInteger pdf_big_int1
      variable
    • pdf_big_int2

      BigInteger pdf_big_int2
      variable
    • pdf_long

      long pdf_long
      variable
    • pdf_long1

      long pdf_long1
      variable
    • pdf_long2

      long pdf_long2
      variable
    • big_int_array

      BigInteger[] big_int_array
      variable
    • pd_cc

      int pd_cc
      variable
    • rsbg_test

      boolean rsbg_test
      variable
    • rsbg_zero

      boolean rsbg_zero
      variable
    • rsbg_mask_zeros

      long rsbg_mask_zeros
      variable
    • rsbg_mask_ones

      long rsbg_mask_ones
      variable
    • risb_zero

      boolean risb_zero
      variable
    • risb_mask_zeros

      int risb_mask_zeros
      variable
    • risb_mask_ones

      int risb_mask_ones
      variable
    • reg_byte

      byte[] reg_byte
      variable
    • reg

      variable
    • reg_len

      int reg_len
      variable
    • work_reg_byte

      byte[] work_reg_byte
      variable
    • work_reg

      ByteBuffer work_reg
      variable
    • log_reg_byte

      byte[] log_reg_byte
      variable
    • log_reg

      ByteBuffer log_reg
      variable
    • r0

      int r0
      variable
    • r1

      int r1
      variable
    • r2

      int r2
      variable
    • r3

      int r3
      variable
    • r4

      int r4
      variable
    • r5

      int r5
      variable
    • r6

      int r6
      variable
    • r7

      int r7
      variable
    • r8

      int r8
      variable
    • r9

      int r9
      variable
    • r10

      int r10
      variable
    • r11

      int r11
      variable
    • r12

      int r12
      variable
    • r13

      int r13
      variable
    • r14

      int r14
      variable
    • r15

      int r15
      variable
    • fp_reg_byte

      byte[] fp_reg_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:
      1. LE and LD set fp_reg with fp_ctl_ld
      2. STE and STD store from fp_reg or co_reg
      3. fp_reg is indexed by reg * 8 byte index
      4. fp_ctl and co-regs are indexed by reg #
    • fp_reg

      ByteBuffer fp_reg
      variable
    • trace_reg_byte

      byte[] trace_reg_byte
      variable
    • trace_reg

      ByteBuffer trace_reg
      variable
    • fp_ctl_ld

      byte fp_ctl_ld
      variable
    • fp_ctl_eb

      byte fp_ctl_eb
      variable
    • fp_ctl_db

      byte fp_ctl_db
      variable
    • fp_ctl_bd1

      byte fp_ctl_bd1
      variable
    • fp_ctl_bd2

      byte fp_ctl_bd2
      variable
    • fp_reg_type

      byte[] fp_reg_type
      variable
    • fp_reg_ctl

      byte[] fp_reg_ctl
      variable
    • fp_reg_eb

      float[] fp_reg_eb
      variable
    • fp_reg_db

      double[] fp_reg_db
      variable
    • fp_reg_bd

      BigDecimal[] fp_reg_bd
      variable
    • work_fp_reg_byte

      byte[] work_fp_reg_byte
      variable
    • work_fp_reg

      ByteBuffer work_fp_reg
      variable
    • fp_pair_type

      boolean[] fp_pair_type
      variable
    • fp_pair_valid

      boolean[] fp_pair_valid
      variable
    • ar_reg_byte

      byte[] ar_reg_byte
      variable
    • ar_reg

      ByteBuffer ar_reg
      variable
    • ar_reg_len

      int ar_reg_len
      variable
    • lrv1

      long lrv1
      variable
    • fp_rev1

      float fp_rev1
      variable
    • fp_rev2

      float fp_rev2
      variable
    • fp_rdv1

      double fp_rdv1
      variable
    • fp_rdv2

      double fp_rdv2
      variable
    • fp_rdv3

      double fp_rdv3
      variable
    • fp_rdv4

      double fp_rdv4
      variable
    • fp_rbdv1

      BigDecimal fp_rbdv1
      variable
    • fp_rbdv2

      BigDecimal fp_rbdv2
      variable
    • fp_rbdv3

      BigDecimal fp_rbdv3
      variable
    • fp_bd_half

      BigDecimal fp_bd_half
      variable
    • fp_bd_two

      BigDecimal fp_bd_two
      variable
    • fp_bd_int_rem

      BigDecimal[] fp_bd_int_rem
      variable
    • fp_bd_inc

      BigDecimal fp_bd_inc
      variable
    • fp_bd_sqrt_scale

      int fp_bd_sqrt_scale
      variable
    • work_fp_bi1_bytes

      byte[] work_fp_bi1_bytes
      variable
    • work_fp_bi1

      BigInteger work_fp_bi1
      variable
    • work_fp_bd1

      BigDecimal work_fp_bd1
      variable
    • work_fp_bd2

      BigDecimal work_fp_bd2
      variable
    • long_dh_zero

      long long_dh_zero
      variable
    • long_dh_exp_bits

      long long_dh_exp_bits
      variable
    • long_dh_man_bits

      long long_dh_man_bits
      variable
    • fp_round

      int fp_round
      variable
    • long_work

      long long_work
      variable
    • long_sign

      long long_sign
      variable
    • long_exp

      long long_exp
      variable
    • long_man

      long long_man
      variable
    • long_db_exp_bits

      long long_db_exp_bits
      variable
    • long_db_one_bits

      long long_db_one_bits
      variable
    • long_db_one_bit

      long long_db_one_bit
      variable
    • long_db_man_bits

      long long_db_man_bits
      variable
    • int_eh_exp_bits

      int int_eh_exp_bits
      variable
    • int_eh_zero

      int int_eh_zero
      variable
    • int_work

      int int_work
      variable
    • int_man

      int int_man
      variable
    • int_eh_man_bits

      int int_eh_man_bits
      variable
    • fp_dhg_context

      MathContext fp_dhg_context
      variable
    • fp_lxg_context

      MathContext fp_lxg_context
      variable
    • fp_dbg_context

      MathContext fp_dbg_context
      variable
    • fp_ebg_context

      MathContext fp_ebg_context
      variable
    • fp_dh_context

      MathContext fp_dh_context
      variable
    • fp_lh_context

      MathContext fp_lh_context
      variable
    • fp_ld_context

      MathContext fp_ld_context
      variable
    • fp_bfp_rnd_mode

      RoundingMode[] fp_bfp_rnd_mode
      RPI 1125 use array for BFP context
    • fp_db_rnd_context

      MathContext[] fp_db_rnd_context
      variable
    • fp_eb_rnd_context

      MathContext[] fp_eb_rnd_context
      variable
    • fp_lb_rnd_context

      MathContext[] fp_lb_rnd_context
      variable
    • fp_hfp_class

      byte fp_hfp_class
      variable
    • fp_bfp_class

      byte fp_bfp_class
      variable
    • fp_dfp_class

      byte fp_dfp_class
      variable
    • fp_dfp_rnd_mode

      RoundingMode[] fp_dfp_rnd_mode
      variable
    • fp_dd_rnd_context

      MathContext[] fp_dd_rnd_context
      variable
    • fp_ed_rnd_context

      MathContext[] fp_ed_rnd_context
      variable
    • fp_ld_rnd_context

      MathContext[] fp_ld_rnd_context
      variable
    • fp_dh_rnd_context

      MathContext[] fp_dh_rnd_context
      variable
    • fp_log2

      double fp_log2
      variable
    • fp_log10

      double fp_log10
      variable
    • fp_bd

      BigDecimal fp_bd
      variable
    • fp_big_dec2

      BigDecimal fp_big_dec2
      variable
    • fp_big_dec3

      BigDecimal fp_big_dec3
      variable
    • fp_big_int1

      BigInteger fp_big_int1
      variable
    • fp_big_int2

      BigInteger fp_big_int2
      variable
    • fp_big_int_one_bits

      BigInteger fp_big_int_one_bits
      variable
    • fp_big_int_lx_man_bits

      BigInteger fp_big_int_lx_man_bits
      variable
    • fp_big_int_dh_man_bits

      BigInteger fp_big_int_dh_man_bits
      variable
    • fp_int1

      int fp_int1
      variable
    • fp_int2

      int fp_int2
      variable
    • fp_int_eb_one_bits

      int fp_int_eb_one_bits
      variable
    • fp_int_eb_man_bits

      int fp_int_eb_man_bits
      variable
    • fp_int_eh_man_bits

      int fp_int_eh_man_bits
      variable
    • fp_long1

      long fp_long1
      variable
    • fp_long2

      long fp_long2
      variable
    • fp_long3

      long fp_long3
      variable
    • fp_exp1

      byte fp_exp1
      variable
    • fp_exp2

      byte fp_exp2
      variable
    • fp_exp3

      byte fp_exp3
      variable
    • fp_sign1

      byte fp_sign1
      variable
    • fp_sign2

      byte fp_sign2
      variable
    • fp_sign3

      byte fp_sign3
      variable
    • fp_long_db_one_bits

      long fp_long_db_one_bits
      variable
    • fp_long_db_man_bits

      long fp_long_db_man_bits
      variable
    • fp_long_dh_man_bits

      long fp_long_dh_man_bits
      variable
    • fp_eb_pos_inf

      int fp_eb_pos_inf
      variable
    • fp_eb_neg_inf

      int fp_eb_neg_inf
      variable
    • fp_db_pos_inf

      long fp_db_pos_inf
      variable
    • fp_db_neg_inf

      long fp_db_neg_inf
      variable
    • fp_dd_pos_inf

      long fp_dd_pos_inf
      variable
    • fp_dd_neg_inf

      long fp_dd_neg_inf
      variable
    • fp_lb_pos_inf

      long fp_lb_pos_inf
      variable
    • fp_lb_neg_inf

      long fp_lb_neg_inf
      variable
    • fp_ld_pos_inf

      long fp_ld_pos_inf
      variable
    • fp_ld_neg_inf

      long fp_ld_neg_inf
      variable
    • fp_eb_min

      float fp_eb_min
      variable
    • fp_eb_max

      float fp_eb_max
      variable
    • fp_db_min

      double fp_db_min
      variable
    • fp_db_max

      double fp_db_max
      variable
    • fp_eh_min

      double fp_eh_min
      variable
    • fp_eh_max

      double fp_eh_max
      variable
    • fp_dh_min

      BigDecimal fp_dh_min
      variable
    • fp_dh_max

      BigDecimal fp_dh_max
      variable
    • fp_lh_min

      BigDecimal fp_lh_min
      variable
    • fp_lh_max

      BigDecimal fp_lh_max
      variable
    • fp_lb_min

      BigDecimal fp_lb_min
      variable
    • fp_lb_neg_zero

      BigDecimal fp_lb_neg_zero
      variable
    • fp_lb_max

      BigDecimal fp_lb_max
      variable
    • fp_dd_pos_max

      BigDecimal fp_dd_pos_max
      variable
    • fp_dd_pos_min

      BigDecimal fp_dd_pos_min
      variable
    • fp_dd_neg_max

      BigDecimal fp_dd_neg_max
      variable
    • fp_dd_neg_min

      BigDecimal fp_dd_neg_min
      variable
    • fp_ed_pos_max

      BigDecimal fp_ed_pos_max
      variable
    • fp_ed_pos_min

      BigDecimal fp_ed_pos_min
      variable
    • fp_ed_neg_max

      BigDecimal fp_ed_neg_max
      variable
    • fp_ed_neg_min

      BigDecimal fp_ed_neg_min
      variable
    • fp_ld_pos_max

      BigDecimal fp_ld_pos_max
      variable
    • fp_ld_pos_min

      BigDecimal fp_ld_pos_min
      variable
    • fp_ld_neg_max

      BigDecimal fp_ld_neg_max
      variable
    • fp_ld_neg_min

      BigDecimal fp_ld_neg_min
      variable
    • fp_dd_exp_min

      int fp_dd_exp_min
      variable
    • fp_dd_exp_max

      int fp_dd_exp_max
      variable
    • fp_ed_exp_min

      int fp_ed_exp_min
      variable
    • fp_ed_exp_max

      int fp_ed_exp_max
      variable
    • fp_ld_exp_min

      int fp_ld_exp_min
      variable
    • fp_ld_exp_max

      int fp_ld_exp_max
      variable
    • cur_pc_stk

      int cur_pc_stk
      variable
    • cur_pc_stk_reg

      int cur_pc_stk_reg
      variable
    • pc_stk_reg_byte

      byte[] pc_stk_reg_byte
      variable
    • pc_stk_reg

      ByteBuffer pc_stk_reg
      variable
    • pc_stk_psw_loc

      int[] pc_stk_psw_loc
      variable
    • pc_stk_psw_cc

      int[] pc_stk_psw_cc
      variable
    • pc_stk_type_pc

      boolean[] pc_stk_type_pc
      variable
    • mem24_start

      int mem24_start
      variable
    • mem24_line

      int mem24_line
      variable
    • mem_byte

      byte[] mem_byte
      variable
    • mem

      variable
    • dsa24_start

      int dsa24_start
      variable
    • dsa24_end

      int dsa24_end
      variable
    • dsa31_start

      int dsa31_start
      variable
    • dsa31_end

      int dsa31_end
      variable
    • tot_mem

      int tot_mem
      variable
    • tot_mem_alloc

      int tot_mem_alloc
      variable
    • psa_cvt

      int psa_cvt
      variable
    • psa_svc_old_psw

      int psa_svc_old_psw
      variable
    • psa_svc_new_psw

      int psa_svc_new_psw
      variable
    • psa_pgm_old_psw

      int psa_pgm_old_psw
      variable
    • psa_pgm_nwq_paq

      int psa_pgm_nwq_paq
      variable
    • psa_cvt2

      int psa_cvt2
      variable
    • psa_psw_ins_len

      int psa_psw_ins_len
      variable
    • psa_len

      int psa_len
      variable
    • zcvt_start

      int zcvt_start
      variable
    • zcvt_user_pgm

      int zcvt_user_pgm
      variable
    • zcvt_ipl_pgm

      int zcvt_ipl_pgm
      variable
    • zcvt_fqe24

      int zcvt_fqe24
      variable
    • zcvt_fqe31

      int zcvt_fqe31
      variable
    • zcvt_exit

      int zcvt_exit
      variable
    • zcvt_tget_ecb

      int zcvt_tget_ecb
      variable
    • zcvt_save

      int zcvt_save
      variable
    • zcvt_stimer_save

      int zcvt_stimer_save
      variable
    • zcvt_exec_parma

      int zcvt_exec_parma
      variable
    • zcvt_exec_parm

      int zcvt_exec_parm
      variable
    • zcvt_epie

      int zcvt_epie
      variable
    • zcvt_sdwa

      int zcvt_sdwa
      variable
    • zcvt_comrg

      int zcvt_comrg
      variable
    • cvt_start

      int cvt_start
      variable
    • cvt_date

      int cvt_date
      variable
    • cvt_dcb

      int cvt_dcb
      variable
    • cvt_cde

      int cvt_cde
      variable
    • cde_cdchain

      int cde_cdchain
      variable
    • cde_cdname

      int cde_cdname
      variable
    • cde_cdentpt

      int cde_cdentpt
      variable
    • cde_cduse

      int cde_cduse
      variable
    • cde_cdloadpt

      int cde_cdloadpt
      variable
    • cde_cdmodlen

      int cde_cdmodlen
      variable
    • cde_len

      int cde_len
      variable
    • zcvt_comrg_jobdate

      int zcvt_comrg_jobdate
      variable
    • zcvt_comrg_comname

      int zcvt_comrg_comname
      variable
    • epie_id

      int epie_id
      variable
    • epie_parm

      int epie_parm
      variable
    • epie_psw

      int epie_psw
      variable
    • epie_ilc

      int epie_ilc
      variable
    • epie_inc

      int epie_inc
      variable
    • epie_flags

      int epie_flags
      variable
    • epie_gpr

      int epie_gpr
      variable
    • sdwa_parm

      int sdwa_parm
      variable
    • sdwa_cmp

      int sdwa_cmp
      variable
    • sdwa_psw

      int sdwa_psw
      variable
    • sdwa_xpad

      int sdwa_xpad
      variable
    • sdwa_ptrs

      int sdwa_ptrs
      variable
    • sdwa_xeme

      int sdwa_xeme
      variable
    • sdwa_rc4

      int sdwa_rc4
      variable
    • sdwa_g64

      int sdwa_g64
      variable
    • bit_cnt

      byte[] bit_cnt
      byte bit count lookup table
    • op_type_offset

      int[] op_type_offset
      opcode lookup tables unique to ez390
    • op_type_mask

      int[] op_type_mask
      variable
    • opcode2_offset

      int[] opcode2_offset
      variable
    • opcode2_mask

      int[] opcode2_mask
      variable
    • retaddr

      int retaddr
      retaddr 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

      public String get_ins_name(int ins_loc)
      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:
      1. If psw_pic has corresponding psw_pgm_mask bit off, continue at next instruction.
      2. If psw_pic has corresponding bit on in ESPIE PIE mask bits, restart at espie_exit if defined.
      3. If estae_exit defined, then restart at estae_exit.
      4. If option test on
      5. 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 value
      mask - 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 value
      mask - 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 register
      shift_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 register
      shift_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 register
      shift_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
      Notes:
      1. rvw = r1 input
      2. rv2 = r2 input
      3. 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:- 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
      Notes:
      1. rvw = r1 input
      2. rv2 = r2 input
      3. rv1 = result r1
      R1 = RW + R2
      • 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
      Notes:
      1. rlvw = r1 input
      2. rlv2 = r2 input
      3. rlv1 = result r1
      R1 = RW + R2
      • 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
      Notes:
      1. rvw = r1 input
      2. rv2 = r2 input
      3. 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
      Notes:
      1. rlvw = orig. rlv1
      2. rlv1 = result
      3. 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 array
      data_offset - offset of data in data_byte array
      data_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 array
      data_offset - offset of data in data_byte array
      data_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 into
      store_offset - offset in array where to store
      big_int - big-int value to be stored
      store_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:
      1. psw_cc = 0 all inserted bits 0 or mask 0
      2. psw_cc = 1 if first inserted bit 1
      3. 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:
      1. 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 PC
      link_addr - linkage address
    • pop_pc_stack

      private void pop_pc_stack()
      pop psw and regs on PC stack
    • get_ins_target

      public String get_ins_target(int ins_loc)
      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

      public String get_ins_hex(int ins_loc)
      return 2, 4, or 6 byte hex instruction
      Parameters:
      ins_loc - instruction address
      Returns:
      instruction data in hex
    • get_fp_long_hex

      public String get_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.
      Parameters:
      reg_index - register index
      Returns:
      hexadecimal string
    • get_long_hex

      public String get_long_hex(long work_long)
      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

      private String 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

      public int get_big_int_comp_cc(BigInteger big_int1, BigInteger big_int2)
      return psw cc for big int comparison
      Parameters:
      big_int1 - operand1 value
      big_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 - operand1
      long2 - 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 - operand1
      int2 - 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 - operand1
      eb2 - 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 - operand1
      db2 - 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 - operand1
      db2 - operand2
      Returns:
      condition code
    • fp_get_dd_comp_cc

      private int fp_get_dd_comp_cc(BigDecimal dd1, BigDecimal dd2)
      return psw_cc for DD compare with or without signal
      Parameters:
      dd1 - operand1
      dd2 - operand2
      Returns:
      condition code
    • fp_get_ld_comp_cc

      private int fp_get_ld_comp_cc(BigDecimal ld1, BigDecimal ld2)
      return psw_cc for LD compare with or without signal
      Parameters:
      ld1 - operand1
      ld2 - 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

      private int fp_get_lb_comp_cc(BigDecimal bd1, BigDecimal bd2)
      return psw_cc for big decimal compare
      Parameters:
      bd1 - operand1
      bd2 - operand2
      Returns:
      condition code
    • fp_get_dh_comp_cc

      private int fp_get_dh_comp_cc(BigDecimal bd1, BigDecimal bd2)
      return psw_cc for DH big decimal compare
      Parameters:
      bd1 - operand1
      bd2 - operand2
      Returns:
      condition code
    • fp_get_lh_comp_cc

      private int fp_get_lh_comp_cc(BigDecimal bd1, BigDecimal bd2)
      return psw_cc for LH big decimal compare
      Parameters:
      bd1 - operand1
      bd2 - 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 - operand1
      int2 - 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 - operand1
      long2 - operand2
      Returns:
      condition code
    • fp_get_eb_from_eb

      public float fp_get_eb_from_eb(ByteBuffer fp_buff, int fp_index)
      get float for EB from fp_reg or mem. If fp_reg then check for co-reg to avoid conversion.
      Notes:
      1. float is used to support EB only.
      2. EH is supported using double since exponent (4*0x7f) exceeds EB (0xff).
      Parameters:
      fp_buff - byte buffer
      fp_index - index to input data
      Returns:
      floating point number
    • fp_get_db_from_eh

      public double fp_get_db_from_eh(ByteBuffer fp_buff, int fp_index)
      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 buffer
      fp_index - index to input data
      Returns:
      double floating point number
    • fp_get_db_from_eb

      private double fp_get_db_from_eb(ByteBuffer fp_buff, int fp_index)
      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 data
      fp_index - ???
      Returns:
      double floating point number
    • fp_get_db_from_db

      public double fp_get_db_from_db(ByteBuffer fp_buff, int fp_index)
      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 data
      fp_index - ???
      Returns:
      double floating point number
    • fp_get_db_from_lh

      private double fp_get_db_from_lh(ByteBuffer fp_buff, int fp_index)
      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 data
      fp_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:
      1. 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:
      1. Return 0 for 0 and issue data exception if negative.
      2. Scale number to within double range to calc estimate to 14 decimal places.
      3. Use Newton Rapson iteration to reduce error to fp_lxg_context limit.
    • fp_get_bd_from_lh

      public BigDecimal fp_get_bd_from_lh(ByteBuffer fp_buff, int fp_index)
      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 value
      fp_index - address of input data in fp_buff
      Returns:
      BigDecimal value
    • fp_get_bd_from_lb

      public BigDecimal fp_get_bd_from_lb(ByteBuffer fp_buff, int fp_index)
      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 value
      fp_index - address of input data in fp_buff
      Returns:
      BigDecimal value
    • fp_get_bd_from_ed

      public BigDecimal fp_get_bd_from_ed(ByteBuffer fp_buff, int fp_index)
      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 value
      fp_index - address of input data in fp_buff
      Returns:
      BigDecimal value
    • fp_get_bd_from_dd

      public BigDecimal fp_get_bd_from_dd(ByteBuffer fp_buff, int fp_index)
      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 value
      fp_index - address of input data in fp_buff
      Returns:
      BigDecimal value
    • fp_get_bd_from_ld

      public BigDecimal fp_get_bd_from_ld(ByteBuffer fp_buff, int fp_index)
      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 value
      fp_index - address of input data in fp_buff
      Returns:
      BigDecimal value
    • fp_ctl_reg_to_eb

      private Float fp_ctl_reg_to_eb(int fp_ctl_index)
      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

      private Double fp_ctl_reg_to_db(int fp_ctl_index)
      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

      private BigDecimal fp_ctl_reg_to_bd(int fp_ctl_index)
      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

      public BigDecimal fp_get_bd_from_dh(ByteBuffer fp_buff, int fp_index)
      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 data
      fp_index - probably memory address or register number`
      Returns:
      BigDecimal value
    • fp_get_bd_from_db

      private BigDecimal fp_get_bd_from_db(ByteBuffer fp_buff, int fp_index)
      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 data
      fp_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 number
      index2 - 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:
      1. LFAS and SFASR signalling not supported for now
      Parameters:
      fpc_reg - ??
    • fp_get_bd_rnd_int

      private BigDecimal fp_get_bd_rnd_int(byte fp_class, int rnd_mode)
      get bd rounded to integer from fp_bd_int_rnd[]
      Notes:
      1. For BFP - mode = 0-3
      2. For DFP - mode - 0-7
      Parameters:
      fp_class - floating class
      rnd_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 class
      rnd_mode - rounding mode
      Returns:
      integer value
    • fp_get_bd_from_eb

      private BigDecimal fp_get_bd_from_eb(ByteBuffer fp_buff, int fp_index)
      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 data
      fp_index - ???
      Returns:
      BigDecimal value
    • fp_get_bd_from_eh

      private BigDecimal fp_get_bd_from_eh(ByteBuffer fp_buff, int fp_index)
      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 data
      fp_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:
      1. 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 code
      reg_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 code
      reg_value - value to store
    • fp_put_bd

      private void fp_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 pair
      Parameters:
      fp_index - index (register number * 8)
      reg_type - register type code
      reg_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:
      1. bd1/bd2 co-reg pair being partially replaced is discarded without conversion.
      2. 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

      public void fp_store_reg(ByteBuffer reg_buff, int reg_index)
      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 buffer
      reg_index - probably offset in reg_buff (register number * 8)
    • fp_ed_to_bd

      private BigDecimal fp_ed_to_bd(ByteBuffer fp_buff, int fp_index)
      convert ED format to big decimal
      Parameters:
      fp_buff - buffer with input data
      fp_index - offset of input data within fp_buff
      Returns:
      BigDecimal value
    • fp_dd_to_bd

      private BigDecimal fp_dd_to_bd(ByteBuffer fp_buff, int fp_index)
      convert DD format to big decimal
      Parameters:
      fp_buff - buffer with input data
      fp_index - offset of input data within fp_buff
      Returns:
      BigDecimal value
    • fp_ld_to_bd

      private BigDecimal fp_ld_to_bd(ByteBuffer fp_buff, int fp_index)
      convert LD format to big decimal
      Parameters:
      fp_buff - buffer with input data
      fp_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

      private BigDecimal fp_dh_to_bd(long dh1)
      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

      private BigDecimal fp_eh_to_bd(ByteBuffer eh1_buff, int eh1_index)
      convert EH in fp_reg or mem to big_dec
      Parameters:
      eh1_buff - buffer holding input data
      eh1_index - ??
      Returns:
      BigDecimal float value
    • fp_lh_to_bd

      private BigDecimal fp_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 precision
      Parameters:
      lh1_buff - buffer holding input data
      lh1_index - ??
      Returns:
      BigDecimal float value
    • fp_lb_to_bd

      private BigDecimal fp_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 exponent
      Parameters:
      lb1_buff - buffer holding input data
      lb1_index - ??
      Returns:
      BigDecimal float value
    • fp_bd_to_wreg

      public void fp_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 decimal
      Parameters:
      fp_type - type code
      fp_bd - BigDecimal value
    • fp_bd_to_dh_wreg

      private void fp_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. 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

      private void fp_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. 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 code
      fp_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:
      1. mask must be EBCDIC in both modes
      2. 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 address
      ilc - instruction length code
    • get_pdf_ints

      public boolean get_pdf_ints()
      1. Return true if ok else false.
      2. Set pdf_is_big to true or false and set pdf_big_int1 and pdf_big_int2 or pdf_long1 and pdf_long2
      3. Set pdf_leftmost_zeros to 1st operand number of leftmost zeros.
      Returns:
      true if successful, false otherwise
    • get_pd

      private boolean get_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:
      1. Set true if ok
      2. Set pd_cc
        • 0 = ok
        • 1 = sign invalid
        • 2 = digit invalid
      3. Raise 0C7 if not TP opcode
      4. If pdf_signed = false, return positive value including low digit
      5. if pdf_signed = true and pdf_ignore_sign = true then ignore sign and set positive
      6. Add support for up to 34 digits using 3 segments (16+16+2)
      7. Calculate number of leftmost zeros RPI 2013
      Parameters:
      pd_buff - byte buffer holding packed decimal input data
      pdf_loc - location of pd field within pd_buff
      pdf_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:
      1. If pdf_signed is false store unsigned value with low order digit in low nibble, and do not set psw_cc.
      2. If pdf_trunc, truncate to fit else raise pgm exception.
      Parameters:
      pd_stor - byte array to store into
      pdf_loc - location in pd_stor where to store
      pdf_len - pdf_len length of area to store into
    • ex_restore

      private void ex_restore()
      restore ex target instruction 2nd byte
    • bytes_to_hex

      public String bytes_to_hex(ByteBuffer bytes, int byte_start, int byte_length, int chunk)
      Format bytes into hex string
      Parameters:
      bytes - byte array holding input data
      byte_start - address of data to convert
      byte_length - length of data to convert
      chunk - size of each chunk in the output string
      Returns:
      string of hexadecimal digits
    • init_pz390

      public void init_pz390(tz390 shared_tz390, sz390 shared_sz390)
      init tz390
      Parameters:
      shared_tz390 - shared tz390 object
      shared_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:
      1. Verify tz390 and ptz390 trace type tables match
      2. trace and test do lookup by hex for display
      3. test break on opcode does lookup by name to get hex code for break
      4. 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:
      1. Set cvt pointer at 16
      2. Set zcvt_ipl_pgm to name of opt_ipl pgm name if any to run via link svc 6
      3. Set zcvt_user_pgm to name of user initial program to run via link svc
      4. Set mem_fqe_ptr to point to free queue with all of available memory for use by svc 4 getmain and svc 5 freemain
        1. 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
        2. If less than 16 MB allocated 31 bit fqe is set to 0 and RMODE31 requests use memory below the line
      5. 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
      Notes:
      1. 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 rotated
      n - 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 rotated
      n - 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 rotated
      n - shift amount in bits
      Returns:
      integer result value
    • exec_pfpo

      private void exec_pfpo()
      perform floating point operation
      1. If r0 bit 32 is on, check if function supported and set r1 rc = 0 else r1 = 3
      2. if r0 bit 32 zero, perform floating point function:
        1. bits 33-39 = operation x'01' = convert radix (FP0+2 = FP4+6)
        2. bits 40-47 = first operand type
        3. bits 48-55 = second operand type
        4. bit 56 = inexact suppression control
        5. bit 57 = alternate exception action control
        6. bits 58-59 = target radix dependent controls
        7. 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.