diff --git a/CGI.Comments b/CGI.Comments index 7f18cb1..573cb45 100644 --- a/CGI.Comments +++ b/CGI.Comments @@ -480,12 +480,16 @@ { pc_umi - unsigned integer multiply } { pc_mpl - long integer multiply } { pc_uml - unsigned long multiply } +{ pc_mpq - long long integer multiply } +{ pc_umq - unsigned long long multiply } { pc_mpr - real multiply } { } { Gen0(pc_mpi) cgByte,cgWord } { Gen0(pc_umi) cgUByte,cgUWord } { Gen0(pc_mpl) cgLong } { Gen0(pc_uml) cgULong } +{ Gen0(pc_mpq) cgQuad } +{ Gen0(pc_umq) cgUQuad } { Gen0(pc_mpr) cgReal,cgDouble,cgComp,cgExtended } { } { The two values on the top of the evaluation stack are } diff --git a/CGI.Debug b/CGI.Debug index c4a8e26..82ba67d 100644 --- a/CGI.Debug +++ b/CGI.Debug @@ -121,6 +121,8 @@ opt[pc_bqx] := 'bqx'; opt[pc_baq] := 'baq'; opt[pc_bnq] := 'bnq'; opt[pc_ngq] := 'ngq'; +opt[pc_mpq] := 'mpq'; +opt[pc_umq] := 'umq'; end; {InitWriteCode} diff --git a/CGI.pas b/CGI.pas index 3bffb45..75a3357 100644 --- a/CGI.pas +++ b/CGI.pas @@ -229,7 +229,7 @@ type dc_sym,pc_lnd,pc_lor,pc_vsr,pc_uml,pc_udl,pc_ulm,pc_pop,pc_gil, pc_gli,pc_gdl,pc_gld,pc_cpi,pc_tri,pc_lbu,pc_lbf,pc_sbf,pc_cbf,dc_cns, dc_prm,pc_nat,pc_bno,pc_nop,pc_psh,pc_ili,pc_iil,pc_ild,pc_idl, - pc_bqr,pc_bqx,pc_baq,pc_bnq,pc_ngq,pc_adq,pc_sbq); + pc_bqr,pc_bqx,pc_baq,pc_bnq,pc_ngq,pc_adq,pc_sbq,pc_mpq,pc_umq); {intermediate code} {-----------------} diff --git a/DAG.pas b/DAG.pas index 8af07b9..0a68635 100644 --- a/DAG.pas +++ b/DAG.pas @@ -110,7 +110,8 @@ function CodesMatch (op1, op2: icptr; exact: boolean): boolean; pc_adi, pc_adl, pc_adr, pc_and, pc_lnd, pc_bnd, pc_bal, pc_bor, pc_blr, pc_bxr, pc_blx, pc_equ, pc_neq, pc_ior, pc_lor, pc_mpi, - pc_umi, pc_mpl, pc_uml, pc_mpr, pc_bqr, pc_bqx, pc_baq, pc_adq: begin + pc_umi, pc_mpl, pc_uml, pc_mpr, pc_bqr, pc_bqx, pc_baq, pc_adq, + pc_mpq, pc_umq: begin if op1^.left = op2^.left then if op1^.right = op2^.right then result := true; @@ -2266,7 +2267,7 @@ case op^.opcode of pc_udl, pc_ulm, pc_uml, pc_vsr: TypeOf := cgULong; - pc_bnq, pc_ngq, pc_bqr, pc_bqx, pc_baq, pc_adq, pc_sbq: + pc_bnq, pc_ngq, pc_bqr, pc_bqx, pc_baq, pc_adq, pc_sbq, pc_mpq, pc_umq: TypeOf := cgQuad; pc_ngr, pc_adr, pc_dvr, pc_mpr, pc_sbr: @@ -4062,7 +4063,8 @@ var pc_mdl,pc_ulm,pc_mpi,pc_umi,pc_mpl,pc_uml,pc_mpr,pc_ngi, pc_ngl,pc_ngr,pc_not,pc_pop,pc_sbi,pc_sbl,pc_sbr, pc_shl,pc_sll,pc_shr,pc_usr,pc_slr,pc_vsr,pc_tri, - pc_bqr,pc_bqx,pc_baq,pc_bnq,pc_ngq,pc_adq,pc_sbq] + pc_bqr,pc_bqx,pc_baq,pc_bnq,pc_ngq,pc_adq,pc_sbq, + pc_mpq,pc_umq] then begin op^.parents := icount; icount := icount+1; @@ -4943,7 +4945,7 @@ case code^.opcode of pc_ulm, pc_mpi, pc_umi, pc_mpl, pc_uml, pc_mpr, pc_psh, pc_sbi, pc_sbl, pc_sbr, pc_shl, pc_sll, pc_shr, pc_usr, pc_slr, pc_vsr, pc_tri, pc_sbf, pc_sto, pc_cui, pc_bqr, pc_bqx, pc_baq, pc_adq, - pc_sbq: + pc_sbq, pc_mpq, pc_umq: begin code^.right := Pop; code^.left := Pop; diff --git a/Expression.pas b/Expression.pas index 50f2f46..727ce83 100644 --- a/Expression.pas +++ b/Expression.pas @@ -3142,6 +3142,10 @@ case tree^.token.kind of Gen0(pc_mpl) else if et = cgULong then Gen0(pc_uml) + else if et = cgQuad then + Gen0(pc_mpq) + else if et = cgUQuad then + Gen0(pc_umq) else if et = cgExtended then Gen0(pc_mpr) else @@ -3556,6 +3560,10 @@ case tree^.token.kind of Gen0(pc_mpl); cgULong: Gen0(pc_uml); + cgQuad: + Gen0(pc_mpq); + cgUQuad: + Gen0(pc_umq); cgExtended: Gen0(pc_mpr); otherwise: diff --git a/Gen.pas b/Gen.pas index d639bb2..065dc46 100644 --- a/Gen.pas +++ b/Gen.pas @@ -4524,6 +4524,11 @@ procedure GenTree {op: icptr}; pc_bqr: GenOp(m_ora_s); pc_bqx: GenOp(m_eor_s); pc_baq: GenOp(m_and_s); + + pc_mpq: GenCall(79); + + pc_umq: GenCall(80); + otherwise: Error(cge1); end; {case} end; {GenBinQuad} @@ -6128,7 +6133,7 @@ case op^.opcode of pc_and,pc_bnd,pc_bor,pc_bxr,pc_ior: GenLogic(op); pc_blr,pc_blx,pc_bal,pc_dvl,pc_mdl,pc_mpl,pc_sll,pc_slr,pc_udl,pc_ulm, pc_uml,pc_vsr: GenBinLong(op); - pc_bqr,pc_bqx,pc_baq: GenBinQuad(op); + pc_bqr,pc_bqx,pc_baq,pc_mpq,pc_umq: GenBinQuad(op); pc_bnl,pc_ngl: GenUnaryLong(op); pc_bnq,pc_ngq: GenUnaryQuad(op); pc_bno: GenBno(op); diff --git a/Native.pas b/Native.pas index 77262eb..362213a 100644 --- a/Native.pas +++ b/Native.pas @@ -2033,6 +2033,8 @@ case callNum of 76: sp := @'~STACKERR'; {CC} 77: sp := @'~LOADSTRUCT'; {CC} 78: sp := @'~DIV4'; {CC} + 79: sp := @'~MUL8'; + 80: sp := @'~UMUL8'; otherwise: Error(cge1); end; {case}