Gabe Black
06ff83e1b9
X86: Implement a basic prefetch instruction.
2009-02-25 10:19:22 -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
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
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
5a4eed5d34
X86: All x86 fault classes now attempt to do something useful.
2009-02-01 17:09:08 -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
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
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
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
4c19c56a77
X86: Implement entering an interrupt in microcode.
2008-10-12 22:42:03 -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
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
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
e0c20386ac
X86: Add microops and supporting code to manipulate the whole rflags register.
2008-06-12 00:49:50 -04:00
Gabe Black
6106b05b6e
X86: Redo BSF.
2008-06-12 00:48:58 -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
Gabe Black
73caca57a8
X86: Make sure the memory index is calculated using the address size for bit test instructions.
...
--HG--
extra : convert_revision : 9634675857dae53b5e79e49267c864a0265afde1
2007-12-02 01:46:38 -08:00
Gabe Black
b5d4018382
X86: Fix a copy/paste mistake where the bit test instructions were using an immediate where they should use a register.
...
--HG--
extra : convert_revision : b0ee80e4c7fdb58a1eb85b3bcc82a0cdaa93330a
2007-12-02 01:46:29 -08:00
Gabe Black
5de71e39d8
X86: Make the 0xA0-0xA3 versions of mov use the right sized immediates.
...
--HG--
extra : convert_revision : a702403de29772618abb5bd5c5555279d91bdd59
2007-12-02 00:02:51 -08:00
Gabe Black
67fee01026
X86: Fix a copy paste error in the bts microcode.
...
--HG--
extra : convert_revision : c4ac007d35ac13211f9816f1104c84f2b447ddba
2007-12-01 23:06:52 -08:00
Gabe Black
988c6f227a
X86: Implement mov from control register.
...
--HG--
extra : convert_revision : c8280f0686a3ae6d5c405327540ad15a3a5531f9
2007-12-01 23:06:03 -08:00
Gabe Black
fe833dd2c3
X86: First crack at far returns. This is grossly approximate.
...
--HG--
extra : convert_revision : 23da0338af1f7663ae5ddf2289fb45dd32f37c42
2007-12-01 23:05:01 -08:00
Gabe Black
dc6f960171
X86: Reorganize segmentation and implement segment selector movs.
...
--HG--
extra : convert_revision : 553c3ffeda1f5312cf02493f602e7d4ba2fe66e8
2007-12-01 23:03:39 -08:00
Gabe Black
557bc80647
X86: Implement the LIDT instruction.
...
--HG--
extra : convert_revision : 380515e985318311632e00b13000585afb052e3b
2007-12-01 23:01:31 -08:00
Gabe Black
62c79ca637
X86: Implement the lgdt instruction.
...
--HG--
extra : convert_revision : d1698a82df3c57cc9bbf8d5d190f271bfc7cb2e4
2007-12-01 23:01:17 -08:00
Gabe Black
917ae9ec66
X86: Fix a stupid typo where WRMSR and RDMSR were switched, and add a debug statement.
...
--HG--
extra : convert_revision : f1eb17291f4c01f3c0fa8f99650bc1edf09d21de
2007-11-12 14:39:14 -08:00
Gabe Black
f1f5dd79bf
X86: Implement the wrcr microop which writes a control register, and some control register work.
...
--HG--
extra : convert_revision : 3e9daef9cdd0665c033420e5b4f981649e9908ab
2007-11-12 14:38:59 -08:00
Gabe Black
4d4d2883f9
X86: Implement some bit testing instructions.
...
--HG--
extra : convert_revision : 54585e276e44322be9c56af0b2eabfe8d4b3e430
2007-11-12 14:38:53 -08:00
Gabe Black
f9ddb894dd
X86: Change the meaning of the sext and zext width operand, and make sext set zext if the sign bit is 0.
...
--HG--
extra : convert_revision : 08bd7b4ff183038c016612d04ac73b20a255d141
2007-11-12 14:38:45 -08:00
Gabe Black
7d396b1bf6
X86: Use the cda microop where appropriate. The ENTER instruction still needs these.
...
--HG--
extra : convert_revision : c5a1a6d66c454f252d3b798c38a6798e7dd486f0
2007-10-22 14:39:40 -07:00
Gabe Black
43cb78004b
X86: Start using the stupd microop, and update statistics accordingly.
...
--HG--
extra : convert_revision : 4aa9daa4e19acfb3e6840ce5d83cf199e30c2f19
2007-10-21 18:45:46 -07:00
Gabe Black
4d15e4cf7b
X86: Implement the stupd microop ("store with update", not "stupid") and use it in ENTER.
...
--HG--
extra : convert_revision : 9151f701162d31ef26298497467c42b7b0ed85d5
2007-10-21 18:44:50 -07:00
Gabe Black
d8494325f0
X86: Implement the PUSHF, POPF, SAHF, and LAHF instructions.
...
--HG--
extra : convert_revision : 37c63b1133022fa3432888592f8c84785fb95091
2007-10-19 15:21:16 -07:00
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
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
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
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
674b6436b0
X86: Implemented the jrcx instruction.
...
--HG--
extra : convert_revision : d738015ff33449e55d8f1624c8467c1bba193e16
2007-10-18 22:37:08 -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
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
f4a932a6b3
X86: Fix places where movfp was used incorrectly.
...
--HG--
extra : convert_revision : a6b5688eaa53d2f6675df1be193726641e558d37
2007-10-02 22:58:48 -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
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
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
65c247f21f
X86: Add classes for the actual x86 faults.
...
--HG--
extra : convert_revision : bc060a01b5415551b335ca68ccbf126333ae20b0
2007-10-02 22:04:20 -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
3cd95a2748
X86: Implement the fld, fst, and fstp instructions.
...
--HG--
extra : convert_revision : 7dd274bdc3c34839c17d9012a745d7c95dfcfdd8
2007-09-19 18:28:34 -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
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
f7b6230d99
X86: Total overhaul of the division instructions and microops.
...
--HG--
extra : convert_revision : 303ea45f69f7805361ad877fe6bb43fbc3dfd7a6
2007-09-13 16:34:46 -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
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
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
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
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
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
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
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
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
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
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
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
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
4b3a20cdec
X86: Implement LEAVE
...
--HG--
extra : convert_revision : c642d5018ece82c644e1cfa389b2d3dbd6ab5ffd
2007-07-30 13:19:11 -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
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
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
7d826f632c
Implement NOT
...
--HG--
extra : convert_revision : 09cbed6332224d06644d401f21178eb7914993df
2007-07-26 22:03:19 -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
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
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
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
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
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
1ed6a8ed79
Define and fill out a lot of different instructions and instruction versions. Added two of the shift microops.
...
--HG--
extra : convert_revision : 0b76953dbb1dc3366242d4d209cccebde86bbe4e
2007-07-20 16:39:07 -07:00
Gabe Black
dfcb2ffa46
Comment, implement, fix, and trim the move microassembly.
...
--HG--
extra : convert_revision : aa5ee7270e740bfbe42e70c4dfccc4c91ecacb33
2007-07-20 15:04:41 -07:00
Gabe Black
fcc23891bb
Implement jnbe.
...
--HG--
extra : convert_revision : cdbf1ff5ed3a63787cbd2187a8a3455a41cc5085
2007-07-20 15:03:36 -07:00
Gabe Black
79b3208aa5
Appended _NEAR to the near version of call and return.
...
--HG--
extra : convert_revision : 70adb38d59ff7b5d103e58a9f0773dfb911fec6d
2007-07-20 15:03:03 -07:00
Gabe Black
d926de462a
Implement the increment and decrement instructions, and the two operand form of signed multiplication.
...
--HG--
extra : convert_revision : d87df4b1b5470bed1d963dfe8e2ffa1403718342
2007-07-20 14:59:14 -07:00
Gabe Black
cfadef74d1
x86 fixes
...
Make the emulation environment consider the rex prefix.
Implement and hook in forms of j, jmp, cmp, syscall, movzx
Added a format for an instruction to carry a call to the SE mode syscalls system
Made memory instructions which refer to the rip do so directly
Made the operand size overridable in the microassembly
Made the "ext" field of register operations 16 bits to hold a sparse encoding of flags to set or conditions to predicate on
Added an explicit "rax" operand for the syscall format
Implemented syscall returns.
--HG--
extra : convert_revision : ae84bd8c6a1d400906e17e8b8c4185f2ebd4c5f2
2007-07-19 15:15:47 -07:00
Gabe Black
dbf361128a
Implement near returns.
...
--HG--
extra : convert_revision : 3d6e8a976d31cb016a4b78200716b0ece155137a
2007-07-18 17:47:40 -07:00
Gabe Black
e209fce9de
Fix a comment to refer to the right type of instruction.
...
--HG--
extra : convert_revision : dd441d8fbaed1ed8b2b66e3ad0275009bd4dcef4
2007-07-18 17:44:12 -07:00
Gabe Black
6c54b654a8
Implement some forms of add.
...
--HG--
extra : convert_revision : adbff2e9b9952ec09853cc43d40243e7262410a7
2007-07-18 16:33:56 -07:00
Gabe Black
3bd42af99e
Implement the x86 nop to be a "fault" microop which returns "NoFault".
...
--HG--
extra : convert_revision : 1b446def756f1d0f80631db944d1cc41be95efbd
2007-07-18 16:10:44 -07:00
Gabe Black
2e80f71dcd
Implemented jnz.
...
--HG--
extra : convert_revision : ea169ad68acbb3383443586b783b831b3a9eecf9
2007-07-17 16:55:33 -07:00
Gabe Black
62ffc71fab
Use limm to set up immediate value for subtract instruction.
...
--HG--
extra : convert_revision : f94e391e36a47c2f5222f30d7e28f48f7875db58
2007-07-17 16:50:13 -07:00