Commit graph

4764 commits

Author SHA1 Message Date
Gabe Black b4087e0e44 Statetrace: Make statetrace patch amd64 executables for true single stepping after system calls.
Because of peculiarities in how system calls are returned from, single stepping executes some system calls and the instruction following them in a single step. Statetrace now patches the executable image when it detects a system call to force "correct" behavior, aka the appearance of stepping one instruction every single time.

--HG--
extra : convert_revision : ac6243a2e00ff98f827b005efd27b4dc5be4f774
2007-07-29 12:37:35 -07:00
Gabe Black c5c64823fc Merge with head. style.py was also missing an argument in one call to modified_lines.
--HG--
extra : convert_revision : 0f4e23007399f9d0e2be5310062bd61f5415550d
2007-07-29 01:38:07 -07:00
Gabe Black 5e34c62b3b X86: Initial stack frame fixes and constant shuffling.
The initial stack frame for x86 is now substantially more correct. The fixes made here can be back ported to SPARC and possible the other ISAs as well. The auxiliary vector types were moved to the LiveProcess base class because they are independent of ISA. Some of the types may only apply to Linux, though, so they may have to be moved.

--HG--
extra : convert_revision : 89ace35fcc8eb9586d2fee8eeccbc3686499ef24
2007-07-29 01:33:06 -07:00
Gabe Black e5f5890365 X86: Make limm use merge and allow overriding the data size.
--HG--
extra : convert_revision : c6057226b8ff8f272612a9d3bf7d1d9ba90c819b
2007-07-29 01:30:28 -07:00
Gabe Black c52e28a4d9 Statetrace: Print the correct address of auxiliary vectors.
The address of the stackpointer proceeding the vector minus 8 should be minus 16.

--HG--
extra : convert_revision : 648f01e9753e28391fc8d282bd9fe2bd47a0193f
2007-07-29 01:29:53 -07:00
Gabe Black b6395da4ce X86: Fix register ordering.
The correct order is unintuitively rax, rcx, rdx, rbx, etc, not rax, rbx, rcx, rdx.

--HG--
extra : convert_revision : 3abe6a723a6e30becfe34f8da707ea2ff5d4df77
2007-07-29 01:28:36 -07:00
Gabe Black 33847f8c83 X86: return -return_value.value() on failure.
--HG--
extra : convert_revision : d8e1486ff075b2917be62a0008f83fd6c9e4c09a
2007-07-29 01:27:34 -07:00
Gabe Black d995575342 X86: Fix popa and push with the stack pointer.
POPA used st instead of ld, and it didn't skip rsp. push rsp needs to store the -original- value of the stack pointer.

--HG--
extra : convert_revision : 376370c99b6ab60fb2bc4cd4f0a6dce71153ad06
2007-07-29 01:26:47 -07:00
Gabe Black 3dcd848ec3 X86: Fix a bug with merge
Merge was returning the value to merge in, not the actual result of the merge.

--HG--
extra : convert_revision : 230b4b5064037d099ae7859edabdf5be84603849
2007-07-29 01:24:57 -07:00
Nathan Binkert 41a1acd1e9 Work around a mercurial bug in bdiff.blocks
--HG--
extra : convert_revision : 597503431883a24f68744bf0dce77356a32d7ff7
2007-07-28 21:56:43 -07:00
Gabe Black dc86f3229c X86: Fix a comment and adjust the stack base address.
The stack base on my development machine starts one page below where it needs to. I don't know why it does, but I've duplicated it in m5.

--HG--
extra : convert_revision : c4783ba885b90f17e843f61e07af0bc3330a74bc
2007-07-28 21:18:53 -07:00
Gabe Black fe46e28b14 Merge with head.
--HG--
extra : convert_revision : 3c1ff2585c9b20649792344b4180f6d82cef9c1b
2007-07-28 21:04:45 -07:00
Gabe Black 4903b549e7 Statetrace: Implement the AMD64 version of TraceChild.
--HG--
extra : convert_revision : cde33fefe46dc05e9b4ea785a4df6b78ac57ccd5
2007-07-28 20:36:35 -07:00
Gabe Black fa968da296 Statetrace: Fix indendation. Set the default hostname to "localhost" instead of my machine at UM.
--HG--
extra : convert_revision : f268c04e39fd384e0ac17253faae2233b58e9373
2007-07-28 20:35:33 -07:00
Gabe Black 77f712cdb6 Statetrace: Fix compilation problem.
--HG--
extra : convert_revision : 7f501de99e5389dc3a4172654d7cbe32ed811259
2007-07-28 20:34:17 -07:00
Gabe Black e996ff7497 X86: Fix up auxiliary vectors.
The type constants should go into an architecture independent spot since they are universal to all Linux elf binaries. The right value for some of the vectors needs to be determined. Also, x86 does not store argc or argv_array_base in registers like some other architectures.

