gem5.git
15 years agoscons: fix the library path stuff
Nathan Binkert [Sat, 7 Mar 2009 22:30:52 +0000 (14:30 -0800)]
scons: fix the library path stuff

15 years agobuild: fix errors for compilers other than g++ 4.3
Nathan Binkert [Sat, 7 Mar 2009 22:30:52 +0000 (14:30 -0800)]
build: fix errors for compilers other than g++ 4.3

15 years agostats: create an enable phase, and a prepare phase.
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
stats: create an enable phase, and a prepare phase.
Enable more or less takes the place of check, but also allows stats to
do some other configuration.  Prepare moves all of the code that readies
a stat for dumping into a separate function in preparation for supporting
serialization of certain pieces of statistics data.
While we're at it, clean up the visitor code and some of the python code.

15 years agostats: clean up how templates are used on the data side.
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
stats: clean up how templates are used on the data side.
This basically works by taking advantage of the curiously recurring template
pattern in an intelligent way so as to reduce the number of lines of code
and hopefully make things a little bit clearer.

15 years agostats: Fix all stats usages to deal with template fixes
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
stats: Fix all stats usages to deal with template fixes

15 years agostats: remove the template wart left over from the ancient binning stuff
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
stats: remove the template wart left over from the ancient binning stuff

15 years agostats: stick the distribution's fancy parameter into the parameters structure.
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
stats: stick the distribution's fancy parameter into the parameters structure.

15 years agostats: Add a wrapper class for the information side of things.
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
stats: Add a wrapper class for the information side of things.
This provides an easy way to provide the callbacks into the data side
of things from the info side of things.  Rename Wrap to DataWrap so it
is more easily distinguishable from InfoWrap

15 years agostats: better naming of template parameters for the wrapper stuff
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
stats: better naming of template parameters for the wrapper stuff
Parent and Child are bad names.  Derived and Base are better.

15 years agostats: get rid of meaningless uses of virtual
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
stats: get rid of meaningless uses of virtual

15 years agostats: miscellaneous cleanup
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
stats: miscellaneous cleanup

15 years agoserialize: Allow floats and doubles to be serialized
Nathan Binkert [Fri, 6 Mar 2009 03:09:53 +0000 (19:09 -0800)]
serialize: Allow floats and doubles to be serialized

15 years agoGet rid of 'using namespace' declarations in headers.
Steve Reinhardt [Fri, 6 Mar 2009 01:15:31 +0000 (17:15 -0800)]
Get rid of 'using namespace' declarations in headers.

15 years agoSCons: Fix bug with .hg dir not existing.
Ali Saidi [Thu, 5 Mar 2009 22:05:06 +0000 (17:05 -0500)]
SCons: Fix bug with .hg dir not existing.

