This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] include sim/common/sim-fpu.c in PSIM.
- From: matthew green <mrg at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 10 Dec 2001 19:18:25 +1100
- Subject: [PATCH] include sim/common/sim-fpu.c in PSIM.
- Organisation: Red Hat, Asia-Pacific.
hi folks.
this patch enables the use of sim-fpu.c FP functions inside PSIM.
not included are any changes to use these functions, merely the
infrastructure work required. as many macros conflicted with
sim-common, i had to rename many psim macros. the name changes
are either of the form s/SIM/PSIM/ or s/^/PSIM_/.
i have verified that both gdb & psim tests work equally with
or without this patch.
OK?
.mrg.
2001-12-10 matthew green <mrg@redhat.com>
* Makefile.in (LIB_OBJ): Add @sim_fpu@.
(ICACHE_CFLAGS, SEMANTICS_CFLAGS): New variables.
(icache.o, semantics.o): Add new ICACHE_FLAGS & SEMANTICS_FLAGS.
(sim-fpu.o, sim-bits.o, tconfig.h): New targets.
* configure.in: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS. Add a
check for sim/common/sim-fpu.c. Output sim_fpu and sim_fpu_cflags.
* configure: Regenerate.
* device.h (device_find_integer_array_property): Match function definition.
* gen-icache.c (print_icache_internal_function_declaration): Rename
INLINE_ICACHE to PSIM_INLINE_ICACHE.
* gen-idecode.c (print_idecode_run_function_header): Rename INLINE_IDECODE
to PSIM_INLINE_IDECODE.
* gen-semantics.c (print_semantic_function_header): Rename
EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS.
* gen-support.c (print_support_function_name): Rename INLINE_SUPPORT to
PSIM_INLINE_SUPPORT.
* igen.c (print_function_name): Also escape `(' and `)'.
(gen_semantics_h): Rename EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS.
(gen_semantics_c): Likewise. Also output includes for "sim-fpu.h"
* inline.h (INLINE_SIM_ENDIAN): Renamed INLINE_PSIM_ENDIAN.
(EXTERN_SIM_ENDIAN): Renamed EXTERN_PSIM_ENDIAN.
(STATIC_INLINE_SIM_ENDIAN): Renamed STATIC_INLINE_PSIM_ENDIAN.
(INLINE_LOCALS): Renamed PSIM_INLINE_LOCALS.
(EXTERN_SUPPORT): Renamed PSIM_EXTERN_SUPPORT.
(INLINE_SUPPORT): Renamed PSIM_INLINE_SUPPORT.
(EXTERN_SEMANTICS): Renamed PSIM_EXTERN_SEMANTICS.
(INLINE_SEMANTICS): Renamed PSIM_INLINE_SEMANTICS.
(EXTERN_IDECODE): Renamed PSIM_EXTERN_IDECODE.
(INLINE_IDECODE): Renamed PSIM_INLINE_IDECODE.
(EXTERN_ICACHE): Renamed PSIM_EXTERN_ICACHE.
(INLINE_ICACHE): Renamed PSIM_INLINE_ICACHE.
* options.c (options_inline): Fix names.
* sim-endian-n.h: Change INLINE_SIM_ENDIAN to INLINE_PSIM_ENDIAN.
* sim-endian.h: Likewise.
* sim-main.h: New file.
* std-config.h: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/sim/ppc/Makefile.in,v
retrieving revision 1.2
diff -p -r1.2 Makefile.in
*** Makefile.in 2001/07/16 18:36:37 1.2
--- Makefile.in 2001/12/10 07:46:04
*************** LIB_OBJ = \
*** 306,311 ****
--- 306,312 ----
semantics.o \
idecode.o \
support.o \
+ @sim_fpu@ \
psim.o \
$(PACKAGE_OBJ) \
$(HW_OBJ) \
*************** LIB_OBJ = \
*** 314,319 ****
--- 315,323 ----
GDB_OBJ = sim_calls.o @sim_callback@
+ ICACHE_CFLAGS = @sim_fpu_cflags@
+ SEMANTICS_CFLAGS = @sim_fpu_cflags@
+
HW_SRC = @sim_hw_src@
HW_OBJ = @sim_hw_obj@
*************** device_table.o: device_table.c $(DEVICE_
*** 386,395 ****
cap.o: cap.c cap.h $(BASICS_H)
semantics.o: semantics.c semantics.h $(CPU_H) $(IDECODE_H)
! $(CC) -c $(NOWARN_CFLAGS) $<
icache.o: icache.c icache.h $(IDECODE_H) $(CPU_H)
! $(CC) -c $(NOWARN_CFLAGS) $<
support.o: support.c support.h $(IDECODE_H) $(CPU_H)
--- 390,399 ----
cap.o: cap.c cap.h $(BASICS_H)
semantics.o: semantics.c semantics.h $(CPU_H) $(IDECODE_H)
! $(CC) -c $(SEMANTICS_CFLAGS) $(NOWARN_CFLAGS) $<
icache.o: icache.c icache.h $(IDECODE_H) $(CPU_H)
! $(CC) -c $(ICACHE_CFLAGS) $(NOWARN_CFLAGS) $<
support.o: support.c support.h $(IDECODE_H) $(CPU_H)
*************** callback.o: ../common/callback.c targ-va
*** 421,426 ****
--- 425,440 ----
$(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $<
targ-map.o: targ-map.c targ-vals.h
+
+ sim-fpu.o: ../common/sim-fpu.c config.h tconfig.h
+ $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $<
+
+ sim-bits.o: ../common/sim-bits.c config.h tconfig.h
+ $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $<
+
+ tconfig.h:
+ rm -f tconfig.h
+ echo > tconfig.h
# Rebuild options whenever something changes so the date/time is up to date.
options.o: options.c $(BASICS_H) $(CPU_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile defines.h
Index: configure
===================================================================
RCS file: /cvs/src/src/sim/ppc/configure,v
retrieving revision 1.2
diff -p -r1.2 configure
*** configure 2000/05/24 04:39:50 1.2
--- configure 2001/12/10 07:46:07
*************** case "$enableval" in
*** 3242,3248 ****
no) sim_inline="-DDEFAULT_INLINE=0";;
0) sim_inline="-DDEFAULT_INLINE=0";;
yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";;
! 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
*) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
new_flag=""
case "$x" in
--- 3242,3248 ----
no) sim_inline="-DDEFAULT_INLINE=0";;
0) sim_inline="-DDEFAULT_INLINE=0";;
yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";;
! 1) sim_inline="-DDEFAULT_INLINE=PSIM_INLINE_LOCALS";;
*) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
new_flag=""
case "$x" in
*************** if test x"$silent" != x"yes" && test x"$
*** 3263,3269 ****
fi
else
if test x"$GCC" != ""; then
! sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS"
if test x"$silent" != x"yes"; then
echo "Setting inline flags = $sim_inline" 6>&1
fi
--- 3263,3269 ----
fi
else
if test x"$GCC" != ""; then
! sim_inline="-DDEFAULT_INLINE=PSIM_INLINE_LOCALS"
if test x"$silent" != x"yes"; then
echo "Setting inline flags = $sim_inline" 6>&1
fi
*************** else
*** 4663,4675 ****
sim_targ_vals=""
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
! echo "configure:4668: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 4673 "configure"
#include "confdefs.h"
int main() {
--- 4663,4687 ----
sim_targ_vals=""
fi
+ echo $ac_n "checking for common simulator directory fpu implementation""... $ac_c" 1>&6
+ echo "configure:4668: checking for common simulator directory fpu implementation" >&5
+ if test -f "${srcdir}/../common/sim-fpu.c"; then
+ echo "$ac_t""yes" 1>&6
+ sim_fpu_cflags="-DHAVE_COMMON_FPU -I${srcdir}/../common"
+ sim_fpu="sim-fpu.o sim-bits.o"
+ else
+ echo "$ac_t""no" 1>&6
+ sim_fpu_cflags=
+ sim_fpu=
+ fi
+
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
! echo "configure:4680: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 4685 "configure"
#include "confdefs.h"
int main() {
*************** int main() {
*** 4680,4686 ****
return __CYGWIN__;
; return 0; }
EOF
! if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
--- 4692,4698 ----
return __CYGWIN__;
; return 0; }
EOF
! if { (eval echo configure:4696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
*************** echo "$ac_t""$ac_cv_cygwin" 1>&6
*** 4697,4715 ****
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
! echo "configure:4701: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 4706 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
! if { (eval echo configure:4713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
--- 4709,4727 ----
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
! echo "configure:4713: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 4718 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
! if { (eval echo configure:4725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
*************** test "$ac_cv_mingw32" = yes && MINGW32=y
*** 4728,4734 ****
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
! echo "configure:4732: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 4740,4746 ----
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
! echo "configure:4744: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
*************** else
*** 4738,4744 ****
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
! if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
--- 4750,4756 ----
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
! if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
*************** AR=${AR-ar}
*** 4767,4773 ****
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:4771: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 4779,4785 ----
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:4783: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
*************** fi
*** 4837,4842 ****
--- 4849,4856 ----
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
*************** s%@sim_termio@%$sim_termio%g
*** 5069,5074 ****
--- 5083,5090 ----
s%@sim_devzero@%$sim_devzero%g
s%@sim_callback@%$sim_callback%g
s%@sim_targ_vals@%$sim_targ_vals%g
+ s%@sim_fpu_cflags@%$sim_fpu_cflags%g
+ s%@sim_fpu@%$sim_fpu%g
CEOF
EOF
*************** cat >> $CONFIG_STATUS <<\EOF
*** 5077,5083 ****
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
! ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
--- 5093,5099 ----
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
! ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/sim/ppc/configure.in,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 configure.in
*** configure.in 1999/05/11 13:34:58 1.1.1.2
--- configure.in 2001/12/10 07:46:07
*************** case "$enableval" in
*** 291,297 ****
no) sim_inline="-DDEFAULT_INLINE=0";;
0) sim_inline="-DDEFAULT_INLINE=0";;
yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";;
! 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
*) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
new_flag=""
case "$x" in
--- 291,297 ----
no) sim_inline="-DDEFAULT_INLINE=0";;
0) sim_inline="-DDEFAULT_INLINE=0";;
yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";;
! 1) sim_inline="-DDEFAULT_INLINE=PSIM_INLINE_LOCALS";;
*) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
new_flag=""
case "$x" in
*************** esac
*** 310,316 ****
if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
echo "Setting inline flags = $sim_inline" 6>&1
fi],[if test x"$GCC" != ""; then
! sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS"
if test x"$silent" != x"yes"; then
echo "Setting inline flags = $sim_inline" 6>&1
fi
--- 310,316 ----
if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
echo "Setting inline flags = $sim_inline" 6>&1
fi],[if test x"$GCC" != ""; then
! sim_inline="-DDEFAULT_INLINE=PSIM_INLINE_LOCALS"
if test x"$silent" != x"yes"; then
echo "Setting inline flags = $sim_inline" 6>&1
fi
*************** else
*** 689,694 ****
--- 689,705 ----
sim_targ_vals=""
fi
+ AC_MSG_CHECKING(for common simulator directory fpu implementation)
+ if test -f "${srcdir}/../common/sim-fpu.c"; then
+ AC_MSG_RESULT(yes)
+ sim_fpu_cflags="-DHAVE_COMMON_FPU -I${srcdir}/../common"
+ sim_fpu="sim-fpu.o sim-bits.o"
+ else
+ AC_MSG_RESULT(no)
+ sim_fpu_cflags=
+ sim_fpu=
+ fi
+
dnl Check for exe extension
AC_EXEEXT
*************** AC_SUBST(sim_termio)
*** 740,745 ****
--- 751,758 ----
AC_SUBST(sim_devzero)
AC_SUBST(sim_callback)
AC_SUBST(sim_targ_vals)
+ AC_SUBST(sim_fpu_cflags)
+ AC_SUBST(sim_fpu)
AC_OUTPUT(Makefile,
[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
Index: device.h
===================================================================
RCS file: /cvs/src/src/sim/ppc/device.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 device.h
*** device.h 1999/04/16 01:35:08 1.1.1.1
--- device.h 2001/12/10 07:46:07
*************** INLINE_DEVICE\
*** 335,341 ****
(device *me,
const char *property,
unsigned index,
! signed_word *integer);
--- 335,341 ----
(device *me,
const char *property,
unsigned index,
! signed_cell *integer);
Index: gen-icache.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/gen-icache.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 gen-icache.c
*** gen-icache.c 1999/04/16 01:35:09 1.1.1.1
--- gen-icache.c 2001/12/10 07:46:08
*************** print_icache_internal_function_declarati
*** 623,629 ****
ASSERT((code & generate_with_icache) != 0);
if (it_is("internal", function->fields[insn_flags])) {
lf_printf(file, "\n");
! lf_print_function_type(file, ICACHE_FUNCTION_TYPE, "INLINE_ICACHE",
"\n");
print_function_name(file,
function->fields[insn_name],
--- 623,629 ----
ASSERT((code & generate_with_icache) != 0);
if (it_is("internal", function->fields[insn_flags])) {
lf_printf(file, "\n");
! lf_print_function_type(file, ICACHE_FUNCTION_TYPE, "PSIM_INLINE_ICACHE",
"\n");
print_function_name(file,
function->fields[insn_name],
*************** print_icache_internal_function_definitio
*** 643,649 ****
ASSERT((code & generate_with_icache) != 0);
if (it_is("internal", function->fields[insn_flags])) {
lf_printf(file, "\n");
! lf_print_function_type(file, ICACHE_FUNCTION_TYPE, "INLINE_ICACHE",
"\n");
print_function_name(file,
function->fields[insn_name],
--- 643,649 ----
ASSERT((code & generate_with_icache) != 0);
if (it_is("internal", function->fields[insn_flags])) {
lf_printf(file, "\n");
! lf_print_function_type(file, ICACHE_FUNCTION_TYPE, "PSIM_INLINE_ICACHE",
"\n");
print_function_name(file,
function->fields[insn_name],
Index: gen-idecode.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/gen-idecode.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 gen-idecode.c
*** gen-idecode.c 1999/04/16 01:35:09 1.1.1.1
--- gen-idecode.c 2001/12/10 07:46:08
*************** print_idecode_run_function_header(lf *fi
*** 1448,1454 ****
{
int indent;
lf_printf(file, "\n");
! lf_print_function_type(file, "void", "INLINE_IDECODE", (is_definition ? " " : "\n"));
indent = lf_putstr(file, (can_stop ? "idecode_run_until_stop" : "idecode_run"));
if (is_definition)
lf_putstr(file, "\n");
--- 1448,1454 ----
{
int indent;
lf_printf(file, "\n");
! lf_print_function_type(file, "void", "PSIM_INLINE_IDECODE", (is_definition ? " " : "\n"));
indent = lf_putstr(file, (can_stop ? "idecode_run_until_stop" : "idecode_run"));
if (is_definition)
lf_putstr(file, "\n");
Index: gen-semantics.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/gen-semantics.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 gen-semantics.c
*** gen-semantics.c 1999/04/16 01:35:09 1.1.1.1
--- gen-semantics.c 2001/12/10 07:46:08
*************** print_semantic_function_header(lf *file,
*** 44,50 ****
{
int indent;
lf_printf(file, "\n");
! lf_print_function_type(file, SEMANTIC_FUNCTION_TYPE, "EXTERN_SEMANTICS",
(is_function_definition ? "\n" : " "));
indent = print_function_name(file,
basename,
--- 44,50 ----
{
int indent;
lf_printf(file, "\n");
! lf_print_function_type(file, SEMANTIC_FUNCTION_TYPE, "PSIM_EXTERN_SEMANTICS",
(is_function_definition ? "\n" : " "));
indent = print_function_name(file,
basename,
Index: gen-support.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/gen-support.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 gen-support.c
*** gen-support.c 1999/04/16 01:35:09 1.1.1.1
--- gen-support.c 2001/12/10 07:46:08
*************** print_support_function_name(lf *file,
*** 38,44 ****
int is_function_definition)
{
if (it_is("internal", function->fields[insn_flags])) {
! lf_print_function_type(file, SEMANTIC_FUNCTION_TYPE, "INLINE_SUPPORT",
(is_function_definition ? "\n" : " "));
print_function_name(file,
function->fields[function_name],
--- 38,44 ----
int is_function_definition)
{
if (it_is("internal", function->fields[insn_flags])) {
! lf_print_function_type(file, SEMANTIC_FUNCTION_TYPE, "PSIM_INLINE_SUPPORT",
(is_function_definition ? "\n" : " "));
print_function_name(file,
function->fields[function_name],
*************** print_support_function_name(lf *file,
*** 52,58 ****
else {
lf_print_function_type(file,
function->fields[function_type],
! "INLINE_SUPPORT",
(is_function_definition ? "\n" : " "));
lf_printf(file, "%s\n(%s)%s",
function->fields[function_name],
--- 52,58 ----
else {
lf_print_function_type(file,
function->fields[function_type],
! "PSIM_INLINE_SUPPORT",
(is_function_definition ? "\n" : " "));
lf_printf(file, "%s\n(%s)%s",
function->fields[function_name],
Index: igen.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/igen.c,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 igen.c
*** igen.c 1999/04/26 18:33:25 1.1.1.2
--- igen.c 2001/12/10 07:46:09
*************** print_function_name(lf *file,
*** 107,112 ****
--- 107,114 ----
switch (*pos) {
case '/':
case '-':
+ case '(':
+ case ')':
break;
case ' ':
nr += lf_putchr(file, '_');
*************** gen_semantics_h(insn_table *table,
*** 184,190 ****
lf_printf(file, "extern int option_mpc860c0;\n");
lf_printf(file, "#define PAGE_SIZE 0x1000\n");
lf_printf(file, "\n");
! lf_printf(file, "EXTERN_SEMANTICS(void)\n");
lf_printf(file, "semantic_init(device* root);\n");
lf_printf(file, "\n");
if (generate_expanded_instructions)
--- 186,192 ----
lf_printf(file, "extern int option_mpc860c0;\n");
lf_printf(file, "#define PAGE_SIZE 0x1000\n");
lf_printf(file, "\n");
! lf_printf(file, "PSIM_EXTERN_SEMANTICS(void)\n");
lf_printf(file, "semantic_init(device* root);\n");
lf_printf(file, "\n");
if (generate_expanded_instructions)
*************** gen_semantics_c(insn_table *table,
*** 219,228 ****
lf_printf(file, "#include \"idecode.h\"\n");
lf_printf(file, "#include \"semantics.h\"\n");
lf_printf(file, "#include \"support.h\"\n");
lf_printf(file, "\n");
lf_printf(file, "int option_mpc860c0 = 0;\n");
lf_printf(file, "\n");
! lf_printf(file, "EXTERN_SEMANTICS(void)\n");
lf_printf(file, "semantic_init(device* root)\n");
lf_printf(file, "{\n");
lf_printf(file, " option_mpc860c0 = 0;\n");
--- 221,232 ----
lf_printf(file, "#include \"idecode.h\"\n");
lf_printf(file, "#include \"semantics.h\"\n");
lf_printf(file, "#include \"support.h\"\n");
+ lf_printf(file, "#include \"sim-inline.h\"\n");
+ lf_printf(file, "#include \"sim-fpu.h\"\n");
lf_printf(file, "\n");
lf_printf(file, "int option_mpc860c0 = 0;\n");
lf_printf(file, "\n");
! lf_printf(file, "PSIM_EXTERN_SEMANTICS(void)\n");
lf_printf(file, "semantic_init(device* root)\n");
lf_printf(file, "{\n");
lf_printf(file, " option_mpc860c0 = 0;\n");
*************** gen_icache_c(insn_table *table,
*** 303,308 ****
--- 307,314 ----
lf_printf(file, "#include \"semantics.h\"\n");
lf_printf(file, "#include \"icache.h\"\n");
lf_printf(file, "#include \"support.h\"\n");
+ lf_printf(file, "#include \"sim-inline.h\"\n");
+ lf_printf(file, "#include \"sim-fpu.h\"\n");
lf_printf(file, "\n");
insn_table_traverse_function(table,
file, NULL,
Index: inline.h
===================================================================
RCS file: /cvs/src/src/sim/ppc/inline.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 inline.h
*** inline.h 1999/04/16 01:35:10 1.1.1.1
--- inline.h 2001/12/10 07:46:09
***************
*** 30,50 ****
#if !defined(_SIM_ENDIAN_C_) && (SIM_ENDIAN_INLINE & INCLUDE_MODULE)
# if (SIM_ENDIAN_INLINE & INLINE_MODULE)
! # define INLINE_SIM_ENDIAN(TYPE) static INLINE TYPE UNUSED
! # define EXTERN_SIM_ENDIAN(TYPE) static TYPE UNUSED
# else
! # define INLINE_SIM_ENDIAN(TYPE) static TYPE UNUSED
! # define EXTERN_SIM_ENDIAN(TYPE) static TYPE UNUSED
# endif
#else
! # define INLINE_SIM_ENDIAN(TYPE) TYPE
! # define EXTERN_SIM_ENDIAN(TYPE) TYPE
#endif
! #if (SIM_ENDIAN_INLINE & INLINE_LOCALS)
! # define STATIC_INLINE_SIM_ENDIAN(TYPE) static INLINE TYPE
#else
! # define STATIC_INLINE_SIM_ENDIAN(TYPE) static TYPE
#endif
--- 30,50 ----
#if !defined(_SIM_ENDIAN_C_) && (SIM_ENDIAN_INLINE & INCLUDE_MODULE)
# if (SIM_ENDIAN_INLINE & INLINE_MODULE)
! # define INLINE_PSIM_ENDIAN(TYPE) static INLINE TYPE UNUSED
! # define EXTERN_PSIM_ENDIAN(TYPE) static TYPE UNUSED
# else
! # define INLINE_PSIM_ENDIAN(TYPE) static TYPE UNUSED
! # define EXTERN_PSIM_ENDIAN(TYPE) static TYPE UNUSED
# endif
#else
! # define INLINE_PSIM_ENDIAN(TYPE) TYPE
! # define EXTERN_PSIM_ENDIAN(TYPE) TYPE
#endif
! #if (SIM_ENDIAN_INLINE & PSIM_INLINE_LOCALS)
! # define STATIC_INLINE_PSIM_ENDIAN(TYPE) static INLINE TYPE
#else
! # define STATIC_INLINE_PSIM_ENDIAN(TYPE) static TYPE
#endif
***************
*** 63,69 ****
# define EXTERN_BITS(TYPE) TYPE
#endif
! #if (BITS_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_BITS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_BITS(TYPE) static TYPE
--- 63,69 ----
# define EXTERN_BITS(TYPE) TYPE
#endif
! #if (BITS_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_BITS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_BITS(TYPE) static TYPE
***************
*** 85,91 ****
# define EXTERN_CORE(TYPE) TYPE
#endif
! #if (CORE_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_CORE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_CORE(TYPE) static TYPE
--- 85,91 ----
# define EXTERN_CORE(TYPE) TYPE
#endif
! #if (CORE_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_CORE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_CORE(TYPE) static TYPE
***************
*** 107,113 ****
# define EXTERN_VM(TYPE) TYPE
#endif
! #if (VM_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_VM(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_VM(TYPE) static TYPE
--- 107,113 ----
# define EXTERN_VM(TYPE) TYPE
#endif
! #if (VM_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_VM(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_VM(TYPE) static TYPE
***************
*** 129,135 ****
# define EXTERN_CPU(TYPE) TYPE
#endif
! #if (CPU_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_CPU(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_CPU(TYPE) static TYPE
--- 129,135 ----
# define EXTERN_CPU(TYPE) TYPE
#endif
! #if (CPU_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_CPU(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_CPU(TYPE) static TYPE
***************
*** 151,157 ****
# define EXTERN_MODEL(TYPE) TYPE
#endif
! #if (MODEL_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_MODEL(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_MODEL(TYPE) static TYPE
--- 151,157 ----
# define EXTERN_MODEL(TYPE) TYPE
#endif
! #if (MODEL_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_MODEL(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_MODEL(TYPE) static TYPE
***************
*** 173,179 ****
# define EXTERN_EVENTS(TYPE) TYPE
#endif
! #if (EVENTS_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_EVENTS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_EVENTS(TYPE) static TYPE
--- 173,179 ----
# define EXTERN_EVENTS(TYPE) TYPE
#endif
! #if (EVENTS_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_EVENTS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_EVENTS(TYPE) static TYPE
***************
*** 195,201 ****
# define EXTERN_MON(TYPE) TYPE
#endif
! #if (MON_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_MON(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_MON(TYPE) static TYPE
--- 195,201 ----
# define EXTERN_MON(TYPE) TYPE
#endif
! #if (MON_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_MON(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_MON(TYPE) static TYPE
***************
*** 217,223 ****
# define EXTERN_REGISTERS(TYPE) TYPE
#endif
! #if (REGISTERS_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_REGISTERS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_REGISTERS(TYPE) static TYPE
--- 217,223 ----
# define EXTERN_REGISTERS(TYPE) TYPE
#endif
! #if (REGISTERS_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_REGISTERS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_REGISTERS(TYPE) static TYPE
***************
*** 239,245 ****
# define EXTERN_INTERRUPTS(TYPE) TYPE
#endif
! #if (INTERRUPTS_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_INTERRUPTS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_INTERRUPTS(TYPE) static TYPE
--- 239,245 ----
# define EXTERN_INTERRUPTS(TYPE) TYPE
#endif
! #if (INTERRUPTS_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_INTERRUPTS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_INTERRUPTS(TYPE) static TYPE
***************
*** 261,267 ****
# define EXTERN_DEVICE(TYPE) TYPE
#endif
! #if (DEVICE_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_DEVICE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_DEVICE(TYPE) static TYPE
--- 261,267 ----
# define EXTERN_DEVICE(TYPE) TYPE
#endif
! #if (DEVICE_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_DEVICE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_DEVICE(TYPE) static TYPE
***************
*** 283,289 ****
# define EXTERN_TREE(TYPE) TYPE
#endif
! #if (TREE_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_TREE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_TREE(TYPE) static TYPE
--- 283,289 ----
# define EXTERN_TREE(TYPE) TYPE
#endif
! #if (TREE_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_TREE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_TREE(TYPE) static TYPE
***************
*** 305,311 ****
# define EXTERN_SPREG(TYPE) TYPE
#endif
! #if (SPREG_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_SPREG(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_SPREG(TYPE) static TYPE
--- 305,311 ----
# define EXTERN_SPREG(TYPE) TYPE
#endif
! #if (SPREG_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_SPREG(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_SPREG(TYPE) static TYPE
***************
*** 316,403 ****
#if defined(_INLINE_C_) && !defined(_SEMANTICS_C_) && (SEMANTICS_INLINE & INCLUDE_MODULE)
# if (SEMANTICS_INLINE & INLINE_MODULE)
! # define INLINE_SEMANTICS(TYPE) static INLINE TYPE UNUSED
! # define EXTERN_SEMANTICS(TYPE) static TYPE UNUSED REGPARM
#else
! # define INLINE_SEMANTICS(TYPE) static TYPE UNUSED REGPARM
! # define EXTERN_SEMANTICS(TYPE) static TYPE UNUSED REGPARM
#endif
#else
! # define INLINE_SEMANTICS(TYPE) TYPE REGPARM
! # define EXTERN_SEMANTICS(TYPE) TYPE REGPARM
#endif
! #if (SEMANTICS_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_SEMANTICS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_SEMANTICS(TYPE) static TYPE REGPARM
#endif
/* idecode is actually not inlined */
#if defined(_INLINE_C_) && !defined(_IDECODE_C_) && (IDECODE_INLINE & INCLUDE_MODULE)
# if (IDECODE_INLINE & INLINE_MODULE)
! # define INLINE_IDECODE(TYPE) static INLINE TYPE UNUSED
# define EXTERN_IDECODE(TYPE) static TYPE UNUSED REGPARM
#else
! # define INLINE_IDECODE(TYPE) static TYPE UNUSED REGPARM
# define EXTERN_IDECODE(TYPE) static TYPE UNUSED REGPARM
#endif
#else
! # define INLINE_IDECODE(TYPE) TYPE REGPARM
# define EXTERN_IDECODE(TYPE) TYPE REGPARM
#endif
! #if (IDECODE_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_IDECODE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_IDECODE(TYPE) static TYPE REGPARM
#endif
/* icache is inlined with inline.c */
#if defined(_INLINE_C_) && !defined(_ICACHE_C_) && (ICACHE_INLINE & INCLUDE_MODULE)
# if (ICACHE_INLINE & INLINE_MODULE)
! # define INLINE_ICACHE(TYPE) static INLINE TYPE UNUSED
# define EXTERN_ICACHE(TYPE) static TYPE UNUSED REGPARM
#else
! # define INLINE_ICACHE(TYPE) static TYPE UNUSED REGPARM
# define EXTERN_ICACHE(TYPE) static TYPE UNUSED REGPARM
#endif
#else
! # define INLINE_ICACHE(TYPE) TYPE REGPARM
# define EXTERN_ICACHE(TYPE) TYPE REGPARM
#endif
! #if (ICACHE_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_ICACHE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_ICACHE(TYPE) static TYPE REGPARM
#endif
/* support is always inlined */
#if !defined(_SUPPORT_C_) && (SUPPORT_INLINE & INCLUDE_MODULE)
# if (SUPPORT_INLINE & INLINE_MODULE)
! # define INLINE_SUPPORT(TYPE) static INLINE TYPE UNUSED
# define EXTERN_SUPPORT(TYPE) static TYPE UNUSED
#else
! # define INLINE_SUPPORT(TYPE) static TYPE UNUSED
# define EXTERN_SUPPORT(TYPE) static TYPE UNUSED
#endif
#else
! # define INLINE_SUPPORT(TYPE) TYPE
# define EXTERN_SUPPORT(TYPE) TYPE
#endif
! #if (SUPPORT_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_SUPPORT(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_SUPPORT(TYPE) static TYPE
#endif
/* options is inlined with inline.c */
--- 316,411 ----
#if defined(_INLINE_C_) && !defined(_SEMANTICS_C_) && (SEMANTICS_INLINE & INCLUDE_MODULE)
# if (SEMANTICS_INLINE & INLINE_MODULE)
! # define PSIM_INLINE_SEMANTICS(TYPE) static INLINE TYPE UNUSED
! # define PSIM_EXTERN_SEMANTICS(TYPE) static TYPE UNUSED REGPARM
#else
! # define PSIM_INLINE_SEMANTICS(TYPE) static TYPE UNUSED REGPARM
! # define PSIM_EXTERN_SEMANTICS(TYPE) static TYPE UNUSED REGPARM
#endif
#else
! # define PSIM_INLINE_SEMANTICS(TYPE) TYPE REGPARM
! # define PSIM_EXTERN_SEMANTICS(TYPE) TYPE REGPARM
#endif
! #if 0 /* this isn't used */
! #if (SEMANTICS_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_SEMANTICS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_SEMANTICS(TYPE) static TYPE REGPARM
#endif
+ #endif
/* idecode is actually not inlined */
#if defined(_INLINE_C_) && !defined(_IDECODE_C_) && (IDECODE_INLINE & INCLUDE_MODULE)
# if (IDECODE_INLINE & INLINE_MODULE)
! # define PSIM_INLINE_IDECODE(TYPE) static INLINE TYPE UNUSED
# define EXTERN_IDECODE(TYPE) static TYPE UNUSED REGPARM
#else
! # define PSIM_INLINE_IDECODE(TYPE) static TYPE UNUSED REGPARM
# define EXTERN_IDECODE(TYPE) static TYPE UNUSED REGPARM
#endif
#else
! # define PSIM_INLINE_IDECODE(TYPE) TYPE REGPARM
# define EXTERN_IDECODE(TYPE) TYPE REGPARM
#endif
! #if 0 /* this isn't used */
! #if (IDECODE_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_IDECODE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_IDECODE(TYPE) static TYPE REGPARM
#endif
+ #endif
/* icache is inlined with inline.c */
#if defined(_INLINE_C_) && !defined(_ICACHE_C_) && (ICACHE_INLINE & INCLUDE_MODULE)
# if (ICACHE_INLINE & INLINE_MODULE)
! # define PSIM_INLINE_ICACHE(TYPE) static INLINE TYPE UNUSED
# define EXTERN_ICACHE(TYPE) static TYPE UNUSED REGPARM
#else
! # define PSIM_INLINE_ICACHE(TYPE) static TYPE UNUSED REGPARM
# define EXTERN_ICACHE(TYPE) static TYPE UNUSED REGPARM
#endif
#else
! # define PSIM_INLINE_ICACHE(TYPE) TYPE REGPARM
# define EXTERN_ICACHE(TYPE) TYPE REGPARM
#endif
! #if 0 /* this isn't used */
! #if (ICACHE_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_ICACHE(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_ICACHE(TYPE) static TYPE REGPARM
#endif
+ #endif
/* support is always inlined */
#if !defined(_SUPPORT_C_) && (SUPPORT_INLINE & INCLUDE_MODULE)
# if (SUPPORT_INLINE & INLINE_MODULE)
! # define PSIM_INLINE_SUPPORT(TYPE) static INLINE TYPE UNUSED
# define EXTERN_SUPPORT(TYPE) static TYPE UNUSED
#else
! # define PSIM_INLINE_SUPPORT(TYPE) static TYPE UNUSED
# define EXTERN_SUPPORT(TYPE) static TYPE UNUSED
#endif
#else
! # define PSIM_INLINE_SUPPORT(TYPE) TYPE
# define EXTERN_SUPPORT(TYPE) TYPE
#endif
! #if 0 /* this isn't used */
! #if (SUPPORT_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_SUPPORT(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_SUPPORT(TYPE) static TYPE
#endif
+ #endif
/* options is inlined with inline.c */
***************
*** 415,421 ****
# define EXTERN_OPTIONS(TYPE) TYPE
#endif
! #if (OPTIONS_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_OPTIONS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_OPTIONS(TYPE) static TYPE
--- 423,429 ----
# define EXTERN_OPTIONS(TYPE) TYPE
#endif
! #if (OPTIONS_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_OPTIONS(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_OPTIONS(TYPE) static TYPE
***************
*** 437,443 ****
# define EXTERN_OS_EMUL(TYPE) TYPE
#endif
! #if (OS_EMUL_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_OS_EMUL(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_OS_EMUL(TYPE) static TYPE
--- 445,451 ----
# define EXTERN_OS_EMUL(TYPE) TYPE
#endif
! #if (OS_EMUL_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_OS_EMUL(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_OS_EMUL(TYPE) static TYPE
***************
*** 459,465 ****
# define EXTERN_PSIM(TYPE) TYPE
#endif
! #if (PSIM_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_PSIM(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_PSIM(TYPE) static TYPE
--- 467,473 ----
# define EXTERN_PSIM(TYPE) TYPE
#endif
! #if (PSIM_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_PSIM(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_PSIM(TYPE) static TYPE
***************
*** 481,487 ****
# define EXTERN_CAP(TYPE) TYPE
#endif
! #if (CAP_INLINE & INLINE_LOCALS)
# define STATIC_INLINE_CAP(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_CAP(TYPE) static TYPE
--- 489,495 ----
# define EXTERN_CAP(TYPE) TYPE
#endif
! #if (CAP_INLINE & PSIM_INLINE_LOCALS)
# define STATIC_INLINE_CAP(TYPE) static INLINE TYPE
#else
# define STATIC_INLINE_CAP(TYPE) static TYPE
Index: options.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/options.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 options.c
*** options.c 1999/04/16 01:35:11 1.1.1.1
--- options.c 2001/12/10 07:46:09
*************** options_inline (int in)
*** 99,107 ****
case /*1*/ REVEAL_MODULE: return "REVEAL_MODULE";
case /*2*/ INLINE_MODULE: return "INLINE_MODULE";
case /*3*/ REVEAL_MODULE|INLINE_MODULE: return "REVEAL_MODULE|INLINE_MODULE";
! case /*4*/ INLINE_LOCALS: return "LOCALS_INLINE";
! case /*5*/ INLINE_LOCALS|REVEAL_MODULE: return "INLINE_LOCALS|REVEAL_MODULE";
! case /*6*/ INLINE_LOCALS|INLINE_MODULE: return "INLINE_LOCALS|INLINE_MODULE";
case /*7*/ ALL_INLINE: return "ALL_INLINE";
}
return "0";
--- 99,107 ----
case /*1*/ REVEAL_MODULE: return "REVEAL_MODULE";
case /*2*/ INLINE_MODULE: return "INLINE_MODULE";
case /*3*/ REVEAL_MODULE|INLINE_MODULE: return "REVEAL_MODULE|INLINE_MODULE";
! case /*4*/ PSIM_INLINE_LOCALS: return "PSIM_LOCALS_INLINE";
! case /*5*/ PSIM_INLINE_LOCALS|REVEAL_MODULE: return "PSIM_INLINE_LOCALS|REVEAL_MODULE";
! case /*6*/ PSIM_INLINE_LOCALS|INLINE_MODULE: return "PSIM_INLINE_LOCALS|INLINE_MODULE";
case /*7*/ ALL_INLINE: return "ALL_INLINE";
}
return "0";
Index: sim-endian-n.h
===================================================================
RCS file: /cvs/src/src/sim/ppc/sim-endian-n.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 sim-endian-n.h
*** sim-endian-n.h 1999/04/16 01:35:11 1.1.1.1
--- sim-endian-n.h 2001/12/10 07:46:09
***************
*** 35,41 ****
#define endian_le2h_N XCONCAT2(endian_le2h_,N)
! INLINE_SIM_ENDIAN\
(unsigned_N)
endian_t2h_N(unsigned_N raw_in)
{
--- 35,41 ----
#define endian_le2h_N XCONCAT2(endian_le2h_,N)
! INLINE_PSIM_ENDIAN\
(unsigned_N)
endian_t2h_N(unsigned_N raw_in)
{
*************** endian_t2h_N(unsigned_N raw_in)
*** 48,54 ****
}
! INLINE_SIM_ENDIAN\
(unsigned_N)
endian_h2t_N(unsigned_N raw_in)
{
--- 48,54 ----
}
! INLINE_PSIM_ENDIAN\
(unsigned_N)
endian_h2t_N(unsigned_N raw_in)
{
*************** endian_h2t_N(unsigned_N raw_in)
*** 61,67 ****
}
! INLINE_SIM_ENDIAN\
(unsigned_N)
swap_N(unsigned_N raw_in)
{
--- 61,67 ----
}
! INLINE_PSIM_ENDIAN\
(unsigned_N)
swap_N(unsigned_N raw_in)
{
*************** swap_N(unsigned_N raw_in)
*** 70,76 ****
! INLINE_SIM_ENDIAN\
(unsigned_N)
endian_h2be_N(unsigned_N raw_in)
{
--- 70,76 ----
! INLINE_PSIM_ENDIAN\
(unsigned_N)
endian_h2be_N(unsigned_N raw_in)
{
*************** endian_h2be_N(unsigned_N raw_in)
*** 83,89 ****
}
! INLINE_SIM_ENDIAN\
(unsigned_N)
endian_be2h_N(unsigned_N raw_in)
{
--- 83,89 ----
}
! INLINE_PSIM_ENDIAN\
(unsigned_N)
endian_be2h_N(unsigned_N raw_in)
{
*************** endian_be2h_N(unsigned_N raw_in)
*** 96,102 ****
}
! INLINE_SIM_ENDIAN\
(unsigned_N)
endian_h2le_N(unsigned_N raw_in)
{
--- 96,102 ----
}
! INLINE_PSIM_ENDIAN\
(unsigned_N)
endian_h2le_N(unsigned_N raw_in)
{
*************** endian_h2le_N(unsigned_N raw_in)
*** 109,115 ****
}
! INLINE_SIM_ENDIAN\
(unsigned_N)
endian_le2h_N(unsigned_N raw_in)
{
--- 109,115 ----
}
! INLINE_PSIM_ENDIAN\
(unsigned_N)
endian_le2h_N(unsigned_N raw_in)
{
Index: sim-endian.h
===================================================================
RCS file: /cvs/src/src/sim/ppc/sim-endian.h,v
retrieving revision 1.2
diff -p -r1.2 sim-endian.h
*** sim-endian.h 2000/12/12 20:54:13 1.2
--- sim-endian.h 2001/12/10 07:46:09
***************
*** 25,64 ****
/* C byte conversion functions */
! INLINE_SIM_ENDIAN(unsigned_1) endian_h2t_1(unsigned_1 x);
! INLINE_SIM_ENDIAN(unsigned_2) endian_h2t_2(unsigned_2 x);
! INLINE_SIM_ENDIAN(unsigned_4) endian_h2t_4(unsigned_4 x);
! INLINE_SIM_ENDIAN(unsigned_8) endian_h2t_8(unsigned_8 x);
!
! INLINE_SIM_ENDIAN(unsigned_1) endian_t2h_1(unsigned_1 x);
! INLINE_SIM_ENDIAN(unsigned_2) endian_t2h_2(unsigned_2 x);
! INLINE_SIM_ENDIAN(unsigned_4) endian_t2h_4(unsigned_4 x);
! INLINE_SIM_ENDIAN(unsigned_8) endian_t2h_8(unsigned_8 x);
!
! INLINE_SIM_ENDIAN(unsigned_1) swap_1(unsigned_1 x);
! INLINE_SIM_ENDIAN(unsigned_2) swap_2(unsigned_2 x);
! INLINE_SIM_ENDIAN(unsigned_4) swap_4(unsigned_4 x);
! INLINE_SIM_ENDIAN(unsigned_8) swap_8(unsigned_8 x);
!
! INLINE_SIM_ENDIAN(unsigned_1) endian_h2be_1(unsigned_1 x);
! INLINE_SIM_ENDIAN(unsigned_2) endian_h2be_2(unsigned_2 x);
! INLINE_SIM_ENDIAN(unsigned_4) endian_h2be_4(unsigned_4 x);
! INLINE_SIM_ENDIAN(unsigned_8) endian_h2be_8(unsigned_8 x);
!
! INLINE_SIM_ENDIAN(unsigned_1) endian_be2h_1(unsigned_1 x);
! INLINE_SIM_ENDIAN(unsigned_2) endian_be2h_2(unsigned_2 x);
! INLINE_SIM_ENDIAN(unsigned_4) endian_be2h_4(unsigned_4 x);
! INLINE_SIM_ENDIAN(unsigned_8) endian_be2h_8(unsigned_8 x);
!
! INLINE_SIM_ENDIAN(unsigned_1) endian_h2le_1(unsigned_1 x);
! INLINE_SIM_ENDIAN(unsigned_2) endian_h2le_2(unsigned_2 x);
! INLINE_SIM_ENDIAN(unsigned_4) endian_h2le_4(unsigned_4 x);
! INLINE_SIM_ENDIAN(unsigned_8) endian_h2le_8(unsigned_8 x);
!
! INLINE_SIM_ENDIAN(unsigned_1) endian_le2h_1(unsigned_1 x);
! INLINE_SIM_ENDIAN(unsigned_2) endian_le2h_2(unsigned_2 x);
! INLINE_SIM_ENDIAN(unsigned_4) endian_le2h_4(unsigned_4 x);
! INLINE_SIM_ENDIAN(unsigned_8) endian_le2h_8(unsigned_8 x);
/* Host dependant:
--- 25,64 ----
/* C byte conversion functions */
! INLINE_PSIM_ENDIAN(unsigned_1) endian_h2t_1(unsigned_1 x);
! INLINE_PSIM_ENDIAN(unsigned_2) endian_h2t_2(unsigned_2 x);
! INLINE_PSIM_ENDIAN(unsigned_4) endian_h2t_4(unsigned_4 x);
! INLINE_PSIM_ENDIAN(unsigned_8) endian_h2t_8(unsigned_8 x);
!
! INLINE_PSIM_ENDIAN(unsigned_1) endian_t2h_1(unsigned_1 x);
! INLINE_PSIM_ENDIAN(unsigned_2) endian_t2h_2(unsigned_2 x);
! INLINE_PSIM_ENDIAN(unsigned_4) endian_t2h_4(unsigned_4 x);
! INLINE_PSIM_ENDIAN(unsigned_8) endian_t2h_8(unsigned_8 x);
!
! INLINE_PSIM_ENDIAN(unsigned_1) swap_1(unsigned_1 x);
! INLINE_PSIM_ENDIAN(unsigned_2) swap_2(unsigned_2 x);
! INLINE_PSIM_ENDIAN(unsigned_4) swap_4(unsigned_4 x);
! INLINE_PSIM_ENDIAN(unsigned_8) swap_8(unsigned_8 x);
!
! INLINE_PSIM_ENDIAN(unsigned_1) endian_h2be_1(unsigned_1 x);
! INLINE_PSIM_ENDIAN(unsigned_2) endian_h2be_2(unsigned_2 x);
! INLINE_PSIM_ENDIAN(unsigned_4) endian_h2be_4(unsigned_4 x);
! INLINE_PSIM_ENDIAN(unsigned_8) endian_h2be_8(unsigned_8 x);
!
! INLINE_PSIM_ENDIAN(unsigned_1) endian_be2h_1(unsigned_1 x);
! INLINE_PSIM_ENDIAN(unsigned_2) endian_be2h_2(unsigned_2 x);
! INLINE_PSIM_ENDIAN(unsigned_4) endian_be2h_4(unsigned_4 x);
! INLINE_PSIM_ENDIAN(unsigned_8) endian_be2h_8(unsigned_8 x);
!
! INLINE_PSIM_ENDIAN(unsigned_1) endian_h2le_1(unsigned_1 x);
! INLINE_PSIM_ENDIAN(unsigned_2) endian_h2le_2(unsigned_2 x);
! INLINE_PSIM_ENDIAN(unsigned_4) endian_h2le_4(unsigned_4 x);
! INLINE_PSIM_ENDIAN(unsigned_8) endian_h2le_8(unsigned_8 x);
!
! INLINE_PSIM_ENDIAN(unsigned_1) endian_le2h_1(unsigned_1 x);
! INLINE_PSIM_ENDIAN(unsigned_2) endian_le2h_2(unsigned_2 x);
! INLINE_PSIM_ENDIAN(unsigned_4) endian_le2h_4(unsigned_4 x);
! INLINE_PSIM_ENDIAN(unsigned_8) endian_le2h_8(unsigned_8 x);
/* Host dependant:
Index: sim-main.h
===================================================================
RCS file: sim-main.h
diff -N sim-main.h
*** /dev/null Tue May 5 13:32:27 1998
--- sim-main.h Sun Dec 9 23:46:09 2001
***************
*** 0 ****
--- 1,10 ----
+ #include "sim-basics.h"
+ #include "sim-signal.h"
+
+ typedef unsigned32 sim_cia;
+
+ #include "sim-base.h"
+
+ struct sim_state {
+ sim_state_base base;
+ };
Index: std-config.h
===================================================================
RCS file: /cvs/src/src/sim/ppc/std-config.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 std-config.h
*** std-config.h 1999/04/16 01:35:11 1.1.1.1
--- std-config.h 2001/12/10 07:46:10
*************** extern int current_stdio;
*** 340,346 ****
the module is included into a file being compiled, calls to
its funtions can be eliminated. 2 implies 1.
! INLINE_LOCALS:
Make internal (static) functions within the module `inline'.
--- 340,346 ----
the module is included into a file being compiled, calls to
its funtions can be eliminated. 2 implies 1.
! PSIM_INLINE_LOCALS:
Make internal (static) functions within the module `inline'.
*************** extern int current_stdio;
*** 348,354 ****
INCLUDE_MODULE == (REVEAL_MODULE | INLINE_MODULE)
! ALL_INLINE == (REVEAL_MODULE | INLINE_MODULE | INLINE_LOCALS)
In addition to this, modules have been put into two categories.
--- 348,354 ----
INCLUDE_MODULE == (REVEAL_MODULE | INLINE_MODULE)
! ALL_INLINE == (REVEAL_MODULE | INLINE_MODULE | PSIM_INLINE_LOCALS)
In addition to this, modules have been put into two categories.
*************** extern int current_stdio;
*** 449,455 ****
#define REVEAL_MODULE 1
#define INLINE_MODULE 2
#define INCLUDE_MODULE (INLINE_MODULE | REVEAL_MODULE)
! #define INLINE_LOCALS 4
#define ALL_INLINE 7
/* Your compilers inline reserved word */
--- 449,455 ----
#define REVEAL_MODULE 1
#define INLINE_MODULE 2
#define INCLUDE_MODULE (INLINE_MODULE | REVEAL_MODULE)
! #define PSIM_INLINE_LOCALS 4
#define ALL_INLINE 7
/* Your compilers inline reserved word */
*************** extern int current_stdio;
*** 506,512 ****
/* Default macro to simplify control several of key the inlines */
#ifndef DEFAULT_INLINE
! #define DEFAULT_INLINE INLINE_LOCALS
#endif
/* Code that converts between hosts and target byte order. Used on
--- 506,512 ----
/* Default macro to simplify control several of key the inlines */
#ifndef DEFAULT_INLINE
! #define DEFAULT_INLINE PSIM_INLINE_LOCALS
#endif
/* Code that converts between hosts and target byte order. Used on
*************** extern int current_stdio;
*** 580,586 ****
a jump table. */
#ifndef DEVICE_INLINE
! #define DEVICE_INLINE (DEFAULT_INLINE ? INLINE_LOCALS : 0)
#endif
/* Code called used while the device tree is being built.
--- 580,586 ----
a jump table. */
#ifndef DEVICE_INLINE
! #define DEVICE_INLINE (DEFAULT_INLINE ? PSIM_INLINE_LOCALS : 0)
#endif
/* Code called used while the device tree is being built.
*************** extern int current_stdio;
*** 588,594 ****
Inlining this is of no benefit */
#ifndef TREE_INLINE
! #define TREE_INLINE (DEFAULT_INLINE ? INLINE_LOCALS : 0)
#endif
/* Code called whenever information on a Special Purpose Register is
--- 588,594 ----
Inlining this is of no benefit */
#ifndef TREE_INLINE
! #define TREE_INLINE (DEFAULT_INLINE ? PSIM_INLINE_LOCALS : 0)
#endif
/* Code called whenever information on a Special Purpose Register is
*************** extern int current_stdio;
*** 628,634 ****
code is reduced. */
#ifndef SUPPORT_INLINE
! #define SUPPORT_INLINE INLINE_LOCALS
#endif
/* Model specific code used in simulating functional units. Note, it actaully
--- 628,634 ----
code is reduced. */
#ifndef SUPPORT_INLINE
! #define SUPPORT_INLINE PSIM_INLINE_LOCALS
#endif
/* Model specific code used in simulating functional units. Note, it actaully
*************** extern int current_stdio;
*** 653,665 ****
into this file */
#ifndef IDECOCE_INLINE
! #define IDECODE_INLINE INLINE_LOCALS
#endif
/* psim, isn't actually inlined */
#ifndef PSIM_INLINE
! #define PSIM_INLINE INLINE_LOCALS
#endif
/* Code to emulate os or rom compatibility. This code is called via a
--- 653,665 ----
into this file */
#ifndef IDECOCE_INLINE
! #define IDECODE_INLINE PSIM_INLINE_LOCALS
#endif
/* psim, isn't actually inlined */
#ifndef PSIM_INLINE
! #define PSIM_INLINE PSIM_INLINE_LOCALS
#endif
/* Code to emulate os or rom compatibility. This code is called via a