Commit graph

241 commits

Author SHA1 Message Date
Ali Saidi f2e97427be Merge zizzer:/bk/m5
into  pb15.local:/Users/ali/work/m5.head

--HG--
extra : convert_revision : b8631bcea38e3a75e4442927500ddfc7763ba9cf
2006-02-10 20:06:44 -05:00
Ali Saidi a86a3fa525 Merge zizzer:/bk/m5
into  udhcp-macvpn-776.public.engin.umich.edu:/Users/ali/work/m5.head

--HG--
extra : convert_revision : e9ffaa1d4b7eee1f5bd0c492e162aac1e0806099
2006-02-10 14:38:15 -05:00
Ali Saidi fb7899aa68 fix problems on darwin/*BSD for syscall emulation mode
arch/alpha/alpha_linux_process.cc:
arch/alpha/alpha_tru64_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
base/intmath.hh:
base/socket.cc:
    this is no longer needed with mac os 10.4
cpu/inst_seq.hh:
    just use a uint64_t instead of long long
cpu/o3/inst_queue_impl.hh:
    I much cleaner way to get max int
sim/syscall_emul.hh:
    fix stat64 problems on *BSD

--HG--
extra : convert_revision : 9eef5f896e083ae1774e818a9765dd83e0305942
2006-02-10 14:21:32 -05:00
Steve Reinhardt 3923eec0ef Change how memory operands are handled in ISA descriptions.
Should enable implementation of split-phase timing loads
with new memory model.
May create slight timing differences under FullCPU, as I
believe we were not handling software prefetches correctly
before when the split MemAcc/Exec model was used.  I haven't
looked into this in any detail though.

arch/alpha/isa/decoder.isa:
    HwLoadStore format split into separate HwLoad and
    HwStore formats.
    Copy instructions now fall under MiscPrefetch format.
    Mem_write_result is now just write_result in store
    conditionals.
arch/alpha/isa/mem.isa:
    Split MemAccExecute and LoadStoreExecute templates
    into separate templates for loads and stores; now
    that memory operands are handled differently from
    registers, it's impossible to have a single template
    serve both.
    Also unified the handling of "regular" prefetches
    (loads to r31) and "misc" prefetches (e.g., wh64)
    under the new scheme.  It looks like SW prefetches
    were not handled correctly in FullCPU up til now,
    since we generated an execute() method for the outer
    instruction but didn't generate a proper method for
    MemAcc::execute() (instead getting a default no-op
    method for that).
arch/alpha/isa/pal.isa:
    Split HwLoadStore into separate HwLoad and HwStore
    formats to select proper template (see change to
    mem.isa in this changeset).
arch/isa_parser.py:
    Stop trying to treat memory operands like register
    operands, since we never used them in a uniform way
    anyway, and it made it impossible to do split-phase
    loads as needed for the new CPU model.  Now there's no
    more 'op_mem_rd', 'op_nonmem_rd', etc.: 'op_rd' just does
    register operands, and the template code is responsible
    for formulating the call to the memory system.  Right now
    the only thing exported by InstObjParams is a new attribute
    'mem_acc_size' which gives the memory access size in bits,
    though more attributes can be added if needed.

    Also moved code in findOperands() method to
    OperandDescriptorList.__init__(), which is where it belongs.

--HG--
extra : convert_revision : 6d53d07e0c5e828455834ded4395fa40f9146a34
2006-02-10 09:12:55 -05:00
Steve Reinhardt dd473ecd57 Split Alpha ISA description into multiple files
(thanks to Gabe's include feature!).

arch/alpha/isa/main.isa:
    Split out into multiple .isa files.

--HG--
extra : convert_revision : 30d8edf74ea194d4a208febf1e66edc72a7dbd5d
2006-02-09 23:02:38 -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
Steve Reinhardt 2c528d5865 Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/m5
into  zizzer.eecs.umich.edu:/z/stever/bk/m5

--HG--
extra : convert_revision : 6e30fb802265c6a0d4afc00141b89ee529595549
2006-02-09 14:58:56 -05:00
Steve Reinhardt 730ee42ab8 Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/m5
into  zizzer.eecs.umich.edu:/z/stever/bk/m5

--HG--
extra : convert_revision : 10146c85d2fa6f565568cc30a4564b3674e4768d
2006-02-09 14:51:56 -05:00
Steve Reinhardt 879aaa5569 Change how isa_parser.py generates C++ names for isa_desc operands.
arch/isa_parser.py:
    Get rid of "munged name" for operands in C++ code.
    That is, "Ra.uq" will now be known in the C++ as "Ra"
    rather than "Ra_uq".  It wasn't legal to use different
    type extensions for the same operand at the same time
    anyway, and now it will be easier to refer to explicit
    operands in template code if necessary.

--HG--
extra : convert_revision : 9ff41e0201aeefe761743084ecdb34f4b9c84fdb
2006-02-09 14:51:37 -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
Korey Sewell fb10300c4f more code for instructions... Mainly for coprocessor0 and coprocessor1 move instructions
--HG--
extra : convert_revision : 34e017fd0a6f330f2ac17d34af216fc14f09dd42
2006-02-09 04:26:04 -05:00
Korey Sewell 710b894351 Merge zizzer:/bk/multiarch
into  zazzer.eecs.umich.edu:/z/ksewell/research/m5-sim/m5-multiarch

--HG--
extra : convert_revision : 2bfc19cfa186776ff94440b01ea51f520f61234f
2006-02-08 16:24:25 -05:00
Korey Sewell b6d21b7a34 Code for more "BasicOp" instructions ... formats for all instructions in place ... Edits to Branch Format
arch/mips/isa/decoder.isa:
    Code for di,ei,seb,seh,clz,and clo ....

    Every instruction has a format now (of course these are initial formats are still subject to change!)
arch/mips/isa/formats/branch.isa:
    Format Branch in MIPS similar to Alpha Format

--HG--
extra : convert_revision : 2118a1d9668610b1e9f1dea66d878b7b36c1ac7e
2006-02-08 16:24:04 -05:00
Korey Sewell b203d7bd33 add at least BasicOp Format to most if not all instructions
and file name changes ...

arch/mips/isa/decoder.isa:
    add at least BasicOp Format to most if not all instructions

--HG--
rename : arch/mips/isa/formats/basic.format => arch/mips/isa/formats/basic.isa
rename : arch/mips/isa/formats/branch.format => arch/mips/isa/formats/branch.isa
rename : arch/mips/isa/formats/fp.format => arch/mips/isa/formats/fp.isa
rename : arch/mips/isa/formats/int.format => arch/mips/isa/formats/int.isa
rename : arch/mips/isa/formats/mem.format => arch/mips/isa/formats/mem.isa
rename : arch/mips/isa/formats/noop.format => arch/mips/isa/formats/noop.isa
rename : arch/mips/isa/formats/tlbop.format => arch/mips/isa/formats/tlbop.isa
rename : arch/mips/isa/formats/trap.format => arch/mips/isa/formats/trap.isa
rename : arch/mips/isa/mips.isa => arch/mips/isa/main.isa
extra : convert_revision : 0b2f3aee13fee3e0e25c0c746af4216c4a596391
2006-02-08 14:50:07 -05:00
Gabe Black f444a7e799 Moved the alpha isa_desc to conform to the new naming system.
--HG--
rename : arch/alpha/isa_desc => arch/alpha/isa/main.isa
extra : convert_revision : a3cc14c202ae606db270c2c29847170d90c05216
2006-02-08 02:17:47 -05:00
Gabe Black e59fdcdd39 Some fixups
arch/alpha/alpha_linux_process.cc:
arch/alpha/alpha_tru64_process.cc:
    Replaced the namespace declaration with including arch/alpha/isa_traits.hh

--HG--
extra : convert_revision : 07cb73a9f30f0e165809668f9baff6a3e3f94580
2006-02-08 01:57:47 -05:00
Gabe Black 29bc6c086a Merge gblack@m5.eecs.umich.edu:/bk/multiarch
into  ewok.(none):/home/gblack/m5/multiarch

--HG--
extra : convert_revision : c7caf571575fb0e7136770864371300d3f11787e
2006-02-08 01:04:32 -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 7219693f4c Actually we do need a separate class for Integer Ops with Immediates!!!
The extra class is needed because of the necessisty of an immediate member variable.

Also, added some 'very modest' python code to choose between the IntOp and
the IntImmOp based on the instruction name ...

--HG--
extra : convert_revision : f109c12418202a99b40e270360134e8335739836
2006-02-07 19:28:19 -05:00
Korey Sewell d30262d480 name changes ... minor IntOP format change
arch/mips/isa/formats/int.format:
    Looks like Integer Ops with Immediates may not need their own separate class because all those instructions are distinct from
    their reg-reg counterparts

--HG--
rename : arch/mips/isa/bitfields.def => arch/mips/isa/bitfields.isa
rename : arch/mips/isa/decoder.def => arch/mips/isa/decoder.isa
rename : arch/mips/isa/formats.def => arch/mips/isa/formats.isa
rename : arch/mips/isa/includes.h => arch/mips/isa/includes.isa
rename : arch/mips/isa/operands.def => arch/mips/isa/operands.isa
extra : convert_revision : 8e354b4232b28c0264d98d333d55ef8b5a6589cc
2006-02-07 18:36:08 -05:00
Korey Sewell 6d2807ded8 1st full draft switch statement actions for all integer arithmetic operations and the majority of the load & store operations (not all of FP-Ops),
Output,Format, & Template code needs to be adjusted to correctly take these "decoder.h" inputs ...

--HG--
extra : convert_revision : 3dcde1f2f587e2766fd61231a93d34d1d7727356
2006-02-04 18:59:44 -05:00
Korey Sewell 035b443093 mainly added minor support for the basic arithmetic operations (add, mult, shift)
arch/mips/isa/bitfields.def:
    Add comment, move definition up in file
arch/mips/isa/decoder.def:
    add basic arithmetic operations
arch/mips/isa/formats/fp.format:
    change Integer -> FP words
arch/mips/isa/formats/int.format:
    Add derived IntImm class
arch/mips/isa/operands.def:
    change to MIPS sytle operands

--HG--
rename : arch/mips/isa/formats/fpop.format => arch/mips/isa/formats/fp.format
rename : arch/mips/isa/formats/integerop.format => arch/mips/isa/formats/int.format
extra : convert_revision : a95da47bc981e56a9898421da4eeb9c442d1dc15
2006-02-03 23:04:06 -05:00
Korey Sewell 1e222c1502 .h -> .def
--HG--
rename : arch/mips/isa/bitfields.h => arch/mips/isa/bitfields.def
rename : arch/mips/isa/decoder.h => arch/mips/isa/decoder.def
rename : arch/mips/isa/formats.h => arch/mips/isa/formats.def
rename : arch/mips/isa/operands.h => arch/mips/isa/operands.def
extra : convert_revision : 45cb5485311d51982ebcaf1c7eec34e8751c31f5
2006-02-03 03:56:57 -05:00
Korey Sewell de1f3a7b6b Rename: arch/mips/isa/formats/tlb.format -> arch/mips/isa/formats/tlbop.format
--HG--
rename : arch/mips/isa/formats/tlb.format => arch/mips/isa/formats/tlbop.format
extra : convert_revision : 5b1cfba4a5b687c9a271e1a3f67f75e3fa6c2dde
2006-02-03 03:39:08 -05:00
Korey Sewell f7a75d872b Checkin (Merge?) files ... Added a few new format files
arch/mips/isa/formats/fpop.format:
    Floating Point Formats
arch/mips/isa/formats/tlb.format:
    TLB Ops Format
arch/mips/isa/mips.isa:
    Name change to mips.isa

--HG--
rename : arch/mips/isa_desc/bitfields.h => arch/mips/isa/bitfields.h
rename : arch/mips/isa_desc/decoder.h => arch/mips/isa/decoder.h
rename : arch/mips/isa_desc/formats.h => arch/mips/isa/formats.h
rename : arch/mips/isa_desc/formats/basic.format => arch/mips/isa/formats/basic.format
rename : arch/mips/isa_desc/formats/branch.format => arch/mips/isa/formats/branch.format
rename : arch/mips/isa_desc/formats/integerop.format => arch/mips/isa/formats/integerop.format
rename : arch/mips/isa_desc/formats/mem.format => arch/mips/isa/formats/mem.format
rename : arch/mips/isa_desc/formats/noop.format => arch/mips/isa/formats/noop.format
rename : arch/mips/isa_desc/formats/trap.format => arch/mips/isa/formats/trap.format
rename : arch/mips/isa_desc/includes.h => arch/mips/isa/includes.h
rename : arch/mips/isa_desc/operands.h => arch/mips/isa/operands.h
extra : convert_revision : 069a24da405b613f688e693fd038ac7a30a4faed
2006-02-03 03:38:27 -05:00
Gabe Black 2939a7089a byte_swap.hh was removed from arch/alpha/, and replaced by sim/byteswap.hh. The new file uses LittleEndianGuest and BigEndianGuest namespaces to allow selecting the appropriate functions.
arch/alpha/alpha_linux_process.cc:
arch/alpha/alpha_tru64_process.cc:
    Added the endianness namespace. This may change.
cpu/exec_context.hh:
    Changed the include path for byteswap, and forced LittleEndianness for lack of a better solution.
cpu/o3/alpha_cpu.hh:
    Forced LittleEndianness, for lack of a better solution.
cpu/o3/alpha_cpu_impl.hh:
    Cleared away some commented out code.
cpu/o3/fetch_impl.hh:
    Changed the include patch for byteswap, and forced LittleEndianness for lack of a better solution.
cpu/simple/cpu.cc:
    Added an include for byteswap.hh, and fixed the SimpleCPU to LittleEndian. This cpu only does alpha, so that's fine.
dev/disk_image.cc:
    Changed the include path of byteswap.hh
kern/freebsd/freebsd_system.cc:
kern/linux/linux_system.cc:
    Added an include for byteswap.hh, and forced LittleEndianness for lack of a better solution.
sim/system.cc:
    Forced LittleEndianness for lack of a better solution.

--HG--
extra : convert_revision : b95d3e1265a825e04bd77622a3ac09fbac6bd206
2006-02-03 00:16:44 -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 0162c52f17 bitfields definition to support current decoder.h
--HG--
extra : convert_revision : 75ccc53181b857605d051024d86ef62ec43f3b7f
2006-01-26 17:07:01 -05:00
Korey Sewell 2bc106a8e7 "sparc" -> "mips"
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_traits.cc:
arch/mips/isa_traits.hh:
    changing "sparc" strings to "mips" everywhere

--HG--
extra : convert_revision : eaecf9eeac26e3ef0726deef2fb5d7e9ad172984
2006-01-26 16:19:44 -05:00
Korey Sewell efc4620de1 decoder skeleton code: this should be able to read any MIPS instruction and decode it but NOT produce any C++ class object.
All of the code literals are empty as of now. As much as possible instructions were organized into relevant "formats"
and also references to the tables I used from the MIPS manual were noted via appropriate comments.

--HG--
extra : convert_revision : 9b44fb40e900061a4cdb290b6a5aaceb9750ae13
2006-01-26 01:34:43 -05:00
Korey Sewell 4be1f418bc more changes to the decoder ... Now does special 3 table
arch/mips/isa_desc/bitfields.h:
    Change from table names to actual bitfield name ...

--HG--
extra : convert_revision : ead69065eb9c3e9c4ea4f67587a6fb07091898ed
2006-01-25 17:36:38 -05:00
Korey Sewell 14fc0996e3 first version of my decoder function skeleton
- this will decode the instructions but not doing anything to create the C++ object yet
(the 1st of many steps!)

arch/mips/isa_desc/bitfields.h:
    initial bitfield constants ... copied some from original alpha bitfields
arch/mips/isa_desc/decoder.h:
    decoder function skeleton pt.1
    - this will decode the instructions but not doing anything to create the C++ object yet
    (the 1st of many steps!)

--HG--
extra : convert_revision : 2b9a0f8160c78b17f9d3d5eaf5af5a4d2f074761
2006-01-25 17:06:23 -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
Steve Reinhardt 0cdcb08d90 Change base/intmath.{cc,hh} to follow m5 style.
arch/alpha/alpha_tru64_process.cc:
base/intmath.hh:
base/statistics.cc:
base/str.cc:
cpu/o3/btb.cc:
sim/process.cc:
sim/syscall_emul.hh:
    Rename intmath.hh functions to follow m5 style
    (RoundUp -> roundUp, etc.).
base/intmath.cc:
    Rename intmath.hh functions to follow m5 style
    (RoundUp -> roundUp, etc.).
    Also reindent code in m5 style.

--HG--
extra : convert_revision : 57b853002bc3c9911e122599d9062b41a06d8e6a
2005-12-23 13:32:31 -05:00
Kevin Lim 6da93ea526 Apply patch for syscall emulation provided by Antti Miettinen (apm@brigitte.dna.fi). It provides support for more syscalls in syscall emulation mode.
arch/alpha/alpha_linux_process.cc:
sim/syscall_emul.cc:
sim/syscall_emul.hh:
    Apply patch for syscall emulation provided by Antti Miettinen (apm@brigitte.dna.fi).

--HG--
extra : convert_revision : 37fbc78a927110b7798343afd2c5f37a269e42b4
2005-11-22 12:08:08 -05:00
Nathan Binkert 0dcb288365 Cleanup the StackTrace interfaces and profile interfaces so they
are more efficient and reduce the number of new/delete calls

arch/alpha/stacktrace.cc:
    - 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
    - switch to using kernelSymtab instead of allSymtab which will be
    going away
    - if the stack adjustment doesn't make any sense, exit and push
    unknown so we don't get into an infinite loop or record garbage.
    - check to see if we've made too many iterations through the stack
    and panic to avoid an infinite loop
arch/alpha/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
cpu/base.cc:
    only clear the profile if we have one
    include profile.hh here since base.hh doesn't do it anymore
cpu/base.hh:
    no need to include cpu/profile.hh here
cpu/profile.cc:
    use ProfileNode pointers instead of objects in the ChildList
    Consume a vector of addresses since that's really all we
    care about.
cpu/profile.hh:
    Keep pointers to ProfileNodes to reduce the size of these structures
    keep a StackTrace around so that we may reuse it.
    provide consume functions that use the new StackTrace trace interface
    one consume function is inline and tries to fastpath the no trace
    condition, it calls the outlined consume function if a trace is generated.
cpu/simple/cpu.cc:
    include cpu/profile.hh here since base.hh no longer does
    use the new FunctionProfile::consume interface
    (which contains the tracing functions)

--HG--
extra : convert_revision : 5a1d9265289a75f67a497b322926be1f8c2d8eb3
2005-11-20 17:44:58 -05:00
Ali Saidi ccae5838fd add symbol opcode
--HG--
extra : convert_revision : e050d2c4fec33c41ac21b6f17b3be329b9521429
2005-11-19 01:25:34 -05:00
Steve Reinhardt e701cf48d9 A couple of FP-related fixes (prompted by Adam having trouble
running SPEC FP codes).

arch/alpha/isa_desc:
    Don't warn about non-standard trapping modes more than
    once per static instruction.  (Had the flag to suppress
    these but forgot to check it!)
build/SConstruct:
    Add USE_SSE2 option to enable compiling w/SSE2 (important
    for getting IEEE-compliant FP on x86).

--HG--
extra : convert_revision : eac69efb28cce7b48035480d8b7cb004782969f4
2005-11-09 09:52:07 -05:00
Steve Reinhardt 9a881c5a82 Minor tweak to isa_parser.
arch/isa_parser.py:
    Derive Stack class directly from list.

--HG--
extra : convert_revision : 4f09db4baec0bb2144d71ffad5ce53651e8c3ac6
2005-10-20 14:14:59 -04:00
Nathan Binkert e999645caf define a couple more abi regiesters
--HG--
extra : convert_revision : 2b909cc784d4fdd4833a70e86d13c207a7c1dd23
2005-10-18 20:02:23 -04:00
Nathan Binkert a81c03737a Add new function profiling stuff, wrap the pc_sample stuff into it.
SConscript:
    Get rid of the pc_sample stuff and move to the new profiling stuff
base/traceflags.py:
    DPRINTF Stack stuff
cpu/base.cc:
cpu/base.hh:
cpu/exec_context.cc:
cpu/exec_context.hh:
cpu/simple/cpu.cc:
    Add profiling stuff
kern/kernel_stats.hh:
    Use a smart pointer
sim/system.cc:
sim/system.hh:
    Create a new symbol table that has all of the symbols for a
    particular system
util/stats/categories.py:
    change around the categories, add categories for function
    profiling stuff
util/stats/profile.py:
    No profile parsing and display code to deal with function
    profiling stuff, graph, dot, and text outputs.

--HG--
extra : convert_revision : b3de0cdc8bd468e42647966e2640ae009bda9eb8
2005-10-18 19:07:42 -04:00
Steve Reinhardt 310f608757 Clean up indentation in isa_desc.
arch/alpha/isa_desc:
    Little bit of re-ordering and indentation clean-up.

--HG--
extra : convert_revision : e538ff89d8b507c3e1aa68a032578fcaa645d7ee
2005-09-24 18:17:51 -04:00
Steve Reinhardt 11cb904ad7 Explicitly handle rounding on FP-to-integer conversions.
Seems to avoid the significant problems on platforms w/o fenv.h.

arch/alpha/isa_desc:
    Explicitly handle rounding on FP-to-integer conversions.
    Seems to avoid the significant problems on platforms w/o fenv.h.
    Get rid of FP "Fast" vs "General" distinction... more headache than
    it's worth.
arch/isa_parser.py:
    Fix bug with "%s" in C++ templates (must escape properly to
    pass through Python string interpolation).

--HG--
extra : convert_revision : de964d764e67e0934ac0ef535f53c974640731fb
2005-09-11 19:29:41 -04:00
Steve Reinhardt 39ce4fbaf9 Bug fix: can't increment an iterator after you erase
the thing it points to.  Somehow Linux doesn't care,
but Cygwin sure does.

--HG--
extra : convert_revision : 1209a75831f080f17a95433e546d7074f9f07332
2005-09-02 14:38:11 -04:00
Steve Reinhardt c4793184bd Build options are set via a build_options file in the
build directory instead of being inferred from the name
of the build directory.
Options are passed to C++ via config/*.hh files instead of
via the command line.  Build option flags are now always
defined to 0 or 1, so checks must use '#if' rather than
'#ifdef'.

SConscript:
    MySQL detection moved to SConstruct.
    Add config/*.hh files (via ConfigFile builder).
arch/alpha/alpha_memory.cc:
arch/alpha/ev5.cc:
arch/alpha/ev5.hh:
arch/alpha/isa_traits.hh:
base/fast_alloc.hh:
base/statistics.cc:
base/statistics.hh:
base/stats/events.cc:
base/stats/events.hh:
cpu/base.cc:
cpu/base.hh:
cpu/base_dyn_inst.cc:
cpu/base_dyn_inst.hh:
cpu/exec_context.cc:
cpu/exec_context.hh:
cpu/o3/alpha_cpu.hh:
cpu/o3/alpha_cpu_builder.cc:
cpu/o3/alpha_cpu_impl.hh:
cpu/o3/alpha_dyn_inst.hh:
cpu/o3/alpha_dyn_inst_impl.hh:
cpu/o3/alpha_params.hh:
cpu/o3/commit_impl.hh:
cpu/o3/cpu.cc:
cpu/o3/cpu.hh:
cpu/o3/fetch_impl.hh:
cpu/o3/iew.hh:
cpu/o3/iew_impl.hh:
cpu/o3/regfile.hh:
cpu/o3/rename_impl.hh:
cpu/o3/rob_impl.hh:
cpu/ozone/cpu.hh:
cpu/pc_event.cc:
cpu/simple/cpu.cc:
cpu/simple/cpu.hh:
sim/process.cc:
sim/process.hh:
    Convert compile flags from def/undef to 0/1.
    Set via #include config/*.hh instead of command line.
arch/alpha/isa_desc:
    Convert compile flags from def/undef to 0/1.
    Set via #include config/*.hh instead of command line.
    Revamp fenv.h support... most of the ugliness is hidden
    in base/fenv.hh now.
base/mysql.hh:
    Fix typo in #ifndef guard.
build/SConstruct:
    Build options are set via a build_options file in the
    build directory instead of being inferred from the name
    of the build directory.
    Options are passed to C++ via config/*.hh files instead of
    via the command line.
python/SConscript:
    Generate m5_build_env directly from scons options
    instead of indirectly via CPPDEFINES.
python/m5/convert.py:
    Allow '0' and '1' for booleans.
    Rewrite toBool to use dict.
base/fenv.hh:
    Revamp <fenv.h> support to make it a compile option
    (so we can test w/o it even if it's present) and to
    make isa_desc cleaner.

--HG--
extra : convert_revision : 8f97dc11185bef5e1865b3269c7341df8525c9ad
2005-08-30 13:18:54 -04:00
Benjamin Nash bc76a807af Merge m5read@m5.eecs.umich.edu:/bk/m5
into zed.eecs.umich.edu:/z/benash/bk/m5

--HG--
extra : convert_revision : 453615c8194ae9ca96330b7493c6b19fc89c3a72
2005-06-28 14:03:04 -04:00
Nathan Binkert 036a8ceb8d Don't hard code the location of m5AlphaAccess. Instead, move the
code into a function that can be called by the AlphaConsole class.
AlphaConsole will pass in its address.

arch/alpha/ev5.hh:
    Move Phys2K0Seg to ev5.hh and fixup the TSUNAMI uncacheable
    bits so that they will be converted correctly.
dev/alpha_access.h:
    Do not hard code the location of the AlphaConsole
dev/alpha_console.cc:
    fixup #includes
    tell the system where the alpha console is
sim/system.hh:
    Provide a function that will tell the system where the AlphaAccess
    structure (device) lives

--HG--
extra : convert_revision : 92d70ca926151a32eebe9925de597459ac58013e
2005-06-28 12:42:15 -04:00
Benjamin Nash f4e5776df4 I/O changes and SkipFuncEvents to increase FreeBSD compatibility.
SConscript:
    Added kern/freebsd/freebsd_events.cc.
arch/alpha/isa_traits.hh:
    Added Argument to support replacement of calibrate_clocks function in FreeBSD.
dev/ns_gige.hh:
    Fixed NIC model number typo.
dev/tsunami_io.cc:
    Added support for RTC writes and PIC 2 mask reads.  Made RTC static member.
dev/tsunami_io.hh:
    Made RTC static member.
kern/freebsd/freebsd_system.cc:
    Added events to skip functions in FreeBSD.
kern/freebsd/freebsd_system.hh:
    Added events to skip certain functions.

--HG--
extra : convert_revision : 8aaca51d3f9b1bb601722a5bae240aae77b445db
2005-06-17 18:08:05 -04:00