--HG--
extra : convert_revision : 8d3f6a3e028d881d3c41e8ddf4f29d25738b529c
2007-07-28 20:33:42 -07:00
Gabe Black 8dd7700482 Turn the instruction tracing code into pluggable sim objects.
These need to be refined a little still and given parameters.

--HG--
extra : convert_revision : 9a8f5a7bd9dacbebbbd2c235cd890c49a81040d7
2007-07-28 20:30:43 -07:00
Nathan Binkert 1bc36f0787 style: bad whitespace
--HG--
extra : convert_revision : 3af834e0a8c9656e0332960c085d9152dd5c3092
2007-07-28 17:17:04 -07:00
Nathan Binkert 9aed27efb3 style: fix stupid bugs
--HG--
extra : convert_revision : ef3dcc3a160eb19a6c4fcdcd411d392aa42e4efe
2007-07-28 16:55:51 -07:00
Nathan Binkert c27e23f2e8 style: Check/Fix whitespace on SCons files
--HG--
extra : convert_revision : 46e6b2dd8e1984cbab0ea24c94760794734c0f95
2007-07-28 16:49:20 -07:00
Nathan Binkert cda354b070 scons: make things work when EXTRAS is not defined.
--HG--
extra : convert_revision : 83562b55ec099e609c64cd42eb47a8481e4e85e7
2007-07-26 22:45:33 -07:00
Gabe Black d4e69c006b Merge with head.
--HG--
extra : convert_revision : e4be9d5f2ce8e3252958e2c5e03710b0bf9755c7
2007-07-26 22:13:48 -07:00
Gabe Black d1e533a1e2 X86: Fix argument register indexing.
Code was assuming that all argument registers followed in order from ArgumentReg0. There is now an ArgumentReg array which is indexed to find the right index. There is a constant, NumArgumentRegs, which can be used to protect against using an invalid ArgumentReg.

--HG--
extra : convert_revision : f448a3ca4d6adc3fc3323562870f70eec05a8a1f
2007-07-26 22:13:14 -07:00
Gabe Black 876849724d X86: Hook in shift and rotate by one instructions, and NOT.
--HG--
extra : convert_revision : b3ab74e09f5cd02671cc6425c8cb8638bd58cbee
2007-07-26 22:10:59 -07:00
Gabe Black edaaf1ebf1 X86: Fix pc relative versions of add and subtract.
--HG--
extra : convert_revision : c7e578aae8d36aa5d279fc27d6d7d28ed0a54181
2007-07-26 22:10:21 -07:00
Gabe Black 647a3270d1 X86: Implement rotate-by-one instructions, and make register rotates use registers.
--HG--
extra : convert_revision : 701691951688ecefdc6450d31076b45e9af15324
2007-07-26 22:09:41 -07:00
Gabe Black 9e975a7e08 X86: Implement shift-by-one instructions, and make register shifts use registers.
--HG--
extra : convert_revision : ce4af3e56b45821e0a8b27f288b532d2f9dd3336
2007-07-26 22:09:24 -07:00
Gabe Black c0670187c5 X86: Add functions to read and write to an exec context.
These functions take care of calling the thread contexts read and write functions with the right sized data type, and handle unaligned accesses.

--HG--
extra : convert_revision : b4b59ab2b22559333035185946bae3eab316c879
2007-07-26 22:08:35 -07:00
Gabe Black 57428b8b0b X86: Fix carry calculation for subtraction based microops.
The carry flag should be calculated using the -complement- of the second operand, not it's negation. The carry in which is part of computing the 2's complement may induce a carry, but if you've already caused the carry before you get the carry computing logic involved, it will miss it.

--HG--
extra : convert_revision : 318cf86929664fc52ed9e023606a9e892eba635c
2007-07-26 22:06:30 -07:00
Gabe Black 749ed15b60 Add functions for mmap and brk.
--HG--
extra : convert_revision : 3d0340a2aae87b3462d6562b34ac7e02c685c1ef
2007-07-26 22:04:33 -07:00
Gabe Black 7d826f632c Implement NOT
--HG--
extra : convert_revision : 09cbed6332224d06644d401f21178eb7914993df
2007-07-26 22:03:19 -07:00
Nathan Binkert 19c01e82b1 Add a new SCons option called EXTRAS that allows you to include stuff in
the build process that is outside of the main M5 tree.

