URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/tags/or1ksim/or1ksim-0.4.0/cpu/dlx
- from Rev 121 to Rev 135
- ↔ Reverse comparison
Rev 121 → Rev 135
/Makefile.in
0,0 → 1,511
# Makefile.in generated by automake 1.11.1 from Makefile.am. |
# @configure_input@ |
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, |
# Inc. |
# This Makefile.in is free software; the Free Software Foundation |
# gives unlimited permission to copy and/or distribute it, |
# with or without modifications, as long as this notice is preserved. |
|
# This program is distributed in the hope that it will be useful, |
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
# PARTICULAR PURPOSE. |
|
@SET_MAKE@ |
|
# Makefile -- Makefile for DLX architecture dependent simulation |
# |
# Copyright (C) 1999 Damjan Lampret, lampret@opencores.org |
# Copyright (C) 2008 Embecosm Limited |
# |
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
# |
# This file is part of OpenRISC 1000 Architectural Simulator. |
# |
# 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 3 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, see <http://www.gnu.org/licenses/>. |
|
VPATH = @srcdir@ |
pkgdatadir = $(datadir)/@PACKAGE@ |
pkgincludedir = $(includedir)/@PACKAGE@ |
pkglibdir = $(libdir)/@PACKAGE@ |
pkglibexecdir = $(libexecdir)/@PACKAGE@ |
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd |
install_sh_DATA = $(install_sh) -c -m 644 |
install_sh_PROGRAM = $(install_sh) -c |
install_sh_SCRIPT = $(install_sh) -c |
INSTALL_HEADER = $(INSTALL_DATA) |
transform = $(program_transform_name) |
NORMAL_INSTALL = : |
PRE_INSTALL = : |
POST_INSTALL = : |
NORMAL_UNINSTALL = : |
PRE_UNINSTALL = : |
POST_UNINSTALL = : |
build_triplet = @build@ |
host_triplet = @host@ |
target_triplet = @target@ |
subdir = cpu/dlx |
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in |
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ |
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ |
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ |
$(top_srcdir)/configure.ac |
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
$(ACLOCAL_M4) |
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs |
CONFIG_HEADER = $(top_builddir)/config.h |
CONFIG_CLEAN_FILES = |
CONFIG_CLEAN_VPATH_FILES = |
LTLIBRARIES = $(noinst_LTLIBRARIES) |
libarch_la_LIBADD = |
am_libarch_la_OBJECTS = execute.lo |
libarch_la_OBJECTS = $(am_libarch_la_OBJECTS) |
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) |
depcomp = $(SHELL) $(top_srcdir)/depcomp |
am__depfiles_maybe = depfiles |
am__mv = mv -f |
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ |
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) |
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ |
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) |
CCLD = $(CC) |
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ |
$(LDFLAGS) -o $@ |
SOURCES = $(libarch_la_SOURCES) |
DIST_SOURCES = $(libarch_la_SOURCES) |
ETAGS = etags |
CTAGS = ctags |
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
ACLOCAL = @ACLOCAL@ |
AMTAR = @AMTAR@ |
AR = @AR@ |
ARFLAGS = @ARFLAGS@ |
AUTOCONF = @AUTOCONF@ |
AUTOHEADER = @AUTOHEADER@ |
AUTOMAKE = @AUTOMAKE@ |
AWK = @AWK@ |
BUILD_DIR = @BUILD_DIR@ |
CC = @CC@ |
CCAS = @CCAS@ |
CCASDEPMODE = @CCASDEPMODE@ |
CCASFLAGS = @CCASFLAGS@ |
CCDEPMODE = @CCDEPMODE@ |
CFLAGS = @CFLAGS@ |
CPP = @CPP@ |
CPPFLAGS = @CPPFLAGS@ |
CPU_ARCH = @CPU_ARCH@ |
CYGPATH_W = @CYGPATH_W@ |
DEBUGFLAGS = @DEBUGFLAGS@ |
DEFS = @DEFS@ |
DEJAGNU = @DEJAGNU@ |
DEPDIR = @DEPDIR@ |
DSYMUTIL = @DSYMUTIL@ |
DUMPBIN = @DUMPBIN@ |
ECHO_C = @ECHO_C@ |
ECHO_N = @ECHO_N@ |
ECHO_T = @ECHO_T@ |
EGREP = @EGREP@ |
EXEEXT = @EXEEXT@ |
FGREP = @FGREP@ |
GREP = @GREP@ |
INCLUDES = @INCLUDES@ |
INSTALL = @INSTALL@ |
INSTALL_DATA = @INSTALL_DATA@ |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
LD = @LD@ |
LDFLAGS = @LDFLAGS@ |
LIBOBJS = @LIBOBJS@ |
LIBS = @LIBS@ |
LIBTOOL = @LIBTOOL@ |
LIPO = @LIPO@ |
LN_S = @LN_S@ |
LOCAL_CFLAGS = @LOCAL_CFLAGS@ |
LOCAL_DEFS = @LOCAL_DEFS@ |
LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ |
LTLIBOBJS = @LTLIBOBJS@ |
MAKEINFO = @MAKEINFO@ |
MKDIR_P = @MKDIR_P@ |
NM = @NM@ |
NMEDIT = @NMEDIT@ |
OBJDUMP = @OBJDUMP@ |
OBJEXT = @OBJEXT@ |
OTOOL = @OTOOL@ |
OTOOL64 = @OTOOL64@ |
PACKAGE = @PACKAGE@ |
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |
PACKAGE_NAME = @PACKAGE_NAME@ |
PACKAGE_STRING = @PACKAGE_STRING@ |
PACKAGE_TARNAME = @PACKAGE_TARNAME@ |
PACKAGE_VERSION = @PACKAGE_VERSION@ |
PATH_SEPARATOR = @PATH_SEPARATOR@ |
POW_LIB = @POW_LIB@ |
RANLIB = @RANLIB@ |
RUNTESTDEFAULTFLAGS = @RUNTESTDEFAULTFLAGS@ |
SED = @SED@ |
SET_MAKE = @SET_MAKE@ |
SHELL = @SHELL@ |
STRIP = @STRIP@ |
SUMVERSION = @SUMVERSION@ |
TERMCAP_LIB = @TERMCAP_LIB@ |
VERSION = @VERSION@ |
abs_builddir = @abs_builddir@ |
abs_srcdir = @abs_srcdir@ |
abs_top_builddir = @abs_top_builddir@ |
abs_top_srcdir = @abs_top_srcdir@ |
ac_ct_CC = @ac_ct_CC@ |
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ |
am__include = @am__include@ |
am__leading_dot = @am__leading_dot@ |
am__quote = @am__quote@ |
am__tar = @am__tar@ |
am__untar = @am__untar@ |
bindir = @bindir@ |
build = @build@ |
build_alias = @build_alias@ |
build_cpu = @build_cpu@ |
build_os = @build_os@ |
build_vendor = @build_vendor@ |
builddir = @builddir@ |
datadir = @datadir@ |
datarootdir = @datarootdir@ |
docdir = @docdir@ |
dvidir = @dvidir@ |
exec_prefix = @exec_prefix@ |
host = @host@ |
host_alias = @host_alias@ |
host_cpu = @host_cpu@ |
host_os = @host_os@ |
host_vendor = @host_vendor@ |
htmldir = @htmldir@ |
includedir = @includedir@ |
infodir = @infodir@ |
install_sh = @install_sh@ |
libdir = @libdir@ |
libexecdir = @libexecdir@ |
localedir = @localedir@ |
localstatedir = @localstatedir@ |
lt_ECHO = @lt_ECHO@ |
mandir = @mandir@ |
mkdir_p = @mkdir_p@ |
oldincludedir = @oldincludedir@ |
pdfdir = @pdfdir@ |
prefix = @prefix@ |
program_transform_name = @program_transform_name@ |
psdir = @psdir@ |
sbindir = @sbindir@ |
sharedstatedir = @sharedstatedir@ |
srcdir = @srcdir@ |
subdirs = @subdirs@ |
sysconfdir = @sysconfdir@ |
target = @target@ |
target_alias = @target_alias@ |
target_cpu = @target_cpu@ |
target_os = @target_os@ |
target_vendor = @target_vendor@ |
top_build_prefix = @top_build_prefix@ |
top_builddir = @top_builddir@ |
top_srcdir = @top_srcdir@ |
noinst_LTLIBRARIES = libarch.la |
libarch_la_SOURCES = execute.c \ |
arch.h |
|
all: all-am |
|
.SUFFIXES: |
.SUFFIXES: .c .lo .o .obj |
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) |
@for dep in $?; do \ |
case '$(am__configure_deps)' in \ |
*$$dep*) \ |
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ |
&& { if test -f $@; then exit 0; else break; fi; }; \ |
exit 1;; \ |
esac; \ |
done; \ |
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cpu/dlx/Makefile'; \ |
$(am__cd) $(top_srcdir) && \ |
$(AUTOMAKE) --gnu cpu/dlx/Makefile |
.PRECIOUS: Makefile |
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
@case '$?' in \ |
*config.status*) \ |
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ |
*) \ |
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ |
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ |
esac; |
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
|
$(top_srcdir)/configure: $(am__configure_deps) |
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
$(ACLOCAL_M4): $(am__aclocal_m4_deps) |
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
$(am__aclocal_m4_deps): |
|
clean-noinstLTLIBRARIES: |
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) |
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ |
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ |
test "$$dir" != "$$p" || dir=.; \ |
echo "rm -f \"$${dir}/so_locations\""; \ |
rm -f "$${dir}/so_locations"; \ |
done |
libarch.la: $(libarch_la_OBJECTS) $(libarch_la_DEPENDENCIES) |
$(LINK) $(libarch_la_OBJECTS) $(libarch_la_LIBADD) $(LIBS) |
|
mostlyclean-compile: |
-rm -f *.$(OBJEXT) |
|
distclean-compile: |
-rm -f *.tab.c |
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute.Plo@am__quote@ |
|
.c.o: |
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
@am__fastdepCC_FALSE@ $(COMPILE) -c $< |
|
.c.obj: |
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` |
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` |
|
.c.lo: |
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< |
|
mostlyclean-libtool: |
-rm -f *.lo |
|
clean-libtool: |
-rm -rf .libs _libs |
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) |
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
unique=`for i in $$list; do \ |
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
done | \ |
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \ |
END { if (nonempty) { for (i in files) print i; }; }'`; \ |
mkid -fID $$unique |
tags: TAGS |
|
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ |
$(TAGS_FILES) $(LISP) |
set x; \ |
here=`pwd`; \ |
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
unique=`for i in $$list; do \ |
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
done | \ |
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \ |
END { if (nonempty) { for (i in files) print i; }; }'`; \ |
shift; \ |
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ |
test -n "$$unique" || unique=$$empty_fix; \ |
if test $$# -gt 0; then \ |
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ |
"$$@" $$unique; \ |
else \ |
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ |
$$unique; \ |
fi; \ |
fi |
ctags: CTAGS |
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ |
$(TAGS_FILES) $(LISP) |
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
unique=`for i in $$list; do \ |
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
done | \ |
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \ |
END { if (nonempty) { for (i in files) print i; }; }'`; \ |
test -z "$(CTAGS_ARGS)$$unique" \ |
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ |
$$unique |
|
GTAGS: |
here=`$(am__cd) $(top_builddir) && pwd` \ |
&& $(am__cd) $(top_srcdir) \ |
&& gtags -i $(GTAGS_ARGS) "$$here" |
|
distclean-tags: |
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
|
distdir: $(DISTFILES) |
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
list='$(DISTFILES)'; \ |
dist_files=`for file in $$list; do echo $$file; done | \ |
sed -e "s|^$$srcdirstrip/||;t" \ |
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ |
case $$dist_files in \ |
*/*) $(MKDIR_P) `echo "$$dist_files" | \ |
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ |
sort -u` ;; \ |
esac; \ |
for file in $$dist_files; do \ |
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ |
if test -d $$d/$$file; then \ |
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ |
if test -d "$(distdir)/$$file"; then \ |
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ |
fi; \ |
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ |
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ |
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ |
fi; \ |
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ |
else \ |
test -f "$(distdir)/$$file" \ |
|| cp -p $$d/$$file "$(distdir)/$$file" \ |
|| exit 1; \ |
fi; \ |
done |
check-am: all-am |
check: check-am |
all-am: Makefile $(LTLIBRARIES) |
installdirs: |
install: install-am |
install-exec: install-exec-am |
install-data: install-data-am |
uninstall: uninstall-am |
|
install-am: all-am |
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am |
|
installcheck: installcheck-am |
install-strip: |
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ |
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ |
`test -z '$(STRIP)' || \ |
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install |
mostlyclean-generic: |
|
clean-generic: |
|
distclean-generic: |
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) |
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) |
|
maintainer-clean-generic: |
@echo "This command is intended for maintainers to use" |
@echo "it deletes files that may require special tools to rebuild." |
clean: clean-am |
|
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ |
mostlyclean-am |
|
distclean: distclean-am |
-rm -rf ./$(DEPDIR) |
-rm -f Makefile |
distclean-am: clean-am distclean-compile distclean-generic \ |
distclean-tags |
|
dvi: dvi-am |
|
dvi-am: |
|
html: html-am |
|
html-am: |
|
info: info-am |
|
info-am: |
|
install-data-am: |
|
install-dvi: install-dvi-am |
|
install-dvi-am: |
|
install-exec-am: |
|
install-html: install-html-am |
|
install-html-am: |
|
install-info: install-info-am |
|
install-info-am: |
|
install-man: |
|
install-pdf: install-pdf-am |
|
install-pdf-am: |
|
install-ps: install-ps-am |
|
install-ps-am: |
|
installcheck-am: |
|
maintainer-clean: maintainer-clean-am |
-rm -rf ./$(DEPDIR) |
-rm -f Makefile |
maintainer-clean-am: distclean-am maintainer-clean-generic |
|
mostlyclean: mostlyclean-am |
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic \ |
mostlyclean-libtool |
|
pdf: pdf-am |
|
pdf-am: |
|
ps: ps-am |
|
ps-am: |
|
uninstall-am: |
|
.MAKE: install-am install-strip |
|
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ |
clean-libtool clean-noinstLTLIBRARIES ctags distclean \ |
distclean-compile distclean-generic distclean-libtool \ |
distclean-tags distdir dvi dvi-am html html-am info info-am \ |
install install-am install-data install-data-am install-dvi \ |
install-dvi-am install-exec install-exec-am install-html \ |
install-html-am install-info install-info-am install-man \ |
install-pdf install-pdf-am install-ps install-ps-am \ |
install-strip installcheck installcheck-am installdirs \ |
maintainer-clean maintainer-clean-generic mostlyclean \ |
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ |
pdf pdf-am ps ps-am tags uninstall uninstall-am |
|
|
# Tell versions [3.59,3.63) of GNU make to not export all variables. |
# Otherwise a system limit (for SysV at least) may be exceeded. |
.NOEXPORT: |
/arch.h
0,0 → 1,28
/* arch.h -- DLX architecture specific macros |
Copyright (C) 1999 Damjan Lampret, lampret@opencores.org |
|
This file is part of OpenRISC 1000 Architectural Simulator. |
|
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., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
|
#define LINK_REG "r31" |
#define STACK_REG "r29" |
#define FRAME_REG "r30" |
|
#define MAX_GPRS 32 |
typedef unsigned long machword; |
|
/* Should args be passed on stack */ |
#define STACK_ARGS 1 |
arch.h
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: execute.c
===================================================================
--- execute.c (nonexistent)
+++ execute.c (revision 135)
@@ -0,0 +1,754 @@
+/* execute.c -- DLX dependent simulation
+ Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
+
+This file is part of OpenRISC 1000 Architectural Simulator.
+
+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., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* Most of the DLX simulation is done in this file. */
+
+#include
+#include
+#include
+
+#include "arch.h"
+
+#include "branch_predict.h"
+#include "abstract.h"
+#include "parse.h"
+#include "trace.h"
+#include "execute.h"
+#include "stats.h"
+
+/* General purpose registers. */
+machword reg[MAX_GPRS];
+
+/* Instruction queue */
+struct iqueue_entry iqueue[20];
+
+/* Benchmark multi issue execution */
+int multissue[20];
+int supercycles;
+
+/* Load and store stalls */
+int loadcycles, storecycles;
+
+/* Result forwarding stall cycles */
+int forwardingcycles;
+
+/* Completition queue */
+struct icomplet_entry icomplet[20];
+
+/* Program counter */
+unsigned long pc;
+
+/* Temporary program counter */
+unsigned long pctemp;
+
+/* Cycles counts fetch stages */
+int cycles;
+
+/* Implementation specific.
+ Get an actual value of a specific register. */
+
+machword eval_reg(char *regstr)
+{
+ int regno;
+
+ regno = atoi(regstr + 1);
+
+ if (regno < MAX_GPRS)
+ return reg[regno];
+ else {
+ PRINTF("\nABORT: read out of registers\n");
+ cont_run = 0;
+ return 0;
+ }
+}
+
+/* Implementation specific.
+ Set a specific register with value. */
+
+void set_reg32(char *regstr, unsigned long value)
+{
+ int regno;
+
+ regno = atoi(regstr + 1);
+
+ if (regno == 0) /* gpr0 is always zero */
+ value = 0;
+
+ if (regno < MAX_GPRS)
+ reg[regno] = value;
+ else {
+ PRINTF("\nABORT: write out of registers\n");
+ cont_run = 0;
+ }
+
+ return;
+}
+
+/* Does srcoperand depend on computation of dstoperand? Return
+ non-zero if yes.
+
+ Cycle t Cycle t+1
+dst: irrelevant src: immediate always 0
+dst: reg1 direct src: reg2 direct 0 if reg1 != reg2
+dst: reg1 disp src: reg2 direct always 0
+dst: reg1 direct src: reg2 disp 0 if reg1 != reg2
+dst: reg1 disp src: reg2 disp always 1 (store must
+ finish before load)
+*/
+
+int depend_operands(char *dstoperand, char *srcoperand)
+{
+ char dst[OPERANDNAME_LEN];
+ char src[OPERANDNAME_LEN];
+
+ if (!srcoperand)
+ return 0;
+
+ if (!dstoperand)
+ return 0;
+
+ strcpy(dst, dstoperand);
+ strcpy(src, srcoperand);
+
+ if (*src == '#') /* immediate */
+ return 0;
+ else
+ if (!strstr(src, "("))
+ if (*src == 'r') { /* src: reg direct */
+ if (!strstr(dst, "("))
+ if (*dst == 'r')
+ if (strcmp(dst, src) == 0)
+ return 1; /* dst: reg direct */
+ else
+ return 0; /* dst: reg direct */
+ else
+ return 0; /* dst: addr */
+ else
+ return 0; /* dst: reg disp */
+ } else
+ return 0; /* src: addr */
+ else { /* src: register disp */
+ char *regstr;
+
+ regstr = strstr(src, "(r") + 1; /* regstr == "rXX)" */
+ *strstr(regstr, ")") = '\0'; /* regstr == "rXX" */
+
+ if (!strstr(dst, "("))
+ if (*dst == 'r')
+ if (strcmp(dst, regstr) == 0)
+ return 1; /* dst: reg direct */
+ else
+ return 0; /* dst: reg direct */
+ else
+ return 0; /* dst: addr */
+ else
+ return 1; /* dst: reg disp */
+ }
+
+ return 0;
+}
+
+/* Implementation specific.
+ Get an actual value represented by operand (register direct, register
+ indirect (with displacement), immediate etc.).
+
+ #n - immediate n
+ rXX - register direct
+ XX - relative or absolute address (labels)
+ n(XX) - register indirect (with displacement) */
+
+machword eval_operand(char *srcoperand,int* breakpoint)
+{
+ char operand[OPERANDNAME_LEN];
+
+ strcpy(operand, srcoperand);
+
+ if (*operand == '#') /* immediate */
+ return strtoul(&operand[1], NULL, 0);
+ else
+ if (!strstr(operand, "(")) /* not indirect but ...*/
+ if (*operand == 'r') /* ... register direct */
+ return eval_reg(operand);
+
+ else /* ... rel. or abs. address */
+ return eval_label(operand);
+ else { /* register indirect */
+ int disp; /* with possible displacement */
+ char *regstr;
+ unsigned int memaddr;
+
+ disp = atoi(operand); /* operand == "nn(rXX)" */
+ regstr = strstr(operand, "(r") + 1; /* regstr == "rXX)" */
+ *strstr(regstr, ")") = '\0'; /* regstr == "rXX" */
+ memaddr = eval_reg(regstr) + disp;
+
+ return eval_mem32(memaddr,breakpoint);
+ }
+
+ return 0;
+}
+
+/* Implementation specific.
+ Set destination operand (register direct, register indirect
+ (with displacement) with value. */
+
+void set_operand(char *dstoperand, unsigned long value,int* breakpoint)
+{
+ char operand[OPERANDNAME_LEN];
+
+ strcpy(operand, dstoperand);
+
+ if (*operand == '#') /* immediate */
+ PRINTF("INTERNAL ERROR: Can't set immediate operand.\n");
+ else
+ if (!strstr(operand, "(")) /* not indirect but ...*/
+ if (*operand == 'r') /* ... register direct */
+ set_reg32(operand, value);
+ else /* ... rel. or abs. address */
+ PRINTF("INTERNAL ERROR: Can't set addr operand.\n");
+ else { /* register indirect */
+ int disp; /* with possible displacement */
+ char *regstr;
+ unsigned int memaddr;
+
+ disp = atoi(operand); /* operand == "nn(rXX)" */
+ regstr = strstr(operand, "(r") + 1; /* regstr == "rXX)" */
+ *strstr(regstr, ")") = '\0'; /* regstr == "rXX" */
+ memaddr = eval_reg(regstr) + disp;
+
+ set_mem32(memaddr, value, breakpoint);
+ }
+
+ return;
+}
+
+void reset()
+{
+ cycles = 0;
+ supercycles = 0;
+ loadcycles = 0;
+ storecycles = 0;
+ forwardingcycles = 0;
+ memset(reg, 0, sizeof(reg));
+ memset(iqueue, 0, sizeof(iqueue));
+ memset(icomplet, 0, sizeof(icomplet));
+ pctemp = eval_label("_main");
+ pc = pctemp;
+ set_reg32(STACK_REG , MEMORY_LEN - STACK_SIZE);
+}
+
+void fetch()
+{
+ /* Cycles after reset. */
+ cycles++;
+
+ /* Simulate instruction cache */
+ ic_simulate(pc);
+
+ /* Fetch instruction. */
+ strcpy(iqueue[0].insn, mem[pc].insn->insn);
+ strcpy(iqueue[0].op1, mem[pc].insn->op1);
+ strcpy(iqueue[0].op2, mem[pc].insn->op2);
+ strcpy(iqueue[0].op3, mem[pc].insn->op3);
+ iqueue[0].insn_addr = pc;
+ iqueue[0].dependdst = NULL;
+ iqueue[0].dependsrc1 = NULL;
+ iqueue[0].dependsrc2 = NULL;
+
+ /* Increment program counter. */
+ pc = pctemp;
+ pctemp += 4;
+
+ /* Check for breakpoint. */
+ if (mem[pc].brk)
+ cont_run = 0; /* Breakpoint set. */
+
+ return;
+}
+
+void decode(struct iqueue_entry *cur)
+{
+ int breakpoint = 0;
+
+ cur->dependdst = cur->op1;
+ cur->dependsrc1 = cur->op2; /* for calculating register */
+ cur->dependsrc2 = cur->op3; /* dependency */
+
+ cur->func_unit = unknown;
+
+ if (strcmp(cur->insn, "sw") == 0) {
+ cur->func_unit = store;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sb") == 0) {
+ cur->func_unit = store;
+ set_operand(cur->op1, (eval_operand(cur->op2,&breakpoint) << 24) + (eval_operand(cur->op1,&breakpoint) & 0xffffff),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sh") == 0) {
+ cur->func_unit = store;
+ set_operand(cur->op1, (eval_operand(cur->op2,&breakpoint) << 16) + (eval_operand(cur->op1,&breakpoint) & 0xffff),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "lw") == 0) {
+ cur->func_unit = load;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "lb") == 0) {
+ signed char temp = (eval_operand(cur->op2,&breakpoint) >> 24);
+ cur->func_unit = load;
+ set_operand(cur->op1, temp,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "lbu") == 0) {
+ unsigned char temp = (eval_operand(cur->op2,&breakpoint) >> 24);
+ cur->func_unit = load;
+ set_operand(cur->op1, temp,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "lh") == 0) {
+ signed short temp = (eval_operand(cur->op2,&breakpoint) >> 16);
+ cur->func_unit = load;
+ set_operand(cur->op1, temp,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "lhu") == 0) {
+ unsigned short temp = (eval_operand(cur->op2,&breakpoint) >> 16);
+ cur->func_unit = load;
+ set_operand(cur->op1, temp,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "lwi") == 0) {
+ cur->func_unit = movimm;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "lhi") == 0) {
+ cur->func_unit = movimm;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint) << 16,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "and") == 0) {
+ cur->func_unit = arith;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint) & eval_operand(cur->op3,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "andi") == 0) {
+ cur->func_unit = arith;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint) & eval_operand(cur->op3,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "or") == 0) {
+ cur->func_unit = arith;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint) | eval_operand(cur->op3,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "ori") == 0) {
+ cur->func_unit = arith;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint) | eval_operand(cur->op3,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "xor") == 0) {
+ cur->func_unit = arith;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint) ^ eval_operand(cur->op3,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "add") == 0) {
+ signed long temp3, temp2, temp1;
+ signed char temp4;
+
+ cur->func_unit = arith;
+ temp3 = eval_operand(cur->op3,&breakpoint);
+ temp2 = eval_operand(cur->op2,&breakpoint);
+ temp1 = temp2 + temp3;
+ set_operand(cur->op1, temp1,&breakpoint);
+
+ temp4 = temp1;
+ if (temp4 == temp1)
+ mstats.byteadd++;
+ } else
+ if (strcmp(cur->insn, "addi") == 0) {
+ signed long temp3, temp2, temp1;
+ signed char temp4;
+
+ cur->func_unit = arith;
+ temp3 = eval_operand(cur->op3,&breakpoint);
+ temp2 = eval_operand(cur->op2,&breakpoint);
+ temp1 = temp2 + temp3;
+ set_operand(cur->op1, temp1,&breakpoint);
+
+ temp4 = temp1;
+ if (temp4 == temp1)
+ mstats.byteadd++;
+ } else
+ if (strcmp(cur->insn, "addui") == 0) {
+ unsigned long temp3, temp2, temp1;
+ unsigned char temp4;
+
+ cur->func_unit = arith;
+ temp3 = eval_operand(cur->op3,&breakpoint);
+ temp2 = eval_operand(cur->op2,&breakpoint);
+ temp1 = temp2 + temp3;
+ set_operand(cur->op1, temp1,&breakpoint);
+
+ temp4 = temp1;
+ if (temp4 == temp1)
+ mstats.byteadd++;
+ } else
+ if (strcmp(cur->insn, "sub") == 0) {
+ signed long temp3, temp2, temp1;
+
+ cur->func_unit = arith;
+ temp3 = eval_operand(cur->op3,&breakpoint);
+ temp2 = eval_operand(cur->op2,&breakpoint);
+ temp1 = temp2 - temp3;
+ set_operand(cur->op1, temp1,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "subui") == 0) {
+ unsigned long temp3, temp2, temp1;
+
+ cur->func_unit = arith;
+ temp3 = eval_operand(cur->op3,&breakpoint);
+ temp2 = eval_operand(cur->op2,&breakpoint);
+ temp1 = temp2 - temp3;
+ set_operand(cur->op1, temp1,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "subi") == 0) {
+ signed long temp3, temp2, temp1;
+
+ cur->func_unit = arith;
+ temp3 = eval_operand(cur->op3,&breakpoint);
+ temp2 = eval_operand(cur->op2,&breakpoint);
+ temp1 = temp2 - temp3;
+ set_operand(cur->op1, temp1,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "mul") == 0) {
+ signed long temp3, temp2, temp1;
+
+ cur->func_unit = arith;
+ temp3 = eval_operand(cur->op3,&breakpoint);
+ temp2 = eval_operand(cur->op2,&breakpoint);
+ temp1 = temp2 * temp3;
+ set_operand(cur->op1, temp1,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "div") == 0) {
+ signed long temp3, temp2, temp1;
+
+ cur->func_unit = arith;
+ temp3 = eval_operand(cur->op3,&breakpoint);
+ temp2 = eval_operand(cur->op2,&breakpoint);
+ temp1 = temp2 / temp3;
+ set_operand(cur->op1, temp1,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "divu") == 0) {
+ unsigned long temp3, temp2, temp1;
+
+ cur->func_unit = arith;
+ temp3 = eval_operand(cur->op3,&breakpoint);
+ temp2 = eval_operand(cur->op2,&breakpoint);
+ temp1 = temp2 / temp3;
+ set_operand(cur->op1, temp1,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "slli") == 0) {
+ cur->func_unit = shift;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint) << eval_operand(cur->op3,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sll") == 0) {
+ cur->func_unit = shift;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint) << eval_operand(cur->op3,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "srl") == 0) {
+ cur->func_unit = shift;
+ set_operand(cur->op1, eval_operand(cur->op2,&breakpoint) >> eval_operand(cur->op3,&breakpoint),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "srai") == 0) {
+ cur->func_unit = shift;
+ set_operand(cur->op1, (signed)eval_operand(cur->op2,&breakpoint) / (1 << eval_operand(cur->op3,&breakpoint)),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sra") == 0) {
+ cur->func_unit = shift;
+ set_operand(cur->op1, (signed)eval_operand(cur->op2,&breakpoint) / (1 << eval_operand(cur->op3,&breakpoint)),&breakpoint);
+ } else
+ if (strcmp(cur->insn, "jal") == 0) {
+ cur->func_unit = jump;
+ pctemp = eval_operand(cur->op1,&breakpoint);
+ set_reg32(LINK_REG, pc + 4);
+ } else
+ if (strcmp(cur->insn, "jr") == 0) {
+ cur->func_unit = jump;
+ cur->dependsrc1 = cur->op1;
+ pctemp = eval_operand(cur->op1,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "j") == 0) {
+ cur->func_unit = jump;
+ pctemp = eval_operand(cur->op1,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "nop") == 0) {
+ cur->func_unit = nop;
+ } else
+ if (strcmp(cur->insn, "beqz") == 0) {
+ cur->func_unit = branch;
+ cur->dependsrc1 = cur->op1;
+ if (eval_operand(cur->op1,&breakpoint) == 0) {
+ pctemp = eval_operand(cur->op2,&breakpoint);
+ mstats.beqz.taken++;
+ bpb_update(cur->insn_addr, 1);
+ btic_update(pctemp);
+ } else {
+ mstats.beqz.nottaken++;
+ bpb_update(cur->insn_addr, 0);
+ btic_update(pc);
+ }
+ } else
+ if (strcmp(cur->insn, "bnez") == 0) {
+ cur->func_unit = branch;
+ cur->dependsrc1 = cur->op1;
+ if (eval_operand(cur->op1,&breakpoint) != 0) {
+ pctemp = eval_operand(cur->op2,&breakpoint);
+ mstats.bnez.taken++;
+ bpb_update(cur->insn_addr, 1);
+ btic_update(pctemp);
+ } else {
+ mstats.bnez.nottaken++;
+ bpb_update(cur->insn_addr, 0);
+ btic_update(pc);
+ }
+ } else
+ if (strcmp(cur->insn, "seq") == 0) {
+ cur->func_unit = compare;
+ if (eval_operand(cur->op2,&breakpoint) == eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "snei") == 0) {
+ cur->func_unit = compare;
+ if (eval_operand(cur->op2,&breakpoint) != eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sne") == 0) {
+ cur->func_unit = compare;
+ if (eval_operand(cur->op2,&breakpoint) != eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "seqi") == 0) {
+ cur->func_unit = compare;
+ if (eval_operand(cur->op2,&breakpoint) == eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sgt") == 0) {
+ cur->func_unit = compare;
+ if ((signed)eval_operand(cur->op2,&breakpoint) >
+ (signed)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sgtui") == 0) {
+ cur->func_unit = compare;
+ if ((unsigned)eval_operand(cur->op2,&breakpoint) >
+ (unsigned)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sgeui") == 0) {
+ cur->func_unit = compare;
+ if ((unsigned)eval_operand(cur->op2,&breakpoint) >=
+ (unsigned)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sgei") == 0) {
+ cur->func_unit = compare;
+ if ((signed)eval_operand(cur->op2,&breakpoint) >= (signed)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sgti") == 0) {
+ cur->func_unit = compare;
+ if ((signed)eval_operand(cur->op2,&breakpoint) >
+ (signed)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "slt") == 0) {
+ cur->func_unit = compare;
+ if ((signed)eval_operand(cur->op2,&breakpoint) <
+ (signed)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "slti") == 0) {
+ cur->func_unit = compare;
+ if ((signed)eval_operand(cur->op2,&breakpoint) <
+ (signed)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sle") == 0) {
+ cur->func_unit = compare;
+ if ((signed)eval_operand(cur->op2,&breakpoint) <=
+ (signed)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "slei") == 0) {
+ cur->func_unit = compare;
+ if ((signed)eval_operand(cur->op2,&breakpoint) <=
+ (signed)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sleui") == 0) {
+ cur->func_unit = compare;
+ if ((unsigned)eval_operand(cur->op2,&breakpoint) <=
+ (unsigned)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "sleu") == 0) {
+ cur->func_unit = compare;
+ if ((unsigned)eval_operand(cur->op2,&breakpoint) <=
+ (unsigned)eval_operand(cur->op3,&breakpoint))
+ set_operand(cur->op1, 1,&breakpoint);
+ else
+ set_operand(cur->op1, 0,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "simrdtsc") == 0) {
+ set_operand(cur->op1, cycles+loadcycles+storecycles+forwardingcycles,&breakpoint);
+ } else
+ if (strcmp(cur->insn, "simprintf") == 0) {
+ unsigned long stackaddr;
+
+ stackaddr = eval_reg(FRAME_REG);
+ simprintf(stackaddr, 0);
+ /* PRINTF("simprintf %x %x %x\n", stackaddr, fmtaddr, args); */
+ } else {
+ PRINTF("\nABORT: illegal opcode %s ", cur->insn);
+ PRINTF("at %.8lx\n", cur->insn_addr);
+ cont_run = 0;
+ }
+
+ /* Dynamic, dependency stats. */
+ adddstats(icomplet[0].insn, iqueue[0].insn, 1, check_depend());
+
+ /* Dynamic, functional units stats. */
+ addfstats(icomplet[0].func_unit, iqueue[0].func_unit, 1, check_depend());
+
+ /* Dynamic, single stats. */
+ addsstats(iqueue[0].insn, 1, 0);
+
+ if (cur->func_unit == store)
+ storecycles += 0;
+
+ if (cur->func_unit == load)
+ loadcycles += 0;
+
+ if (check_depend())
+ forwardingcycles += 0;
+
+ /* Pseudo multiple issue benchmark */
+ if ((multissue[cur->func_unit] == 0) || (check_depend())) {
+ int i;
+ for (i = 0; i < 20; i++)
+ multissue[i] = 9;
+ supercycles++;
+ multissue[arith] = 9;
+ multissue[store] = 9;
+ multissue[load] = 9;
+ }
+ multissue[cur->func_unit]--;
+
+ return;
+}
+
+void execute()
+{
+ int i;
+
+ /* Here comes real execution someday... */
+
+ /* Instruction waits in completition buffer until retired. */
+ strcpy(icomplet[0].insn, iqueue[0].insn);
+ strcpy(icomplet[0].op1, iqueue[0].op1);
+ strcpy(icomplet[0].op2, iqueue[0].op2);
+ strcpy(icomplet[0].op3, iqueue[0].op3);
+ icomplet[0].func_unit = iqueue[0].func_unit;
+ icomplet[0].insn_addr = iqueue[0].insn_addr;
+
+ if (iqueue[0].dependdst == iqueue[0].op1)
+ icomplet[0].dependdst = icomplet[0].op1;
+ else
+ if (iqueue[0].dependdst == iqueue[0].op2)
+ icomplet[0].dependdst = icomplet[0].op2;
+ else
+ if (iqueue[0].dependdst == iqueue[0].op3)
+ icomplet[0].dependdst = icomplet[0].op3;
+ else
+ icomplet[0].dependdst = NULL;
+
+ if (iqueue[0].dependsrc1 == iqueue[0].op1)
+ icomplet[0].dependsrc1 = icomplet[0].op1;
+ else
+ if (iqueue[0].dependsrc1 == iqueue[0].op2)
+ icomplet[0].dependsrc1 = icomplet[0].op2;
+ else
+ if (iqueue[0].dependsrc1 == iqueue[0].op3)
+ icomplet[0].dependsrc1 = icomplet[0].op3;
+ else
+ icomplet[0].dependsrc1 = NULL;
+
+ if (iqueue[0].dependsrc2 == iqueue[0].op1)
+ icomplet[0].dependsrc2 = icomplet[0].op1;
+ else
+ if (iqueue[0].dependsrc2 == iqueue[0].op2)
+ icomplet[0].dependsrc2 = icomplet[0].op2;
+ else
+ if (iqueue[0].dependsrc2 == iqueue[0].op3)
+ icomplet[0].dependsrc2 = icomplet[0].op3;
+ else
+ icomplet[0].dependsrc2 = NULL;
+
+ /* History of execution */
+ for (i = HISTEXEC_LEN - 1; i; i--)
+ histexec[i] = histexec[i - 1];
+ histexec[0] = icomplet[0].insn_addr; /* add last insn */
+
+ return;
+}
+
+void dumpreg()
+{
+ int i;
+
+ PRINTF("\n\nIQ[0]:");
+ dumpmemory(iqueue[0].insn_addr, iqueue[0].insn_addr + 4);
+ PRINTF(" (just executed)\tCYCLES: %u \nSuperscalar CYCLES: %u\n", cycles, supercycles);
+ PRINTF("Additional LOAD CYCLES: %u STORE CYCLES: %u\n", loadcycles, storecycles);
+ PRINTF("Additional RESULT FORWARDING CYCLES: %u\nPC:", forwardingcycles);
+ dumpmemory(pc, pc + 4);
+ PRINTF(" (next insn)");
+ for(i = 0; i < MAX_GPRS; i++) {
+ if (i % 4 == 0)
+ PRINTF("\n");
+ PRINTF("GPR%.2u: %.8lx ", i, reg[i]);
+ }
+}
execute.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: Makefile.am
===================================================================
--- Makefile.am (nonexistent)
+++ Makefile.am (revision 135)
@@ -0,0 +1,26 @@
+# Makefile -- Makefile for DLX architecture dependent simulation
+#
+# Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
+# Copyright (C) 2008 Embecosm Limited
+#
+# Contributor Jeremy Bennett
+#
+# This file is part of OpenRISC 1000 Architectural Simulator.
+#
+# 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 3 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, see .
+
+
+noinst_LTLIBRARIES = libarch.la
+libarch_la_SOURCES = execute.c \
+ arch.h
Makefile.am
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: .cvsignore
===================================================================
--- .cvsignore (nonexistent)
+++ .cvsignore (revision 135)
@@ -0,0 +1 @@
+Makefile