Commit graph

8 commits

Author SHA1 Message Date
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
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 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 f1ef4a8f06 Renamed arch files to remove alpha prefix, and changed alpha_memory.hh and cc to a more accurate tlb.hh and cc
--HG--
rename : arch/alpha/alpha_linux_process.cc => arch/alpha/linux_process.cc
rename : arch/alpha/alpha_linux_process.hh => arch/alpha/linux_process.hh
rename : arch/alpha/alpha_memory.cc => arch/alpha/tlb.cc
rename : arch/alpha/alpha_memory.hh => arch/alpha/tlb.hh
rename : arch/alpha/alpha_tru64_process.cc => arch/alpha/tru64_process.cc
rename : arch/alpha/alpha_tru64_process.hh => arch/alpha/tru64_process.hh
extra : convert_revision : 9fe6863cc37347d2a6bd716c529b0a4a50b36ea7
2006-02-27 06:05:10 -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
Steve Reinhardt 9a4c0f12ef Clean excess comments out of SConscripts.
SConscript:
arch/alpha/SConscript:
    Clean out excess comments.

--HG--
extra : convert_revision : 7aae68d36f9fce5f236d117d803b5e3cd4a3769d
2006-02-22 21:11:45 -05:00
Gabe Black 19e5efed03 Pseudo instructions are now passed whatever instructions they need by the decoder, rather than extracting them explicitly. This lets most of the pseudo instruction code to be shared across architectures.
SConscript:
    Moved pseudo_inst.hh from targetarch to full system sources
arch/alpha/SConscript:
    Moved pseudo_inst.cc out of the alpha specific sources
arch/alpha/isa/decoder.isa:
    The decoder now pulls out the arguments for the pseudo instructions based on the alpha ABI
arch/alpha/isa/main.isa:
    Registers 16, 17 and 18 are used to get parameters for the pseudo instructions and can be referred to explicitly
sim/pseudo_inst.cc:
    Changed some include paths to reflect that pseudo_inst.hh is now outside of the alpha directory. Also, instead of extracting their parameters directly, they're passed in as regular function arguments.
sim/pseudo_inst.hh:
    Changed the function prototypes to include the functions parameters, now that they aren't extracted from the execution context.

--HG--
rename : arch/alpha/pseudo_inst.cc => sim/pseudo_inst.cc
rename : arch/alpha/pseudo_inst.hh => sim/pseudo_inst.hh
extra : convert_revision : 76ce768cf1d8a838aa7b64878a7ab4c4215ac999
2006-02-12 17:38:10 -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