Commit graph

27 commits

Author SHA1 Message Date
Ali Saidi 7b283dbc09 fix merging issues
arch/alpha/isa_traits.hh:
arch/sparc/linux/process.cc:
    fix merging problem
sim/syscall_emul.cc:
    use setIntReg

--HG--
extra : convert_revision : e88d72e415493cd17d7b88c22c7e995f3199e396
2006-03-09 16:17:10 -05:00
Ali Saidi 56cc760f6f Merge zizzer:/bk/multiarch
into  zeep.eecs.umich.edu:/z/saidi/work/m5.ma2

arch/alpha/isa_traits.hh:
arch/alpha/linux/process.cc:
arch/sparc/isa_traits.hh:
arch/sparc/linux/process.cc:
sim/process.cc:
    merge

--HG--
rename : cpu/exec_context.hh => cpu/cpu_exec_context.hh
extra : convert_revision : fea0155c8e23abbd0d5d5251abbd0f4d223fe935
2006-03-09 15:56:42 -05:00
Ali Saidi ce3a6343b6 no more common syscall emulation, now common for everyone
check abi-tag note section of elf binary for OS
add pseudo functions (moved from alpha and made to be generic)
move setsyscallreturn into isa traits

arch/alpha/SConscript:
    no more common syscall emulation, now common for everyone
arch/alpha/isa_traits.hh:
    move setsyscallreturn into isa description
arch/alpha/linux/process.cc:
arch/alpha/tru64/process.cc:
    use generic functions rather than alpha specific ones
arch/sparc/isa_traits.hh:
    have consts for generic pseudo syscalls
arch/sparc/linux/process.cc:
    use generic functions
base/loader/elf_object.cc:
    check abi-tag note section of elf binary for OS
cpu/exec_context.hh:
    move syssyscallreturn into isa traits
sim/process.cc:
    find call num with a more generic
sim/syscall_emul.cc:
sim/syscall_emul.hh:
    add pseudo functions (moved from alpha and made to be generic)

--HG--
extra : convert_revision : 5a31024ecde7e39b830365ddd84593ea501a34d2
2006-03-09 15:42:09 -05:00
Korey Sewell a3aae21d03 last changes before big merge
arch/alpha/isa_traits.hh:
arch/sparc/isa_traits.hh:
    add nnpc for compiling purposes in exec_context setNextNPC function
cpu/exec_context.hh:
    set NNPC function
cpu/simple/cpu.cc:
    use NNPC in determining what PC we are using

--HG--
extra : convert_revision : e810cfbc5dc31879b20d2cc40bf9871613203532
2006-03-09 03:27:51 -05:00
Gabe Black 3b7d756907 Working towards compiling SPARC_SE
arch/alpha/isa_traits.hh:
    Changed the enums to const ints, and got rid of a few unnecessary constants.
arch/sparc/isa_traits.hh:
    Got rid of the enums, and added in some missing constants.

--HG--
extra : convert_revision : ee47890af9d8c67300b31d8e0dda1d580bd21479
2006-03-08 08:09:27 -05:00
Gabe Black b5f65c36c7 Corrected a mispelling of "unimplemented".
arch/sparc/stacktrace.hh:
    - Change the StackTrace code so that the class can more easily be
    cleaned out and reused to avoid extra allocations.
    - Allow trace() to accept a static instruction pointer so it can
    determine if the instruction is worth tracing.  This is moved from
    the CPU.
    - provide constants for special meaning PCs (user, console, unknown),
    instead of magic numbers
arch/sparc/stacktrace.hh:
    Added some typedefs for Addr and MachInst, and untemplatized StaticInstPtr
arch/sparc/stacktrace.hh:
    Made Addr a global type
arch/sparc/stacktrace.hh:
    bk cp ../alpha/stacktrace.hh stacktrace.hh

--HG--
extra : convert_revision : 8fd15e5ec8d676d081380b21886234561c5f3678
2006-03-07 14:34:11 -05:00
Gabe Black 8106a80450 Pushed ev5.hh out of the non-alpha code.
arch/SConscript:
    ev5 should now be contained within alpha specific code.
