1987-01-15 18:12:26 +00:00
|
|
|
#ifndef NORCSID
|
|
|
|
static char rcsid[] = "$Header$";
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "nopt.h"
|
|
|
|
|
1987-02-09 17:55:46 +00:00
|
|
|
static Linenumber = 0; /* Local optimization of lin to lni if possible */
|
|
|
|
|
1987-01-21 14:27:04 +00:00
|
|
|
OO_mkcalls(p)
|
1987-01-15 18:12:26 +00:00
|
|
|
struct instr *p;
|
|
|
|
{
|
1987-01-21 14:27:04 +00:00
|
|
|
switch(p->opcode) {
|
|
|
|
case op_aar:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_aar(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_adf:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_adf(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_adi:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_adi(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_adp:
|
|
|
|
O_adp(p->acst); break;
|
|
|
|
case op_ads:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_ads(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_adu:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_adu(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_and:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_and(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_asp:
|
|
|
|
O_asp(p->acst); break;
|
|
|
|
case op_ass:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_ass(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_beq:
|
|
|
|
O_beq((label)p->acst); break;
|
|
|
|
case op_bge:
|
|
|
|
O_bge((label)p->acst); break;
|
|
|
|
case op_bgt:
|
|
|
|
O_bgt((label)p->acst); break;
|
|
|
|
case op_ble:
|
|
|
|
O_ble((label)p->acst); break;
|
|
|
|
case op_blm:
|
|
|
|
O_blm(p->acst); break;
|
|
|
|
case op_bls:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_bls(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_blt:
|
|
|
|
O_blt((label)p->acst); break;
|
|
|
|
case op_bne:
|
|
|
|
O_bne((label)p->acst); break;
|
|
|
|
case op_bra:
|
|
|
|
O_bra((label)p->acst); break;
|
|
|
|
case op_cai:
|
|
|
|
O_cai(); break;
|
|
|
|
case op_cal:
|
|
|
|
O_cal(p->apnam); break;
|
|
|
|
case op_cff:
|
|
|
|
O_cff(); break;
|
|
|
|
case op_cfi:
|
|
|
|
O_cfi(); break;
|
|
|
|
case op_cfu:
|
|
|
|
O_cfu(); break;
|
|
|
|
case op_cif:
|
|
|
|
O_cif(); break;
|
|
|
|
case op_cii:
|
|
|
|
O_cii(); break;
|
|
|
|
case op_ciu:
|
|
|
|
O_ciu(); break;
|
|
|
|
case op_cmf:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_cmf(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_cmi:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_cmi(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_cmp:
|
|
|
|
O_cmp(); break;
|
|
|
|
case op_cms:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_cms(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_cmu:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_cmu(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_com:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_com(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_csa:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_csa(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_csb:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_csb(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_cuf:
|
|
|
|
O_cuf(); break;
|
|
|
|
case op_cui:
|
|
|
|
O_cui(); break;
|
|
|
|
case op_cuu:
|
|
|
|
O_cuu(); break;
|
|
|
|
case op_dch:
|
|
|
|
O_dch(); break;
|
|
|
|
case op_dec:
|
|
|
|
O_dec(); break;
|
|
|
|
case op_dee:
|
|
|
|
if(p->argtype==nof_ptyp) O_dee_dlb(p->adlb, p->anoff);
|
|
|
|
else O_dee_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_del:
|
|
|
|
O_del(p->acst); break;
|
|
|
|
case op_dup:
|
|
|
|
O_dup(p->acst); break;
|
|
|
|
case op_dus:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_dus(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_dvf:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_dvf(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_dvi:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_dvi(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_dvu:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_dvu(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_exg:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_exg(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_fef:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_fef(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_fif:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_fif(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_fil:
|
1987-02-09 17:55:46 +00:00
|
|
|
Linenumber = 0;
|
1987-01-21 14:27:04 +00:00
|
|
|
if(p->argtype==nof_ptyp) O_fil_dlb(p->adlb, p->anoff);
|
|
|
|
else O_fil_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_gto:
|
|
|
|
if(p->argtype==nof_ptyp) O_gto_dlb(p->adlb, p->anoff);
|
|
|
|
else O_gto_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_inc:
|
|
|
|
O_inc(); break;
|
|
|
|
case op_ine:
|
|
|
|
if(p->argtype==nof_ptyp) O_ine_dlb(p->adlb, p->anoff);
|
|
|
|
else O_ine_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_inl:
|
|
|
|
O_inl(p->acst); break;
|
|
|
|
case op_inn:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_inn(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_ior:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_ior(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_lab:
|
1987-02-09 17:55:46 +00:00
|
|
|
Linenumber = 0;
|
1987-01-15 18:12:26 +00:00
|
|
|
O_df_ilb(p->alab); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_lae:
|
|
|
|
if(p->argtype==nof_ptyp) O_lae_dlb(p->adlb, p->anoff);
|
|
|
|
else O_lae_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_lal:
|
|
|
|
O_lal(p->acst); break;
|
|
|
|
case op_lar:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_lar(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_ldc:
|
|
|
|
O_ldc(p->acst); break;
|
|
|
|
case op_lde:
|
|
|
|
if(p->argtype==nof_ptyp) O_lde_dlb(p->adlb, p->anoff);
|
|
|
|
else O_lde_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_ldf:
|
|
|
|
O_ldf(p->acst); break;
|
|
|
|
case op_ldl:
|
|
|
|
O_ldl(p->acst); break;
|
|
|
|
case op_lfr:
|
|
|
|
O_lfr(p->acst); break;
|
|
|
|
case op_lil:
|
|
|
|
O_lil(p->acst); break;
|
|
|
|
case op_lim:
|
|
|
|
O_lim(); break;
|
|
|
|
case op_lin:
|
1987-02-09 17:55:46 +00:00
|
|
|
if(Linenumber && p->acst == ++Linenumber) {
|
|
|
|
O_lni();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
O_lin(p->acst);
|
|
|
|
Linenumber = p->acst;
|
|
|
|
}
|
|
|
|
break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_lni:
|
1987-02-09 17:55:46 +00:00
|
|
|
O_lni();
|
|
|
|
Linenumber++;
|
|
|
|
break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_loc:
|
|
|
|
O_loc(p->acst); break;
|
|
|
|
case op_loe:
|
|
|
|
if(p->argtype==nof_ptyp) O_loe_dlb(p->adlb, p->anoff);
|
|
|
|
else O_loe_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_lof:
|
|
|
|
O_lof(p->acst); break;
|
|
|
|
case op_loi:
|
|
|
|
O_loi(p->acst); break;
|
|
|
|
case op_lol:
|
|
|
|
O_lol(p->acst); break;
|
|
|
|
case op_lor:
|
|
|
|
O_lor(p->acst); break;
|
|
|
|
case op_los:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_los(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_lpb:
|
|
|
|
O_lpb(); break;
|
|
|
|
case op_lpi:
|
|
|
|
O_lpi(p->apnam); break;
|
|
|
|
case op_lxa:
|
|
|
|
O_lxa(p->acst); break;
|
|
|
|
case op_lxl:
|
|
|
|
O_lxl(p->acst); break;
|
|
|
|
case op_mlf:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_mlf(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_mli:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_mli(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_mlu:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_mlu(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_mon:
|
|
|
|
O_mon(); break;
|
|
|
|
case op_ngf:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_ngf(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_ngi:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_ngi(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_nop:
|
|
|
|
O_nop(); break;
|
|
|
|
case op_rck:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_rck(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_ret:
|
|
|
|
O_ret(p->acst); break;
|
|
|
|
case op_rmi:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_rmi(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_rmu:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_rmu(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_rol:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_rol(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_ror:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_ror(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_rtt:
|
|
|
|
O_rtt(); break;
|
|
|
|
case op_sar:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_sar(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_sbf:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_sbf(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_sbi:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_sbi(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_sbs:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_sbs(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_sbu:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_sbu(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_sde:
|
|
|
|
if(p->argtype==nof_ptyp) O_sde_dlb(p->adlb, p->anoff);
|
|
|
|
else O_sde_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_sdf:
|
|
|
|
O_sdf(p->acst); break;
|
|
|
|
case op_sdl:
|
|
|
|
O_sdl(p->acst); break;
|
|
|
|
case op_set:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_set(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_sig:
|
|
|
|
O_sig(); break;
|
|
|
|
case op_sil:
|
|
|
|
O_sil(p->acst); break;
|
|
|
|
case op_sim:
|
|
|
|
O_sim(); break;
|
|
|
|
case op_sli:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_sli(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_slu:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_slu(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_sri:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_sri(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_sru:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_sru(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_ste:
|
|
|
|
if(p->argtype==nof_ptyp) O_ste_dlb(p->adlb, p->anoff);
|
|
|
|
else O_ste_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_stf:
|
|
|
|
O_stf(p->acst); break;
|
|
|
|
case op_sti:
|
|
|
|
O_sti(p->acst); break;
|
|
|
|
case op_stl:
|
|
|
|
O_stl(p->acst); break;
|
|
|
|
case op_str:
|
|
|
|
O_str(p->acst); break;
|
|
|
|
case op_sts:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_sts(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_teq:
|
|
|
|
O_teq(); break;
|
|
|
|
case op_tge:
|
|
|
|
O_tge(); break;
|
|
|
|
case op_tgt:
|
|
|
|
O_tgt(); break;
|
|
|
|
case op_tle:
|
|
|
|
O_tle(); break;
|
|
|
|
case op_tlt:
|
|
|
|
O_tlt(); break;
|
|
|
|
case op_tne:
|
|
|
|
O_tne(); break;
|
|
|
|
case op_trp:
|
|
|
|
O_trp(); break;
|
|
|
|
case op_xor:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_xor(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_zeq:
|
|
|
|
O_zeq((label)p->acst); break;
|
|
|
|
case op_zer:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_zer(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_zge:
|
|
|
|
O_zge((label)p->acst); break;
|
|
|
|
case op_zgt:
|
|
|
|
O_zgt((label)p->acst); break;
|
|
|
|
case op_zle:
|
|
|
|
O_zle((label)p->acst); break;
|
|
|
|
case op_zlt:
|
|
|
|
O_zlt((label)p->acst); break;
|
|
|
|
case op_zne:
|
|
|
|
O_zne((label)p->acst); break;
|
|
|
|
case op_zre:
|
|
|
|
if(p->argtype==nof_ptyp) O_zre_dlb(p->adlb, p->anoff);
|
|
|
|
else O_zre_dnam(p->adnam, p->asoff); break;
|
|
|
|
case op_zrf:
|
1987-02-06 14:13:22 +00:00
|
|
|
O_zrf(p->acst); break;
|
1987-01-21 14:27:04 +00:00
|
|
|
case op_zrl:
|
|
|
|
O_zrl(p->acst); break;
|
1987-01-15 18:12:26 +00:00
|
|
|
}
|
|
|
|
}
|