This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Custom Instructions
- From: Ian Lance Taylor <iant at google dot com>
- To: Nick <nikos_ikono1989 at yahoo dot gr>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 17 Sep 2010 12:57:29 -0700
- Subject: Re: Custom Instructions
- References: <loom.20100917T183923-657@post.gmane.org>
Nick <nikos_ikono1989@yahoo.gr> writes:
> 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"?
See struct insn_template in opcodes/i386-opc.h.
> one further question would be, do i have to change other files as well (e.g.
> i386-opc.h, i386-init.h etc)?
It sort of depends on what you want to do, but probably not.
Ian