arch/alpha/ev5.cc:
arch/alpha/isa_traits.hh:
    Added getInstAsid and getDataAsid functions. These should be removed when the SimpleScalar cpu model is removed.
arch/sparc/isa_traits.hh:
    Added getInstAsid and getDataAsid functions. These should be removed when the SimpleScalar cpu model is removed. Also made some small fixes.
cpu/o3/alpha_cpu.hh:
    Added typedefs which are required now that there isn't a using namespace EV5.
cpu/o3/alpha_cpu_impl.hh:
    Some small changes so that ev5.hh isn't needed directly.
cpu/o3/cpu.hh:
    Removed including ev5.hh, and pushed retrieving the Asid into the MiscRegFile.
cpu/o3/regfile.hh:
    Removed the include of ev5.hh, using namespace EV5, and the now redundant ipr array.

--HG--
extra : convert_revision : 5ef8f69435a3a888a3f06d0095d89326dafb33fd
2006-03-07 14:08:01 -05:00
Gabe Black b0eeb15d72 Fixed up some issues to be more compilable.
--HG--
extra : convert_revision : a70d9cdbe26f44fa9d94e1cbadd92f8c909596ec
2006-03-07 07:34:43 -05:00
Gabe Black 5aa0669b52 Changed the include paths to take advantage of the os specific directories.
--HG--
extra : convert_revision : 287d5323268806adc7cfb9cb3600605e837e3764
2006-03-07 04:34:21 -05:00
Gabe Black 547999eb1f Clean up of the SPARC isa_traits. This still doesn't compile, but it's closer.
--HG--
extra : convert_revision : 7b22a4a4af5bcb13e2d9322ef93d3f582e8efa92
2006-03-07 04:33:40 -05:00
Gabe Black 9e43f70ac2 Clean up of the SPARC isa description.
--HG--
extra : convert_revision : 21fe35fe4719f487168c89dd7bfc87dc38af0267
2006-03-07 04:33:10 -05:00
Gabe Black d4b246b3e9 Implemented SPARC fault classes.
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    Implemented the SPARC fault classes. The invoke method still needs to be written, but this depends on the misc regfile.

--HG--
extra : convert_revision : bc9d2785600cee5ea1cba72e563ca5d1a20f37fd
2006-03-07 04:32:34 -05:00
Gabe Black b7ebc2d97f Moved where some alpha specific source files were mentioned to be in the alpha specific Sconscript, and took advantage of the os specific directories for the process files.
arch/sparc/faults.cc:
    Remove fake fault, fix to have normal m5 line length limit, and change pointers to be const pointers so that the default faults aren't changed accidentally.
arch/sparc/faults.hh:
    Fix to have normal m5 line length limit, change pointers to const pointers.
arch/sparc/faults.hh:
    Added a typedef for the Addr type, and changed the formatting of the faults slightly.
arch/sparc/faults.hh:
    ur
    Using cleaned up fault class deiffinitions
arch/sparc/faults.hh:
    Added typedef for Addr
arch/sparc/faults.hh:
    Made Addr a global type
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    Changed Fault * to Fault, which is a typedef to FaultBase *, which is the old Fault class renamed.
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    Changed Fault to be a RefCountingPtr
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    MachineCheckFaults and AlignmentFaults are now generated by the ISA, rather than being created directly.
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    Put the Alpha faults into the AlphaISA namespace
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    Moved the _stat for MachineCheckFault and AlignmentFault into the isa specific classes to prevent instantiation of the generic classes.
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    Changed ev5_trap from a function of the execution context to a function of the fault. The actual function still resides in the execution context.
arch/sparc/faults.cc:
    AlphaFault is now an abstract class.
arch/sparc/faults.hh:
    AlphaFault is now an abstract class. Also, AlphaMachineCheckFault and AlphaAlignmentFault multiply inherit from both AlphaFault and from MachineCheckFault and AlignmentFault respectively. These classes get their name from the generic classes.
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    moved ev5_trap fully into the fault class.
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    Changed the name of the fault's invocation method from ev5_trap to invoke.
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    Moved the fault invocation code into the fault class fully, and got rid of the need for isA.
arch/sparc/faults.cc:
arch/sparc/faults.hh:
    Got rid of the multiple inheritance in the Fault classes, and the base MachineCheck and Alignment faults.
