Update of /cvsroot/simit-arm/simit-arm/emulator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7571/emulator
Modified Files:
Tag: sc_branch
Makefile.am arm_dec.h arm_inst_wfpe_nonull.def armemul.cpp
armemul.h main.cpp
Log Message:
improved decoder generation
Index: arm_dec.h
===================================================================
RCS file: /cvsroot/simit-arm/simit-arm/emulator/arm_dec.h,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** arm_dec.h 28 Dec 2004 05:54:24 -0000 1.2.2.1
--- arm_dec.h 3 Apr 2005 20:24:00 -0000 1.2.2.2
***************
*** 1,7 ****
/*
! Binary decoder synthesized by SimIt-ARM version 2.0.4
Input statistics
! Total entries : 191
Unique labels : 131
Shannon entropy : 6.99511
--- 1,7 ----
/*
! Binary decoder synthesized by SimIt-ARM-sc version 2.1pre4
[...1931 lines suppressed...]
if _PATTERN_TRUE(0x00000f00, 0x00000000) {
--- 2223,2227 ----
}
! _STUB_ENTRY(stub_10_13)
{
if _PATTERN_TRUE(0x00000f00, 0x00000000) {
***************
*** 2039,2043 ****
}
! _STUB_ENTRY(stub_8_15)
{
if _PATTERN_TRUE(0x00000f00, 0x00000000) {
--- 2232,2236 ----
}
! _STUB_ENTRY(stub_10_15)
{
if _PATTERN_TRUE(0x00000f00, 0x00000000) {
Index: main.cpp
===================================================================
RCS file: /cvsroot/simit-arm/simit-arm/emulator/main.cpp,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** main.cpp 2 Feb 2005 18:00:20 -0000 1.2.2.1
--- main.cpp 3 Apr 2005 20:24:00 -0000 1.2.2.2
***************
*** 94,98 ****
#endif
! UInt64 icount = ema.run_count(max_inum);
#if HAVE_SYS_RESOURCE_H && HAVE_SYS_TIME_H
--- 94,102 ----
#endif
! UInt64 icount;
! if (max_inum==(UInt64)-1)
! icount = ema.run();
! else
! icount = ema.run_count(max_inum);
#if HAVE_SYS_RESOURCE_H && HAVE_SYS_TIME_H
Index: Makefile.am
===================================================================
RCS file: /cvsroot/simit-arm/simit-arm/emulator/Makefile.am,v
retrieving revision 1.1.1.1.2.1
retrieving revision 1.1.1.1.2.2
diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.2
*** Makefile.am 28 Dec 2004 05:54:24 -0000 1.1.1.1.2.1
--- Makefile.am 3 Apr 2005 20:24:00 -0000 1.1.1.1.2.2
***************
*** 1,3 ****
--- 1,10 ----
+ DECODER_GEN := ../decgen/decgen32
+ DECODER_HDR := arm_dec.h
+ DECODER_DEF := arm_inst_wfpe_nonull.def
+
+ $(DECODER_HDR): $(DECODER_DEF)
+ $(DECODER_GEN) -i -g 0.125 -o $@ $<
+
SUBDIRS = nwfpe
***************
*** 34,35 ****
--- 41,43 ----
INCLUDES = -I$(top_srcdir)/libosm
+ EXTRA_DIST = $(DECODER_DEF) arm_inst_wfpe.def
Index: armemul.h
===================================================================
RCS file: /cvsroot/simit-arm/simit-arm/emulator/armemul.h,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** armemul.h 28 Dec 2004 05:54:24 -0000 1.2.2.1
--- armemul.h 3 Apr 2005 20:24:00 -0000 1.2.2.2
***************
*** 28,31 ****
--- 28,34 ----
/* run the program */
+ UInt64 run();
+
+ /* run the program */
UInt64 run_count(UInt64 count);
Index: arm_inst_wfpe_nonull.def
===================================================================
RCS file: /cvsroot/simit-arm/simit-arm/emulator/arm_inst_wfpe_nonull.def,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1
*** arm_inst_wfpe_nonull.def 24 Sep 2004 03:11:01 -0000 1.1.1.1
--- arm_inst_wfpe_nonull.def 3 Apr 2005 20:24:00 -0000 1.1.1.1.2.1
***************
*** 198,203 ****
IDEF(fpe, 0x0F000000, 0x0E000000, 0.33)
! IDEF(cpld, 0x0F100E00, 0x0D100E00, 1)
! IDEF(cpst, 0x0F100E00, 0x0D000E00, 1)
IDEF(sc, 0x0F000000, 0x0F000000, 1)
--- 198,203 ----
IDEF(fpe, 0x0F000000, 0x0E000000, 0.33)
! /*IDEF(cpld, 0x0F100E00, 0x0D100E00, 1)*/
! /*IDEF(cpst, 0x0F100E00, 0x0D000E00, 1)*/
IDEF(sc, 0x0F000000, 0x0F000000, 1)
Index: armemul.cpp
===================================================================
RCS file: /cvsroot/simit-arm/simit-arm/emulator/armemul.cpp,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -C2 -d -r1.2.2.2 -r1.2.2.3
*** armemul.cpp 20 Feb 2005 08:14:22 -0000 1.2.2.2
--- armemul.cpp 3 Apr 2005 20:24:00 -0000 1.2.2.3
***************
*** 100,103 ****
--- 100,118 ----
}
+ UInt64 arm_emulator::run()
+ {
+ arm_inst_t inst;
+
+ icount = 0;
+ running = true;
+ while(running)
+ {
+ inst = fetch_inst(get_pc());
+ execute(inst, get_pc());
+ }
+
+ return icount;
+ }
+
UInt64 arm_emulator::run_count(UInt64 count)
{
|