Gabe Black
ba6b8389ee
X86: Take limitted advantage of the compilers type checking for microop operands.
2009-07-16 09:29:29 -07:00
Gabe Black
80c834ccac
X86: Fix a number of places where the wrong form of a microop was used.
2009-07-16 09:27:56 -07:00
Gabe Black
9993ca8280
X86: Fold the MiscRegFile all the way into the ISA object.
2009-07-09 20:29:02 -07:00
Gabe Black
b398b8ff1b
Registers: Add a registers.hh file as an ISA switched header.
...
This file is for register indices, Num* constants, and register types.
copyRegs and copyMiscRegs were moved to utility.hh and utility.cc.
--HG--
rename : src/arch/alpha/regfile.hh => src/arch/alpha/registers.hh
rename : src/arch/arm/regfile.hh => src/arch/arm/registers.hh
rename : src/arch/mips/regfile.hh => src/arch/mips/registers.hh
rename : src/arch/sparc/regfile.hh => src/arch/sparc/registers.hh
rename : src/arch/x86/regfile.hh => src/arch/x86/registers.hh
2009-07-08 23:02:21 -07:00
Gabe Black
d029110fa1
X86: Fix a bug in IRET_PROT's microcode. The immediate form of sra was intended.
2009-07-08 23:01:54 -07:00
Gabe Black
7f50ea05ac
X86: Keep track of more descriptor state to accomodate KVM.
2009-05-28 23:27:56 -07:00
Gabe Black
ee7055c289
X86: Put the StoreCheck flag with the others, and don't collide with other flags.
2009-04-23 01:43:00 -07:00
Gabe Black
eee74ba427
X86: Fix up a copyright.
2009-04-19 13:17:35 -07:00
Gabe Black
0a6ff60caa
X86: Recognize and handle the lock legacy prefix.
2009-04-19 04:57:28 -07:00
Gabe Black
61edc9ba66
X86: Implement a locking version of XADD.
2009-04-19 04:56:49 -07:00
Gabe Black
209cfc89fd
X86: Implement a locking version of BTC.
2009-04-19 04:56:45 -07:00
Gabe Black
e475cf85f0
X86: Implement a locking version of BTR.
2009-04-19 04:56:43 -07:00
Gabe Black
43f58927d6
X86: Implement a locking version of CMPXCHG.
2009-04-19 04:56:40 -07:00
Gabe Black
b493906eb9
X86: Implement a locking version of BTS.
2009-04-19 04:56:36 -07:00
Gabe Black
985d959ea6
X86: Implement a locking version of DEC.
2009-04-19 04:56:34 -07:00
Gabe Black
4f2d4f466a
X86: Implement a locking version of INC.
2009-04-19 04:56:31 -07:00
Gabe Black
2394f73f90
X86: Implement a locking version of NEG.
2009-04-19 04:56:28 -07:00
Gabe Black
9b9b7a412c
X86: Implement a locking version of NOT.
2009-04-19 04:56:25 -07:00
Gabe Black
b8f81c62a2
X86: Implement a locking version of XCHG.
2009-04-19 04:56:22 -07:00
Gabe Black
750f5a0a67
X86: Implement a locking version of XOR.
2009-04-19 04:56:20 -07:00
Gabe Black
cfb289ebeb
X86: Implement a locking version of SUB.
2009-04-19 04:56:16 -07:00
Gabe Black
789b3191b9
X86: Implement a locking version of AND.
2009-04-19 04:56:14 -07:00
Gabe Black
e742cad6f4
X86: Implement a locking version of SBB.
2009-04-19 04:56:11 -07:00
Gabe Black
193265c6e5
X86: Implement a locking version of ADC.
2009-04-19 04:56:08 -07:00
Gabe Black
2f607b882c
X86: Implement a locking version of OR.
2009-04-19 04:56:06 -07:00
Gabe Black
a7f79c9049
X86: Implement a locking version of ADD.
2009-04-19 04:56:02 -07:00
Gabe Black
d90456a486
X86: Implement the stul microop.
...
This microop does a store and unlocks the requested address. The RISC86
microop ISA doesn't seem to have an equivalent to this, so I'm guessing that
the store following an ldstl is automatically unlocking. We don't do it this
way for performance reasons since the behavior is the same.
2009-04-19 04:55:58 -07:00
Gabe Black
d2554ff030
X86: Implement the ldstl microop.
...
This microop does a load, checks that a store would succeed, and locks the
requested address.
2009-04-19 04:55:43 -07:00
Gabe Black
93cccf7d19
X86: Make the TEST instruction set all the flags it's supposed to.
2009-04-19 04:14:16 -07:00
Gabe Black
3eed59768c
X86: Explicitly use the right width in a few places that need a 64 bit value.
2009-04-19 03:47:59 -07:00
Gabe Black
038225a6ca
X86: Implement far jmp.
2009-04-19 03:42:41 -07:00
Gabe Black
a0cc081997
X86: Fix a bug in the chks microop where it ignored that it found a fault.
2009-04-19 03:40:08 -07:00
Gabe Black
f2ff5b9249
X86: Make the interrupt entering microcode record the value to use, not actually use it.
2009-04-19 03:36:57 -07:00
Gabe Black
35eea4191b
X86: LEA calculates an address before segmentation.
2009-04-19 03:24:51 -07:00
Gabe Black
bdd55ec8b6
X86: Implement the save machine status word instruction (SMSW).
2009-04-19 03:22:38 -07:00
Gabe Black
d86cd1d2a0
X86: Implement the load machine status word instruction (LMSW).
2009-04-19 03:17:14 -07:00
Gabe Black
eba640c963
X86: Only use %eax to select a function and look like we support sse2.
2009-04-19 03:11:24 -07:00
Gabe Black
27e54982b4
X86: Fix the mov to segment selector in real mode instruction microcode.
2009-04-19 03:08:40 -07:00
Gabe Black
d277feb925
X86: Implement the INIT IPI.
2009-04-19 02:53:00 -07:00
Gabe Black
a340b214cf
X86: Fix the halt microop.
2009-04-19 02:51:09 -07:00
Gabe Black
b36f28472d
X86: Implement shrd.
2009-02-27 09:26:26 -08:00
Gabe Black
aa51c01d69
X86: Set address size to 64 bits when generating addresses internally.
2009-02-27 09:26:01 -08:00
Gabe Black
c3d7d7ed0e
X86: Implement sysenter as a system call interface.
2009-02-27 09:25:43 -08:00
Gabe Black
8a1eb7e8be
X86: Take address size into account when computing an effective address.
2009-02-27 09:25:16 -08:00
Gabe Black
1d18eb9043
X86: Make instructions that use intseg preserve all 8 bytes of their addresses.
2009-02-27 09:25:02 -08:00
Gabe Black
79bc1b3740
X86: Fix a decoder bug and add in some missing instructions.
2009-02-27 09:24:10 -08:00
Gabe Black
3dfa564e70
X86: Respect segment override prefixes even when there's no ModRM byte.
2009-02-27 09:23:58 -08:00
Gabe Black
9dfa3f7f73
X86: Fix segment limit checks.
2009-02-27 09:23:50 -08:00
Gabe Black
281ef8111a
X86: Compute shift instruction flags correctly.
2009-02-27 09:23:00 -08:00
Gabe Black
60aab03e85
X86: Implement the int system call interface in the decoder.
2009-02-27 09:21:58 -08:00
Gabe Black
7400769768
X86: Implement IST stack switching.
2009-02-25 10:22:43 -08:00
Gabe Black
7aa875f4f3
X86: Implement the lldt instruction.
2009-02-25 10:21:27 -08:00
Gabe Black
bda7077c64
X86: Add segmentation checks for ldt related descriptors and selectors.
2009-02-25 10:21:21 -08:00
Gabe Black
e08d60389d
X86: Make the TSS type check actually return a fault if it fails.
2009-02-25 10:21:14 -08:00
Gabe Black
68300cfb8c
X86: Make rdcr use merge and the mov to control register instructions use the right operand size.
2009-02-25 10:21:08 -08:00
Gabe Black
9842f1ca9d
X86: Implement CLTS.
2009-02-25 10:21:02 -08:00
Gabe Black
b035c917a5
X86: Make the segment register reading microops use merge.
2009-02-25 10:20:47 -08:00
Gabe Black
28efb3c6e3
X86: Implement the mov to debug register intructions.
2009-02-25 10:20:42 -08:00
Gabe Black
c39ed53d05
X86: Rename oszForPseudoDesc maxOsz to reflect its more general use.
2009-02-25 10:20:30 -08:00
Gabe Black
1e70401c08
X86: Fix a few bugs with the segment register instructions in real mode.
...
Fix a few instances where the register form of zext was used where zexti was
intended. Also get rid of the 64 bit only rip relative addressed version since
64 bit and real mode are mutually exclusive.
2009-02-25 10:20:19 -08:00
Gabe Black
8813168b5a
X86: Do a merge for the zero extension microop.
2009-02-25 10:20:10 -08:00
Gabe Black
28a35a6adb
X86: Add microops for reading/writing debug registers.
2009-02-25 10:20:01 -08:00
Gabe Black
cb4141f6e6
X86: Check src1 for illegal values since that's the index we actually use.
2009-02-25 10:19:47 -08:00
Gabe Black
d48214a656
X86: Implement the fence instructions. These are not microcoded.
2009-02-25 10:19:41 -08:00
Gabe Black
06ff83e1b9
X86: Implement a basic prefetch instruction.
2009-02-25 10:19:22 -08:00
Gabe Black
5f0428ef9f
X86: Use the right portion of a register for stores.
2009-02-25 10:19:14 -08:00
Gabe Black
f35a37ca9e
X86: Update CS later so stack accesses have the right permission checks.
2009-02-25 10:18:51 -08:00
Gabe Black
ba69184630
X86: Use atCPL0 for accesses that are part of CPU machinery.
2009-02-25 10:18:29 -08:00
Gabe Black
dc53ca89f6
X86: Add a flag to force memory accesses to happen at CPL 0.
2009-02-25 10:18:22 -08:00
Gabe Black
897c374892
X86: Move where CS is set so CPL checks work out.
2009-02-25 10:18:16 -08:00
Gabe Black
eec3f49a57
X86: Implement the sysret instruction in long mode.
2009-02-25 10:17:54 -08:00
Gabe Black
6325245e3e
X86: Implement the longmode versions of the syscall instruction.
2009-02-25 10:17:49 -08:00
Gabe Black
dadc30b0a4
X86: Make the microcode assembler recognize r8-r15.
2009-02-25 10:17:43 -08:00
Gabe Black
fcad6e3b13
X86: Add a wrattr microop.
2009-02-25 10:17:38 -08:00
Gabe Black
99aa121fca
X86: Make exceptions handle stack switching.
2009-02-25 10:17:19 -08:00
Gabe Black
aa7bc1be74
X86: Implement the LTR instruction.
2009-02-25 10:17:14 -08:00
Gabe Black
08f3a126d5
X86: Fix segment limit checking.
2009-02-25 10:17:08 -08:00
Gabe Black
2f31643db5
X86: Add a check to chks to verify a task state segment descriptor.
2009-02-25 10:17:02 -08:00
Gabe Black
7b1cb74ac3
X86: Add a check to chks which raises #GP(selector) if selector is NULL or not in the GDT.
2009-02-25 10:16:54 -08:00
Gabe Black
1b336a8fe7
X86: Make the stupd microop not update registers in initiateAcc.
2009-02-25 10:15:56 -08:00
Gabe Black
a1aba01a02
CPU: Get rid of translate... functions from various interface classes.
2009-02-25 10:15:34 -08:00
Nathan Binkert
e1798d063e
Quell g++ 4.3 warning about operator ambiguity
2009-02-06 20:55:50 -08:00
Gabe Black
5a4eed5d34
X86: All x86 fault classes now attempt to do something useful.
2009-02-01 17:09:08 -08:00
Gabe Black
923a14dde7
X86: Make the fault classes handle error codes better.
2009-02-01 17:08:32 -08:00
Gabe Black
2f8cec849d
X86: Make the long mode interrupt/exception microcode handle an error code.
2009-02-01 17:07:43 -08:00
Gabe Black
9b4d1e0f9a
X86: Distinguish between hardware and software interrupts/exceptions
2009-02-01 17:07:18 -08:00
Gabe Black
041402a949
X86: Fix the upper bound on some ranges that were setting up the micro code assembler.
2009-02-01 17:06:25 -08:00
Gabe Black
6b53b8387e
X86: Make the chks microop check for the right int descriptor type.
2009-02-01 17:05:37 -08:00
Gabe Black
c0cd58812e
X86: Touch up the interrupt entering microcode.
2009-02-01 17:04:21 -08:00
Gabe Black
ca6e0d75c8
X86: Fix the microcode for the LODS instruction.
2009-02-01 00:28:28 -08:00
Gabe Black
d432bd13b2
X86: Fix some incorrect register widths.
2009-02-01 00:18:13 -08:00
Gabe Black
52defeb4e7
X86: Implement the xadd instruction.
2009-01-25 20:33:27 -08:00
Gabe Black
3c5988b86c
X86: Implement the bswap instruction.
2009-01-25 20:32:43 -08:00
Gabe Black
0449fb2b7a
X86: Fix a bug in the iret microcode.
2009-01-25 20:31:17 -08:00
Gabe Black
b23633ad1b
X86: Hook in the M5 pseudo insts.
2009-01-06 23:55:46 -08:00
Gabe Black
115b1a7ed3
X86: Autogenerate macroop generateDisassemble function.
2009-01-06 22:55:27 -08:00
Gabe Black
9e24d8c599
X86: Move the macroop class out of the isa description into C++.
2009-01-06 22:44:59 -08:00
Gabe Black
8c15518f30
X86: Fix completeAcc get call.
2008-11-09 21:55:43 -08:00
Gabe Black
3c4567f2a6
X86: Set the delayed commit flag in x86 microops appropriately.
2008-10-12 23:29:10 -07:00
Gabe Black
e3004c579f
X86: Fix the segment setting code in IRET, and make it restore the flags.
2008-10-12 23:05:22 -07:00
Gabe Black
564eda827b
X86: Implement the swapgs instruction.
2008-10-12 23:00:07 -07:00
Gabe Black
a2e0d539d8
X86: Add wrval/rdval microops for reading significant miscregs.
2008-10-12 22:55:55 -07:00
Gabe Black
4c19c56a77
X86: Implement entering an interrupt in microcode.
2008-10-12 22:42:03 -07:00
Gabe Black
f813a4be49
X86: Make sure register microops set fault rather than returning one.
2008-10-12 22:24:06 -07:00
Gabe Black
961b40cdb5
X86: Implement an wrdh microop which loads bases/offsets from 16 byte descriptors.
2008-10-12 22:16:53 -07:00
Gabe Black
6074b1abf2
X86: Implement local labels for the ROM that actually refer into the ROM.
2008-10-12 20:44:11 -07:00
Gabe Black
6b46e5204d
X86: Implement the chks check of interrupt gate target code segments.
2008-10-12 20:38:22 -07:00
Gabe Black
30feb90c1c
X86: Add a check type for interrupt gates.
2008-10-12 20:33:37 -07:00
Gabe Black
15f5bb3055
X86: Fix chks checking the submode for stack segments.
2008-10-12 20:29:52 -07:00
Gabe Black
9e1fe2050a
X86: Let segment manipulation microops be conditional.
2008-10-12 20:25:06 -07:00
Gabe Black
e9158d763a
X86: Let the microassembler know about the microcode only H segment.
2008-10-12 20:17:38 -07:00
Gabe Black
223fc41c07
X86: Fix the rdbase microop
2008-10-12 20:07:46 -07:00
Gabe Black
cefb768131
X86: Create a handy way to access labels from the ROM in microcode.
2008-10-12 17:52:51 -07:00
Gabe Black
e5f8092467
X86: Make X86's microcode ROM actually do something.
2008-10-12 17:48:44 -07:00
Gabe Black
6fd4eff68f
X86: Create an eret microop which returns from ROM to combinational decoding.
2008-10-12 15:53:04 -07:00
Gabe Black
4aa18aa800
X86: Make Br never report itself as the last microop.
2008-10-12 15:43:35 -07:00
Gabe Black
77c0e1d110
X86: Create a SeqOp class of microops and make Br one of them.
2008-10-12 15:33:17 -07:00
Gabe Black
a76c4b8ca1
X86: Implement CPUID with a magical function instead of microcode.
2008-10-12 15:31:28 -07:00
Gabe Black
e1b306fa53
X86: Fix the debugging microops. The debug functions can't handle a string object format.
2008-10-09 00:05:39 -07:00
Gabe Black
569db520ad
X86: Make far ret modify CS instead of some random selector.
2008-10-09 00:04:36 -07:00
Ali Saidi
3a3e356f4e
style: Remove non-leading tabs everywhere they shouldn't be. Developers should configure their editors to not insert tabs
2008-09-10 14:26:15 -04:00
Gabe Black
30bc897613
X86: Fix the microcode for sign/zero extending moves that use high byte registers.
2008-09-03 00:52:54 -04:00
Gabe Black
5b5875341c
X86: Make the cpuid processor identifier return a real string.
2008-06-12 01:00:19 -04:00
Gabe Black
4f4ff17578
X86: Make the disassembly for halt conform with the other microops.
2008-06-12 00:58:27 -04:00
Gabe Black
31d40ad7c2
X86: Implement and hook up STI and CLI instructions.
2008-06-12 00:58:19 -04:00
Gabe Black
8d2416c6e9
X86: Implement a partial, sort of correct version of the protected mode variant of iret.
2008-06-12 00:53:01 -04:00
Gabe Black
66f54a6037
X86: Change how segment loading is performed.
2008-06-12 00:52:12 -04:00
Gabe Black
129831c116
X86: Make pushes and pops use the stack size instead of the data size.
2008-06-12 00:51:57 -04:00
Gabe Black
d4e7c7edd3
X86: Keep handy values like the operating mode in one register.
2008-06-12 00:50:25 -04:00
Gabe Black
fa7c81c6df
X86: Change what the microop chks does.
...
Instead of computing the segment descriptor address, this now checks if a
selector value/descriptor are legal for a particular purpose.
2008-06-12 00:50:10 -04:00
Gabe Black
6bd9cf3594
X86: Add a microop to read a segments attribute register.
2008-06-12 00:50:05 -04:00
Gabe Black
e0c20386ac
X86: Add microops and supporting code to manipulate the whole rflags register.
2008-06-12 00:49:50 -04:00
Gabe Black
2bb8933f78
X86: Add microops which panic, fatal, warn, and warn_once.
2008-06-12 00:49:25 -04:00
Gabe Black
bbc1f394ff
X86: Truncate descriptors to 16 bits.
2008-06-12 00:49:16 -04:00
Gabe Black
6106b05b6e
X86: Redo BSF.
2008-06-12 00:48:58 -04:00
Gabe Black
dfc2d44ea3
X86: Flesh out 3dnow instruction decoding a bit and grab the byte immediate.
2008-06-12 00:48:46 -04:00
Gabe Black
de6eeaaa27
X86: Make string instructions work when rcx=0.
2008-06-12 00:48:15 -04:00
Gabe Black
a8e3001df8
X86: Bypass unaligned access support for register addressed MSRs.
2008-06-12 00:47:25 -04:00
Gabe Black
8e2991b529
X86: Fix the implementation of BSF.
2008-06-12 00:46:04 -04:00
Gabe Black
16e189fad2
X86: Bit scan forward/reverse were accidentally transposed.
2008-06-12 00:45:52 -04:00
Gabe Black
254cc07650
X86: Fix a byte register indexing issue in the sign extending move from memory microcode.
2008-06-12 00:45:22 -04:00
Gabe Black
8501a90f59
X86: Add in some support for the tsc register.
2008-06-12 00:39:10 -04:00
Gabe Black
98d2ca403e
X86: Implement the INVLPG instruction and the TIA microop.
...
--HG--
extra : convert_revision : 31db1ee082f6c3ca5443cba1eb335e408661ead2
2008-02-26 23:39:22 -05:00
Gabe Black
423bbe6499
X86: Optomize the bit scanning instruction microassembly a little. More can be done.
...
--HG--
extra : convert_revision : 3cf6e972f0e41e3529a633ecbb31289e1bd17f0f
2008-01-23 08:18:27 -05:00
Gabe Black
60c2d98fc0
X86: Implement and attach the BSR and BSF instructions.
...
--HG--
extra : convert_revision : be7e11980092e5d1baff0e05d4ec910305966908
2008-01-22 00:10:33 -05:00
Gabe Black
f809637011
X86: Fill out group17 in the decoder.
...
--HG--
extra : convert_revision : 66ab9c0fc3086f66e3d6d82d47964ecf406c3a8a
2008-01-21 16:27:40 -05:00
Gabe Black
c08b7802a9
X86: Redo the bit test instructions.
...
--HG--
extra : convert_revision : 433c2a9f3675ed02f3be5ce759a440f2686d2ccd
2008-01-12 06:41:32 -05:00
Gabe Black
b705eba6e5
X86: Fix the wrmsr instruction.
...
--HG--
extra : convert_revision : 12bc7e71226ebafb8eedadf6a3db82929e15e722
2008-01-12 06:40:55 -05:00
Gabe Black
0e394fdfa4
X86: Fix the general IO instructions dataSize.
...
--HG--
extra : convert_revision : 9774a52cb6a8e7632d1b1dc0706e5791cc18d238
2008-01-12 06:37:35 -05:00
Gabe Black
27cc351688
X86: Please excuse my dear Aunt Sally. (precedence bug)
...
--HG--
extra : convert_revision : 9ad4f31e7a962c3177896bcbfb93e2e54720d117
2007-12-03 14:32:56 -08:00