arch/sparc/faults.cc:
    bk cp ../alpha/faults.cc faults.cc
arch/sparc/faults.hh:
    bk cp ../alpha/faults.hh faults.hh
SConscript:
    Moved the alpha specific source files into the alpha specific SConscript
arch/alpha/SConscript:
    Moved the alpha specific source files into the alpha specific SConscript, and moved the process files into the new os specific subfolders.
arch/alpha/linux/process.cc:
arch/alpha/process.hh:
arch/sparc/process.hh:
arch/alpha/tru64/process.cc:
    Changed the include paths to use the new os specific directories.

--HG--
rename : arch/alpha/linux_process.cc => arch/alpha/linux/process.cc
rename : arch/alpha/linux_process.hh => arch/alpha/linux/process.hh
rename : arch/alpha/tru64_process.cc => arch/alpha/tru64/process.cc
rename : arch/alpha/tru64_process.hh => arch/alpha/tru64/process.hh
rename : arch/sparc/linux_process.cc => arch/sparc/linux/process.cc
rename : arch/sparc/linux_process.hh => arch/sparc/linux/process.hh
extra : convert_revision : dc7eed7994b9c5e7308c771f43758292e78ce3e3
2006-03-07 04:25:42 -05:00
Gabe Black 62d149d9be General small SPARC fixups
arch/sparc/SConscript:
    Fixed up the SPARC SConscript to use the name of the SPARC source files.
arch/sparc/linux_process.cc:
    Changed the namespace name from SPARCISA to SparcISA.

--HG--
extra : convert_revision : c340fbf78200bf7d962e7578a3f2998860224c53
2006-03-04 03:16:16 -05:00
Gabe Black 7c4c623302 Filled out the object file loader so it can load object files for several OSs and architectures.
SConscript:
    Added ./libelf as an include search directory. There might be a better spot for this than where I put it.
arch/SConscript:
    Combined the linux_process.h and tru64_process.h into process.h. This allows each ISA to support processes from arbitrary OSs.
arch/alpha/SConscript:
    Added process.cc as a source file. It provides an implementation of createProcess, which takes an object_file object and creates the appropriate process object, or dies.
base/loader/elf_object.cc:
    Actually extract the OS and architecture from the elf file, rather than always guessing Alpha and Linux.
base/loader/object_file.hh:
    Added constants for SPARC, MIPS, and Solaris, and changed the include for the Addr type.
sim/process.cc:
    Pushed creation of specific process objects into the ISA specific code.

--HG--
extra : convert_revision : b4754e7ca8328672d07e1394c4d162e199606b53
2006-03-04 03:09:23 -05:00
Gabe Black b71f9c801e Begain setting up syscall emulation for sparc linux.
arch/sparc/linux_process.cc:
    Began modifying this file for sparc, and replaced the alpha syscall numbers with the sparc ones.
arch/sparc/linux_process.hh:
    Begain modifying this file for sparc.

--HG--
extra : convert_revision : b1ed8ac50a35591521c5feaf1ea9c4b8ccc26dc8
2006-03-01 05:28:26 -05:00
Gabe Black d21e037fb8 Made sparc copies of some architecture specific files.
arch/sparc/linux_process.cc:
arch/sparc/linux_process.hh:
    Formatting & doxygen.
arch/sparc/linux_process.cc:
    Added some more ioctl commands to ignore.
    Set unlink and rename to the new functions.
    Ignore setrlimit, times and rt_sigaction.
    Should eventually provide a function for times.
arch/sparc/linux_process.cc:
    Fixes for Linux emulation:
    - stat struct alignment
    - osf_{get,set}sysinfo return values
    - additional syscall numbers
    - initialize $r0 to 0
arch/sparc/linux_process.cc:
arch/sparc/linux_process.hh:
    Updated Copyright
arch/sparc/linux_process.cc:
    Alphabetize includes.
arch/sparc/linux_process.cc:
    Changed all syscalls to use syscall return object
