This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Custom Instructions
- From: Nick <nikos_ikono1989 at yahoo dot gr>
- To: binutils at sources dot redhat dot com
- Date: Fri, 17 Sep 2010 17:42:52 +0000 (UTC)
- Subject: Custom Instructions
Hello everybody,
since this is a group all about binutils, i hope i'm at the right place for my
question. if not, i'd like to apologise in advance; that is also the case if my
questions sound too silly (but i'm a real rookie...).
i'm trying to expand the instruction set recognised by the assembler (part of my
bachelor thesis)(for now only interested in intel architectures). i'm focusing
on binutils-2.20.51/opcodes/i386-opc.tbl, as my assumption is that a
modification of that file should bring the expected results (after re-compiling
gas).
the problem starts at the basics: no matter how much i've looked in the
interwebs, i still don't understand i386-opc.tbl. for example, i don't know what
the parts of this line mean: "mov, 2, 0xc6, 0x0, 1, 0, W|Modrm|No_sSuf|No_ldSuf,
{ Imm8|Imm16|Imm32|Imm32S,
Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex|Disp8|Disp16|
Disp32|Disp32S
}". ok, "mov" is the mnemonic, "2" is (guess) the number of operands, in
brackets the type of operands accepted (not all of them clear), but what about
the two hexadecimal values, the "1" and "0"(if not "0" then something like
"Cpu386", "Cpu64"), "No_*Suf"?
one further question would be, do i have to change other files as well (e.g.
i386-opc.h, i386-init.h etc)?
i would really appreciate an answer. sorry again for the, for you probably
trivial, questions.
greetings,
nick