Commit graph

1158 commits

Author SHA1 Message Date
Gabe Black 35a8bc56cd X86: Impelement the HLT instruction and fix the "halt" microop.
--HG--
extra : convert_revision : 932e5bb5bf3644f8468dba92177fb87cc54b891a
2007-10-19 15:11:15 -07:00
Gabe Black f69a463b4b X86: Implement a "halt" microop.
--HG--
extra : convert_revision : 53a846a157e4dce42343b81901df1207738f62cd
2007-10-19 15:10:23 -07:00
Gabe Black 7f37322532 X86: Implement the ENTER instruction. This could probably be optimized by cleaning up the indexing in the main loop.
--HG--
extra : convert_revision : ad2d560f2a6f36176b22b8510c58cd6fe5a2c9c2
2007-10-19 15:09:37 -07:00
Gabe Black 9243666c39 X86: Replace "group10" placeholder with the corresponding instructions in the decoder.
--HG--
extra : convert_revision : ffa8f7c4f8d1e381eefd29247ebd705863d385ad
2007-10-18 22:43:32 -07:00
Gabe Black 5c32422162 X86: Implement the string IO instructions, ins and outs.
--HG--
extra : convert_revision : b021e70390d289b22a8e693cd8a99d6e7bd7d2b4
2007-10-18 22:42:53 -07:00
Gabe Black f0dce3bfce X86: Implement the undocumented SALC instruction which sets AL to 0xFF if CF=1 and 0x00 otherwise.
--HG--
extra : convert_revision : 845d43c544e296d7595f54054906055a9f21ad9f
2007-10-18 22:42:17 -07:00
Gabe Black 46bd1c99a9 X86: Implement the XLAT instruction.
--HG--
extra : convert_revision : 22d7d9e79e722293b4dc1e66d8610301dc04c5fa
2007-10-18 22:41:18 -07:00
Gabe Black c526b00b35 X86: Implement the BOUND instruction.
--HG--
extra : convert_revision : 7bcfa5b4a47d342bee267cc593a1bd4b4f31abe0
2007-10-18 22:40:48 -07:00
Gabe Black 33dbd8a766 X86: Make the "fault" microop predicated.
--HG--
extra : convert_revision : 48dae1f3c680636833c137fe6b95b37ae84e188c
2007-10-18 22:40:18 -07:00
Gabe Black 70542c8e61 X86: Make "Inst" the default format instead of WarnUnimpl for one byte opcodes.
--HG--
extra : convert_revision : 591e67fc21f5b72977c5876e39f488494fda77c2
2007-10-18 22:39:39 -07:00
Gabe Black dc2e887f23 X86: Implement the in/out instructions. These will still need support from the TLB and memory system.
--HG--
extra : convert_revision : a9503248ea9efca7e5247e4f2830967f428b8215
2007-10-18 22:39:00 -07:00
Gabe Black 2bbc058c6c X86: Implement the LOOP instructions.
--HG--
extra : convert_revision : 3ccd0565c83b6d9c9b63f9f7ac2b67839a2c714f
2007-10-18 22:38:17 -07:00
Gabe Black 418b30602b X86: Attach the CMC instruction to the decoder.
--HG--
extra : convert_revision : 909661062017c7640c343e80431eaf365e8fcf53
2007-10-18 22:37:44 -07:00
Gabe Black 674b6436b0 X86: Implemented the jrcx instruction.
--HG--
extra : convert_revision : d738015ff33449e55d8f1624c8467c1bba193e16
2007-10-18 22:37:08 -07:00
Gabe Black 0ffb317ff9 X86: Make wrip sign extend its second operand.
--HG--
extra : convert_revision : 2531af8b442ea5aaefccd7a7999c7720489edc36
2007-10-18 22:36:36 -07:00
Gabe Black 54466a31c3 Make the process objects use the Params structs in their constructors, and use a limit to check if access are on the stack.
--HG--
extra : convert_revision : af40a7acf424c4c4f62d0d76db1001a714ae0474
2007-10-16 18:04:01 -07:00
Gabe Black 9660a0a552 Merge with head
--HG--
extra : convert_revision : 490f9909469751a6cdaf6669e4cd4589ce3a4093
2007-10-12 20:10:57 -07:00
Gabe Black ac27bc7878 Loader: Identify sections based on virtual addresses, and set the LoadAddrMask correctly for x86.
--HG--
extra : convert_revision : efa6cf42f7e69074c645dfcac335a3edf0941389
2007-10-12 20:10:10 -07:00
Gabe Black 0d6383b69e X86: Added some new versions of MOV and a new argument type tag.
--HG--
extra : convert_revision : e21b2062d68baa983c7c631b3e1fe3149de56427
2007-10-12 20:08:12 -07:00
Gabe Black d82d3bbda5 X86: Implemented LODS.
--HG--
extra : convert_revision : 4bd8f15bbc25f5dce16ea0504ad6dd21805fa56a
2007-10-12 20:07:28 -07:00
Gabe Black 9498e536c0 X86: Implement MSR reads and writes and the wrsmr and rdmsr instructions.
There are no priviledge checks, so these instructions will all work in all
modes.