arch/sparc/linux_process.cc:
    Removed unecessary constructor call at each return.
arch/sparc/linux_process.cc:
    Rename sim/universe.{cc,hh} to root.{cc,hh}.
arch/sparc/linux_process.cc:
    shuffle files around for new directory structure
arch/sparc/linux_process.cc:
    Remove RCS Id string
arch/sparc/linux_process.cc:
arch/sparc/linux_process.hh:
    Update copyright dates and author list
arch/sparc/linux_process.hh:
    remove $Id$ string
arch/sparc/linux_process.cc:
    Apply patch for syscall emulation provided by Antti Miettinen (apm@brigitte.dna.fi).
arch/sparc/linux_process.cc:
    Added the endianness namespace. This may change.
arch/sparc/linux_process.cc:
    Replaced the namespace declaration with including arch/alpha/isa_traits.hh
arch/sparc/linux_process.cc:
    fixup for bsd hosts. Some headers are included by default which means that
    more variables need TGT_ prefixes and there isn't a stat call (everything
    is a stat64 call) so we have to work around that a bit
arch/sparc/linux_process.cc:
    Add endian conversions to fstat
arch/sparc/linux_process.cc:
    fix #if. I wonder why my compiler had no issues
arch/sparc/linux_process.cc:
    add endian conversions for fstat functions
arch/sparc/linux_process.cc:
    move architecture independent code into kern/linux/linux.(hh|cc)
arch/sparc/linux_process.hh:
    Add getDesc function
arch/sparc/linux_process.cc:
    Added using directive for AlphaISA namespace
arch/sparc/linux_process.cc:
    Add pipeFunc.
arch/alpha/linux_process.cc:
    Renamed arch files to remove alpha prefix, and changed alpha_memory.hh and cc to a more accurate tlb.hh and cc
arch/sparc/linux_process.cc:
    bk cp ../alpha/linux_process.cc linux_process.cc
arch/sparc/linux_process.hh:
    bk cp ../alpha/linux_process.hh linux_process.hh

--HG--
extra : convert_revision : a8eca1c5f848383263a2326b0e3cde4bcd85f14b
2006-03-01 05:20:47 -05:00
Steve Reinhardt 99484cfae8 Create a Builder object for .isa files in arch/SConscript.
Start using SCons File objects to avoid fixed paths in
subordinate SConscripts.

SConscript:
    Push isa_parser stuff (including .isa scanner) down into
    arch/SConscript.
arch/SConscript:
    Create a Builder object for .isa files, including existing scanner.
    Return file objects generated by isa-specific SConscript
    back up to parent.
arch/alpha/SConscript:
arch/mips/SConscript:
arch/sparc/SConscript:
    Convert sources to scons File objects, so file names can be specified
    relative to the current directory.
    Invoke new builder for isa description, and get generated sources from
    there (instead of listing them explicitly).
arch/isa_parser.py:
    Get rid of third argument ("include_path").
    It was a pain to generate this from scons, and it turned out
    it's not needed anyway, since the only included file
    (decoder.hh) will be in the same directory as the sources.

--HG--
extra : convert_revision : 36861bcef36763f229704d8cb7a642b4486a3581
2006-02-23 14:31:15 -05:00
Gabe Black 7826fcd09d New files to fix building the SPARC_SE and MIPS_SE isa_parser.py generated files.
--HG--
extra : convert_revision : 94a9543376f8b4709a4aef54c5ac0d6f582a9dad
2006-02-14 20:13:08 -05:00
Steve Reinhardt 79613686f0 Polishing of isa_parser.py internal operand handling, resulting in
minor change to syntax of 'def operands' in ISA descriptions.

arch/alpha/isa/main.isa:
arch/mips/isa/operands.isa:
arch/sparc/isa/operands.isa:
    Change 'def operands' statement to work with new
    isa_parser changes.
arch/isa_parser.py:
    Merge OperandTraits and OperandDescriptor objects into a
    unified hierarchy of Operand objects.
    Required a change in the syntax of the 'def operands'
    statement in the ISA description.

