summaryrefslogtreecommitdiffstats
path: root/libcpu/defs/i386.doc
diff options
context:
space:
mode:
authorUlrich Drepper <[email protected]>2008-01-02 17:44:39 +0000
committerUlrich Drepper <[email protected]>2008-01-02 17:44:39 +0000
commit3cbdd387c752999255aea91600b5cfdefbeac7d0 (patch)
tree50c18bd26f8cd31f4c1aa3ce1d78bb98548659ba /libcpu/defs/i386.doc
parentad024afc93dcd0f4797b3e80bfb6b80c34da5c12 (diff)
propagate from branch 'com.redhat.elfutils.disasm' (head d15b4eb794e81e477f9896fe82a74cb5ecf4514c)
to branch 'com.redhat.elfutils' (head eaacbf01f8cc89d043ec6eca9b5e35cb5c4cde06)
Diffstat (limited to 'libcpu/defs/i386.doc')
-rw-r--r--libcpu/defs/i386.doc74
1 files changed, 74 insertions, 0 deletions
diff --git a/libcpu/defs/i386.doc b/libcpu/defs/i386.doc
new file mode 100644
index 00000000..732cd238
--- /dev/null
+++ b/libcpu/defs/i386.doc
@@ -0,0 +1,74 @@
+{imm} only parameter:
+ - is {s} in opcode: {s} == 0, unsigned (8/)16/32 bit immediate
+ {s} == 1, signed 8 bit immediate
+
+{es:di}: segment register normally %es, can be overwritten
+ edi/di depending on apfx
+
+{ds:si}: segment register normally %ds, can be overwritten
+ esi/si depending on apfx
+
+{ax} al/ax/eax depending of dpfx and w
+
+{dx} (%edx) or (%dx) depending on apfx
+
+
+{w} 0 = b, 1 = { no dpfx = l, dpfx = w }
+
+{W} no dpfx = <empty>, dpfx = w
+{WW} no dpfx = l, dpfx = w
+
+{R} rep prefix possible
+{RE} repe or repne prefix possible
+
+{ccc} CRx registers
+{ddd} DRx registers
+
+{gg} 00 = b, 01 = w, 10 = d, 11 = <illegal>
+{0g} 00 = b, 01 = w, 10 = <illegal>, 11 = <illegal>
+{GG} 00 = <illegal>, 01 = w, 10 = d, 11 = q
+{gG} 00 = <illegal>, 01 = w, 10 = d, 11 = <illegal>
+
+{modr/m} normal registers
+{MODR/M} MMX registers
+{ModR/m} XMM registers
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Special opcodes (prefixes):
+
+
+01100111:{apfx}
+01100110:{dpfx}
+
+00101110:{cs}
+00111110:{ds}
+00100110:{es}
+01100100:{fs}
+01100101:{gs}
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+table format
+
+1bit RE flag
+1bit R flag
+16bit mnemonic
+3bit suffix
+
+5bit fct
+2bit string
+6bit offset1
+5bit offset2
+
+4bit fct
+1bit string
+6bit offset1
+4bit offset2
+
+2bit fct
+1bit string
+3bit offset1
+1bit offset2
+
+61bit