f63c0d48b9e42d82e7162182c2473643d664d08d
1 /* insns.h header file for insns.c
2 * $Id: insns.h,v 1.1 2004/02/11 19:01:38 perrin Exp $
4 * The Netwide Assembler is copyright (C) 1996 Simon Tatham and
5 * Julian Hall. All rights reserved. The software is
6 * redistributable under the licence given in the file "Licence"
7 * distributed in the NASM archive.
13 /* This file is auto-generated from insns.dat by insns.pl - don't edit it */
15 /* This file in included by nasm.h */
17 /* Instruction names */
584 #define MAX_INSLEN 11
586 /* max length of any instruction, register name etc. */
587 #if MAX_INSLEN > 9 /* MAX_INSLEN defined in insnsi.h */
588 #define MAX_KEYWORD MAX_INSLEN
590 #define MAX_KEYWORD 9
594 int opcode
; /* the token, passed from "parser.c" */
595 int operands
; /* number of operands */
596 long opd
[3]; /* bit flags for operand types */
597 const char *code
; /* the code it assembles to */
598 unsigned long flags
; /* some flags */
602 * this define is used to signify the end of an itemplate
604 #define ITEMPLATE_END {-1,-1,{-1,-1,-1},NULL,0}
607 * Instruction template flags. These specify which processor
608 * targets the instruction is eligible for, whether it is
609 * privileged or undocumented, and also specify extra error
610 * checking on the matching of the instruction.
612 * IF_SM stands for Size Match: any operand whose size is not
613 * explicitly specified by the template is `really' intended to be
614 * the same size as the first size-specified operand.
615 * Non-specification is tolerated in the input instruction, but
616 * _wrong_ specification is not.
618 * IF_SM2 invokes Size Match on only the first _two_ operands, for
619 * three-operand instructions such as SHLD: it implies that the
620 * first two operands must match in size, but that the third is
621 * required to be _unspecified_.
623 * IF_SB invokes Size Byte: operands with unspecified size in the
624 * template are really bytes, and so no non-byte specification in
625 * the input instruction will be tolerated. IF_SW similarly invokes
626 * Size Word, and IF_SD invokes Size Doubleword.
628 * (The default state if neither IF_SM nor IF_SM2 is specified is
629 * that any operand with unspecified size in the template is
630 * required to have unspecified size in the instruction too...)
633 #define IF_SM 0x00000001UL /* size match */
634 #define IF_SM2 0x00000002UL /* size match first two operands */
635 #define IF_SB 0x00000004UL /* unsized operands can't be non-byte */
636 #define IF_SW 0x00000008UL /* unsized operands can't be non-word */
637 #define IF_SD 0x00000010UL /* unsized operands can't be nondword */
638 #define IF_AR0 0x00000020UL /* SB, SW, SD applies to argument 0 */
639 #define IF_AR1 0x00000040UL /* SB, SW, SD applies to argument 1 */
640 #define IF_AR2 0x00000060UL /* SB, SW, SD applies to argument 2 */
641 #define IF_ARMASK 0x00000060UL /* mask for unsized argument spec */
642 #define IF_PRIV 0x00000100UL /* it's a privileged instruction */
643 #define IF_SMM 0x00000200UL /* it's only valid in SMM */
644 #define IF_PROT 0x00000400UL /* it's protected mode only */
645 #define IF_UNDOC 0x00001000UL /* it's an undocumented instruction */
646 #define IF_FPU 0x00002000UL /* it's an FPU instruction */
647 #define IF_MMX 0x00004000UL /* it's an MMX instruction */
648 #define IF_3DNOW 0x00008000UL /* it's a 3DNow! instruction */
649 #define IF_SSE 0x00010000UL /* it's a SSE (KNI, MMX2) instruction */
650 #define IF_SSE2 0x00020000UL /* it's a SSE2 instruction */
651 #define IF_SSE3 0x00040000UL /* it's a SSE3 (PNI) instruction */
652 #define IF_PMASK 0xFF000000UL /* the mask for processor types */
653 #define IF_PLEVEL 0x0F000000UL /* the mask for processor instr. level */
654 /* also the highest possible processor */
655 #define IF_PFMASK 0xF001FF00UL /* the mask for disassembly "prefer" */
656 #define IF_8086 0x00000000UL /* 8086 instruction */
657 #define IF_186 0x01000000UL /* 186+ instruction */
658 #define IF_286 0x02000000UL /* 286+ instruction */
659 #define IF_386 0x03000000UL /* 386+ instruction */
660 #define IF_486 0x04000000UL /* 486+ instruction */
661 #define IF_PENT 0x05000000UL /* Pentium instruction */
662 #define IF_P6 0x06000000UL /* P6 instruction */
663 #define IF_KATMAI 0x07000000UL /* Katmai instructions */
664 #define IF_WILLAMETTE 0x08000000UL /* Willamette instructions */
665 #define IF_PRESCOTT 0x09000000UL /* Prescott instructions */
666 #define IF_IA64 0x0F000000UL /* IA64 instructions */
667 #define IF_CYRIX 0x10000000UL /* Cyrix-specific instruction */
668 #define IF_AMD 0x20000000UL /* AMD-specific instruction */