--HG--
extra : convert_revision : cb43f1607311497ead88ba13953d410ab5bc6a37
2006-02-12 00:31:19 -05:00
Steve Reinhardt fb90b1dd13 Minor cleanup of include-handling code in isa_parser.py.
arch/isa_parser.py:
    Clean up ##include code a bit.
arch/sparc/isa/formats.isa:
arch/sparc/isa/main.isa:
    Fix include paths.

--HG--
extra : convert_revision : 0689963c2948e5f1088ecbf2cf6018d29bdaceff
2006-02-09 22:27:41 -05:00
Gabe Black 7d9b93d825 Changed the filenames to the new standard again
arch/sparc/isa/formats.isa:
    Changed the file extensions to .isa again.
arch/sparc/isa/main.isa:
    Changed the file extensions to .isa again

--HG--
rename : arch/sparc/isa_desc/base.h => arch/sparc/isa/base.isa
rename : arch/sparc/isa_desc/bitfields.h => arch/sparc/isa/bitfields.isa
rename : arch/sparc/isa_desc/decoder.h => arch/sparc/isa/decoder.isa
rename : arch/sparc/isa_desc/formats.h => arch/sparc/isa/formats.isa
rename : arch/sparc/isa_desc/formats/basic.format => arch/sparc/isa/formats/basic.isa
rename : arch/sparc/isa_desc/formats/branch.format => arch/sparc/isa/formats/branch.isa
rename : arch/sparc/isa_desc/formats/integerop.format => arch/sparc/isa/formats/integerop.isa
rename : arch/sparc/isa_desc/formats/mem.format => arch/sparc/isa/formats/mem.isa
rename : arch/sparc/isa_desc/formats/noop.format => arch/sparc/isa/formats/noop.isa
rename : arch/sparc/isa_desc/formats/trap.format => arch/sparc/isa/formats/trap.isa
rename : arch/sparc/isa_desc/includes.h => arch/sparc/isa/includes.isa
rename : arch/sparc/isa_desc/isa_desc => arch/sparc/isa/main.isa
rename : arch/sparc/isa_desc/operands.h => arch/sparc/isa/operands.isa
extra : convert_revision : acb087e81d06ca5d67fe9b402423d7930f6ae798
2006-02-09 13:56:24 -05:00
Gabe Black 82f2ae56ed Alot of changes to push towards ISA independence. Highlights are renaming of the isa_desc files, movement of byte_swap.hh into sim, and the creation of arch/isa_traits.hh
SConscript:
    Moved some files out of targetarch. The either no longer need to be there, never needed to be there, or should be referred to directly in arch/alpha due to there strictly alpha content.
arch/alpha/isa_traits.hh:
    Added alpha's endianness to it's isa_traits.hh
arch/mips/isa_traits.hh:
    Added MIPS endianness to it's isa_traits.hh
arch/sparc/isa_traits.hh:
    Added SPARCs endianess to it's isa_traits.hh
build/SConstruct:
    Added MIPS as a valid architecture
cpu/exec_context.hh:
    Included arch/isa_traits.hh to bring in the endianness of the system.
cpu/o3/alpha_cpu.hh:
    Included arch/isa_traits.hh to bring in the systems endianness, and removed the hardcoding of little endianness
cpu/o3/fetch_impl.hh:
kern/freebsd/freebsd_system.cc:
    Included arch/isa_traits.hh to bring in the systems endianness, and removed the hardcoding to little endianness.
sim/system.cc:
    Included arch/isa_traits.hh to bring in the systems endianness, and removed the hardcoding to little endian.

--HG--
extra : convert_revision : b1ab34b7569db531cd1c74f273b24222e63f9007
2006-02-08 01:03:55 -05:00
Korey Sewell 8b783f8ad2 sparc files that were removed from revision 1.888
--HG--
extra : convert_revision : f285a442b64eee183f7d0f6c203f0b0aa7ea8586
2006-01-29 17:25:54 -05:00
Korey Sewell 90aa2dbfc2 initial changes to decoder.hh and copied files from arch/sparc directory
arch/mips/isa_desc/bitfields.h:
arch/mips/isa_desc/formats.h:
arch/mips/isa_desc/formats/basic.format:
arch/mips/isa_desc/formats/branch.format:
arch/mips/isa_desc/formats/integerop.format:
arch/mips/isa_desc/formats/mem.format:
arch/mips/isa_desc/formats/noop.format:
arch/mips/isa_desc/formats/trap.format:
arch/mips/isa_desc/includes.h:
arch/mips/isa_desc/operands.h:
arch/mips/isa_traits.cc:
arch/mips/isa_traits.hh:
    copied from sparc ISA directory
