1997-03-14 15:13:58 +00:00
|
|
|
# Makefile fragment for common parts of all simulators.
|
|
|
|
# Copyright (C) 1997 Free Software Foundation, Inc.
|
|
|
|
# Contributed by Cygnus Support.
|
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
# This Makefile fragment consists of two separate parts.
|
|
|
|
# They are merged into the final Makefile at points denoted by
|
|
|
|
# "## COMMON_PRE_CONFIG_FRAG" and "## COMMON_POST_CONFIG_FRAG".
|
|
|
|
#
|
|
|
|
# The target Makefile should look like:
|
|
|
|
#
|
|
|
|
#># Copyright blah blah
|
|
|
|
#>
|
|
|
|
#>## COMMON_PRE_CONFIG_FRAG
|
|
|
|
#>
|
|
|
|
#># Any overrides necessary for the SIM_FOO config vars.
|
|
|
|
#>SIM_FOO = ...
|
|
|
|
#>
|
|
|
|
#>## COMMON_POST_CONFIG_FRAG
|
|
|
|
#>
|
|
|
|
#># Rules to build target specific .o's.
|
|
|
|
|
|
|
|
## COMMON_PRE_CONFIG_FRAG
|
|
|
|
|
|
|
|
VPATH = @srcdir@
|
|
|
|
srcdir = @srcdir@
|
1997-11-18 07:14:20 +00:00
|
|
|
srccom = $(srcdir)/../common
|
1997-03-14 15:13:58 +00:00
|
|
|
srcroot = $(srcdir)/../..
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
host_alias = @host_alias@
|
|
|
|
target_alias = @target_alias@
|
|
|
|
program_transform_name = @program_transform_name@
|
|
|
|
bindir = @bindir@
|
|
|
|
|
|
|
|
libdir = @libdir@
|
|
|
|
tooldir = $(libdir)/$(target_alias)
|
|
|
|
|
|
|
|
datadir = @datadir@
|
|
|
|
mandir = @mandir@
|
|
|
|
man1dir = $(mandir)/man1
|
|
|
|
infodir = @infodir@
|
|
|
|
includedir = @includedir@
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
1997-04-15 19:13:56 +00:00
|
|
|
INSTALL = @INSTALL@
|
1997-03-14 15:13:58 +00:00
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
CC_FOR_BUILD = @CC_FOR_BUILD@
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
SIM_BSWAP = @sim_bswap@
|
|
|
|
SIM_CFLAGS = @sim_cflags@
|
|
|
|
SIM_DEBUG = @sim_debug@
|
|
|
|
SIM_TRACE = @sim_trace@
|
1997-04-30 18:35:58 +00:00
|
|
|
SIM_PROFILE = @sim_profile@
|
1997-03-17 15:29:29 +00:00
|
|
|
|
1997-09-23 01:25:26 +00:00
|
|
|
SIM_ASSERT = @sim_assert@
|
|
|
|
SIM_ALIGNMENT = @sim_alignment@
|
1997-10-14 09:39:05 +00:00
|
|
|
SIM_BITSIZE = @sim_bitsize@
|
1997-09-23 04:05:50 +00:00
|
|
|
SIM_DEFAULT_MODEL = @sim_default_model@
|
1997-09-23 01:25:26 +00:00
|
|
|
SIM_ENDIAN = @sim_endian@
|
1997-12-04 02:04:42 +00:00
|
|
|
SIM_ENVIRONMENT = @sim_environment@
|
1997-09-23 01:25:26 +00:00
|
|
|
SIM_FLOAT = @sim_float@
|
|
|
|
SIM_HARDWARE = @sim_hardware@
|
|
|
|
SIM_HOSTENDIAN = @sim_hostendian@
|
|
|
|
SIM_INLINE = @sim_inline@
|
|
|
|
SIM_PACKAGES = @sim_packages@
|
|
|
|
SIM_REGPARM = @sim_regparm@
|
|
|
|
SIM_RESERVED_BITS = @sim_reserved_bits@
|
1997-09-23 04:05:50 +00:00
|
|
|
SIM_SCACHE = @sim_scache@
|
1997-09-23 01:25:26 +00:00
|
|
|
SIM_SMP = @sim_smp@
|
|
|
|
SIM_STDCALL = @sim_stdcall@
|
|
|
|
SIM_WARNINGS = @sim_warnings@
|
|
|
|
SIM_XOR_ENDIAN = @sim_xor_endian@
|
|
|
|
|
1997-03-14 15:13:58 +00:00
|
|
|
HDEFINES = @HDEFINES@
|
|
|
|
TDEFINES =
|
|
|
|
|
|
|
|
AR = @AR@
|
|
|
|
AR_FLAGS = rc
|
|
|
|
RANLIB = @RANLIB@
|
|
|
|
MAKEINFO = makeinfo
|
|
|
|
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
DEP = $(srcroot)/mkdep
|
|
|
|
|
1997-03-14 15:13:58 +00:00
|
|
|
# Each simulator's Makefile.in defines one or more of these variables
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
# to override our settings as necessary. There is no need to define these
|
|
|
|
# in the simulator's Makefile.in if one is using the default value. In fact
|
|
|
|
# it's preferable not to.
|
1997-03-14 15:13:58 +00:00
|
|
|
|
|
|
|
# List of object files, less common parts.
|
|
|
|
SIM_OBJS =
|
1997-04-15 19:13:56 +00:00
|
|
|
# List of extra dependencies.
|
|
|
|
# Generally this consists of simulator specific files included by sim-main.h.
|
|
|
|
SIM_EXTRA_DEPS =
|
1997-03-14 15:13:58 +00:00
|
|
|
# List of flags to always pass to $(CC).
|
|
|
|
SIM_EXTRA_CFLAGS =
|
|
|
|
# List of extra libraries to link with.
|
|
|
|
SIM_EXTRA_LIBS =
|
|
|
|
# List of extra program dependencies.
|
|
|
|
SIM_EXTRA_LIBDEPS =
|
|
|
|
# List of main object files for `run'.
|
|
|
|
SIM_RUN_OBJS = run.o
|
|
|
|
# Dependency of `all' to build any extra files.
|
|
|
|
SIM_EXTRA_ALL =
|
|
|
|
# Dependency of `install' to install any extra files.
|
|
|
|
SIM_EXTRA_INSTALL =
|
|
|
|
# Dependency of `clean' to clean any extra files.
|
|
|
|
SIM_EXTRA_CLEAN =
|
|
|
|
|
1997-11-18 23:55:33 +00:00
|
|
|
# Every time a new general purpose source file was added every target's
|
|
|
|
# Makefile.in needed to be updated to include the file in SIM_OBJS.
|
|
|
|
# This doesn't scale.
|
|
|
|
# This variable specifies all the generic stuff common to the newer simulators.
|
|
|
|
# Things like sim-reason.o can't go here as the cpu may provide its own
|
|
|
|
# (though hopefully in time that won't be so). Things like sim-bits.o can go
|
|
|
|
# here. Some files are used by all simulators (e.g. callback.o).
|
|
|
|
# Those files are specified in LIB_OBJS below.
|
|
|
|
|
|
|
|
SIM_NEW_COMMON_OBJS = \
|
|
|
|
sim-bits.o \
|
|
|
|
sim-break.o \
|
|
|
|
sim-config.o \
|
|
|
|
sim-core.o \
|
|
|
|
sim-endian.o \
|
|
|
|
sim-events.o \
|
|
|
|
sim-fpu.o \
|
|
|
|
sim-io.o \
|
|
|
|
sim-load.o \
|
|
|
|
sim-memopt.o \
|
|
|
|
sim-module.o \
|
|
|
|
sim-options.o \
|
|
|
|
sim-profile.o \
|
1997-11-19 08:00:37 +00:00
|
|
|
sim-signal.o \
|
1997-11-18 23:55:33 +00:00
|
|
|
sim-trace.o \
|
|
|
|
sim-utils.o \
|
|
|
|
sim-watch.o
|
|
|
|
|
1997-03-14 15:13:58 +00:00
|
|
|
## End COMMON_PRE_CONFIG_FRAG
|
|
|
|
|
|
|
|
## COMMON_POST_CONFIG_FRAG
|
|
|
|
|
1997-09-23 01:25:26 +00:00
|
|
|
CONFIG_CFLAGS = @DEFS@ \
|
|
|
|
$(SIM_CFLAGS) \
|
|
|
|
$(SIM_DEBUG) \
|
1997-09-23 04:05:50 +00:00
|
|
|
$(SIM_DEFAULT_MODEL) \
|
1997-09-23 01:25:26 +00:00
|
|
|
$(SIM_TRACE) \
|
|
|
|
$(SIM_PROFILE) \
|
|
|
|
$(SIM_BSWAP) \
|
|
|
|
$(SIM_ASSERT) \
|
|
|
|
$(SIM_ALIGNMENT) \
|
1997-10-14 09:39:05 +00:00
|
|
|
$(SIM_BITSIZE) \
|
1997-09-23 01:25:26 +00:00
|
|
|
$(SIM_ENDIAN) \
|
1997-12-04 02:04:42 +00:00
|
|
|
$(SIM_ENVIRONMENT) \
|
1997-09-23 01:25:26 +00:00
|
|
|
$(SIM_FLOAT) \
|
|
|
|
$(SIM_HARDWARE) \
|
|
|
|
$(SIM_HOSTENDIAN) \
|
|
|
|
$(SIM_INLINE) \
|
|
|
|
$(SIM_PACKAGES) \
|
|
|
|
$(SIM_REGPARM) \
|
|
|
|
$(SIM_RESERVED_BITS) \
|
1997-09-23 04:05:50 +00:00
|
|
|
$(SIM_SCACHE) \
|
1997-09-23 01:25:26 +00:00
|
|
|
$(SIM_SMP) \
|
|
|
|
$(SIM_STDCALL) \
|
|
|
|
$(SIM_WARNINGS) \
|
|
|
|
$(SIM_XOR_ENDIAN) \
|
|
|
|
$(SIM_EXTRA_CFLAGS) \
|
|
|
|
$(HDEFINES) $(TDEFINES)
|
1997-11-18 07:14:20 +00:00
|
|
|
CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \
|
1997-03-14 15:13:58 +00:00
|
|
|
-I../../include -I$(srcroot)/include \
|
1997-03-17 15:29:29 +00:00
|
|
|
-I../../bfd -I$(srcroot)/bfd \
|
1997-03-14 15:13:58 +00:00
|
|
|
-I../../opcodes -I$(srcroot)/opcodes
|
|
|
|
ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(CFLAGS)
|
|
|
|
BUILD_CFLAGS = -g -O $(CSEARCH)
|
|
|
|
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH)
|
|
|
|
|
1997-03-14 15:13:58 +00:00
|
|
|
LIBIBERTY_LIB = ../../libiberty/libiberty.a
|
|
|
|
BFD_LIB = ../../bfd/libbfd.a
|
|
|
|
OPCODES_LIB = ../../opcodes/libopcodes.a
|
|
|
|
CONFIG_LIBS = @LIBS@
|
|
|
|
LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBIBERTY_LIB) \
|
|
|
|
$(SIM_EXTRA_LIBDEPS)
|
|
|
|
EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBIBERTY_LIB) \
|
|
|
|
$(CONFIG_LIBS) $(SIM_EXTRA_LIBS)
|
|
|
|
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
LIB_OBJS = callback.o syscall.o targ-map.o $(SIM_OBJS)
|
1997-03-14 15:13:58 +00:00
|
|
|
|
1997-12-04 02:04:42 +00:00
|
|
|
all: $(SIM_EXTRA_ALL) libsim.a run .gdbinit
|
1997-03-14 15:13:58 +00:00
|
|
|
|
|
|
|
libsim.a: $(LIB_OBJS)
|
|
|
|
rm -f libsim.a
|
1997-08-27 04:44:41 +00:00
|
|
|
$(AR) $(AR_FLAGS) libsim.a $(LIB_OBJS)
|
1997-03-14 15:13:58 +00:00
|
|
|
$(RANLIB) libsim.a
|
|
|
|
|
|
|
|
run: $(SIM_RUN_OBJS) libsim.a $(LIBDEPS)
|
|
|
|
$(CC) $(ALL_CFLAGS) -o run \
|
|
|
|
$(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
|
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
run.o: $(srccom)/run.c config.h tconfig.h \
|
1997-12-04 02:04:42 +00:00
|
|
|
$(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/run.c $(ALL_CFLAGS)
|
1997-03-14 15:13:58 +00:00
|
|
|
|
|
|
|
# FIXME: Ideally, callback.o and friends live in a library outside of
|
|
|
|
# both the gdb and simulator source trees (e.g. devo/remote. Not
|
|
|
|
# devo/libremote because this directory would contain more than just
|
|
|
|
# a library).
|
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
callback.o: $(srccom)/callback.c config.h tconfig.h \
|
1997-03-14 15:13:58 +00:00
|
|
|
$(srcroot)/include/callback.h targ-vals.h
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/callback.c $(ALL_CFLAGS)
|
1997-03-14 15:13:58 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
syscall.o: $(srccom)/syscall.c config.h tconfig.h \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(srcroot)/include/callback.h targ-vals.h
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/syscall.c $(ALL_CFLAGS)
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
|
1997-03-14 15:13:58 +00:00
|
|
|
targ-map.o: targ-map.c targ-vals.h
|
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
gentmap: Makefile $(srccom)/gentmap.c targ-vals.def
|
|
|
|
$(CC_FOR_BUILD) $(srccom)/gentmap.c -o gentmap $(BUILD_CFLAGS) $(NL_TARGET)
|
1997-03-14 15:13:58 +00:00
|
|
|
|
1998-02-25 15:15:09 +00:00
|
|
|
targ-vals.h targ-map.c: stamp-tvals
|
|
|
|
stamp-tvals: gentmap
|
|
|
|
rm -f tmp-tvals.h tmp-tmap.c
|
|
|
|
./gentmap -h >tmp-tvals.h
|
|
|
|
$(srcroot)/move-if-change tmp-tvals.h targ-vals.h
|
|
|
|
./gentmap -c >tmp-tmap.c
|
|
|
|
$(srcroot)/move-if-change tmp-tmap.c targ-map.c
|
|
|
|
touch stamp-tvals
|
1997-04-02 05:04:25 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Rules for building sim-* components. Triggered by listing the corresponding
|
|
|
|
# .o file in the list of simulator targets.
|
|
|
|
#
|
|
|
|
|
1997-04-15 19:13:56 +00:00
|
|
|
sim_main_headers = \
|
|
|
|
sim-main.h \
|
1997-11-18 07:14:20 +00:00
|
|
|
$(srccom)/sim-config.h \
|
|
|
|
$(srccom)/sim-base.h \
|
|
|
|
$(srccom)/sim-basics.h \
|
1997-11-22 12:52:44 +00:00
|
|
|
$(srccom)/sim-signal.h \
|
1997-11-18 07:14:20 +00:00
|
|
|
$(srccom)/sim-memopt.h \
|
|
|
|
$(srccom)/sim-model.h \
|
|
|
|
$(srccom)/sim-module.h \
|
|
|
|
$(srccom)/sim-trace.h \
|
|
|
|
$(srccom)/sim-profile.h \
|
|
|
|
$(srccom)/sim-engine.h \
|
|
|
|
$(srccom)/sim-events.h \
|
|
|
|
$(srccom)/sim-watch.h \
|
|
|
|
$(srccom)/sim-assert.h \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
tconfig.h \
|
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-04-15 19:13:56 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-assert_h = $(srccom)/sim-assert.h
|
|
|
|
sim-endian_h = $(srccom)/sim-endian.h
|
|
|
|
sim-n-endian_h = $(srccom)/sim-n-endian.h
|
|
|
|
sim-bits_h = $(srccom)/sim-bits.h
|
|
|
|
sim-config_h = $(srccom)/sim-config.h
|
|
|
|
sim-n-bits_h = $(srccom)/sim-n-bits.h
|
|
|
|
sim-core_h = $(srccom)/sim-core.h
|
|
|
|
sim-n-core_h = $(srccom)/sim-n-core.h
|
|
|
|
sim-engine_h = $(srccom)/sim-engine.h
|
|
|
|
sim-events_h = $(srccom)/sim-events.h
|
|
|
|
sim-fpu_h = $(srccom)/sim-fpu.h
|
|
|
|
sim-io_h = $(srccom)/sim-io.h
|
|
|
|
sim-options_h = $(srccom)/sim-options.h
|
|
|
|
sim-break_h = $(srccom)/sim-break.h
|
1997-11-19 08:00:37 +00:00
|
|
|
sim-signal_h = $(srccom)/sim-signal.h
|
1997-04-02 05:04:25 +00:00
|
|
|
|
1997-04-15 19:13:56 +00:00
|
|
|
# FIXME: If this complicated way of building .o files from ../common is
|
* Makefile.in (sim-options_h): Define.
(sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
(sim-model.o): Add new rule.
(cgen-{scache,trace,utils}.o): Add new rules.
* aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
* cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
Indent output by 2 spaces.
* cgen-scache.h (scache_print_profile): Update.
* cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
Use trace_printf, not fprintf.
(trace_extract): Use trace_printf, not cgen_trace_printf.
* genmloop.sh (!FAST case): Increment `insn_count'.
* sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
(sim_cpu_base): Rename member `sd' to `state' to be consistent with
access macro's name.
* sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
(sim_core_{install,uninstall}): New functions.
* sim-core.h (sim_core_{install,uninstall}): Declare.
(sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
* sim-model.h (models,machs,model_install): Declare.
* sim-module.c (modules): Add scache_install, model_install.
(sim_post_argv_init): Set cpu->state backlinks.
* sim-options.c (standard_options): Delete --simcache-size,--max-insns.
(standard_option_handler): Likewise.
* sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
sim-profile.h.
(*): Assume ANSI C.
(profile_options): Delete --profile-simcache.
(profile_option_handler): Likewise.
(profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
spaces.
(profile_print_{memory,model}): Likewise.
(profile_print_simcache): Delete.
(profile_print_speed): New function.
(profile_print): Rewrite.
* sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
(WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
(PROFILE_DATA): Delete members simcache_{hits,misses}.
(PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
(PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
(profile_print): Update prototype.
1997-05-01 18:05:37 +00:00
|
|
|
# necessary, the reason should be documented here.
|
1997-04-15 19:13:56 +00:00
|
|
|
|
|
|
|
BUILT_SRC_FROM_COMMON= \
|
1997-11-12 20:29:53 +00:00
|
|
|
sim-inline.c
|
1997-04-15 19:13:56 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-abort.o: $(srccom)/sim-abort.c \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-abort.c $(ALL_CFLAGS)
|
1997-05-19 03:42:33 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-bits.o: $(srccom)/sim-bits.c $(sim-bits_h) $(sim-n-bits_h) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-bits.c $(ALL_CFLAGS)
|
1997-04-02 05:04:25 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-config.o: $(srccom)/sim-config.c $(sim-config_h) \
|
* Make-common.in (cgen-{arch,cpu,decode}): New targets.
* cgen.sh: New file.
* cgen-scache.h: Deleted.
* cgen-scache.c: Only compile contents if WITH_SCACHE.
(scache_init): Use runtime computed size of SCACHE.
(scache_flush): Likewise.
* cgen-mem.h (GETIMEMU[QHSD]I): Declare.
([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
* cgen-sim.h: Scache support moved here.
(PC): Redo definition.
(ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
(DECODE): Add parallel execution support.
Only include semantic label members if using switch.
(SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
(CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
(IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
from cgen-types.h.
(engine_{stop,run,resume,halt,signal}): Delete decls.
* cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
(argbuf,scache): Delete forward decls.
(STATE): Delete decl.
* cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
Include cgen-mem.h, cgen-ops.h.
(engine_halt,engine_signal): Delete.
({ex,exc,sem,semc}_illegal): Delete.
(sim_disassemble_insn): Result of extract fn is in bits.
* genmloop.sh: Rewrite.
1998-01-19 21:14:14 +00:00
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-config.c $(ALL_CFLAGS)
|
1997-04-02 05:04:25 +00:00
|
|
|
|
* Make-common.in (cgen-{arch,cpu,decode}): New targets.
* cgen.sh: New file.
* cgen-scache.h: Deleted.
* cgen-scache.c: Only compile contents if WITH_SCACHE.
(scache_init): Use runtime computed size of SCACHE.
(scache_flush): Likewise.
* cgen-mem.h (GETIMEMU[QHSD]I): Declare.
([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
* cgen-sim.h: Scache support moved here.
(PC): Redo definition.
(ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
(DECODE): Add parallel execution support.
Only include semantic label members if using switch.
(SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
(CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
(IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
from cgen-types.h.
(engine_{stop,run,resume,halt,signal}): Delete decls.
* cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
(argbuf,scache): Delete forward decls.
(STATE): Delete decl.
* cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
Include cgen-mem.h, cgen-ops.h.
(engine_halt,engine_signal): Delete.
({ex,exc,sem,semc}_illegal): Delete.
(sim_disassemble_insn): Result of extract fn is in bits.
* genmloop.sh: Rewrite.
1998-01-19 21:14:14 +00:00
|
|
|
sim-core.o: $(srccom)/sim-core.c $(sim_main_headers) \
|
|
|
|
$(sim-core_h) $(sim-n-core_h) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-core.c $(ALL_CFLAGS)
|
1997-04-02 05:04:25 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-endian.o: $(srccom)/sim-endian.c $(sim-endian_h) $(sim-n-endian_h) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-endian.c $(ALL_CFLAGS)
|
1997-04-02 05:04:25 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-engine.o: $(srccom)/sim-engine.c $(sim_main_headers) $(sim-engine_h)
|
|
|
|
$(CC) -c $(srccom)/sim-engine.c $(ALL_CFLAGS)
|
1997-05-19 03:42:33 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-events.o: $(srccom)/sim-events.c $(sim-events_h) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-events.c $(ALL_CFLAGS)
|
1997-04-02 05:04:25 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-fpu.o: $(srccom)/sim-fpu.c $(sim-fpu_h) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-fpu.c $(ALL_CFLAGS)
|
1997-08-27 04:44:41 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-hload.o: $(srccom)/sim-hload.c $(sim-assert_h) \
|
1997-12-04 02:04:42 +00:00
|
|
|
$(srcroot)/include/remote-sim.h \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-hload.c $(ALL_CFLAGS)
|
1997-05-05 12:46:25 +00:00
|
|
|
|
1997-12-04 02:04:42 +00:00
|
|
|
sim-hrw.o: $(srccom)/sim-hrw.c $(sim-assert_h) $(sim_core_h) \
|
|
|
|
$(srcroot)/include/remote-sim.h \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(SIM_EXTRA_DEPS)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-hrw.c $(ALL_CFLAGS)
|
1997-09-23 01:25:26 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-inline.c: $(srccom)/sim-inline.c
|
1997-04-02 05:04:25 +00:00
|
|
|
rm -f $@ tmp-$@
|
1997-11-18 07:14:20 +00:00
|
|
|
echo "# 1 \"$(srccom)/$@\"" > tmp-$@
|
|
|
|
cat $(srccom)/$@ >> tmp-$@
|
1997-04-02 05:04:25 +00:00
|
|
|
$(srcdir)/../../move-if-change tmp-$@ $@
|
|
|
|
|
1997-12-04 02:04:42 +00:00
|
|
|
sim-io.o: $(srccom)/sim-io.c $(sim_main_headers) $(sim-io_h) \
|
|
|
|
$(srcroot)/include/remote-sim.h
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-io.c $(ALL_CFLAGS)
|
1997-04-02 05:04:25 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-memopt.o: $(srccom)/sim-memopt.c $(sim_main_headers) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(sim-io_h)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-memopt.c $(ALL_CFLAGS)
|
1997-09-04 03:47:39 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-module.o: $(srccom)/sim-module.c $(sim_main_headers) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(sim-io_h)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-module.c $(ALL_CFLAGS)
|
1997-04-30 18:35:58 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-options.o: $(srccom)/sim-options.c $(sim_main_headers) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(sim-options_h) $(sim-io_h)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-options.c $(ALL_CFLAGS)
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
|
1997-12-04 02:04:42 +00:00
|
|
|
sim-reason.o: $(srccom)/sim-reason.c $(sim_main_headers) \
|
|
|
|
$(srcroot)/include/remote-sim.h
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-reason.c $(ALL_CFLAGS)
|
1997-05-19 03:42:33 +00:00
|
|
|
|
1997-12-04 02:04:42 +00:00
|
|
|
sim-resume.o: $(srccom)/sim-resume.c $(sim_main_headers) \
|
|
|
|
$(srcroot)/include/remote-sim.h
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-resume.c $(ALL_CFLAGS)
|
1997-05-19 03:42:33 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-run.o: $(srccom)/sim-run.c $(sim_main_headers)
|
|
|
|
$(CC) -c $(srccom)/sim-run.c $(ALL_CFLAGS)
|
1997-05-19 03:42:33 +00:00
|
|
|
|
1997-11-19 08:00:37 +00:00
|
|
|
sim-signal.o: $(srccom)/sim-signal.c $(sim_main_headers) $(sim-signal_h)
|
|
|
|
$(CC) -c $(srccom)/sim-signal.c $(ALL_CFLAGS)
|
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-stop.o: $(srccom)/sim-stop.c $(sim_main_headers)
|
|
|
|
$(CC) -c $(srccom)/sim-stop.c $(ALL_CFLAGS)
|
1997-05-19 03:42:33 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-trace.o: $(srccom)/sim-trace.c $(sim_main_headers) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(sim-options_h) $(sim-io_h)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-trace.c $(ALL_CFLAGS)
|
1997-04-17 14:08:30 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-profile.o: $(srccom)/sim-profile.c $(sim_main_headers) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(sim-options_h) $(sim-io_h)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-profile.c $(ALL_CFLAGS)
|
1997-04-30 18:35:58 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-model.o: $(srccom)/sim-model.c $(sim_main_headers) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(sim-io_h)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-model.c $(ALL_CFLAGS)
|
* Makefile.in (sim-options_h): Define.
(sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
(sim-model.o): Add new rule.
(cgen-{scache,trace,utils}.o): Add new rules.
* aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
* cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
Indent output by 2 spaces.
* cgen-scache.h (scache_print_profile): Update.
* cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
Use trace_printf, not fprintf.
(trace_extract): Use trace_printf, not cgen_trace_printf.
* genmloop.sh (!FAST case): Increment `insn_count'.
* sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
(sim_cpu_base): Rename member `sd' to `state' to be consistent with
access macro's name.
* sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
(sim_core_{install,uninstall}): New functions.
* sim-core.h (sim_core_{install,uninstall}): Declare.
(sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
* sim-model.h (models,machs,model_install): Declare.
* sim-module.c (modules): Add scache_install, model_install.
(sim_post_argv_init): Set cpu->state backlinks.
* sim-options.c (standard_options): Delete --simcache-size,--max-insns.
(standard_option_handler): Likewise.
* sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
sim-profile.h.
(*): Assume ANSI C.
(profile_options): Delete --profile-simcache.
(profile_option_handler): Likewise.
(profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
spaces.
(profile_print_{memory,model}): Likewise.
(profile_print_simcache): Delete.
(profile_print_speed): New function.
(profile_print): Rewrite.
* sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
(WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
(PROFILE_DATA): Delete members simcache_{hits,misses}.
(PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
(PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
(profile_print): Update prototype.
1997-05-01 18:05:37 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-utils.o: $(srccom)/sim-utils.c $(sim_main_headers)
|
|
|
|
$(CC) -c $(srccom)/sim-utils.c $(ALL_CFLAGS)
|
1997-04-02 05:04:25 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-watch.o: $(srccom)/sim-watch.c $(sim_main_headers)
|
|
|
|
$(CC) -c $(srccom)/sim-watch.c $(ALL_CFLAGS)
|
1997-08-27 04:44:41 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-load.o: $(srccom)/sim-load.c $(srcroot)/include/callback.h
|
|
|
|
$(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS)
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
sim-break.o: $(srccom)/sim-break.c $(sim_main_headers) \
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
$(sim_break_h)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/sim-break.c $(ALL_CFLAGS)
|
1997-09-25 00:51:17 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
nrun.o: $(srccom)/nrun.c config.h tconfig.h \
|
1997-12-04 02:04:42 +00:00
|
|
|
$(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h \
|
|
|
|
$(sim_main_headers)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/nrun.c $(ALL_CFLAGS)
|
1997-04-02 05:04:25 +00:00
|
|
|
|
* Makefile.in (sim-options_h): Define.
(sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
(sim-model.o): Add new rule.
(cgen-{scache,trace,utils}.o): Add new rules.
* aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
* cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
Indent output by 2 spaces.
* cgen-scache.h (scache_print_profile): Update.
* cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
Use trace_printf, not fprintf.
(trace_extract): Use trace_printf, not cgen_trace_printf.
* genmloop.sh (!FAST case): Increment `insn_count'.
* sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
(sim_cpu_base): Rename member `sd' to `state' to be consistent with
access macro's name.
* sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
(sim_core_{install,uninstall}): New functions.
* sim-core.h (sim_core_{install,uninstall}): Declare.
(sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
* sim-model.h (models,machs,model_install): Declare.
* sim-module.c (modules): Add scache_install, model_install.
(sim_post_argv_init): Set cpu->state backlinks.
* sim-options.c (standard_options): Delete --simcache-size,--max-insns.
(standard_option_handler): Likewise.
* sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
sim-profile.h.
(*): Assume ANSI C.
(profile_options): Delete --profile-simcache.
(profile_option_handler): Likewise.
(profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
spaces.
(profile_print_{memory,model}): Likewise.
(profile_print_simcache): Delete.
(profile_print_speed): New function.
(profile_print): Rewrite.
* sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
(WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
(PROFILE_DATA): Delete members simcache_{hits,misses}.
(PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
(PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
(profile_print): Update prototype.
1997-05-01 18:05:37 +00:00
|
|
|
# CGEN support.
|
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
cgen-run.o: $(srccom)/cgen-run.c $(sim_main_headers) \
|
1998-01-20 03:57:14 +00:00
|
|
|
$(srccom)/cgen-mem.h $(srccom)/cgen-ops.h
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/cgen-run.c $(ALL_CFLAGS)
|
1997-09-04 00:49:57 +00:00
|
|
|
|
1998-01-20 03:57:14 +00:00
|
|
|
cgen-scache.o: $(srccom)/cgen-scache.c $(sim_main_headers)
|
1997-11-18 07:14:20 +00:00
|
|
|
$(CC) -c $(srccom)/cgen-scache.c $(ALL_CFLAGS)
|
* Makefile.in (sim-options_h): Define.
(sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
(sim-model.o): Add new rule.
(cgen-{scache,trace,utils}.o): Add new rules.
* aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
* cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
Indent output by 2 spaces.
* cgen-scache.h (scache_print_profile): Update.
* cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
Use trace_printf, not fprintf.
(trace_extract): Use trace_printf, not cgen_trace_printf.
* genmloop.sh (!FAST case): Increment `insn_count'.
* sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
(sim_cpu_base): Rename member `sd' to `state' to be consistent with
access macro's name.
* sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
(sim_core_{install,uninstall}): New functions.
* sim-core.h (sim_core_{install,uninstall}): Declare.
(sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
* sim-model.h (models,machs,model_install): Declare.
* sim-module.c (modules): Add scache_install, model_install.
(sim_post_argv_init): Set cpu->state backlinks.
* sim-options.c (standard_options): Delete --simcache-size,--max-insns.
(standard_option_handler): Likewise.
* sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
sim-profile.h.
(*): Assume ANSI C.
(profile_options): Delete --profile-simcache.
(profile_option_handler): Likewise.
(profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
spaces.
(profile_print_{memory,model}): Likewise.
(profile_print_simcache): Delete.
(profile_print_speed): New function.
(profile_print): Rewrite.
* sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
(WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
(PROFILE_DATA): Delete members simcache_{hits,misses}.
(PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
(PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
(profile_print): Update prototype.
1997-05-01 18:05:37 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
cgen-trace.o: $(srccom)/cgen-trace.c $(sim_main_headers) \
|
|
|
|
$(srccom)/cgen-trace.h
|
|
|
|
$(CC) -c $(srccom)/cgen-trace.c $(ALL_CFLAGS)
|
* Makefile.in (sim-options_h): Define.
(sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
(sim-model.o): Add new rule.
(cgen-{scache,trace,utils}.o): Add new rules.
* aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
* cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
Indent output by 2 spaces.
* cgen-scache.h (scache_print_profile): Update.
* cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
Use trace_printf, not fprintf.
(trace_extract): Use trace_printf, not cgen_trace_printf.
* genmloop.sh (!FAST case): Increment `insn_count'.
* sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
(sim_cpu_base): Rename member `sd' to `state' to be consistent with
access macro's name.
* sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
(sim_core_{install,uninstall}): New functions.
* sim-core.h (sim_core_{install,uninstall}): Declare.
(sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
* sim-model.h (models,machs,model_install): Declare.
* sim-module.c (modules): Add scache_install, model_install.
(sim_post_argv_init): Set cpu->state backlinks.
* sim-options.c (standard_options): Delete --simcache-size,--max-insns.
(standard_option_handler): Likewise.
* sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
sim-profile.h.
(*): Assume ANSI C.
(profile_options): Delete --profile-simcache.
(profile_option_handler): Likewise.
(profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
spaces.
(profile_print_{memory,model}): Likewise.
(profile_print_simcache): Delete.
(profile_print_speed): New function.
(profile_print): Rewrite.
* sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
(WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
(PROFILE_DATA): Delete members simcache_{hits,misses}.
(PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
(PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
(profile_print): Update prototype.
1997-05-01 18:05:37 +00:00
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
cgen-utils.o: $(srccom)/cgen-utils.c $(sim_main_headers) \
|
|
|
|
$(srccom)/cgen-mem.h $(srccom)/cgen-ops.h
|
|
|
|
$(CC) -c $(srccom)/cgen-utils.c $(ALL_CFLAGS)
|
* Makefile.in (sim-options_h): Define.
(sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
(sim-model.o): Add new rule.
(cgen-{scache,trace,utils}.o): Add new rules.
* aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
* cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
Indent output by 2 spaces.
* cgen-scache.h (scache_print_profile): Update.
* cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
Use trace_printf, not fprintf.
(trace_extract): Use trace_printf, not cgen_trace_printf.
* genmloop.sh (!FAST case): Increment `insn_count'.
* sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
(sim_cpu_base): Rename member `sd' to `state' to be consistent with
access macro's name.
* sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
(sim_core_{install,uninstall}): New functions.
* sim-core.h (sim_core_{install,uninstall}): Declare.
(sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
* sim-model.h (models,machs,model_install): Declare.
* sim-module.c (modules): Add scache_install, model_install.
(sim_post_argv_init): Set cpu->state backlinks.
* sim-options.c (standard_options): Delete --simcache-size,--max-insns.
(standard_option_handler): Likewise.
* sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
sim-profile.h.
(*): Assume ANSI C.
(profile_options): Delete --profile-simcache.
(profile_option_handler): Likewise.
(profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
spaces.
(profile_print_{memory,model}): Likewise.
(profile_print_simcache): Delete.
(profile_print_speed): New function.
(profile_print): Rewrite.
* sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
(WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
(PROFILE_DATA): Delete members simcache_{hits,misses}.
(PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
(PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
(profile_print): Update prototype.
1997-05-01 18:05:37 +00:00
|
|
|
|
|
|
|
# Support targets.
|
|
|
|
|
1997-03-14 15:13:58 +00:00
|
|
|
install: install-common $(SIM_EXTRA_INSTALL)
|
|
|
|
|
1997-04-15 19:13:56 +00:00
|
|
|
install-common: installdirs
|
|
|
|
n=`echo run | sed '$(program_transform_name)'`; \
|
|
|
|
$(INSTALL_PROGRAM) run $(bindir)/$$n
|
|
|
|
|
|
|
|
installdirs:
|
|
|
|
$(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
|
1997-03-14 15:13:58 +00:00
|
|
|
|
|
|
|
check:
|
1998-02-25 15:15:09 +00:00
|
|
|
cd ../testsuite && $(MAKE) check
|
1997-03-14 15:13:58 +00:00
|
|
|
|
|
|
|
info:
|
|
|
|
clean-info:
|
|
|
|
install-info:
|
|
|
|
|
|
|
|
.NOEXPORT:
|
|
|
|
MAKEOVERRIDES=
|
|
|
|
|
|
|
|
tags etags: TAGS
|
|
|
|
|
|
|
|
TAGS: force
|
1997-09-02 22:03:41 +00:00
|
|
|
etags --regex '/^\/[*] TAGS: .*/' *.c *.h
|
1997-03-14 15:13:58 +00:00
|
|
|
|
1997-04-30 18:35:58 +00:00
|
|
|
clean: $(SIM_EXTRA_CLEAN)
|
1997-03-14 15:13:58 +00:00
|
|
|
rm -f *.[oa] *~ core
|
|
|
|
rm -f run libsim.a
|
1998-02-25 15:15:09 +00:00
|
|
|
rm -f gentmap targ-map.c targ-vals.h stamp-tvals
|
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
(gentmap): Pass $(NL_TARGET) to $(CC).
(syscall.o): Add rule for.
(sim_main_headers): Add $(SIM_EXTRA_DEPS).
(sim-bits.o): Depend on $(sim-n-bits_h).
(sim-load.o): Depend on callback.h.
* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
* cgen-mem.h, cgen-ops.h: New files.
* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
* Makefile.in (nltvals.def): Depend on gennltvals.sh.
Rewrite build rule.
* callback.c: #include string.h or strings.h.
#include sys/types.h and sys/stat.h.
(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
(enosys): New function.
(os_get_errno,os_open): Update.
(os_stat,os_fstat): New functions.
(os_init): Initialize syscall_map, errno_map, open_map.
(default_callback): Add entries for os_stat, os_fstat, syscall_map,
errno_map, open_map, signal_map, stat_map.
(cb_read_target_syscall_maps): New function.
(cb_target_to_host_syscall): New function.
(cb_host_to_target_errno): Renamed from host_to_target_errno.
(cb_target_to_host_open): Renamed from target_to_host_open.
(store): New function.
(cb_host_to_target_stat): New function.
* gentmap.c (sys_tdefs): New global.
(gen_targ_vals_h): Output target syscall numbers.
(gen_targ_map_c): Update. Output target syscall translation map.
* gentvals.sh: New first argument `target'. Preface table with
#ifdef NL_TARGET_$target if non-null target passed.
* gennltvals.sh: New file.
* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
|
|
|
if [ ! -f Make-common.in ] ; then \
|
1997-11-12 20:29:53 +00:00
|
|
|
rm -f $(BUILT_SRC_FROM_COMMON) ; \
|
|
|
|
fi
|
1997-03-14 15:13:58 +00:00
|
|
|
|
1997-04-30 18:35:58 +00:00
|
|
|
distclean mostlyclean maintainer-clean realclean: clean
|
1997-03-14 15:13:58 +00:00
|
|
|
rm -f TAGS
|
1997-09-04 00:49:57 +00:00
|
|
|
rm -f Makefile config.cache config.log config.status .gdbinit
|
1997-03-14 15:13:58 +00:00
|
|
|
rm -f tconfig.h config.h stamp-h
|
1997-04-22 16:00:06 +00:00
|
|
|
rm -f targ-vals.def
|
1997-03-14 15:13:58 +00:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(ALL_CFLAGS) $<
|
|
|
|
|
|
|
|
# Dummy target to force execution of dependent targets.
|
|
|
|
force:
|
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
Makefile: Makefile.in $(srccom)/Make-common.in config.status
|
1997-03-14 15:13:58 +00:00
|
|
|
CONFIG_HEADERS= $(SHELL) ./config.status
|
|
|
|
|
|
|
|
config.status: configure
|
|
|
|
$(SHELL) ./config.status --recheck
|
|
|
|
|
|
|
|
config.h: stamp-h ; @true
|
|
|
|
stamp-h: config.in config.status
|
|
|
|
CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
|
|
|
|
|
1997-11-18 07:14:20 +00:00
|
|
|
.gdbinit: # config.status $(srccom)/gdbinit.in
|
1997-09-04 00:49:57 +00:00
|
|
|
CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status
|
|
|
|
|
1998-01-20 02:36:21 +00:00
|
|
|
# start-sanitize-cygnus
|
|
|
|
|
* Make-common.in (cgen-{arch,cpu,decode}): New targets.
* cgen.sh: New file.
* cgen-scache.h: Deleted.
* cgen-scache.c: Only compile contents if WITH_SCACHE.
(scache_init): Use runtime computed size of SCACHE.
(scache_flush): Likewise.
* cgen-mem.h (GETIMEMU[QHSD]I): Declare.
([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
* cgen-sim.h: Scache support moved here.
(PC): Redo definition.
(ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
(DECODE): Add parallel execution support.
Only include semantic label members if using switch.
(SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
(CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
(IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
from cgen-types.h.
(engine_{stop,run,resume,halt,signal}): Delete decls.
* cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
(argbuf,scache): Delete forward decls.
(STATE): Delete decl.
* cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
Include cgen-mem.h, cgen-ops.h.
(engine_halt,engine_signal): Delete.
({ex,exc,sem,semc}_illegal): Delete.
(sim_disassemble_insn): Result of extract fn is in bits.
* genmloop.sh: Rewrite.
1998-01-19 21:14:14 +00:00
|
|
|
# CGEN support
|
|
|
|
|
|
|
|
SCHEME = @SCHEME@
|
|
|
|
SCHEMEFLAGS = -s
|
|
|
|
srccgen = $(srcroot)/cgen
|
|
|
|
|
|
|
|
CGEN_VERBOSE = -v
|
1998-02-25 15:15:09 +00:00
|
|
|
CGEN_MAIN_SCM = $(srccgen)/object.scm $(srccgen)/utils.scm \
|
|
|
|
$(srccgen)/attr.scm $(srccgen)/enum.scm $(srccgen)/types.scm \
|
|
|
|
$(srccgen)/utils-cgen.scm $(srccgen)/cpu.scm \
|
|
|
|
$(srccgen)/mode.scm $(srccgen)/mach.scm \
|
|
|
|
$(srccgen)/model.scm $(srccgen)/hardware.scm \
|
* Make-common.in (cgen-{arch,cpu,decode}): New targets.
* cgen.sh: New file.
* cgen-scache.h: Deleted.
* cgen-scache.c: Only compile contents if WITH_SCACHE.
(scache_init): Use runtime computed size of SCACHE.
(scache_flush): Likewise.
* cgen-mem.h (GETIMEMU[QHSD]I): Declare.
([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
* cgen-sim.h: Scache support moved here.
(PC): Redo definition.
(ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
(DECODE): Add parallel execution support.
Only include semantic label members if using switch.
(SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
(CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
(IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
from cgen-types.h.
(engine_{stop,run,resume,halt,signal}): Delete decls.
* cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
(argbuf,scache): Delete forward decls.
(STATE): Delete decl.
* cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
Include cgen-mem.h, cgen-ops.h.
(engine_halt,engine_signal): Delete.
({ex,exc,sem,semc}_illegal): Delete.
(sim_disassemble_insn): Result of extract fn is in bits.
* genmloop.sh: Rewrite.
1998-01-19 21:14:14 +00:00
|
|
|
$(srccgen)/ifield.scm $(srccgen)/iformat.scm \
|
|
|
|
$(srccgen)/operand.scm $(srccgen)/insn.scm \
|
1998-02-25 15:15:09 +00:00
|
|
|
$(srccgen)/cdl-c.scm $(srccgen)/sim.scm
|
|
|
|
CGEN_CPU_SCM = $(srccgen)/sim-cpu.scm $(srccgen)/sim-model.scm
|
|
|
|
CGEN_DECODE_SCM = $(srccgen)/sim-decode.scm
|
* Make-common.in (cgen-{arch,cpu,decode}): New targets.
* cgen.sh: New file.
* cgen-scache.h: Deleted.
* cgen-scache.c: Only compile contents if WITH_SCACHE.
(scache_init): Use runtime computed size of SCACHE.
(scache_flush): Likewise.
* cgen-mem.h (GETIMEMU[QHSD]I): Declare.
([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
* cgen-sim.h: Scache support moved here.
(PC): Redo definition.
(ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
(DECODE): Add parallel execution support.
Only include semantic label members if using switch.
(SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
(CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
(IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
from cgen-types.h.
(engine_{stop,run,resume,halt,signal}): Delete decls.
* cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
(argbuf,scache): Delete forward decls.
(STATE): Delete decl.
* cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
Include cgen-mem.h, cgen-ops.h.
(engine_halt,engine_signal): Delete.
({ex,exc,sem,semc}_illegal): Delete.
(sim_disassemble_insn): Result of extract fn is in bits.
* genmloop.sh: Rewrite.
1998-01-19 21:14:14 +00:00
|
|
|
|
|
|
|
# Various choices for which cpu specific files to generate.
|
|
|
|
CGEN_CPU_EXTR = -E tmp-ext.c1
|
|
|
|
CGEN_CPU_READ = -R tmp-read.c1
|
|
|
|
CGEN_CPU_SEM = -S tmp-sem.c1
|
|
|
|
CGEN_CPU_SEMSW = -W tmp-semsw.c1
|
|
|
|
|
|
|
|
# We store the generated files in the source directory until we decide to
|
|
|
|
# ship a Scheme interpreter with gdb/binutils. Maybe we never will.
|
|
|
|
|
|
|
|
cgen-arch: force
|
|
|
|
$(SHELL) $(srccom)/cgen.sh arch $(srcdir) \
|
|
|
|
$(SCHEME) $(SCHEMEFLAGS) \
|
|
|
|
$(srccgen) $(CGEN_VERBOSE) \
|
|
|
|
$(arch) "$(FLAGS)" ignored ignored ignored ignored
|
|
|
|
|
|
|
|
cgen-cpu: force
|
|
|
|
$(SHELL) $(srccom)/cgen.sh cpu $(srcdir) \
|
|
|
|
$(SCHEME) $(SCHEMEFLAGS) \
|
|
|
|
$(srccgen) $(CGEN_VERBOSE) \
|
|
|
|
$(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" "$(EXTRAFILES)"
|
|
|
|
|
|
|
|
cgen-decode: force
|
|
|
|
$(SHELL) $(srccom)/cgen.sh decode $(srcdir) \
|
|
|
|
$(SCHEME) $(SCHEMEFLAGS) \
|
|
|
|
$(srccgen) $(CGEN_VERBOSE) \
|
|
|
|
$(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" ignored
|
|
|
|
|
1998-01-20 02:36:21 +00:00
|
|
|
# end-sanitize-cygnus
|
|
|
|
|
1997-03-14 15:13:58 +00:00
|
|
|
## End COMMON_POST_CONFIG_FRAG
|