Initial revision
This commit is contained in:
6
util/ceg/defaults/message/C_cst.c
Normal file
6
util/ceg/defaults/message/C_cst.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <em.h>
|
||||
|
||||
C_cst( l)
|
||||
arith l;
|
||||
{
|
||||
}
|
||||
7
util/ceg/defaults/message/C_dlb.c
Normal file
7
util/ceg/defaults/message/C_dlb.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <em.h>
|
||||
|
||||
C_dlb( l, val)
|
||||
label l;
|
||||
char *val;
|
||||
{
|
||||
}
|
||||
7
util/ceg/defaults/message/C_dnam.c
Normal file
7
util/ceg/defaults/message/C_dnam.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <em.h>
|
||||
|
||||
C_dnam( str, val)
|
||||
char *str;
|
||||
arith val;
|
||||
{
|
||||
}
|
||||
7
util/ceg/defaults/message/C_fcon.c
Normal file
7
util/ceg/defaults/message/C_fcon.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <em.h>
|
||||
|
||||
C_fcon( val, siz)
|
||||
char *val;
|
||||
arith siz;
|
||||
{
|
||||
}
|
||||
7
util/ceg/defaults/message/C_icon.c
Normal file
7
util/ceg/defaults/message/C_icon.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <em.h>
|
||||
|
||||
C_icon( val, siz)
|
||||
char *val;
|
||||
arith siz;
|
||||
{
|
||||
}
|
||||
6
util/ceg/defaults/message/C_ilb.c
Normal file
6
util/ceg/defaults/message/C_ilb.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <em.h>
|
||||
|
||||
C_ilb( l)
|
||||
label l;
|
||||
{
|
||||
}
|
||||
6
util/ceg/defaults/message/C_mes_begin.c
Normal file
6
util/ceg/defaults/message/C_mes_begin.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <em.h>
|
||||
|
||||
C_mes_begin( ms)
|
||||
int ms;
|
||||
{
|
||||
}
|
||||
5
util/ceg/defaults/message/C_mes_end.c
Normal file
5
util/ceg/defaults/message/C_mes_end.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include <em.h>
|
||||
|
||||
C_mes_end()
|
||||
{
|
||||
}
|
||||
6
util/ceg/defaults/message/C_pnam.c
Normal file
6
util/ceg/defaults/message/C_pnam.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <em.h>
|
||||
|
||||
C_pnam( str)
|
||||
char *str;
|
||||
{
|
||||
}
|
||||
7
util/ceg/defaults/message/C_scon.c
Normal file
7
util/ceg/defaults/message/C_scon.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <em.h>
|
||||
|
||||
C_scon( str, siz)
|
||||
char *str;
|
||||
arith siz;
|
||||
{
|
||||
}
|
||||
7
util/ceg/defaults/message/C_ucon.c
Normal file
7
util/ceg/defaults/message/C_ucon.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <em.h>
|
||||
|
||||
C_ucon( val, siz)
|
||||
char *val;
|
||||
arith siz;
|
||||
{
|
||||
}
|
||||
7
util/ceg/defaults/not_impl/not_impl.c
Normal file
7
util/ceg/defaults/not_impl/not_impl.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <system.h>
|
||||
|
||||
not_implemented( instr)
|
||||
char *instr;
|
||||
{
|
||||
fprint( STDERR, "!! %s, NOT implemented !!\n", instr);
|
||||
}
|
||||
268
util/ceg/defaults/not_impl/not_impl_table
Normal file
268
util/ceg/defaults/not_impl/not_impl_table
Normal file
@@ -0,0 +1,268 @@
|
||||
C_loc ::= not_implemented( "C_loc").
|
||||
C_ldc ::= not_implemented( "C_ldc").
|
||||
C_loc ::= not_implemented( "C_loc").
|
||||
C_ldc ::= not_implemented( "C_ldc").
|
||||
C_lol ::= not_implemented( "C_lol").
|
||||
C_loe ::= not_implemented( "C_loe").
|
||||
C_loe_dnam ::= not_implemented( "C_loe_dnam").
|
||||
C_loe_dlb ::= not_implemented( "C_loe_dlb").
|
||||
C_lil ::= not_implemented( "C_lil").
|
||||
C_lof ::= not_implemented( "C_lof").
|
||||
C_lal ::= not_implemented( "C_lal").
|
||||
C_lae ::= not_implemented( "C_lae").
|
||||
C_lae_dnam ::= not_implemented( "C_lae_dnam").
|
||||
C_lae_dlb ::= not_implemented( "C_lae_dlb").
|
||||
C_lxl ::= not_implemented( "C_lxl").
|
||||
C_lxa ::= not_implemented( "C_lxa").
|
||||
C_loi ::= not_implemented( "C_loi").
|
||||
C_los ::= not_implemented( "C_los").
|
||||
C_los_narg ::= not_implemented( "C_los_narg").
|
||||
C_ldl ::= not_implemented( "C_ldl").
|
||||
C_lde ::= not_implemented( "C_lde").
|
||||
C_lde_dnam ::= not_implemented( "C_lde_dnam").
|
||||
C_lde_dlb ::= not_implemented( "C_lde_dlb").
|
||||
C_ldf ::= not_implemented( "C_ldf").
|
||||
C_lpi ::= not_implemented( "C_lpi").
|
||||
C_inn ::= not_implemented( "C_inn").
|
||||
C_inn_narg ::= not_implemented( "C_inn_narg").
|
||||
C_set ::= not_implemented( "C_set").
|
||||
C_set_narg ::= not_implemented( "C_set_narg").
|
||||
C_lar ::= not_implemented( "C_lar").
|
||||
C_lar_narg ::= not_implemented( "C_lar_narg").
|
||||
C_sar ::= not_implemented( "C_sar").
|
||||
C_sar_narg ::= not_implemented( "C_sar_narg").
|
||||
C_aar ::= not_implemented( "C_aar").
|
||||
C_aar_narg ::= not_implemented( "C_aar_narg").
|
||||
C_cmi ::= not_implemented( "C_cmi").
|
||||
C_cmi_narg ::= not_implemented( "C_cmi_narg").
|
||||
C_cmf ::= not_implemented( "C_cmf").
|
||||
C_cmf_narg ::= not_implemented( "C_cmf_narg").
|
||||
C_cmu ::= not_implemented( "C_cmu").
|
||||
C_cmu_narg ::= not_implemented( "C_cmu_narg").
|
||||
C_cms ::= not_implemented( "C_cms").
|
||||
C_cms_narg ::= not_implemented( "C_cms_narg").
|
||||
C_cmp ::= not_implemented( "C_cmp").
|
||||
C_tlt ::= not_implemented( "C_tlt").
|
||||
C_tle ::= not_implemented( "C_tle").
|
||||
C_teq ::= not_implemented( "C_teq").
|
||||
C_tne ::= not_implemented( "C_tne").
|
||||
C_tge ::= not_implemented( "C_tge").
|
||||
C_tgt ::= not_implemented( "C_tgt").
|
||||
C_bra ::= not_implemented( "C_bra").
|
||||
C_blt ::= not_implemented( "C_blt").
|
||||
C_ble ::= not_implemented( "C_ble").
|
||||
C_beq ::= not_implemented( "C_beq").
|
||||
C_bne ::= not_implemented( "C_bne").
|
||||
C_bge ::= not_implemented( "C_bge").
|
||||
C_bgt ::= not_implemented( "C_bgt").
|
||||
C_zlt ::= not_implemented( "C_zlt").
|
||||
C_zle ::= not_implemented( "C_zle").
|
||||
C_zeq ::= not_implemented( "C_zeq").
|
||||
C_zne ::= not_implemented( "C_zne").
|
||||
C_zge ::= not_implemented( "C_zge").
|
||||
C_zgt ::= not_implemented( "C_zgt").
|
||||
C_cai ::= not_implemented( "C_cai").
|
||||
C_cal ::= not_implemented( "C_cal").
|
||||
C_lfr ::= not_implemented( "C_lfr").
|
||||
C_ret ::= not_implemented( "C_ret").
|
||||
C_asp ::= not_implemented( "C_asp").
|
||||
C_ass ::= not_implemented( "C_ass").
|
||||
C_ass_narg ::= not_implemented( "C_ass_narg").
|
||||
C_blm ::= not_implemented( "C_blm").
|
||||
C_bls ::= not_implemented( "C_bls").
|
||||
C_bls_narg ::= not_implemented( "C_bls_narg").
|
||||
C_csa ::= not_implemented( "C_csa").
|
||||
C_csa_narg ::= not_implemented( "C_csa_narg").
|
||||
C_csb ::= not_implemented( "C_csb").
|
||||
C_csb_narg ::= not_implemented( "C_csb_narg").
|
||||
C_dch ::= not_implemented( "C_dch").
|
||||
C_dup ::= not_implemented( "C_dup").
|
||||
C_dus ::= not_implemented( "C_dus").
|
||||
C_dus_narg ::= not_implemented( "C_dus_narg").
|
||||
C_exg ::= not_implemented( "C_exg").
|
||||
C_exg_narg ::= not_implemented( "C_exg_narg").
|
||||
C_fil ::= not_implemented( "C_fil").
|
||||
C_fil_dnam ::= not_implemented( "C_fil_dnam").
|
||||
C_fil_dlb ::= not_implemented( "C_fil_dlb").
|
||||
C_gto ::= not_implemented( "C_gto").
|
||||
C_gto_dnam ::= not_implemented( "C_gto_dnam").
|
||||
C_gto_dlb ::= not_implemented( "C_gto_dlb").
|
||||
C_lim ::= not_implemented( "C_lim").
|
||||
C_lin ::= not_implemented( "C_lin").
|
||||
C_lni ::= not_implemented( "C_lni").
|
||||
C_lor ::= not_implemented( "C_lor").
|
||||
C_lpb ::= not_implemented( "C_lpb").
|
||||
C_mon ::= not_implemented( "C_mon").
|
||||
C_nop ::= not_implemented( "C_nop").
|
||||
C_rck ::= not_implemented( "C_rck").
|
||||
C_rck_narg ::= not_implemented( "C_rck_narg").
|
||||
C_rtt ::= not_implemented( "C_rtt").
|
||||
C_sig ::= not_implemented( "C_sig").
|
||||
C_sim ::= not_implemented( "C_sim").
|
||||
C_str ::= not_implemented( "C_str").
|
||||
C_trp ::= not_implemented( "C_trp").
|
||||
C_stl ::= not_implemented( "C_stl").
|
||||
C_ste ::= not_implemented( "C_ste").
|
||||
C_ste_dnam ::= not_implemented( "C_ste_dnam").
|
||||
C_ste_dlb ::= not_implemented( "C_ste_dlb").
|
||||
C_sil ::= not_implemented( "C_sil").
|
||||
C_stf ::= not_implemented( "C_stf").
|
||||
C_sti ::= not_implemented( "C_sti").
|
||||
C_sts ::= not_implemented( "C_sts").
|
||||
C_sts_narg ::= not_implemented( "C_sts_narg").
|
||||
C_sdl ::= not_implemented( "C_sdl").
|
||||
C_sde ::= not_implemented( "C_sde").
|
||||
C_sde_dnam ::= not_implemented( "C_sde_dnam").
|
||||
C_sde_dlb ::= not_implemented( "C_sde_dlb").
|
||||
C_sdf ::= not_implemented( "C_sdf").
|
||||
C_adi ::= not_implemented( "C_adi").
|
||||
C_adi_narg ::= not_implemented( "C_adi_narg").
|
||||
C_sbi ::= not_implemented( "C_sbi").
|
||||
C_sbi_narg ::= not_implemented( "C_sbi_narg").
|
||||
C_mli ::= not_implemented( "C_mli").
|
||||
C_mli_narg ::= not_implemented( "C_mli_narg").
|
||||
C_dvi ::= not_implemented( "C_dvi").
|
||||
C_dvi_narg ::= not_implemented( "C_dvi_narg").
|
||||
C_rmi ::= not_implemented( "C_rmi").
|
||||
C_rmi_narg ::= not_implemented( "C_rmi_narg").
|
||||
C_ngi ::= not_implemented( "C_ngi").
|
||||
C_ngi_narg ::= not_implemented( "C_ngi_narg").
|
||||
C_sli ::= not_implemented( "C_sli").
|
||||
C_sli_narg ::= not_implemented( "C_sli_narg").
|
||||
C_sri ::= not_implemented( "C_sri").
|
||||
C_sri_narg ::= not_implemented( "C_sri_narg").
|
||||
C_adu ::= not_implemented( "C_adu").
|
||||
C_adu_narg ::= not_implemented( "C_adu_narg").
|
||||
C_sbu ::= not_implemented( "C_sbu").
|
||||
C_sbu_narg ::= not_implemented( "C_sbu_narg").
|
||||
C_mlu ::= not_implemented( "C_mlu").
|
||||
C_mlu_narg ::= not_implemented( "C_mlu_narg").
|
||||
C_dvu ::= not_implemented( "C_dvu").
|
||||
C_dvu_narg ::= not_implemented( "C_dvu_narg").
|
||||
C_rmu ::= not_implemented( "C_rmu").
|
||||
C_rmu_narg ::= not_implemented( "C_rmu_narg").
|
||||
C_slu ::= not_implemented( "C_slu").
|
||||
C_slu_narg ::= not_implemented( "C_slu_narg").
|
||||
C_sru ::= not_implemented( "C_sru").
|
||||
C_sru_narg ::= not_implemented( "C_sru_narg").
|
||||
C_adf ::= not_implemented( "C_adf").
|
||||
C_adf_narg ::= not_implemented( "C_adf_narg").
|
||||
C_sbf ::= not_implemented( "C_sbf").
|
||||
C_sbf_narg ::= not_implemented( "C_sbf_narg").
|
||||
C_mlf ::= not_implemented( "C_mlf").
|
||||
C_mlf_narg ::= not_implemented( "C_mlf_narg").
|
||||
C_dvf ::= not_implemented( "C_dvf").
|
||||
C_dvf_narg ::= not_implemented( "C_dvf_narg").
|
||||
C_ngf ::= not_implemented( "C_ngf").
|
||||
C_ngf_narg ::= not_implemented( "C_ngf_narg").
|
||||
C_fif ::= not_implemented( "C_fif").
|
||||
C_fif_narg ::= not_implemented( "C_fif_narg").
|
||||
C_fef ::= not_implemented( "C_fef").
|
||||
C_fef_narg ::= not_implemented( "C_fef_narg").
|
||||
C_adp ::= not_implemented( "C_adp").
|
||||
C_ads ::= not_implemented( "C_ads").
|
||||
C_ads_narg ::= not_implemented( "C_ads_narg").
|
||||
C_sbs ::= not_implemented( "C_sbs").
|
||||
C_sbs_narg ::= not_implemented( "C_sbs_narg").
|
||||
C_inc ::= not_implemented( "C_inc").
|
||||
C_inl ::= not_implemented( "C_inl").
|
||||
C_ine ::= not_implemented( "C_ine").
|
||||
C_ine_dnam ::= not_implemented( "C_ine_dnam").
|
||||
C_ine_dlb ::= not_implemented( "C_ine_dlb").
|
||||
C_dec ::= not_implemented( "C_dec").
|
||||
C_del ::= not_implemented( "C_del").
|
||||
C_dee ::= not_implemented( "C_dee").
|
||||
C_dee_dnam ::= not_implemented( "C_dee_dnam").
|
||||
C_dee_dlb ::= not_implemented( "C_dee_dlb").
|
||||
C_zrl ::= not_implemented( "C_zrl").
|
||||
C_zre ::= not_implemented( "C_zre").
|
||||
C_zre_dnam ::= not_implemented( "C_zre_dnam").
|
||||
C_zre_dlb ::= not_implemented( "C_zre_dlb").
|
||||
C_zrf ::= not_implemented( "C_zrf").
|
||||
C_zrf_narg ::= not_implemented( "C_zrf_narg").
|
||||
C_zer ::= not_implemented( "C_zer").
|
||||
C_zer_narg ::= not_implemented( "C_zer_narg").
|
||||
C_cii ::= not_implemented( "C_cii").
|
||||
C_cui ::= not_implemented( "C_cui").
|
||||
C_cfi ::= not_implemented( "C_cfi").
|
||||
C_cif ::= not_implemented( "C_cif").
|
||||
C_cuf ::= not_implemented( "C_cuf").
|
||||
C_cff ::= not_implemented( "C_cff").
|
||||
C_ciu ::= not_implemented( "C_ciu").
|
||||
C_cuu ::= not_implemented( "C_cuu").
|
||||
C_cfu ::= not_implemented( "C_cfu").
|
||||
C_and ::= not_implemented( "C_and").
|
||||
C_and_narg ::= not_implemented( "C_and_narg").
|
||||
C_ior ::= not_implemented( "C_ior").
|
||||
C_ior_narg ::= not_implemented( "C_ior_narg").
|
||||
C_xor ::= not_implemented( "C_xor").
|
||||
C_xor_narg ::= not_implemented( "C_xor_narg").
|
||||
C_com ::= not_implemented( "C_com").
|
||||
C_com_narg ::= not_implemented( "C_com_narg").
|
||||
C_rol ::= not_implemented( "C_rol").
|
||||
C_rol_narg ::= not_implemented( "C_rol_narg").
|
||||
C_ror ::= not_implemented( "C_ror").
|
||||
C_ror_narg ::= not_implemented( "C_ror_narg").
|
||||
C_init ::= not_implemented( "C_init").
|
||||
C_open ::= not_implemented( "C_open").
|
||||
C_close ::= not_implemented( "C_close").
|
||||
C_magic ::= not_implemented( "C_magic").
|
||||
C_df_dlb ::= not_implemented( "C_df_dlb").
|
||||
C_df_dnam ::= not_implemented( "C_df_dnam").
|
||||
C_df_ilb ::= not_implemented( "C_df_ilb").
|
||||
C_pro ::= not_implemented( "C_pro").
|
||||
C_pro_narg ::= not_implemented( "C_pro_narg").
|
||||
C_end ::= not_implemented( "C_end").
|
||||
C_end_narg ::= not_implemented( "C_end_narg").
|
||||
C_exa_dlb ::= not_implemented( "C_exa_dlb").
|
||||
C_exa_dnam ::= not_implemented( "C_exa_dnam").
|
||||
C_exp ::= not_implemented( "C_exp").
|
||||
C_ina_dlb ::= not_implemented( "C_ina_dlb").
|
||||
C_ina_dnam ::= not_implemented( "C_ina_dnam").
|
||||
C_inp ::= not_implemented( "C_inp").
|
||||
C_con_cst ::= not_implemented( "C_con_cst").
|
||||
C_con_icon ::= not_implemented( "C_con_icon").
|
||||
C_con_ucon ::= not_implemented( "C_con_ucon").
|
||||
C_con_fcon ::= not_implemented( "C_con_fcon").
|
||||
C_con_scon ::= not_implemented( "C_con_scon").
|
||||
C_con_dnam ::= not_implemented( "C_con_dnam").
|
||||
C_con_dlb ::= not_implemented( "C_con_dlb").
|
||||
C_con_ilb ::= not_implemented( "C_con_ilb").
|
||||
C_con_pnam ::= not_implemented( "C_con_pnam").
|
||||
C_rom_cst ::= not_implemented( "C_rom_cst").
|
||||
C_rom_icon ::= not_implemented( "C_rom_icon").
|
||||
C_rom_ucon ::= not_implemented( "C_rom_ucon").
|
||||
C_rom_fcon ::= not_implemented( "C_rom_fcon").
|
||||
C_rom_scon ::= not_implemented( "C_rom_scon").
|
||||
C_rom_dnam ::= not_implemented( "C_rom_dnam").
|
||||
C_rom_dlb ::= not_implemented( "C_rom_dlb").
|
||||
C_rom_ilb ::= not_implemented( "C_rom_ilb").
|
||||
C_rom_pnam ::= not_implemented( "C_rom_pnam").
|
||||
C_bss_cst ::= not_implemented( "C_bss_cst").
|
||||
C_bss_icon ::= not_implemented( "C_bss_icon").
|
||||
C_bss_ucon ::= not_implemented( "C_bss_ucon").
|
||||
C_bss_fcon ::= not_implemented( "C_bss_fcon").
|
||||
C_bss_dnam ::= not_implemented( "C_bss_dnam").
|
||||
C_bss_dlb ::= not_implemented( "C_bss_dlb").
|
||||
C_bss_ilb ::= not_implemented( "C_bss_ilb").
|
||||
C_bss_pnam ::= not_implemented( "C_bss_pnam").
|
||||
C_hol_cst ::= not_implemented( "C_hol_cst").
|
||||
C_hol_icon ::= not_implemented( "C_hol_icon").
|
||||
C_hol_ucon ::= not_implemented( "C_hol_ucon").
|
||||
C_hol_fcon ::= not_implemented( "C_hol_fcon").
|
||||
C_hol_dnam ::= not_implemented( "C_hol_dnam").
|
||||
C_hol_dlb ::= not_implemented( "C_hol_dlb").
|
||||
C_hol_ilb ::= not_implemented( "C_hol_ilb").
|
||||
C_hol_pnam ::= not_implemented( "C_hol_pnam").
|
||||
C_cst ::= not_implemented( "C_cst").
|
||||
C_icon ::= not_implemented( "C_icon").
|
||||
C_ucon ::= not_implemented( "C_ucon").
|
||||
C_fcon ::= not_implemented( "C_fcon").
|
||||
C_scon ::= not_implemented( "C_scon").
|
||||
C_dnam ::= not_implemented( "C_dnam").
|
||||
C_dlb ::= not_implemented( "C_dlb").
|
||||
C_ilb ::= not_implemented( "C_ilb").
|
||||
C_pnam ::= not_implemented( "C_pnam").
|
||||
C_mes_begin ::= not_implemented( "C_mes_begin").
|
||||
C_mes_end ::= not_implemented( "C_mes_end").
|
||||
C_exc ::= not_implemented( "C_exc").
|
||||
6
util/ceg/defaults/pseudo/C_busy.c
Normal file
6
util/ceg/defaults/pseudo/C_busy.c
Normal file
@@ -0,0 +1,6 @@
|
||||
extern int busy;
|
||||
|
||||
int C_busy()
|
||||
{
|
||||
return( busy);
|
||||
}
|
||||
12
util/ceg/defaults/pseudo/C_close.c
Normal file
12
util/ceg/defaults/pseudo/C_close.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <assert.h>
|
||||
|
||||
extern int busy;
|
||||
|
||||
C_close()
|
||||
{
|
||||
assert( busy);
|
||||
|
||||
end_back();
|
||||
do_close();
|
||||
busy = 0;
|
||||
}
|
||||
13
util/ceg/defaults/pseudo/C_df_dlb.c
Normal file
13
util/ceg/defaults/pseudo/C_df_dlb.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
C_df_dlb( l)
|
||||
label l;
|
||||
|
||||
/* Bij welk data-segment hoort dit label thuis? ROM, CON, HOL, BSS ???
|
||||
* Oplossing : Bewaar het label totdat de eerstvolgende data-instructie aange-
|
||||
* roepen wordt, op dat moment het label genereren!!
|
||||
*/
|
||||
{
|
||||
save_label( extnd_dlb( l));
|
||||
}
|
||||
8
util/ceg/defaults/pseudo/C_df_dnam.c
Normal file
8
util/ceg/defaults/pseudo/C_df_dnam.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
C_df_dnam( s)
|
||||
char *s;
|
||||
{
|
||||
save_label( extnd_name( s));
|
||||
}
|
||||
9
util/ceg/defaults/pseudo/C_df_ilb.c
Normal file
9
util/ceg/defaults/pseudo/C_df_ilb.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
C_df_ilb( l)
|
||||
label l;
|
||||
{
|
||||
symbol_definition( extnd_ilb( l));
|
||||
set_local_visible( extnd_ilb( l));
|
||||
}
|
||||
21
util/ceg/defaults/pseudo/C_end.c
Normal file
21
util/ceg/defaults/pseudo/C_end.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
extern int locals_created;
|
||||
|
||||
C_end( l)
|
||||
arith l;
|
||||
{
|
||||
char *p;
|
||||
|
||||
swtxt();
|
||||
|
||||
if ( !locals_created) {
|
||||
p = extnd_pro( procno);
|
||||
|
||||
symbol_definition( p);
|
||||
set_local_visible( p);
|
||||
locals( l);
|
||||
jump( extnd_start( procno));
|
||||
}
|
||||
}
|
||||
8
util/ceg/defaults/pseudo/C_end_narg.c
Normal file
8
util/ceg/defaults/pseudo/C_end_narg.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <assert.h>
|
||||
|
||||
extern int locals_created;
|
||||
|
||||
C_end_narg()
|
||||
{
|
||||
assert( locals_created);
|
||||
}
|
||||
8
util/ceg/defaults/pseudo/C_exa_dlb.c
Normal file
8
util/ceg/defaults/pseudo/C_exa_dlb.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
C_exa_dlb( l)
|
||||
label l;
|
||||
{
|
||||
set_global_visible( extnd_dlb( l));
|
||||
}
|
||||
8
util/ceg/defaults/pseudo/C_exa_dnam.c
Normal file
8
util/ceg/defaults/pseudo/C_exa_dnam.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
C_exa_dnam( s)
|
||||
char *s;
|
||||
{
|
||||
set_global_visible( extnd_dnam( s));
|
||||
}
|
||||
8
util/ceg/defaults/pseudo/C_exp.c
Normal file
8
util/ceg/defaults/pseudo/C_exp.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
C_exp( s)
|
||||
char *s;
|
||||
{
|
||||
set_global_visible( extnd_name( s));
|
||||
}
|
||||
8
util/ceg/defaults/pseudo/C_ina_dlb.c
Normal file
8
util/ceg/defaults/pseudo/C_ina_dlb.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
C_ina_dlb( l)
|
||||
label l;
|
||||
{
|
||||
set_local_visible( extnd_dlb( l));
|
||||
}
|
||||
8
util/ceg/defaults/pseudo/C_ina_dnam.c
Normal file
8
util/ceg/defaults/pseudo/C_ina_dnam.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
C_ina_dnam( s)
|
||||
char *s;
|
||||
{
|
||||
set_local_visible( extnd_name( s));
|
||||
}
|
||||
18
util/ceg/defaults/pseudo/C_init.c
Normal file
18
util/ceg/defaults/pseudo/C_init.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <em.h>
|
||||
#include <system.h>
|
||||
#include "mach.h"
|
||||
|
||||
C_init( wsize, psize)
|
||||
arith wsize, psize;
|
||||
{
|
||||
if ( wsize != EM_WSIZE) {
|
||||
fprint( STDERR, "wrong word size\n");
|
||||
exit( -1);
|
||||
}
|
||||
if ( psize != EM_PSIZE) {
|
||||
fprint( STDERR, "wrong pointer size\n");
|
||||
exit( -1);
|
||||
}
|
||||
|
||||
init_back();
|
||||
}
|
||||
8
util/ceg/defaults/pseudo/C_inp.c
Normal file
8
util/ceg/defaults/pseudo/C_inp.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
C_inp( s)
|
||||
char *s;
|
||||
{
|
||||
set_local_visible( extnd_name( s));
|
||||
}
|
||||
3
util/ceg/defaults/pseudo/C_magic.c
Normal file
3
util/ceg/defaults/pseudo/C_magic.c
Normal file
@@ -0,0 +1,3 @@
|
||||
C_magic()
|
||||
{
|
||||
}
|
||||
17
util/ceg/defaults/pseudo/C_open.c
Normal file
17
util/ceg/defaults/pseudo/C_open.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <assert.h>
|
||||
#include <system.h>
|
||||
|
||||
extern int busy;
|
||||
|
||||
int C_open( filename)
|
||||
char *filename;
|
||||
{
|
||||
assert( !busy);
|
||||
|
||||
if ( !do_open( filename)) {
|
||||
fprint( STDERR, "Couldn't open %s\n", filename);
|
||||
return( 0)
|
||||
}
|
||||
else
|
||||
return( 1);
|
||||
}
|
||||
17
util/ceg/defaults/pseudo/C_pro.c
Normal file
17
util/ceg/defaults/pseudo/C_pro.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
extern int locals_created;
|
||||
|
||||
C_pro( s, l)
|
||||
char *s;
|
||||
arith l;
|
||||
{
|
||||
swtxt();
|
||||
|
||||
symbol_definition( extnd_name( s));
|
||||
procno++;
|
||||
prolog();
|
||||
locals(l);
|
||||
locals_created = 1;
|
||||
}
|
||||
24
util/ceg/defaults/pseudo/C_pro_narg.c
Normal file
24
util/ceg/defaults/pseudo/C_pro_narg.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <em.h>
|
||||
#include "back.h"
|
||||
|
||||
extern int locals_created;
|
||||
|
||||
C_pro_narg( s)
|
||||
char*s;
|
||||
|
||||
/* Het aantal locale variabelen is nog niet bekend, maar het stack-frame moet
|
||||
* nu wel gemaakt worden! Oplossing : Pas bij bij C_end() is het aantal locale
|
||||
* variabelen bekend dus nu een "jump" genereren en bij C_end() prolog() aan-
|
||||
* roepen en daarna terug-jump-en naar het begin van de EM-procedure.
|
||||
*/
|
||||
{
|
||||
swtxt();
|
||||
|
||||
symbol_definition( extnd_name( s));
|
||||
procno++;
|
||||
prolog();
|
||||
locals_created = 0;
|
||||
jump( extnd_pro( procno));
|
||||
symbol_definition( extnd_start( procno));
|
||||
set_local_visible( extnd_start( procno));
|
||||
}
|
||||
1
util/ceg/defaults/pseudo_vars.c
Normal file
1
util/ceg/defaults/pseudo_vars.c
Normal file
@@ -0,0 +1 @@
|
||||
int locals_created = 0, busy = 0;
|
||||
48
util/ceg/defaults/storage/C_bss_cst.c
Normal file
48
util/ceg/defaults/storage/C_bss_cst.c
Normal file
@@ -0,0 +1,48 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_bss_cst( n, w, i)
|
||||
arith n, w;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0 || w == BSS_INIT) {
|
||||
switchseg( SEGBSS);
|
||||
dump_label();
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
for ( i = 0; i < n/EM_WSIZE; i++)
|
||||
conEM_WSIZE( (CAST_WSIZE) w);
|
||||
}
|
||||
}
|
||||
49
util/ceg/defaults/storage/C_bss_dlb.c
Normal file
49
util/ceg/defaults/storage/C_bss_dlb.c
Normal file
@@ -0,0 +1,49 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_bss_dlb( n, l, offs, i)
|
||||
arith n, offs;
|
||||
label l;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0) {
|
||||
switchseg( SEGBSS);
|
||||
dump_label();
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
for ( i = 0; i < n/EM_PSIZE; i++)
|
||||
relocEM_PSIZE( extnd_dlb( l), offs, ABSOLUTE);
|
||||
}
|
||||
}
|
||||
49
util/ceg/defaults/storage/C_bss_dnam.c
Normal file
49
util/ceg/defaults/storage/C_bss_dnam.c
Normal file
@@ -0,0 +1,49 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_bss_dnam( n, s, offs, i)
|
||||
arith n, offs;
|
||||
char *s;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0) {
|
||||
switchseg( SEGBSS);
|
||||
dump_label();
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
for ( i = 0; i < n/EM_PSIZE; i++)
|
||||
relocEM_PSIZE( extnd_dnam( s), offs, ABSOLUTE);
|
||||
}
|
||||
}
|
||||
49
util/ceg/defaults/storage/C_bss_ilb.c
Normal file
49
util/ceg/defaults/storage/C_bss_ilb.c
Normal file
@@ -0,0 +1,49 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_bss_ilb( n, l, i)
|
||||
arith n;
|
||||
label l;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0) {
|
||||
switchseg( SEGBSS);
|
||||
dump_label();
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
for ( i = 0; i < n/EM_PSIZE; i++)
|
||||
relocEM_PSIZE( extnd_ilb( l), 0, ABSOLUTE);
|
||||
}
|
||||
}
|
||||
49
util/ceg/defaults/storage/C_bss_pnam.c
Normal file
49
util/ceg/defaults/storage/C_bss_pnam.c
Normal file
@@ -0,0 +1,49 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_bss_pnam( n, s, i)
|
||||
arith n;
|
||||
char *s;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0) {
|
||||
switchseg( SEGBSS);
|
||||
dump_label();
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
for ( i = 0; i < n/EM_PSIZE; i++)
|
||||
relocEM_PSIZE( extnd_name( s), 0, ABSOLUTE);
|
||||
}
|
||||
}
|
||||
39
util/ceg/defaults/storage/C_con_cst.c
Normal file
39
util/ceg/defaults/storage/C_con_cst.c
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
|
||||
C_con_cst( c)
|
||||
arith c;
|
||||
{
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
conEM_WSIZE( (CAST_WSIZE) c);
|
||||
}
|
||||
39
util/ceg/defaults/storage/C_con_dlb.c
Normal file
39
util/ceg/defaults/storage/C_con_dlb.c
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_con_dlb( g, o)
|
||||
label g;
|
||||
arith o;
|
||||
{
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
relocEM_PSIZE( extnd_dlb( g), o, ABSOLUTE);
|
||||
}
|
||||
39
util/ceg/defaults/storage/C_con_dnam.c
Normal file
39
util/ceg/defaults/storage/C_con_dnam.c
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_con_dnam( g, o)
|
||||
char *g;
|
||||
arith o;
|
||||
{
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
relocEM_PSIZE( extnd_name( g), o, ABSOLUTE);
|
||||
}
|
||||
38
util/ceg/defaults/storage/C_con_ilb.c
Normal file
38
util/ceg/defaults/storage/C_con_ilb.c
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_con_ilb( l)
|
||||
label l;
|
||||
{
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
relocEM_PSIZE( extnd_ilb( l), 0, ABSOLUTE);
|
||||
}
|
||||
38
util/ceg/defaults/storage/C_con_pnam.c
Normal file
38
util/ceg/defaults/storage/C_con_pnam.c
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_con_pnam( p)
|
||||
char *p;
|
||||
{
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
relocEM_PSIZE( extnd_name( p), 0, ABSOLUTE);
|
||||
}
|
||||
40
util/ceg/defaults/storage/C_con_scon.c
Normal file
40
util/ceg/defaults/storage/C_con_scon.c
Normal file
@@ -0,0 +1,40 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_con_scon( s, n)
|
||||
char *s;
|
||||
arith n;
|
||||
{
|
||||
switchseg( SEGCON);
|
||||
dump_label();
|
||||
|
||||
for ( ; n-- > 0;)
|
||||
con1( (ONE_BYTE) *s++);
|
||||
}
|
||||
50
util/ceg/defaults/storage/C_hol_cst.c
Normal file
50
util/ceg/defaults/storage/C_hol_cst.c
Normal file
@@ -0,0 +1,50 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_hol_cst( n, w, i)
|
||||
arith n, w;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0 || w == BSS_INIT) {
|
||||
switchseg( SEGBSS);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
for ( i = 0; i < n/EM_WSIZE; i++)
|
||||
conEM_WSIZE( (CAST_WSIZE) w);
|
||||
}
|
||||
}
|
||||
51
util/ceg/defaults/storage/C_hol_dlb.c
Normal file
51
util/ceg/defaults/storage/C_hol_dlb.c
Normal file
@@ -0,0 +1,51 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_hol_dlb( n, l, offs, i)
|
||||
arith n, offs;
|
||||
label l;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0) {
|
||||
switchseg( SEGBSS);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
for ( i = 0; i < n/EM_PSIZE; i++)
|
||||
relocEM_PSIZE( extnd_dlb( l), offs, ABSOLUTE);
|
||||
}
|
||||
}
|
||||
51
util/ceg/defaults/storage/C_hol_dnam.c
Normal file
51
util/ceg/defaults/storage/C_hol_dnam.c
Normal file
@@ -0,0 +1,51 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_hol_dnam( n, s, offs, i)
|
||||
arith n, offs;
|
||||
char *s;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0) {
|
||||
switchseg( SEGBSS);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
for ( i = 0; i < n/EM_PSIZE; i++)
|
||||
relocEM_PSIZE( extnd_dnam( s), offs, ABSOLUTE);
|
||||
}
|
||||
}
|
||||
51
util/ceg/defaults/storage/C_hol_ilb.c
Normal file
51
util/ceg/defaults/storage/C_hol_ilb.c
Normal file
@@ -0,0 +1,51 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_hol_ilb( n, l, i)
|
||||
arith n;
|
||||
label l;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0) {
|
||||
switchseg( SEGBSS);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
for ( i = 0; i < n/EM_PSIZE; i++)
|
||||
relocEM_PSIZE( extnd_ilb( l), 0, ABSOLUTE);
|
||||
}
|
||||
}
|
||||
51
util/ceg/defaults/storage/C_hol_pnam.c
Normal file
51
util/ceg/defaults/storage/C_hol_pnam.c
Normal file
@@ -0,0 +1,51 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_hol_pnam( n, s, i)
|
||||
arith n;
|
||||
char *s;
|
||||
int i;
|
||||
{
|
||||
if ( i == 0) {
|
||||
switchseg( SEGBSS);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
bss( n);
|
||||
}
|
||||
else {
|
||||
switchseg( SEGCON);
|
||||
align_word();
|
||||
symbol_definition( extnd_hol( ++holno));
|
||||
|
||||
for ( i = 0; i < n/EM_PSIZE; i++)
|
||||
relocEM_PSIZE( extnd_name( s), 0, ABSOLUTE);
|
||||
}
|
||||
}
|
||||
38
util/ceg/defaults/storage/C_rom_cst.c
Normal file
38
util/ceg/defaults/storage/C_rom_cst.c
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_rom_cst( c)
|
||||
arith c;
|
||||
{
|
||||
switchseg( SEGROM);
|
||||
dump_label();
|
||||
|
||||
romEM_WSIZE( (CAST_WSIZE) c);
|
||||
}
|
||||
39
util/ceg/defaults/storage/C_rom_dlb.c
Normal file
39
util/ceg/defaults/storage/C_rom_dlb.c
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_rom_dlb( g, o)
|
||||
label g;
|
||||
arith o;
|
||||
{
|
||||
switchseg( SEGROM);
|
||||
dump_label();
|
||||
|
||||
relocEM_PSIZE( extnd_dlb( g), o, ABSOLUTE);
|
||||
}
|
||||
39
util/ceg/defaults/storage/C_rom_dnam.c
Normal file
39
util/ceg/defaults/storage/C_rom_dnam.c
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_rom_dnam( g, o)
|
||||
char *g;
|
||||
arith o;
|
||||
{
|
||||
switchseg( SEGROM);
|
||||
dump_label();
|
||||
|
||||
relocEM_PSIZE( extnd_name( g), o, ABSOLUTE);
|
||||
}
|
||||
38
util/ceg/defaults/storage/C_rom_ilb.c
Normal file
38
util/ceg/defaults/storage/C_rom_ilb.c
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_rom_ilb( l)
|
||||
label l;
|
||||
{
|
||||
switchseg( SEGROM);
|
||||
dump_label();
|
||||
|
||||
relocEM_PSIZE( extnd_ilb( l), 0, ABSOLUTE);
|
||||
}
|
||||
38
util/ceg/defaults/storage/C_rom_pnam.c
Normal file
38
util/ceg/defaults/storage/C_rom_pnam.c
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_rom_pnam( p)
|
||||
char *p;
|
||||
{
|
||||
switchseg( SEGROM);
|
||||
dump_label();
|
||||
|
||||
relocEM_PSIZE( extnd_name( p), 0, ABSOLUTE);
|
||||
}
|
||||
40
util/ceg/defaults/storage/C_rom_scon.c
Normal file
40
util/ceg/defaults/storage/C_rom_scon.c
Normal file
@@ -0,0 +1,40 @@
|
||||
#include <em.h>
|
||||
#include "mach.h"
|
||||
#include "back.h"
|
||||
|
||||
#if EM_WSIZE == 1
|
||||
#define conEM_WSIZE con1
|
||||
#define romEM_WSIZE rom1
|
||||
#define CAST_WSIZE ONE_BYTE
|
||||
#endif
|
||||
#if EM_WSIZE == 2
|
||||
#define conEM_WSIZE con2
|
||||
#define romEM_WSIZE rom2
|
||||
#define CAST_WSIZE TWO_BYTES
|
||||
#endif
|
||||
#if EM_WSIZE == 4
|
||||
#define conEM_WSIZE con4
|
||||
#define romEM_WSIZE rom4
|
||||
#define CAST_WSIZE FOUR_BYTES
|
||||
#endif
|
||||
|
||||
#if EM_PSIZE == 1
|
||||
#define relocEM_PSIZE reloc1
|
||||
#endif
|
||||
#if EM_PSIZE == 2
|
||||
#define relocEM_PSIZE reloc2
|
||||
#endif
|
||||
#if EM_PSIZE == 4
|
||||
#define relocEM_PSIZE reloc4
|
||||
#endif
|
||||
|
||||
C_rom_scon( s, n)
|
||||
char *s;
|
||||
arith n;
|
||||
{
|
||||
switchseg( SEGROM);
|
||||
dump_label();
|
||||
|
||||
for ( ; n-- > 0;)
|
||||
rom1( (ONE_BYTE) *s++);
|
||||
}
|
||||
Reference in New Issue
Block a user