## machine-properties-intel32.pkg
#
# Information specified in this file is largely
# rendundant with that specified in
#
# src/lib/compiler/back/low/intel32/intel32.architecture-description
#
# The duplication is for historical rather than technical reasons;
# this file derives from the original 1990 SML/NJ compiler, whereas
# the architecture-description file derives from the later and
# separate MLRISC project, which is not yet well integrated. XXX SUCKO FIXME
# Compiled by:
#
src/lib/compiler/mythryl-compiler-support-for-intel32.lib# We get referenced in
#
#
src/lib/compiler/back/low/main/intel32/backend-lowhalf-intel32-g.pkg#
# From there we get passed as a parameter to
# generics throughout the back end:
#
#
src/lib/compiler/back/low/main/nextcode/convert-nextcode-fun-args-to-treecode-g.pkg#
src/lib/compiler/back/low/main/nextcode/nextcode-ccalls-g.pkg#
src/lib/compiler/back/low/main/nextcode/emit-treecode-heapcleaner-calls-g.pkg#
src/lib/compiler/back/low/main/nextcode/spill-nextcode-registers-g.pkg#
src/lib/compiler/back/low/main/main/backend-lowhalf-g.pkg#
src/lib/compiler/back/low/main/main/spill-table-g.pkg#
src/lib/compiler/back/low/main/main/translate-nextcode-to-treecode-g.pkg#
src/lib/compiler/back/top/closures/make-nextcode-closures-g.pkg#
src/lib/compiler/back/top/closures/dummy-nextcode-inlining-g.pkg#
src/lib/compiler/back/top/nextcode/nextcode-preimprover-transform-g.pkg#
src/lib/compiler/back/top/improve-nextcode/clean-nextcode-g.pkg#
src/lib/compiler/back/top/improve-nextcode/run-optional-nextcode-improvers-g.pkg#
src/lib/compiler/back/top/improve-nextcode/uncurry-nextcode-functions-g.pkg#
src/lib/compiler/back/top/nextcode/translate-anormcode-to-nextcode-g.pkgstipulate
package sma = supported_architectures; # supported_architectures is from
src/lib/compiler/front/basics/main/supported-architectures.pkgherein
# This package is referenced (only) in:
#
#
src/lib/compiler/back/low/main/intel32/runtime-intel32.pkg #
src/lib/compiler/back/low/main/intel32/backend-lowhalf-intel32-g.pkg #
package machine_properties_intel32
: (weak) Machine_Properties # Machine_Properties is from
src/lib/compiler/back/low/main/main/machine-properties.api {
include package machine_properties_default; # machine_properties_default is from
src/lib/compiler/back/low/main/main/machine-properties-default.pkg machine_architecture = sma::INTEL32; # == intel32;
big_endian = FALSE;
spill_area_size = 8192; # Must?match LIB7_FRAME_SIZE in src/c/machine-dependent/prim.intel32.asm
# Must?match LIB7_FRAME_SIZE in src/c/machine-dependent/prim.intel32.masm
initial_spill_offset = 512; # Must match SpillAreaStart in src/c/machine-dependent/prim.intel32.asm
# Must match SpillAreaStart in src/c/machine-dependent/prim.intel32.masm
# NB: On inte32 we have only six actual int registers
# (not counting esp and edi, the stack- and
# heap allocation-pointers), so we use some stack
# locations as fake int "registers". (This results
# in glorious amounts of kludgery all through the code...)
#
num_int_regs = 12; # 18 # can be
|platform_register_info_intel32::available_int_registers| + |vregs|
num_float_regs = 21; # Can be
|8 upto 31|
num_float_callee_saves = 0;
run_heapcleaner__offset = 32; # Byte-offset relative to framepointer of pointer to function which starts a heapcleaning ("garbage collection").
# Needs to match run_heapcleaner_ptr in src/c/machine-dependent/prim.intel32.asm
# Needs to match run_heapcleaner_ptr in src/c/machine-dependent/prim.intel32.masm
# This pointer gets set up by asm_run_mythryl_task in either of the above assembly-code files;
# Calling the pointer results in REQUEST_HEAPCLEANING being returned to
# run_mythryl_task_and_runtime_eventloop__may_heapclean () in src/c/main/run-mythryl-code-and-runtime-eventloop.c
# which invokes clean_heap () in src/c/heapcleaner/call-heapcleaner.c
pseudo_reg_offset = 136;
const_base_pointer_reg_offset = 0;
fixed_arg_passing = FALSE;
task_offset = 176; # Must match task_offset in src/c/machine-dependent/prim.intel32.asm
# Must match task_offset in src/c/machine-dependent/prim.intel32.masm
hostthread_offtask = 4; # Probably because hostthread is second field in 'struct task' in src/c/h/runtime-base.h
in_lib7off_vsp = 8;
limit_ptr_mask_off_vsp = 200;
};
end;