--HG--
extra : convert_revision : ff893eb569313d8aecbfffb47bcbd1c2d65cd393
2007-10-12 16:37:55 -07:00
Gabe Black a76f734d0b X86: Get rid of BasicOperate format which wasn't used and referred to SparcStaticInst
--HG--
extra : convert_revision : 5d2eac9a4b3f0fe5e3c3554d91acf8fee368c9dc
2007-10-09 17:21:04 -07:00
Gabe Black 8ecea59092 X86: Get rid of stray Sparc DPRINTF
--HG--
extra : convert_revision : d98b2d95448cab4e689d01ceedaa6ad46f9ffc09
2007-10-09 17:20:23 -07:00
Gabe Black 8858b0b667 X86: Make x86 initialize more state.
--HG--
extra : convert_revision : a55866efd339ae795da4072c070918bf419b07fa
2007-10-07 18:20:51 -07:00
Gabe Black a19c212757 X86: Work on the x86 tlb.
--HG--
extra : convert_revision : a08a5cb049a6030ba9fd56a89383d56026238dbf
2007-10-07 18:18:39 -07:00
Gabe Black cd36c69a4d X86: Make faults maintain an error code which gets pushed on the stack.
--HG--
extra : convert_revision : 7576f8cfaec9ddfb65e6ba7a6f64a5f453a42069
2007-10-07 18:17:52 -07:00
Gabe Black efbff349a9 X86: Significantly filled out misc regs.
--HG--
extra : convert_revision : 4c53be6568134d65e57f5411df986fd9a89e82c9
2007-10-07 18:16:00 -07:00
Gabe Black 999328f5ad X86: Make sure there are fewer spurious differences between instructions for caching purposes.
--HG--
extra : convert_revision : 7e6be1c42f28f92d9e8b47169e683827bb3f4aaf
2007-10-07 18:14:48 -07:00
Gabe Black 63a6d7376b X86: Make initCPU and startupCPU do something basic.
--HG--
extra : convert_revision : 1a04f4402f4f31e4e5cd482c7983d853fe117df5
2007-10-07 18:10:42 -07:00
Gabe Black 304e4c932a X86: Make the Interrupts class complain less.
--HG--
extra : convert_revision : 81d9544e85c90139704ffe4a117983df4bfa3bcd
2007-10-07 18:08:17 -07:00
Gabe Black 847a18ad48 X86: Adjust the config scripts for x86 fs.
--HG--
extra : convert_revision : 36ed22b50066f54be0e51c3419babc07dd218e10
2007-10-07 17:52:36 -07:00
Gabe Black e540c37282 X86: Make an x86 system object.
--HG--
extra : convert_revision : 590a4c29cb9b943a2d8c3a97c5fdfbabb658ac45
2007-10-07 17:48:36 -07:00
Gabe Black 22196f8885 X86: X86 FS compile fix.
--HG--
extra : convert_revision : bedd4cbab570d4ae84af9e8ead8f61db5c3c01dc
2007-10-07 17:46:56 -07:00
Gabe Black bd5a88ba43 Merge with head.
--HG--
extra : convert_revision : aa1969b60044f8ed88e689bdd25eeded2b1105ec
2007-10-04 12:35:35 -07:00
Gabe Black e1516aefbb X86: Fix the PageShift constant in isa_traits.hh (I thought I alread did this?)
--HG--
extra : convert_revision : bdc51a66e4fdf4b0a51b5c774ca7372a00a57269
2007-10-04 12:34:29 -07:00
Gabe Black 2848ef6696 SPARC: Make software trap 3 flush the register windows like the ABI specifies.
--HG--
extra : convert_revision : 8ff43617b56dcca5783d6cc490f87140fc20a36d
2007-10-04 12:24:16 -07:00
Gabe Black 50e2d20cb8 Merge with head.
--HG--
extra : convert_revision : 1aa0e4569a7c10e6a395c2c951ac29275b5bcf59
2007-10-02 23:03:38 -07:00
Gabe Black c2d60abf52 X86: Distinguish between the rep and repe prefixes.
STOS and MOVS only accept the rep prefix which always loops until rcx becomes
0. The other string instructions accept repe (same encoding as rep) and repne
which also check the condition code flags each iteration.