arch/mips/isa_desc/decoder.h:
    decoder I started to work on...

--HG--
rename : arch/sparc/isa_desc/bitfields.h => arch/mips/isa_desc/bitfields.h
rename : arch/sparc/isa_desc/decoder.h => arch/mips/isa_desc/decoder.h
rename : arch/sparc/isa_desc/formats.h => arch/mips/isa_desc/formats.h
rename : arch/sparc/isa_desc/formats/basic.format => arch/mips/isa_desc/formats/basic.format
rename : arch/sparc/isa_desc/formats/branch.format => arch/mips/isa_desc/formats/branch.format
rename : arch/sparc/isa_desc/formats/integerop.format => arch/mips/isa_desc/formats/integerop.format
rename : arch/sparc/isa_desc/formats/mem.format => arch/mips/isa_desc/formats/mem.format
rename : arch/sparc/isa_desc/formats/noop.format => arch/mips/isa_desc/formats/noop.format
rename : arch/sparc/isa_desc/formats/trap.format => arch/mips/isa_desc/formats/trap.format
rename : arch/sparc/isa_desc/includes.h => arch/mips/isa_desc/includes.h
rename : arch/sparc/isa_desc/operands.h => arch/mips/isa_desc/operands.h
rename : arch/sparc/isa_traits.cc => arch/mips/isa_traits.cc
rename : arch/sparc/isa_traits.hh => arch/mips/isa_traits.hh
extra : convert_revision : d4f281960ecf2dce479fb665469c6f2c5dd3063e
2006-01-25 14:43:47 -05:00
Gabe Black 89596f0cfa Some stuff aparently didn't get committed which was from before the new repository was created.
SConscript:
    There is a new SConscript in the arch/alpha directory which has the alpha specific files. To add files for an arch, a similar file should be created.
arch/isa_parser.py:
    The isa parser now supports include directives. These are done with ##include
build/SConstruct:
    The target directory is passed on so that the architecture specific SConscript can have it. Also, sparc was added as a valid architecture type.
arch/alpha/SConscript:
    This SConscript adds the alpha specific source
arch/sparc/isa_desc/operands.h:
    This sets up the operand types that the sparc isa uses
arch/sparc/isa_traits.cc:
    Implementation of sparc specific things, like a register file with windows
build/build_options/default/SPARC_SE:
    The default options for a sparc syscall emulation build.

--HG--
extra : convert_revision : 1afedae61dc8cae0d59d3bf1d41420d929be2efd
2006-01-24 19:57:17 -05:00
Gabe Black 79a4683876 Adding the sparc ISA files which were worked on locally
arch/sparc/isa_desc/bitfields.h:
    This file defines the bit fields used by the isa description system
arch/sparc/isa_desc/decoder.h:
    This file describes the decoder for the isa description system
arch/sparc/isa_desc/formats.h:
    This file declares the instruction formats
arch/sparc/isa_desc/formats/basic.format:
    This file implements the "basic" instruction format
arch/sparc/isa_desc/formats/branch.format:
    This file implements the "branch" instruction format
arch/sparc/isa_desc/formats/integerop.format:
    This file implements the "integerop" instruction format
arch/sparc/isa_desc/formats/mem.format:
    This file implements the "mem" instruction format
arch/sparc/isa_desc/formats/noop.format:
    This file implements the "noop" instruction format
arch/sparc/isa_desc/formats/trap.format:
    This file implements the "trap" instruction format
arch/sparc/isa_desc/includes.h:
    This file is all of the inclues that are used by the isa description system

--HG--
extra : convert_revision : 12a2ffe949317b8b57d83263a4261131b9432c2a
2006-01-10 14:57:37 -05:00