Fixed spelling and grammar.
[oota-llvm.git] / lib / Target / X86 / X86InstrInfo.def
1 //===-- X86InstructionInfo.def - X86 Instruction Information ----*- C++ -*-===//
2 //
3 // This file describes all of the instructions that the X86 backend uses.  It
4 // relys on an external 'I' macro being defined that takes the arguments
5 // specified below, and is used to make all of the information relevant to an
6 // instruction be in one place.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // NOTE: No include guards desired
11
12 #ifndef I
13 #errror "Must define I macro before including X86/X86InstructionInfo.def!"
14 #endif
15
16 // Arguments to be passed into the I macro
17 //  #1: Enum name - This ends up being the opcode symbol in the X86 namespace
18 //  #2: Opcode name, as used by the gnu assembler
19 //  #3: Instruction Flags - This should be a field or'd together that contains
20 //      constants from the MInstructionInfo.h file.
21 //  #4: Target Specific Flags - Another bitfield containing X86 specific flags
22 //      that we are interested in for each instruction
23 //
24
25 // The first instruction must always be the PHI instruction:
26 I(PHI         , "phi",                0, 0)
27
28 // The second instruction must always be the noop instruction
29 I(NOOP        , "nop",                0, 0)      // nop          90
30
31 // Miscellaneous instructions
32 I(RET         , "ret",         MIF::RET, 0)      // ret          CB
33
34 // Move instructions
35 I(MOVir8      , "movb",               0, 0)      // R = imm8     B0+ rb
36 I(MOVir16     , "movw",               0, 0)      // R = imm16    B8+ rw
37 I(MOVir32     , "movl",               0, 0)      // R = imm32    B8+ rd
38
39 // Arithmetic instructions
40 I(ADDrr8      , "addb",               0, 0)      // R8  += R8    00/r
41 I(ADDrr16     , "addw",               0, 0)      // R16 += R16   01/r
42 I(ADDrr32     , "addl",               0, 0)      // R32 += R32   02/r
43
44
45 // At this point, I is dead to undefine the macro
46 #undef I