--HG--
extra : convert_revision : 6edc4fbc58240f83b59c7b5707c0390cdb85d9ec
2007-07-25 18:21:11 -07:00
Gabe Black 26b1c455e0 Merge with head.
--HG--
extra : convert_revision : 4a34b3f91c4fc90055596245ae3efec45ea33888
2007-07-24 15:48:40 -07:00
Gabe Black 02c39000bf Hook in a bunch of new instructions, fix a few minor bugs, and expand out one of the prefix multiplexed opcode groups.
--HG--
extra : convert_revision : b5afd54a180a8fbdf9a892b1a2316fcf0d11afc6
2007-07-24 15:43:38 -07:00
Gabe Black 93365f7d1a Add a tgt_iovec structure to support writev, change the name of X86Linux to X86Linux64, add some syscalls.
--HG--
extra : convert_revision : 9c13e9c68f331fe6c4a9abd96f7aee0f064101fc
2007-07-24 15:42:11 -07:00
Gabe Black 4bb1c5ba0c Add a special case for "test" which needs an immediate even though everything else with it's opcode doesn't.
Also made some spacing consistent.

--HG--
extra : convert_revision : 72a317f29c11705782e19840bef24354214d3143
2007-07-24 15:37:16 -07:00
Gabe Black 97c4258383 The groups of instructions hanging off opcode 71h, 72h, and 73h all need a byte immediate
--HG--
extra : convert_revision : 9559047adfec1490c2d40065442a579549624fcc
2007-07-24 15:19:02 -07:00
Gabe Black 69f4a6dc86 Make the shift and rotate microops mask the shift/rotate amount correctly.
--HG--
extra : convert_revision : 31c5d3fa8ef0d37494d0e35cef31be6056d5d93f
2007-07-24 15:10:53 -07:00
Gabe Black 15f57bd7cb Fix immediate shifts. Implement register shifts.
--HG--
extra : convert_revision : 0b83422ad3c190021e46cada07e64d8d57d29859
2007-07-24 15:10:20 -07:00
Gabe Black 66911a1fab Fix immediate rotates and add register ones.
--HG--
extra : convert_revision : a6b9cee59019ea0f906c8a8e76eeb2cd73093671
2007-07-24 15:08:56 -07:00
Gabe Black d961846e8c Clean out part of an old comment.
--HG--
extra : convert_revision : 6a6b2a06576ebe7383f7ce0e4e9f96bc96b84b56
2007-07-24 15:08:09 -07:00
Gabe Black 340ce8e680 Implement cmov.
--HG--
extra : convert_revision : 2e92623b53c1fe8b4da3fef3486c0dcd8d5ef9f5
2007-07-24 15:07:35 -07:00
Gabe Black 28614addff Implement cdqe and cqo, which are also called cbw and cwde, and cwd and cdq respectively, depending on the operand size.
--HG--
extra : convert_revision : 67ac035c68608d7260c21ce32009b344f3834e46
2007-07-24 15:07:03 -07:00
Gabe Black f8f7f994b8 Implement setcc.
--HG--
extra : convert_revision : 7a47b9971fe9e4ac638b275fb56fdcba08c2d671
2007-07-24 15:05:17 -07:00
Gabe Black 1cec0a3249 Get rid of an old comment.
--HG--
extra : convert_revision : 1b86a7f60489bc65a03919b27afd4dfbe4e09bba
2007-07-24 15:04:53 -07:00
Gabe Black 7e52393432 Get rid of an old comment
--HG--
extra : convert_revision : 4d626721ad54af9cbf5b0c07a3a6e8a05e4e9ab5
2007-07-24 15:03:43 -07:00
Nathan Binkert abc76f20cb Major changes to how SimObjects are created and initialized. Almost all
creation and initialization now happens in python.  Parameter objects
are generated and initialized by python.  The .ini file is now solely for
debugging purposes and is not used in construction of the objects in any
way.

--HG--
extra : convert_revision : 7e722873e417cb3d696f2e34c35ff488b7bff4ed
2007-07-23 21:51:38 -07:00
Nathan Binkert 552097b92e Allow the fixwhite stuff to work when committing from a subdir
--HG--
extra : convert_revision : 10e6ecc60bb8ee4e4a6f06f8c56550299c262c91
2007-07-23 20:55:57 -07:00
Gabe Black ecf2621f4f Implement pusha, popa, three operand imul, hook them into the decoder, and clean up the decoder a little.
--HG--
extra : convert_revision : c1b8f0f433f629e4104e2b04addcdaabf57595e3
2007-07-23 11:20:57 -07:00
Gabe Black 85f9415a67 Make the operand size reflect the size specifier on the operand tags, and implement NEG
--HG--
extra : convert_revision : da73ed6820d57f083c18f44b2fa868fc0976dd16
2007-07-23 01:07:49 +00:00