15 years agoInOrderCPU: Clean up Constructors to initialize variables correctly (i.e. in a way...
Korey Sewell [Thu, 5 Mar 2009 03:37:45 +0000 (22:37 -0500)]
InOrderCPU: Clean up Constructors to initialize variables correctly (i.e. in a way for the compiler to play *nice*)

15 years agoGive each resource in InOrder it's own TraceFlag instead of just standard 'Resource...
Korey Sewell [Wed, 4 Mar 2009 18:17:09 +0000 (13:17 -0500)]
Give each resource in InOrder it's own TraceFlag instead of just standard 'Resource' flag

15 years agoRemove unused functions/comments cluttering up the code.
Korey Sewell [Wed, 4 Mar 2009 18:17:08 +0000 (13:17 -0500)]
Remove unused functions/comments cluttering up the code.

15 years agomake handling of interstage buffers (i.e. StageQueues) more consistent: (1)number...
Korey Sewell [Wed, 4 Mar 2009 18:17:07 +0000 (13:17 -0500)]
make handling of interstage buffers (i.e. StageQueues) more consistent: (1)number from 0-n, not 1-n+1, (2) always check nextStageValid before a stageNum+1 and prevStageValid for a stageNum-1 reference (3) add skidSize() to get StageQueue size for all threads

15 years ago InOrder didnt have all it's params set to a default value, which is now required...
Korey Sewell [Wed, 4 Mar 2009 18:17:05 +0000 (13:17 -0500)]
 InOrder didnt have all it's params set to a default value, which is now required for M5 objects; Also, a # of values need to be reset to 0 (or the appropriate value) before we assume they are OK for use.

15 years agoGive TimeBuffer an ID that can be set. Necessary because InOrder uses generic stages...
Korey Sewell [Wed, 4 Mar 2009 18:16:49 +0000 (13:16 -0500)]
Give TimeBuffer an ID that can be set. Necessary because InOrder uses generic stages so w/o an ID there is no way to differentiate buffers when debugging

15 years agouse numCycles instead of simTicks to determine CPI stat in InOrder
Korey Sewell [Wed, 4 Mar 2009 18:16:48 +0000 (13:16 -0500)]
use numCycles instead of simTicks to determine CPI stat in InOrder

15 years agoO3: Make numThreads error message more helpful.
Steve Reinhardt [Wed, 4 Mar 2009 14:25:53 +0000 (09:25 -0500)]
O3: Make numThreads error message more helpful.

15 years agoFix Num_Syscall_Descs check bug in non-x86 ISAs.
Steve Reinhardt [Sun, 1 Mar 2009 01:14:22 +0000 (20:14 -0500)]
Fix Num_Syscall_Descs check bug in non-x86 ISAs.
(See cset d35d2b28df38 for x86 fix.)

15 years agoquell gcc 4.3 warning
Nathan Binkert [Sat, 28 Feb 2009 01:29:58 +0000 (17:29 -0800)]
quell gcc 4.3 warning

15 years agoX86: Install the exit system call.
Gabe Black [Fri, 27 Feb 2009 17:26:41 +0000 (09:26 -0800)]
X86: Install the exit system call.

15 years agoX86: Install the 32 bit write system call.
Gabe Black [Fri, 27 Feb 2009 17:26:32 +0000 (09:26 -0800)]
X86: Install the 32 bit write system call.

15 years agoX86: Implement shrd.
Gabe Black [Fri, 27 Feb 2009 17:26:26 +0000 (09:26 -0800)]
X86: Implement shrd.

15 years agoX86: Add a structure to allow mapping between the host and guest fstat formats.
Gabe Black [Fri, 27 Feb 2009 17:26:17 +0000 (09:26 -0800)]
X86: Add a structure to allow mapping between the host and guest fstat formats.

15 years agoX86: Don't treat the REX prefixes as prefixes in 32 bit modes. These are inc/dec...
Gabe Black [Fri, 27 Feb 2009 17:26:09 +0000 (09:26 -0800)]
X86: Don't treat the REX prefixes as prefixes in 32 bit modes. These are inc/dec instructions.

15 years agoX86: Set address size to 64 bits when generating addresses internally.
Gabe Black [Fri, 27 Feb 2009 17:26:01 +0000 (09:26 -0800)]
X86: Set address size to 64 bits when generating addresses internally.

15 years agoX86: Add a vsyscall page for 32 bit processes to use.
Gabe Black [Fri, 27 Feb 2009 17:25:51 +0000 (09:25 -0800)]
X86: Add a vsyscall page for 32 bit processes to use.

15 years agoX86: Implement sysenter as a system call interface.
Gabe Black [Fri, 27 Feb 2009 17:25:43 +0000 (09:25 -0800)]
X86: Implement sysenter as a system call interface.

15 years agoX86: Add a 32 bit mmap2 system call.
Gabe Black [Fri, 27 Feb 2009 17:25:33 +0000 (09:25 -0800)]
X86: Add a 32 bit mmap2 system call.

15 years agoX86: Install a 32 bit fstat64 system call.
Gabe Black [Fri, 27 Feb 2009 17:25:26 +0000 (09:25 -0800)]
X86: Install a 32 bit fstat64 system call.

15 years agoX86: Take address size into account when computing an effective address.
Gabe Black [Fri, 27 Feb 2009 17:25:16 +0000 (09:25 -0800)]
X86: Take address size into account when computing an effective address.

15 years agoX86: Make instructions that use intseg preserve all 8 bytes of their addresses.
Gabe Black [Fri, 27 Feb 2009 17:25:02 +0000 (09:25 -0800)]
X86: Make instructions that use intseg preserve all 8 bytes of their addresses.

15 years agoX86: Fix a decoder bug and add in some missing instructions.
Gabe Black [Fri, 27 Feb 2009 17:24:10 +0000 (09:24 -0800)]
X86: Fix a decoder bug and add in some missing instructions.

15 years agoX86: Respect segment override prefixes even when there's no ModRM byte.
Gabe Black [Fri, 27 Feb 2009 17:23:58 +0000 (09:23 -0800)]
X86: Respect segment override prefixes even when there's no ModRM byte.

15 years agoX86: Fix segment limit checks.
Gabe Black [Fri, 27 Feb 2009 17:23:50 +0000 (09:23 -0800)]
X86: Fix segment limit checks.

15 years agoX86: Implement the 32 bit set_thread_area system call.
Gabe Black [Fri, 27 Feb 2009 17:23:42 +0000 (09:23 -0800)]
X86: Implement the 32 bit set_thread_area system call.

15 years agoX86: Set an initial value for the LDT selector.
Gabe Black [Fri, 27 Feb 2009 17:23:27 +0000 (09:23 -0800)]
X86: Set an initial value for the LDT selector.

15 years agoX86: Set up a space for a GDT in SE so we can set up TLS or LDT segments.
Gabe Black [Fri, 27 Feb 2009 17:23:17 +0000 (09:23 -0800)]
X86: Set up a space for a GDT in SE so we can set up TLS or LDT segments.

15 years agoX86: Compute shift instruction flags correctly.
Gabe Black [Fri, 27 Feb 2009 17:23:00 +0000 (09:23 -0800)]
X86: Compute shift instruction flags correctly.

15 years agoX86: Install some 32 bit system calls.
Gabe Black [Fri, 27 Feb 2009 17:22:50 +0000 (09:22 -0800)]
X86: Install some 32 bit system calls.

15 years agoX86: Handle 32 bit system call arguments.
Gabe Black [Fri, 27 Feb 2009 17:22:30 +0000 (09:22 -0800)]
X86: Handle 32 bit system call arguments.

15 years agoProcesses: Make getting and setting system call arguments part of a process object.
Gabe Black [Fri, 27 Feb 2009 17:22:14 +0000 (09:22 -0800)]
Processes: Make getting and setting system call arguments part of a process object.

15 years agoX86: Implement the int system call interface in the decoder.
Gabe Black [Fri, 27 Feb 2009 17:21:58 +0000 (09:21 -0800)]
X86: Implement the int system call interface in the decoder.

15 years agoX86: Distinguish the width of values on the stack between 32 and 64 bit processes.
Gabe Black [Fri, 27 Feb 2009 17:21:36 +0000 (09:21 -0800)]
X86: Distinguish the width of values on the stack between 32 and 64 bit processes.

15 years agoX86: Add a class to support 32 bit x86 linux process.
Gabe Black [Fri, 27 Feb 2009 17:21:14 +0000 (09:21 -0800)]
X86: Add a class to support 32 bit x86 linux process.

15 years agoCPA: Add annotations to IGbE and CopyEngine device models.
Ali Saidi [Fri, 27 Feb 2009 00:29:17 +0000 (19:29 -0500)]
CPA: Add annotations to IGbE and CopyEngine device models.

15 years agoCPA: Add code to automatically record function symbols as CPU executes.
Ali Saidi [Fri, 27 Feb 2009 00:29:17 +0000 (19:29 -0500)]
CPA: Add code to automatically record function symbols as CPU executes.

15 years agoCPA: Add new object for gathering critical path annotations.
Ali Saidi [Fri, 27 Feb 2009 00:29:17 +0000 (19:29 -0500)]
CPA: Add new object for gathering critical path annotations.

15 years agoCPA: Add m5ops for critical path annotation work.
Ali Saidi [Fri, 27 Feb 2009 00:29:16 +0000 (19:29 -0500)]
CPA: Add m5ops for critical path annotation work.

15 years agoTrace: fix the --trace-start option
Ali Saidi [Fri, 27 Feb 2009 00:29:16 +0000 (19:29 -0500)]
Trace: fix the --trace-start option

15 years agoDevices: Make the RTC device reflect the use of BCD in its status registers.
Gabe Black [Wed, 25 Feb 2009 18:22:49 +0000 (10:22 -0800)]
Devices: Make the RTC device reflect the use of BCD in its status registers.

15 years agoX86: Implement IST stack switching.
Gabe Black [Wed, 25 Feb 2009 18:22:43 +0000 (10:22 -0800)]
X86: Implement IST stack switching.

15 years agoCPU: Only look up the nearest symbol in the kernel if you're actually in kernel code.
Gabe Black [Wed, 25 Feb 2009 18:22:36 +0000 (10:22 -0800)]
CPU: Only look up the nearest symbol in the kernel if you're actually in kernel code.

15 years agoISA: Get rid of the get*RegName functions.
Gabe Black [Wed, 25 Feb 2009 18:22:31 +0000 (10:22 -0800)]
ISA: Get rid of the get*RegName functions.

15 years agoSPARC: Get rid of the state keeping track of register frames.
Gabe Black [Wed, 25 Feb 2009 18:22:25 +0000 (10:22 -0800)]
SPARC: Get rid of the state keeping track of register frames.

15 years agoISA: Set up common trace flags for tracing registers.
Gabe Black [Wed, 25 Feb 2009 18:22:17 +0000 (10:22 -0800)]
ISA: Set up common trace flags for tracing registers.

15 years agoISA: Get rid of FlattenIntIndex function.
Gabe Black [Wed, 25 Feb 2009 18:22:09 +0000 (10:22 -0800)]
ISA: Get rid of FlattenIntIndex function.

15 years agoSPARC: Get rid of flattenIndex in the int register file.
Gabe Black [Wed, 25 Feb 2009 18:21:59 +0000 (10:21 -0800)]
SPARC: Get rid of flattenIndex in the int register file.

15 years agoISA: Use the "Stack" traceflag for DPRINTFs about the initial stack frame.
Gabe Black [Wed, 25 Feb 2009 18:21:52 +0000 (10:21 -0800)]
ISA: Use the "Stack" traceflag for DPRINTFs about the initial stack frame.

15 years agoSPARC: Get rid of the setGlobals function.
Gabe Black [Wed, 25 Feb 2009 18:21:46 +0000 (10:21 -0800)]
SPARC: Get rid of the setGlobals function.

15 years agoSPARC: Get rid of the setCWP function.
Gabe Black [Wed, 25 Feb 2009 18:21:40 +0000 (10:21 -0800)]
SPARC: Get rid of the setCWP function.

15 years agoSPARC: Add a traceflag for register windows.
Gabe Black [Wed, 25 Feb 2009 18:21:33 +0000 (10:21 -0800)]
SPARC: Add a traceflag for register windows.

15 years agoX86: Implement the lldt instruction.
Gabe Black [Wed, 25 Feb 2009 18:21:27 +0000 (10:21 -0800)]
X86: Implement the lldt instruction.

15 years agoX86: Add segmentation checks for ldt related descriptors and selectors.
Gabe Black [Wed, 25 Feb 2009 18:21:21 +0000 (10:21 -0800)]
X86: Add segmentation checks for ldt related descriptors and selectors.

15 years agoX86: Make the TSS type check actually return a fault if it fails.
Gabe Black [Wed, 25 Feb 2009 18:21:14 +0000 (10:21 -0800)]
X86: Make the TSS type check actually return a fault if it fails.

15 years agoX86: Make rdcr use merge and the mov to control register instructions use the right...
Gabe Black [Wed, 25 Feb 2009 18:21:08 +0000 (10:21 -0800)]
X86: Make rdcr use merge and the mov to control register instructions use the right operand size.

15 years agoX86: Implement CLTS.
Gabe Black [Wed, 25 Feb 2009 18:21:02 +0000 (10:21 -0800)]
X86: Implement CLTS.

15 years agoX86: Make the segment register reading microops use merge.
Gabe Black [Wed, 25 Feb 2009 18:20:47 +0000 (10:20 -0800)]
X86: Make the segment register reading microops use merge.

15 years agoX86: Implement the mov to debug register intructions.
Gabe Black [Wed, 25 Feb 2009 18:20:42 +0000 (10:20 -0800)]
X86: Implement the mov to debug register intructions.

15 years agoX86: Rename oszForPseudoDesc maxOsz to reflect its more general use.
Gabe Black [Wed, 25 Feb 2009 18:20:30 +0000 (10:20 -0800)]
X86: Rename oszForPseudoDesc maxOsz to reflect its more general use.

15 years agoX86: Add code to interpret debug register values.
Gabe Black [Wed, 25 Feb 2009 18:20:25 +0000 (10:20 -0800)]
X86: Add code to interpret debug register values.

15 years agoX86: Fix a few bugs with the segment register instructions in real mode.
Gabe Black [Wed, 25 Feb 2009 18:20:19 +0000 (10:20 -0800)]
X86: Fix a few bugs with the segment register instructions in real mode.
Fix a few instances where the register form of zext was used where zexti was
intended. Also get rid of the 64 bit only rip relative addressed version since
64 bit and real mode are mutually exclusive.

15 years agoX86: Do a merge for the zero extension microop.
Gabe Black [Wed, 25 Feb 2009 18:20:10 +0000 (10:20 -0800)]
X86: Do a merge for the zero extension microop.

15 years agoX86: Add microops for reading/writing debug registers.
Gabe Black [Wed, 25 Feb 2009 18:20:01 +0000 (10:20 -0800)]
X86: Add microops for reading/writing debug registers.

15 years agoX86: Add classes that break out the bits of the DR6 and DR7 registers.
Gabe Black [Wed, 25 Feb 2009 18:19:54 +0000 (10:19 -0800)]
X86: Add classes that break out the bits of the DR6 and DR7 registers.

15 years agoX86: Check src1 for illegal values since that's the index we actually use.
Gabe Black [Wed, 25 Feb 2009 18:19:47 +0000 (10:19 -0800)]
X86: Check src1 for illegal values since that's the index we actually use.

15 years agoX86: Implement the fence instructions. These are not microcoded.
Gabe Black [Wed, 25 Feb 2009 18:19:41 +0000 (10:19 -0800)]
X86: Implement the fence instructions. These are not microcoded.

15 years agoCPU: Add a flag to identify a read barrier to the static inst class.
Gabe Black [Wed, 25 Feb 2009 18:19:33 +0000 (10:19 -0800)]
CPU: Add a flag to identify a read barrier to the static inst class.

15 years agoX86: Update stats now that prefetch is implemented.
Gabe Black [Wed, 25 Feb 2009 18:19:28 +0000 (10:19 -0800)]
X86: Update stats now that prefetch is implemented.

15 years agoX86: Implement a basic prefetch instruction.
Gabe Black [Wed, 25 Feb 2009 18:19:22 +0000 (10:19 -0800)]
X86: Implement a basic prefetch instruction.

15 years agoX86: Use the right portion of a register for stores.
Gabe Black [Wed, 25 Feb 2009 18:19:14 +0000 (10:19 -0800)]
X86: Use the right portion of a register for stores.

15 years agoX86: Add IRQ4 to the Intel MP tables.
Gabe Black [Wed, 25 Feb 2009 18:19:06 +0000 (10:19 -0800)]
X86: Add IRQ4 to the Intel MP tables.

15 years agoX86: Actually check page protections.
Gabe Black [Wed, 25 Feb 2009 18:18:58 +0000 (10:18 -0800)]
X86: Actually check page protections.

15 years agoX86: Update CS later so stack accesses have the right permission checks.
Gabe Black [Wed, 25 Feb 2009 18:18:51 +0000 (10:18 -0800)]
X86: Update CS later so stack accesses have the right permission checks.

15 years agoCPU: Update stats now that there's no fetch in the middle of macroops.
Gabe Black [Wed, 25 Feb 2009 18:18:45 +0000 (10:18 -0800)]
CPU: Update stats now that there's no fetch in the middle of macroops.

15 years agoCPU: Don't fetch when executing a macroop.
Gabe Black [Wed, 25 Feb 2009 18:18:36 +0000 (10:18 -0800)]
CPU: Don't fetch when executing a macroop.
If the CPL changes mid macroop, the end of the instruction might not be
priveleged enough to execute the beginning.

15 years agoX86: Use atCPL0 for accesses that are part of CPU machinery.
Gabe Black [Wed, 25 Feb 2009 18:18:29 +0000 (10:18 -0800)]
X86: Use atCPL0 for accesses that are part of CPU machinery.

15 years agoX86: Add a flag to force memory accesses to happen at CPL 0.
Gabe Black [Wed, 25 Feb 2009 18:18:22 +0000 (10:18 -0800)]
X86: Add a flag to force memory accesses to happen at CPL 0.

15 years agoX86: Move where CS is set so CPL checks work out.
Gabe Black [Wed, 25 Feb 2009 18:18:16 +0000 (10:18 -0800)]
X86: Move where CS is set so CPL checks work out.

15 years agoX86: Implement inUserMode for x86.
Gabe Black [Wed, 25 Feb 2009 18:18:06 +0000 (10:18 -0800)]
X86: Implement inUserMode for x86.

15 years agoX86: Add a trace flag for tracing faults.
Gabe Black [Wed, 25 Feb 2009 18:17:59 +0000 (10:17 -0800)]
X86: Add a trace flag for tracing faults.

15 years agoX86: Implement the sysret instruction in long mode.
Gabe Black [Wed, 25 Feb 2009 18:17:54 +0000 (10:17 -0800)]
X86: Implement the sysret instruction in long mode.

15 years agoX86: Implement the longmode versions of the syscall instruction.
Gabe Black [Wed, 25 Feb 2009 18:17:49 +0000 (10:17 -0800)]
X86: Implement the longmode versions of the syscall instruction.

15 years agoX86: Make the microcode assembler recognize r8-r15.
Gabe Black [Wed, 25 Feb 2009 18:17:43 +0000 (10:17 -0800)]
X86: Make the microcode assembler recognize r8-r15.

15 years agoX86: Add a wrattr microop.
Gabe Black [Wed, 25 Feb 2009 18:17:38 +0000 (10:17 -0800)]
X86: Add a wrattr microop.

15 years agoX86: Add a trace flag for the page table walker.
Gabe Black [Wed, 25 Feb 2009 18:17:27 +0000 (10:17 -0800)]
X86: Add a trace flag for the page table walker.