Commit Graph

10 Commits

Author SHA1 Message Date
Ben Rudiak-Gould
6e87893f06 Drop SAME_AS flag from instruction matcher
It was there to support the SSE5 DREX encoding,
which as far as I know is dead forever.

Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-03-04 00:46:16 +04:00
Ben Rudiak-Gould
d1ac29a3cc insns: Remove pushseg/popseg internal bytecodes
This patch is getting rid of the following bytecodes
'pushseg','popseg','pushseg2','popseg2' and simplifies
overall code.

[gorcunov@: a few style fixes]
Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-03-03 20:50:46 +04:00
Ben Rudiak-Gould
4e8396b5cf Remove +s
It doesn't seem worth >200 lines of C and Perl to save ~50 lines in insns.dat.

In order to make this work I had to rename sbyte16/sbyte32 so that
they can take an ordinary size suffix (their size suffix was formerly
treated specially).

This fixes one disassembly bug: 48C7C000000080 disassembles to mov
rax,0x80000000, which reassembles to B800000080, which loads a
different value.

Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-03-01 10:28:32 +04:00
Cyrill Gorcunov
6e8bbfb62c opflags: Rework opflags bits with OP_ macros
In this path the opflags bits are completely reworked
in a sake of simplier extension. Inparticular for Knights
Corener instructions we will need new registers and new
sizes.

What's done

 - all bits are grouped in sequences, and start using OP_
   macros, thus if one need to extend some field -- just
   tune up @shift and @bits where needed

 - the #define we use in code are OR'ed in symbols, this
   should be a way more convenient to deal with instead of
   pure hex numbers.

The tests are passed but more eyes needed to review this
rather big and intrusive patch. The reason why it's done
in one single path -- for revertability in one command.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2012-09-16 23:23:56 +04:00
Cyrill Gorcunov
220ac6544c opflags: Introduce opflags generating macros
This patch introduces two macros

 - OP_GENMASK, to generate masks in opflags
 - OP_GENBIT, to generate bit at specified position

we will use them with extended 64 bits opflags.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2012-09-16 23:23:43 +04:00
Cyrill Gorcunov
abfb6348fa opflags: Drop never used REG_RIP/REG_EIP
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2012-09-16 23:23:28 +04:00
Cyrill Gorcunov
167917abe5 opflags: Extend opflags_t to 64 bits
Soon we will need to encode 512 bits values
thus there is no space left in our opflags_t
which is 32 bitfield.

Extend it to 64 bits width.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2012-09-10 01:35:38 +04:00
Cyrill Gorcunov
5abbe375cf Add IS_SREG and IS_FSGS helpers
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 18:49:00 +04:00
H. Peter Anvin
9df010725f Optimize mov r64,imm
Handle immediate-size optimization for "mov r64,imm" -- reduce it to
"mov r32,imm32" or "mov r64,imm32" as appropriate.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-08-24 14:08:16 -07:00
H. Peter Anvin
f8563f7a98 opflags: more int32_t -> opflags_t conversions
Hopefully this should catch all of them... but please keep an eye out
for any other uses of int32_t for the operand flags.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-10-13 12:29:01 -07:00