--HG--
extra : convert_revision : 544149f640302070810fb53e53bfeb0e87160ffc
2007-10-02 23:02:18 -07:00
Gabe Black 504f90f763 X86: Start implementing the x86 tlb which will handle segmentation permission and limit checks and paging.
--HG--
extra : convert_revision : 6072f7d9eecbaa066d39d6da7f0180ea4a2615af
2007-10-02 23:00:37 -07:00
Gabe Black f4a932a6b3 X86: Fix places where movfp was used incorrectly.
--HG--
extra : convert_revision : a6b5688eaa53d2f6675df1be193726641e558d37
2007-10-02 22:58:48 -07:00
Gabe Black 06d2d54b57 X86: Fix the movfp microop.
--HG--
extra : convert_revision : 23829782a2802a97a05e4dfdb5dd38fbe4165a90
2007-10-02 22:58:04 -07:00
Gabe Black 3e644b48bb X86: Fix x87 floating point stack register indexing.
--HG--
extra : convert_revision : b515ec20cbfc50b38aa7da6cf4d465acf9054c08
2007-10-02 22:57:33 -07:00
Gabe Black a56c651980 Predecoder: Clear out predecoder state on an ITLB fault.
--HG--
extra : convert_revision : 68f8ff778dbd28ade5070edf5a7d662e7bf0045a
2007-10-02 22:21:38 -07:00
Gabe Black 4049c9f76a X86: Put ldst into the microcode (the earlier changeset didn't really).
Also clean things up as much as possible so that faulting won't break an
instruction. More microops which verify addresses are needed.

--HG--
extra : convert_revision : 7c6050cb4798d287fe7d3cc4bb8c20dfa40ad2be
2007-10-02 22:19:53 -07:00
Gabe Black 7c521db9de X86: Implement the ldst microop and put it in existing microcode where appropriate.
--HG--
extra : convert_revision : f08bd725d07a501bb7a0ce91590b5d37db99c6f3
2007-10-02 22:08:09 -07:00
Gabe Black 683d6d46f6 X86: Fix up the microcode for the FST and FSTP instructions.
--HG--
extra : convert_revision : ad68633e9b7eab425593acb20cf242bf98c2b642
2007-10-02 22:06:59 -07:00
Gabe Black b831f7409b X86: Get rid of a hack for ruflag which is no longer necessary.
--HG--
extra : convert_revision : 1bb60c9ddb483aead2af0201bbda938cc6d3f7cb
2007-10-02 22:05:50 -07:00
Gabe Black efb309525a X86: Allow logic instructions to set ECF as well as CF.
--HG--
extra : convert_revision : 6ac20f069c86c23a8d443a7127afd6015166c00d
2007-10-02 22:05:10 -07:00
Gabe Black 65c247f21f X86: Add classes for the actual x86 faults.
--HG--
extra : convert_revision : bc060a01b5415551b335ca68ccbf126333ae20b0
2007-10-02 22:04:20 -07:00
Gabe Black 7d78f1b41c X86: Hook in another version of the XCHG instruction.
--HG--
extra : convert_revision : 7b6f9cd2f59443622f6963dfee454175322c0ef5
2007-10-02 22:03:38 -07:00
Gabe Black 66a08f7ba4 X86: Implement MOVS
--HG--
extra : convert_revision : 29147e1b86f7c54ce9b5ff68001725802c665fc0
2007-10-02 22:02:58 -07:00
Gabe Black fea7165b55 X86: Implement STOS.
--HG--
extra : convert_revision : 95f3bf185f07fe644d6ab96bbb6e598e406b92f4
2007-10-02 22:02:30 -07:00
Gabe Black 48041fdc53 SPARC,Remote GDB: Flesh out the acc function for SE mode.
--HG--
extra : convert_revision : eada066ab64701b5c53e7351dfffbdc0e0d4f344
2007-10-02 18:25:10 -07:00
Gabe Black 1c83418b14 SPARC,Remote GDB: Fix an accounting bug in the remote gdb stuff.
--HG--
extra : convert_revision : f6f0986211c442ac94da315e344a8f54d4d58c8a
2007-10-02 18:24:24 -07:00
Ali Saidi d325f49b70 Rename cycles() function to ticks()
--HG--
extra : convert_revision : 790eddb793d4f5ba35813d001037bd8601bd76a5
2007-09-28 13:21:52 -04:00
Gabe Black 2dd65dc254 Merge with head.
--HG--
extra : convert_revision : f331b9cbd82086d63d4f35e18f9e08466c016225
2007-09-25 20:11:41 -07:00
Gabe Black 25a9b6ea5e SPARC: Remove parameter that was only ever set to one value.
--HG--
extra : convert_revision : 3c22e576d95bdc7566bbce9b92cf2a6ff153a66f
2007-09-25 20:11:03 -07:00
Gabe Black e735001d54 SPARC: Remove some redundant code from some of the fp instructions.
--HG--
extra : convert_revision : 68b0341ae7a367b84c44081f9a3d6d0bc6631649
2007-09-25 20:10:04 -07:00
Gabe Black 306b5c6b5b SPARC: Clean up of privileged instructions.
--HG--
extra : convert_revision : 1fb055a7d186a3e9dff46f1c1b46bad6bcd00562
2007-09-25 20:09:25 -07:00
Gabe Black b896ad584b SPARC: Long overdue cleanup of the condition code handlers.
--HG--
extra : convert_revision : ddc53a622a8f908fa48788f3b570f33fcfc25fff
2007-09-25 20:08:34 -07:00
Gabe Black 8d53fea210 SPARC: Clean up the branch instructions a bit.
--HG--
extra : convert_revision : 93d5cc68e4a327ee0492eeed7f3b56e98d2d83bb
2007-09-25 20:05:11 -07:00
Gabe Black b3c6f32543 X86: Fix for uninitialized variables in stacktrace code.
--HG--
extra : convert_revision : d19a03d8c14eb93a99f2c1838a9caa1286804c81
2007-09-25 14:44:12 -07:00
Gabe Black 418ddf43e6 X86: Get X86_FS to compile.
--HG--
extra : convert_revision : fb973bcf13648876d5691231845dd47a2be50f01
2007-09-24 17:39:56 -07:00
Gabe Black dd277e0d8f SPARC: Fix linking error from new flattenFloatIndex function.
--HG--
extra : convert_revision : 5260f33336e3a9d5e3592b784458e243157f17e3
2007-09-19 19:08:42 -07:00
Gabe Black 3cd95a2748 X86: Implement the fld, fst, and fstp instructions.
--HG--
extra : convert_revision : 7dd274bdc3c34839c17d9012a745d7c95dfcfdd8
2007-09-19 18:28:34 -07:00
Gabe Black a75b6f5106 X86: Move the fp microops to their own file with their own base classes in C++ and python.
--HG--
extra : convert_revision : 9cd223f2005adb36fea2bb56fa39793a58ec958c
2007-09-19 18:27:55 -07:00
Gabe Black f3f3747431 X86: Put in the foundation for x87 stack based fp registers.
--HG--
extra : convert_revision : 940f92efd4a9dc59106e991cc6d9836861ab69de
2007-09-19 18:26:42 -07:00
Gabe Black a54ae9f92b X86: Put in stubs for x87, 64 bit and 128 bit SIMD instruction microcode.
--HG--
rename : src/arch/x86/isa/insts/sse/__init__.py => src/arch/x86/isa/insts/simd128/__init__.py
extra : convert_revision : efb4405aebaa4a04f33572e7d078ceca45872d9c
2007-09-19 18:25:17 -07:00
Gabe Black a1912df360 X86: Enable the rename system call.
--HG--
extra : convert_revision : bc4a3b5b5ce8e17f632e65ce89df91e2b50e1274
2007-09-19 18:24:11 -07:00
Gabe Black bdc0261eb5 X86: Enable the unlink system call.
--HG--
extra : convert_revision : 4230a13fdb652a87271f8d2ac9ead96cd2af07a5
2007-09-19 18:23:35 -07:00
Gabe Black 4a4aa59632 Merge with head.
--HG--
extra : convert_revision : 22aafb1cead3f584e64c188dc8eb45e271f4e7e9
2007-09-13 16:36:25 -07:00
Gabe Black bbc8a40857 X86: Fix how ECF is computed in genFlags, and get rid of some duplicate code.
--HG--
extra : convert_revision : f86330a5a9fea782ee63aaa18ca964fb6f9cef0b
2007-09-13 16:35:41 -07:00
Gabe Black 534c6a800a X86: Make the shift and rotate instructions set the carry flag(s) and overflow flags like they're supposed to.
--HG--
extra : convert_revision : c0523a5bbf53375ce979ca7d98a95e465be66fbe
2007-09-13 16:35:20 -07:00
Gabe Black f7b6230d99 X86: Total overhaul of the division instructions and microops.
--HG--
extra : convert_revision : 303ea45f69f7805361ad877fe6bb43fbc3dfd7a6
2007-09-13 16:34:46 -07:00
Ali Saidi e282d9601c Syscall Emulation: Add stat64 syscall.
Patch submitted by: Jonas Diemer [diemer (a) ida.ing.tu-bs.de]

--HG--
extra : convert_revision : 07638c05bb3f79aacce49457bbb8c17d0a3a7238
2007-09-13 12:30:12 -04:00
Gabe Black 0f57b407a3 X86: Make the isa parser run if any of the microcode files change.
--HG--
extra : convert_revision : 7f6d07de7e0d728a9333fb46c953dbe6cb04e600
2007-09-10 16:49:07 -07:00
Gabe Black 8e7bca8b36 X86: Move a comment to be next to the code it describes.
--HG--
extra : convert_revision : c384391175babb7cfdd3885ae9d9f1a9405ea44f
2007-09-10 11:01:52 -07:00
Gabe Black e4c0171356 X86: Rework the multiplication microops so that they work like they would in the patent.
--HG--
extra : convert_revision : 6fcf5dee440288d8bf92f6c5c2f97ef019975536
2007-09-06 16:27:28 -07:00
Gabe Black 7f079149f1 X86: Make signed multiplication do something different from unsigned.
--HG--
extra : convert_revision : 333c4a3464d708d4d8cea88931259ab96c2f75ed
2007-09-06 16:25:29 -07:00
Gabe Black 5052e2cb10 X86: Make signed versions of partial register values available to microops.
--HG--
extra : convert_revision : c820d1250f505911a341ced42d4f73796ea77f87
2007-09-06 16:22:08 -07:00
Gabe Black 832ef7412b X86: Correct how the hi portion of a product is computed.
--HG--
extra : convert_revision : 1f503e1cae0374e62e6254e8073e903adc29d067
2007-09-06 16:20:12 -07:00
Gabe Black 389abade01 X86: Add a square root microop and the SSE sqrt instruction.
--HG--
extra : convert_revision : ddc6e7e95111189d43f75bf84cd3d82433d982b3
2007-09-06 16:18:34 -07:00
Gabe Black 4478487c37 X86: Add SSE comparison instructions and microops and move some FP microops to be with the other ones.
--HG--
extra : convert_revision : ee0b5acde08d12c51a5282efb58d1ac72e0779af
2007-09-06 16:09:28 -07:00
Gabe Black fea46ee6e3 X86: Implement an SSE xor microop and instruction.
--HG--
extra : convert_revision : 949737d0f5d6fe4aa77cc4680d0c88caab3e8174
2007-09-04 23:44:37 -07:00
Gabe Black 6c689a3b4b X86: Make the movfp microop use FloatRegBits instead of FloatRegs.
This fixes a problem where interpreting arbitrary bits as floating point would
change what the value was. These values are legitimate because the fp
registers could be used to move around arbitrary data.

--HG--
extra : convert_revision : f1d7159ba137702b5722cc7c1b64ed7dd06c21de
2007-09-04 23:42:55 -07:00
Gabe Black 26ba7cc3b2 X86: Add tracing to the floating point register file.
--HG--
extra : convert_revision : f452d9179b929b980cf9e2d1e3de0431c51c5f4a
2007-09-04 23:40:47 -07:00
Gabe Black 760240176a X86: Hook in the fp arithmetic instructions. Stale python made it work before.
--HG--
extra : convert_revision : af27f26ae810ebaae13faa572c5b4eb074620d91
2007-09-04 23:38:34 -07:00
Gabe Black d2fc4ee625 X86: Implement some SSE fp microops and instructions.
--HG--
extra : convert_revision : 7e0595ef542fbfb701bfac7e9ac4648349a92b26
2007-09-04 23:33:50 -07:00
Gabe Black 8e3b199cb8 X86: Add some SSE floating point/integer conversion microops.
--HG--
extra : convert_revision : 2a1aa16709db940f5f40bbd84ca082f26b03b9c5
2007-09-04 23:32:18 -07:00
Gabe Black af4c04c426 X86: Add floating point micro registers.
--HG--
extra : convert_revision : 442a5f8b9216638e4e6898f89eacb8695719e20f
2007-09-04 23:31:40 -07:00
Gabe Black 310912cf2c X86: Fix a typo in the microassembly for the cqo instruction.
--HG--
extra : convert_revision : ddf739e591e4414ade37b806a88f3c11292627e2
2007-09-04 23:23:51 -07:00
Gabe Black aaee21afdb X86: Implement idiv and propogate the mul corner case fix.
--HG--
extra : convert_revision : 348aa081067728afa14dc5b609fc7e26dbc5fad5
2007-09-04 23:23:13 -07:00
Gabe Black b0b4038ee9 X86: Fix a corner case where mul would overwrite an original register value it still needed.
--HG--
extra : convert_revision : 86ee0e2bf716d52c34ee731727d6366935f103ed
2007-09-04 23:22:08 -07:00
Gabe Black e1e7605213 X86: Add in a file with floating point indexing which -should- have been in an earlier changeset.
--HG--
extra : convert_revision : bf05f81df5e5b1de1ecd8ab7a6ef751922418987
2007-09-04 23:21:41 -07:00
Gabe Black 9da070ce8a X86: Major rework of how regop microops are generated.
The new implementation uses metaclass, and gives a lot more precise control
with a lot less verbosity. The flags/no flags reg/imm variants are all handled
by the same python class now which supplies a constructor to the right C++
class based on context.

--HG--
extra : convert_revision : 712e3ec6de7a5a038da083f79635fd7a687d56e5
2007-08-31 22:28:07 -07:00
Gabe Black 9277545ba6 Microassembler: Pass the actual mnemonic used to the macroop add_micro function
--HG--
extra : convert_revision : acaee747ab30747d602c1f4ac5f0c2b2573a2a9b
2007-08-31 22:26:02 -07:00
Gabe Black 941675690c X86: Get x86 to compile again after the simobject constructor change.
--HG--
extra : convert_revision : 17a3e16e849bee88892223f0c993b19c15daa554
2007-08-31 13:02:58 -07:00
Miles Kaufmann 54cc0053f0 params: Deprecate old-style constructors; update most SimObject constructors.
SimObjects not yet updated:
- Process and subclasses
- BaseCPU and subclasses

The SimObject(const std::string &name) constructor was removed.  Subclasses
that still rely on that behavior must call the parent initializer as
  : SimObject(makeParams(name))

--HG--
extra : convert_revision : d6faddde76e7c3361ebdbd0a7b372a40941c12ed
2007-08-30 15:16:59 -04:00
Gabe Black f67cd04673 X86: Fix the sra microop to get the sign bit from the right operand.
--HG--
extra : convert_revision : 71e58dd6dd6918ee403f2e332c47e29acdace464
2007-08-29 20:39:41 -07:00
Gabe Black c1a776de8a X86: Implement the movaps instruction.
--HG--
extra : convert_revision : 2aeb1c05205f8ea8f7484e8bacf3fbbc581defd2
2007-08-29 20:38:22 -07:00
Gabe Black 3da3190f07 X86: Implement the movsd instruction.
--HG--
extra : convert_revision : a5a73e0ddd39144d2aeeb9cc6a299516752fd4c2
2007-08-29 20:37:44 -07:00
Gabe Black f0b20ff970 X86: Implement the movlpd instruction.
--HG--
extra : convert_revision : dddb20fe48c0ae9de7cd0ba1a1467ecb690056c1
2007-08-29 20:37:16 -07:00
Gabe Black 3b97b6e0e2 X86: Add an fp move microop.
--HG--
extra : convert_revision : a9d6d3568cd2c6a65df91bf56ee1e43523f04630
2007-08-29 20:36:44 -07:00
Gabe Black 22830c0747 X86: Add load and store microops that use the fp registers.
--HG--
extra : convert_revision : 153a055e888d8c47d59758a599dbd38f63008137
2007-08-29 20:36:12 -07:00
Gabe Black 34f3c9d196 X86: Add operands to handle floating point registers.
--HG--
extra : convert_revision : 2e8289dbd3f5dda1221014d4ed0e9450f60de0cf
2007-08-29 20:35:30 -07:00
Gabe Black bc3635a110 X86: Flesh out register indexing constants.
--HG--
extra : convert_revision : 56eedc076bbb7962c3976599a15ed93c7cb154c0
2007-08-29 20:34:52 -07:00
Gabe Black 6204d00940 X86: Make the fp accessors not panic.
--HG--
extra : convert_revision : c6d08863049a3f8755c53e1f49ce19ad6a2dedc7
2007-08-29 20:34:00 -07:00
Gabe Black 61b1c53a2a X86: Make x86 syscall return just stuff the return value in eax.
--HG--
extra : convert_revision : 800d8a2398d5750c03c642264577c9c772684266
2007-08-29 20:29:18 -07:00
Gabe Black c593cfbdeb X86: More two byte opcode decoding. I missed two groups in the last changeset.
--HG--
extra : convert_revision : 1a2813b2e7d3e0e02c8f1474f372de5cf16e7d7b
2007-08-28 19:36:51 -07:00
Gabe Black fbab5c9bd3 X86: Hook in an implementation for lseek.
--HG--
extra : convert_revision : d2424e73fa8ce56248c4edbda9db2714c4b0a92e
2007-08-28 17:34:15 -07:00
Gabe Black 37f1ff95e0 X86: More fully decode two byte opcodes.
This includes the most of the SSE stuff, but not some of the "groups" of
instructions.

--HG--
extra : convert_revision : 4725c34f3d73971ae1763611685c5877b6c51412
2007-08-28 17:18:13 -07:00
Gabe Black a3367adaff Address translation: De-templatize the GenericTLB class.
--HG--
extra : convert_revision : b605a90a4a1071e39f49085a839fdcd175e09fdb
2007-08-28 14:30:50 -07:00
Gabe Black 703d10705c Alpha: Fixes to get alpha to compile again.
--HG--
extra : convert_revision : 9541cf6dae1fb1a1c6025898692b2e04fcf55c6d
2007-08-27 18:30:02 -07:00
Gabe Black 8253ff2ba9 MIPS: Fixes to get mips to compile.
--HG--
extra : convert_revision : 23561eda853a51046ae56c23a88466230c3e83f2
2007-08-27 18:29:15 -07:00
Gabe Black 25ad253643 SPARC: Fixes to get SPARC to compile again.
--HG--
extra : convert_revision : dab20c49fec9c2d385ca59b9ab627c2d3dddfe76
2007-08-27 18:26:36 -07:00
Gabe Black 8d1c7a83d7 X86: Make the Ruflag microop work correctly, and make the code a little clearer.
--HG--
extra : convert_revision : c551f51cdda46df99370363ed2d70916db8413eb
2007-08-26 20:41:36 -07:00
Gabe Black ac5ec1542e X86: Return values for some cpuid functions that match what my development machine returns.
--HG--
extra : convert_revision : e6619da11f43bbe025ceabd06387dd24e1cd883b
2007-08-26 20:40:42 -07:00
Gabe Black 8b738f7f12 X86: Make the microassembler accept lines which are just labels.
The labels on these lines will be associated with whatever the next microop
is.

--HG--
extra : convert_revision : 80c260e48ec1c16e6325061608e37c95a0610cfa
2007-08-26 20:39:55 -07:00
Gabe Black 03880cf828 X86: Make cpuid actually consider the eax parameter and return different values.
--HG--
extra : convert_revision : 527c1cacdd20ab162859bba7f9a6bed33afa2d4f
2007-08-26 20:38:42 -07:00
Gabe Black 9c99f5f825 X86: Fix the sign extension microop so it extends zeros correctly.
--HG--
extra : convert_revision : 9d7ca286ba7709175fa75226320601acce4ced98
2007-08-26 20:37:41 -07:00
Gabe Black 506bf83595 X86: Implement cmps (string compare)
--HG--
extra : convert_revision : 0d6b783b2246b8ad8d91e4c63e407307ee11c651
2007-08-26 20:36:46 -07:00
Gabe Black 00d9036c62 X86: Make shift instructions set some of the flags they're supposed to.
The flag mechanism for microops needs to be fleshd out a little more to allow
for custom flag calculation methods for certain microops. Shift is an example
where the rules for calculating OF and CF are unique.

--HG--
extra : convert_revision : 91981a00c1efd05db702fffa9cea51f912583013
2007-08-26 20:35:48 -07:00
Gabe Black 9b49a78cfd Address translation: Make the page table more flexible.
The page table now stores actual page table entries. It is still a templated
class here, but this will be corrected in the near future.

--HG--
extra : convert_revision : 804dcc6320414c2b3ab76a74a15295bd24e1d13d
2007-08-26 20:33:57 -07:00
Gabe Black fcd04f953c X86: Remove x86 code that attempted to fix misaligned accesses.
--HG--
extra : convert_revision : 42f68010e6498aceb7ed25da278093e99150e4df
2007-08-26 20:30:36 -07:00
Gabe Black 537239b278 Address Translation: Make SE mode use an actual TLB/MMU for translation like FS.
--HG--
extra : convert_revision : a04a30df0b6246e877a1cea35420dbac94b506b1
2007-08-26 20:24:18 -07:00
Gabe Black f738afb865 SPARC: Make sure unaligned access are caught on cached translations as well.
--HG--
extra : convert_revision : 5c1f3f585817a19a771164f809dfc2fdc1ab3fb2
2007-08-26 20:15:29 -07:00
Gabe Black ca84d953b9 SPARC: Make nops have the IsNop flag set.
In O3, a nop is used to carry faults down the pipeline that didn't originate
from an instruction. If the instruction doesn't do anything, that is just
returns NoFault, but doesn't have IsNop set, the NoFault will overwrite the
fault that's being sent down and nothing will happen.

--HG--
extra : convert_revision : 54d99002b550ca0e1cf14603f588dc1038e3e535
2007-08-13 16:11:27 -07:00
Gabe Black e99c56f971 SPARC: Move tlb state into the tlb.
Each "strand" may need to have a private copy of this state, but I couldn't
find anywhere in the spec that said that after looking briefly.
This prevents writes to the thread context in o3 which was causing the
pipeline to be flushed and stopping any forward progress. The other ASI
accessible state will probably need to be accessed differently if/when we get
O3 full system up and running.

--HG--
extra : convert_revision : fa7fba812d7f76564ef4a23818e60f536710d557
2007-08-13 16:06:50 -07:00
Gabe Black 26853e11c0 SPARC: Make the spill and fill handlers use the correct ASI, and let No_Fault ASI accesses work.
--HG--
extra : convert_revision : 3321bb91da02c1bec27fa34d0ba945cc976b6491
2007-08-13 16:02:47 -07:00
Vincentius Robby 1caed14654 alpha: Quick fix for things related to TLB MRU cache.
simple-timing test for ALPHA_FS breaks.

--HG--
extra : convert_revision : 5a1b05cddd480849913da81a3b3931fec16485a8
2007-08-08 18:38:19 -04:00
Vincentius Robby 13d10e844c alpha: Make the TLB cache to actually work.
Improve MRU checking for StaticInst, Bus, TLB

--HG--
extra : convert_revision : 9116b5655cd2986aeb4205438aad4a0f5a440006
2007-08-08 14:18:09 -04:00
Gabe Black ef32494e72 Alpha: Fix an off by one error with the tlb caching mechanism.
--HG--
extra : convert_revision : e17f7a0d58a2e59b2e270f0827db33d0a29365e0
2007-08-07 21:51:12 -07:00
Gabe Black 0fd999ca40 Merge with head.
--HG--
extra : convert_revision : ae7b3df573368c29a66d5b027ecad9ffb3a99104
2007-08-07 15:31:36 -07:00
Gabe Black cd3f0646ca X86: Added some missing parenthesis in the condition code calculation function.
--HG--
extra : convert_revision : 663021070a4bcc795bb44e1839b8bcec686a42f0
2007-08-07 15:26:50 -07:00
Gabe Black 24541780c6 X86: Implemented and hooked in SCAS (scan string)
Fixed the asz assembler symbol.
Adjusted the condion checks to have appropriate options.
Implemented the SCAS microcode.
Attached SCAS into the decoder.

--HG--
extra : convert_revision : 17bf9ddae6bc2069e43b076f8f83c4e54fb7966c
2007-08-07 15:25:41 -07:00
Gabe Black d79a591608 X86: Add a format to handle string instructions which can use the repe and repne prefixes.
--HG--
extra : convert_revision : 205fbbb947258bc0ef2915e22d5b32a3df1a1ce2
2007-08-07 15:23:01 -07:00
Gabe Black 60c61cb2b1 X86: Overhaul of ruflags to get it to work correctly.
--HG--
extra : convert_revision : 00a36a80a1945806aac9fa7d9d6a3906465dcad2
2007-08-07 15:21:13 -07:00
Gabe Black fb6cdf09cb X86: Make a microcode branch microop.
Also some touch up for ruflag.

--HG--
extra : convert_revision : 829947169af25ca6573f53b9430707101c75cc23
2007-08-07 15:19:26 -07:00
Gabe Black cae8d20633 Merge with head.
--HG--
extra : convert_revision : 3edb9f03353b18b4c9f062bccf11e79cfb3c15f2
2007-08-04 20:27:23 -07:00
Gabe Black 30e777a5d3 X86: Implement microops and instructions that manipulate the flags register.
--HG--
extra : convert_revision : 566841577bf4a98cac0b65292fe0f7daf89a9203
2007-08-04 20:24:18 -07:00
Gabe Black 802f13e6bd X86: Make 64 bit unaligned accesses work as well as the other sizes.
There is a fundemental flaw in how unaligned accesses are supported, but this
is still an improvement.

--HG--
extra : convert_revision : 1c20b524ac24cd4a812c876b067495ee6a7ae29f
2007-08-04 20:22:20 -07:00
Gabe Black b9793c2506 X86: Make the open flags correct.
--HG--
extra : convert_revision : 2dc81345176d1de247a567d1f748e2b2bd05f829
2007-08-04 20:18:20 -07:00
Gabe Black fc6b2cceb4 X86: Make fixed register operands ignore register index extensions from the REX prefix.
The only cases where this was the correct behavior are now handled with the
"B" operand type, and doing things this way was breaking some instructions,
notably a shift.

--HG--
extra : convert_revision : 072346d4f541edaceba7aecc26ba8d2cd756e481
2007-08-04 20:17:31 -07:00
Gabe Black 6f3bb03a3f X86: Implement the cmpxchg instruction.
--HG--
extra : convert_revision : b9e172bcb9551edf65c63f26dfa07d771edf3e1e
2007-08-04 20:15:27 -07:00
Gabe Black e410a925df X86: Start implementing segmentation support.
Make instructions observe segment prefixes, default segment rules, segment
base addresses.
Also fix some microcode and add sib and riprel "keywords" to the x86
specialization of the microassembler.

--HG--
extra : convert_revision : be5a3b33d33f243ed6e1ad63faea8495e46d0ac9
2007-08-04 20:12:54 -07:00
Gabe Black ced6cbcccf X86: Create a base enum value for indexing into a region of the miscregs.
This lets you index into a group of registers without having to know
explicitly which one is the lowest in that group.

--HG--
extra : convert_revision : e3cad25a1c5910955204c37177b049ca9834cfd9
2007-08-04 20:07:42 -07:00
Gabe Black 0e6be2a9b1 X86: Add the arch_prctl system call and fix up some microcoding.
The arch_prctl system call is used to set and get the FS and GS segment
bases. The FS segment is use for TLS, so glibc needs to be able to set it
up.

--HG--
extra : convert_revision : 79501491a15967a7a862add846ff88a934fb1b37
2007-08-04 20:02:41 -07:00
Vincentius Robby 2898d76827 alpha: Implement a cache for recently used page table entries
--HG--
extra : convert_revision : 1bb80d71fa91e500a68390e5dc17464ce7136fba
2007-08-04 14:25:35 -04:00
Steve Reinhardt 3afc625975 merge from head
--HG--
extra : convert_revision : 21f7afe2719c00744c0981212c1ee6e442238e01
2007-08-03 03:51:30 -04:00
Gabe Black f4b89cd897 X86: Get rid of some debug warnings.
Get rid of some warnings that were accidentally committed.

--HG--
extra : convert_revision : e800dbce253f6ba759932ca47d64bf98129e4177
2007-08-02 16:28:01 -07:00
Gabe Black fa9e4d110a Merge with head.
--HG--
extra : convert_revision : 7700f475caa676948175cdf126ee018b0c4ad35c
2007-08-02 15:14:36 -07:00
Gabe Black 4af5740afd X86: Finally get the x86 initial stack frame right.
After very carefully reading through the Linux source, I'm pretty confident I now know -exactly- how the initial stack frame is constructed, filled, and aligned.

--HG--
extra : convert_revision : 3c654ade7e458bdd5445026860f11175f383a65f
2007-08-02 15:12:18 -07:00
Gabe Black 85b661e35d X86: Fix special case with SIB index register and REX prefix.
--HG--
extra : convert_revision : b305708a722f2a08cb55c4548c5616fcbe6c5d68
2007-08-02 15:09:12 -07:00
Ali Saidi 31a9114a3d merge, no manual changes
--HG--
extra : convert_revision : 8504bddf1f73a4186cebc03c3e52e42ea38361fc
2007-08-02 15:38:06 -04:00
Ali Saidi acb91c2dfa Linux Support: make sure that when we get the stack page for thread info we're doing a 64bit not
--HG--
extra : convert_revision : c581921dd601fc72fd2d45b961c7440755b0331c
2007-08-02 14:34:58 -04:00
Gabe Black e719a3e4c0 Fix how the "cmd" parameter is set in se.py and remove hack in x86 process initialization code.
--HG--
extra : convert_revision : 1fc741eea956ebfa4cef488eef4333d1f50617a6
2007-08-01 18:19:23 -07:00
Nathan Binkert f20ba92a76 merge: mips fix to getArgument
--HG--
extra : convert_revision : 0e97c80ca9bdd354f537bf5d036e024da0081306
2007-08-01 16:58:22 -07:00
Nathan Binkert a3e70f4957 mips: make getArgument inline so mips will link properly
--HG--
extra : convert_revision : 7fdbf1f35a5fcbd8704bf02aafcb3ea069626ce3
2007-08-01 16:57:29 -07:00
Gabe Black baa1182513 Merge with head.
--HG--
extra : convert_revision : 646d559a10706521b1918d2378d0f99ab5255c77
2007-08-01 16:00:33 -07:00
Gabe Black 458dfc8b3e Merge with head.
--HG--
extra : convert_revision : f677debfd636d79bc5097eb45331601d3253743d
2007-08-01 15:54:25 -07:00
Gabe Black c032a535ab MIPS: Files which are needed for the MIPS fix.
--HG--
extra : convert_revision : ae710fa8e4e9f57c19cd7277b1b59efd0af40b6a
2007-08-01 15:53:39 -07:00
Gabe Black 8da3e0548e Merge with head.
--HG--
extra : convert_revision : 444901221e9a0b991213fbcd555f2f5cca67e91b
2007-08-01 15:12:07 -07:00
Gabe Black 5b5e2fd6cd X86: Hide the irrelevant portions of the address components for load and store microops.
--HG--
extra : convert_revision : a5ac6fefa09882f0833537e23f1ac0477bc89bb9
2007-08-01 14:34:59 -07:00
Ali Saidi 84cd78e96f Merge Gabe and my changes to arch/mips/utility.hh
--HG--
extra : convert_revision : d5a9d74ee6edf71524ba5c03fb7f054cf9722213
2007-08-01 17:05:03 -04:00
Ali Saidi fae60c164e Arguments: Get rid of duplicate code for the Arguments class in each architecture.
Move the argument files to src/sim and add a utility.cc file with a function
getArguments() that returns the given argument in the architecture specific fashion.
getArguments() was getArg() is the architecture specific Argument class and has had
all magic numbers replaced with meaningful constants. Also add a function to the
Argument class for testing if an argument is NULL.

--HG--
rename : src/arch/alpha/arguments.cc => src/sim/arguments.cc
rename : src/arch/alpha/arguments.hh => src/sim/arguments.hh
extra : convert_revision : 8b93667bafaa03b52aadb64d669adfe835266b8e
2007-08-01 16:59:14 -04:00
Gabe Black 239d124e83 MIPS: Cleaned up includes to break loops, and got rid of isa_traits.cc
Loops of header files including each other was causing compilation to fail. To fix it, a bunch of unnecessary includes were removed, and the code in isa_traits.cc which brought a bunch of include chains together was broken up and put in proximity to the header files that delcared it.

--HG--
extra : convert_revision : 66ef7762024b72bb91147a5589a0779e279521e0
2007-08-01 13:55:47 -07:00
Gabe Black e5e5b0119d X86: Fix for compilation bug with new cache code.
--HG--
extra : convert_revision : 073c6db0796cd2c11b8293b382b438a2a959b821
2007-08-01 12:49:58 -07:00
Gabe Black 4b29d22386 X86: Get rid of initialization of R11
R11 is just junk after the start of exectuion because we're "returning" from
an execve call and linux destroys the contents of rcx and r11 on system calls.

--HG--
extra : convert_revision : 6bf69a50ce56e0355dfdd41524163874340beec0
2007-08-01 12:00:32 -07:00
Gabe Black 4bdabe1254 Add a flag to indicate an instruction triggers a syscall in SE mode.
--HG--
extra : convert_revision : 1d0b3afdd8254f5b2fb4bbff1fa4a0536f78bb06
2007-07-31 17:34:08 -07:00
Gabe Black 55ade789d3 X86: Add operand type information to the fnstcw and fldw instruction placeholders.
These are the only floating point instructions that get used in my simple hello world test. These instructions are for setting up the floating point control register. Their not being implemented doesn't affect anything because floating point isn't used.

--HG--
extra : convert_revision : 4dfb9ef2a5665f034946c504978029e8799e64cd
2007-07-31 14:55:06 -07:00
Steve Reinhardt c4c8a12186 Merge from head.
--HG--
extra : convert_revision : af16bc685ea28e44b8120f16b72f60a21d68c1e2
2007-07-31 00:37:07 -04:00
Gabe Black ae3e1d22fc X86: Add decoding for x87 floating point.
--HG--
extra : convert_revision : 08f0f4a3d77a2c5eb9b5ca0cae7d0be9a72febec
2007-07-30 17:54:01 -07:00
Gabe Black 463e8a7516 X86: Attach the "DIV" instruction implementation to the decoder.
--HG--
extra : convert_revision : 8aef1c8d1ced2db998ed0d31241cadc17e19eadd
2007-07-30 15:44:48 -07:00
Gabe Black 595ff465e5 X86: Remove a naming conflict between the register index parameters and the "picked" register values.
--HG--
extra : convert_revision : 7b2c1be509478153ebf396841e4cbeccee3e03d1
2007-07-30 15:44:21 -07:00
Gabe Black 77482dc439 X86: __pad0 should be a 4 byte pad, not a 4 long array of 4 byte pads.
--HG--
extra : convert_revision : e0d5ab617bc95d5d714fa9fcdf0a448874aef886
2007-07-30 15:43:20 -07:00
Gabe Black f02bb63894 X86: Turn on the exit_group, exit, munmap, and write syscalls.
--HG--
extra : convert_revision : e358c18cd999a8e274108e06502c3324c2d12d3b
2007-07-30 15:42:42 -07:00
Gabe Black 43f0be5253 X86: Use an mmap base address that matches what an actual machine uses.
--HG--
extra : convert_revision : 98521797bbc6360301b3c6a6b1b8e28236ef570e
2007-07-30 15:42:04 -07:00
Gabe Black 890e583163 X86: Set up RIP relative LEA instructions operands correctly.
--HG--
extra : convert_revision : 820cafadd550487c0d62c5082261b0886fce4f0d
2007-07-30 15:41:08 -07:00
Gabe Black 44c3419e1a X86: Implement unsigned divide. The non-byte version ignores rdx which it shouldn't.
--HG--
extra : convert_revision : 07e5509fb8ed9d73c144d6f52951ebc02e7c0032
2007-07-30 15:40:39 -07:00
Gabe Black 74fcf117dd X86: Allow RIP relative decode on -all- memory forms of operands.
--HG--
extra : convert_revision : 8af62cda2ce1c4acfa26a028a4f7506647bc27f7
2007-07-30 15:39:25 -07:00
Gabe Black 65db30992c X86: Take into account the regular registers and the microcode registers when decided whether or not to fold.
--HG--
extra : convert_revision : 26feec984dec61799c4afb03a4503a53c35872c5
2007-07-30 15:38:40 -07:00
Gabe Black 9536120845 X86: Fix up the stat structure. This probably still isn't right.
--HG--
extra : convert_revision : 2e2a22cdf3abe648c9e1309b9070cfd10fc4a8b8
2007-07-30 13:31:59 -07:00
Gabe Black a1b193f026 X86: Hook in the new instructions.
--HG--
extra : convert_revision : c4233001b35b52161083482841593ec28da6ff7d
2007-07-30 13:31:27 -07:00
Gabe Black ab8ba813c9 X86: Turn on some system calls, and make the kernel version match my development machine.
--HG--
extra : convert_revision : 2f1969a45aa82708dc4cddef09c01306f76f0a81
2007-07-30 13:30:41 -07:00
Gabe Black 9e2b1f8630 X86: Make sure FP_Base_DepTag is big enough to avoid trouble.
--HG--
extra : convert_revision : 7e0a83d5deb7fc9aaa69b7d024ea6ae6890df133
2007-07-30 13:29:56 -07:00
Gabe Black 18be07289f X86: Implement a stub CPUID function which is hardcode to return certain values.
--HG--
extra : convert_revision : 4085e04fd13e834646106faa55726d07d9631f42
2007-07-30 13:29:33 -07:00
Gabe Black dbc979b9e2 X86: Force jumps to use 64 bit operand size.
--HG--
extra : convert_revision : 1c3685e7f4d07d5b4ded6c78b794964f51a358a9
2007-07-30 13:28:31 -07:00
Gabe Black bae96272a1 X86: Make instructions use pick, and implement/adjust some multiplication microops and instructions.
--HG--
extra : convert_revision : 5c56f6819ee07d936b388b3d1810a3b73db84f9c
2007-07-30 13:28:05 -07:00
Gabe Black fad96cd0fc X86: Make merge and pick work with high bytes. Fix a sizing issue in pick.
--HG--
extra : convert_revision : 4ddc2ca8c23bb7e90a646329ebf27a013ac5e3d6
2007-07-30 13:26:48 -07:00
Gabe Black 0d31a41304 X86: Make register names in disassembly reflect high bytes.
--HG--
extra : convert_revision : e2891581e5504de0a2c8e5932fd22425cafd4fc7
2007-07-30 13:26:14 -07:00
Gabe Black 31a862b8f1 X86: missed a file which adds a "fold" bit.
--HG--
extra : convert_revision : 2c8eea425221d069a9bb888c8f18839843061899
2007-07-30 13:25:38 -07:00
Gabe Black da84aa95a9 Make the register indices use the appropriate "fold" bit.
--HG--
extra : convert_revision : 89e15e2ef1f709f2c09238b78f94505ce8ef146d
2007-07-30 13:25:00 -07:00
Gabe Black d8beeff324 X86: Make disassembly use the final register index. Add bits to indicate whether or not register indexes should be "folded".
--HG--
extra : convert_revision : 4b46e71ca91e480f6e1662b7f37b75240d6598e9
2007-07-30 13:23:33 -07:00
Gabe Black 9b5421dcba X86: Missed a file for adding a bit to indicate that an REX prefix was present.
--HG--
extra : convert_revision : f1bbd5165a7415d0daf27660575d30c41510f531
2007-07-30 13:20:08 -07:00
Gabe Black 4b3a20cdec X86: Implement LEAVE
--HG--
extra : convert_revision : c642d5018ece82c644e1cfa389b2d3dbd6ab5ffd
2007-07-30 13:19:11 -07:00
Gabe Black e70ffb0117 X86: Add a bitfield to indicate whether or not an REX prefix was present.
--HG--
extra : convert_revision : 9c4802f6c6e4eaab36aac900e2c7576682cb0f33
2007-07-30 13:17:34 -07:00
Gabe Black 7309d5ee45 X86: Make logic instructions flag setting work.
The instructions now ask for the appropriate flags to be set, and the microops do the "right thing" with the CF and OF flags, namely zero them.

--HG--
extra : convert_revision : 85138a832f44c879bf8a11bd3a35b58be6272ef3
2007-07-29 13:51:40 -07:00
Gabe Black 1af50a9e8b X86: Make arithmetic instructions set the appropriate flags.
--HG--
extra : convert_revision : 3bdef3876c7b86bc93365edee876b74a201d625f
2007-07-29 13:50:10 -07:00
Steve Reinhardt 08474ccf68 Merge Gabe's changes from head.
--HG--
extra : convert_revision : d00b7b09c7f19bc0e37b385ef7c124f69c0e917f
2007-07-29 13:25:14 -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 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
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 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
Nathan Binkert 142362b703 merge whitespace changes
--HG--
extra : convert_revision : 20e8aa51935dc23ac3c7e6da2cb7a4e62c9a3a7c
2007-07-28 17:06:32 -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 f0fef8f850 Merge python and x86 changes with cache branch
--HG--
extra : convert_revision : e06a950964286604274fba81dcca362d75847233
2007-07-26 23:15:49 -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
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
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
Steve Reinhardt d5c74657c9 Merge more changes in from head.
--HG--
extra : convert_revision : 8f170f2754eccdb424a35b5b077225abcf6eee72
2007-07-22 08:10:59 -07:00
Steve Reinhardt 03730edc45 Merge Gabe's changes with mine.
--HG--
extra : convert_revision : f50ed42e7acb3f11e610fd6976eaa8df0c6ba2ab
2007-07-22 10:40:45 -04:00
Gabe Black 2cd454d102 Add the "open" syscall.
--HG--
extra : convert_revision : d405ed5d3738639809dd2887955db9253138ccbb
2007-07-22 02:43:03 +00:00
Gabe Black 47b0242618 Fixed immediate byte accounting bug.
--HG--
extra : convert_revision : ee5275da14a2923b9a525ae5b5c582c15df4608a
2007-07-22 02:34:52 +00:00
Gabe Black bff4f765f5 Fixed displacement size bug.
--HG--
extra : convert_revision : c39249ef598c1bd555098d688381dc62541a07c0
2007-07-22 02:23:03 +00:00
Gabe Black f7ff068b30 Implemented and hooked in xchg, rotate with carry, and ret instructions
--HG--
extra : convert_revision : a8e67b0ab4072308f01e0df7f7ee05b31f605a35
2007-07-21 19:29:39 -07:00
Gabe Black ee6fbdc28b Implement rotate with carry microops.
--HG--
extra : convert_revision : 1d7ff6611e5b4766a5257c1e73681fabbe5f6d76
2007-07-21 19:27:38 -07:00
Gabe Black fc1b7d62b7 Fixed the distinction between far and near versions of jmp, call and ret. Implemented some shifts, rotates, and pushes.
--HG--
extra : convert_revision : fcb06189ff213e82da16ac43231feb308cb3a285
2007-07-20 23:16:03 -07:00
Gabe Black 009df5ff1e Fixed line number accounting
--HG--
extra : convert_revision : 4c046493b98ce4a766c2121710d70650cb6a801e
2007-07-20 23:12:26 -07:00
Gabe Black 75f6c6a016 Implement UD2 and replace the place holder in the decoder.
--HG--
extra : convert_revision : 16d0d2b2ddad8759698fa4aa668c22063307c72b
2007-07-20 18:27:02 -07:00
Gabe Black 8dd93f32e4 Make the "name" function const.
--HG--
extra : convert_revision : eb71bc3edd92a544a5333786635fce550aaef233
2007-07-20 18:24:46 -07:00
Gabe Black 9093cb79a1 Implement adc and sbb instructions and microops.
--HG--
extra : convert_revision : a2d3068c5b487f4fa7bf5c9cebba7753bc390bfa
2007-07-20 17:17:11 -07:00
Gabe Black c3669b8925 Implement the rest of the conditional jump instructions and hook them into the decoder.
--HG--
extra : convert_revision : 8d1d6abce29371def560e1c3f31dabb4de01366f
2007-07-20 17:02:39 -07:00
Gabe Black 231cc3effb Make the decoder take advantage of the new "B" operand format which takes a register index from the opcode itself.
--HG--
extra : convert_revision : 35f9be6559ee9833049eda1817982efdde7082be
2007-07-20 16:48:59 -07:00