The University of Texas at Austin

Department of Electrical and Computer Engineering# List of Instructions for the Project

Department of Electrical and Computer Engineering

EE 382N – Spring 2014

Yale N. Patt, Instructor

Faruk Guvenilir, Milad Hashemi, TAs

Yale N. Patt, Instructor

Faruk Guvenilir, Milad Hashemi, TAs

The following table contains all instruction variations you will implement in the project. It includes the instruction variations due to the operand size override and REP prefix; in addition, many instructions may be preceded by a segment override prefix (consult the manuals for details).

Opcode | Mnemonic | Description |
---|---|---|

`04 ` | `ADD AL,` | Add imm8 to AL |

`05 ` | `ADD AX,` | Add imm16 to AX |

`05 ` | `ADD EAX,` | Add imm32 to EAX |

`80 /0 ` | `ADD ` | Add imm8 to r/m8 |

`81 /0 ` | `ADD ` | Add imm16 to r/m16 |

`81 /0 ` | `ADD ` | Add imm32 to r/m32 |

`83 /0 ` | `ADD ` | Add sign-extended imm8 to r/m16 |

`83 /0 ` | `ADD ` | Add sign-extended imm8 to r/m32 |

`00 /` | `ADD ` | Add r8 to r/m8 |

`01 /` | `ADD ` | Add r16 to r/m16 |

`01 /` | `ADD ` | Add r32 to r/m32 |

`02 /` | `ADD ` | Add r/m8 to r8 |

`03 /` | `ADD ` | Add r/m16 to r16 |

`03 /` | `ADD ` | Add r/m32 to r32 |

`24 ` | `AND AL, ` | AL AND imm8 |

`25 ` | `AND AX, ` | AX AND imm16 |

`25 ` | `AND EAX, ` | EAX AND imm32 |

`80 /4 ` | `AND ` | r/m8 AND imm8 |

`81 /4 ` | `AND ` | r/m16 AND imm16 |

`81 /4 ` | `AND ` | r/m32 AND imm32 |

`83 /4 ` | `AND ` | r/m16 AND imm8 (sign-extended) |

`83 /4 ` | `AND ` | r/m32 AND imm8 (sign-extended) |

`20 /` | `AND ` | r/m8 AND r8 |

`21 /` | `AND ` | r/m16 AND r16 |

`21 /` | `AND ` | r/m32 AND r32 |

`22 /` | `AND ` | r8 AND r/m8 |

`23 /` | `AND ` | r16 AND r/m16 |

`23 /` | `AND ` | r32 AND r/m32 |

`0F AB /r ` | `BTS ` | Store selected bit in CF flag and set |

`0F AB /r ` | `BTS ` | Store selected bit in CF flag and set |

`0F BA /5 ` | `BTS ` | Store selected bit in CF flag and set |

`0F BA /5 ` | `BTS ` | Store selected bit in CF flag and set |

`E8 ` | `CALL ` | Call near, relative, displacement relative to next instruction |

`E8 ` | `CALL ` | Call near, relative, displacement relative to next instruction |

`FF /2` | `CALL ` | Call near, absolute indirect, address given in r/m16 |

`FF /2` | `CALL ` | Call near, absolute indirect, address given in r/m32 |

`9A ` | `CALL ` | Call far, absolute, address given in operand |

`FC` | `CLD` | Clear DF flag |

`0F 42 /` | `CMOVC ` | Move if carry (CF=1) |

`0F 42 /` | `CMOVC ` | Move if carry (CF=1) |

`A6` | `CMPS ` | Compare byte at address DS:(E)SI with byte at address ES:(E)DI |

`A7` | `CMPS ` | Compare word at address DS:(E)SI with word at address ES:(E)DI |

`A7` | `CMPS ` | Compare doubleword at address DS:(E)SI with doubleword at address ES:(E)DI |

`0F B0 /` | `CMPXCHG ` | Compare AL with r/m8. If equal, r/m8 = r8 and ZF=1. Else, ZF=0, AL=r/m8. |

`0F B1 /` | `CMPXCHG ` | Compare AX with r/m16. If equal, r/m16 = r16 and ZF=1. Else, ZF=0, AX=r/m16. |

`0F B1 /` | `CMPXCHG ` | Compare EAX with r/m32. If equal, r/m32 = r32 and ZF=1. Else, ZF=0, EAX=r/m32. |

`27` | `DAA` | Decimal adjust AL after addition |

`F4` | `HLT` | Halt |

`CF` | `IRETD` | Interrupt return (32-bit operand size) |

`77 ` | `JNBE ` | Jump short if not below or equal (CF=0 and ZF=0) |

`75 ` | `JNE ` | Jump short if not equal (ZF=0) |

`0F 87 ` | `JNBE ` | Jump near if not below or equal (CF=0 and ZF=0) |

`0F 87 ` | `JNBE ` | Jump near if not below or equal (CF=0 and ZF=0) |

`0F 85 ` | `JNE ` | Jump near if not equal (ZF=0) |

`0F 85 ` | `JNE ` | Jump near if not equal (ZF=0) |

`EB ` | `JMP ` | Jump short, relative, displacement relative to next instruction |

`E9 ` | `JMP ` | Jump near, relative, displacement relative to next instruction |

`E9 ` | `JMP ` | Jump near, relative, displacement relative to next instruction |

`FF /4` | `JMP ` | Jump near, absolute indirect, address given in r/m16 |

`FF /4` | `JMP ` | Jump near, absolute indirect, address given in r/m32 |

`EA ` | `JMP ` | Jump far, absolute, address given in operand |

`EA ` | `JMP ` | Jump far, absolute, address given in operand |

`88 /` | `MOV ` | Move r8 to r/m8 |

`89 /` | `MOV ` | Move r16 to r/m16 |

`89 /` | `MOV ` | Move r32 to r/m32 |

`8A /` | `MOV ` | Move r/m8 to r8 |

`8B /` | `MOV ` | Move r/m16 to r16 |

`8B /` | `MOV ` | Move r/m32 to r32 |

`8C /` | `MOV ` | Move segment register to r/m16 |

`8E /` | `MOV ` | Move r/m16 to segment register |

`B0+ ` | `MOV ` | Move imm8 to r8 |

`B8+ ` | `MOV ` | Move imm16 to r16 |

`B8+ ` | `MOV ` | Move imm32 to r32 |

`C6 /0` | `MOV ` | Move imm8 to r/m8 |

`C7 /0` | `MOV ` | Move imm16 to r/m16 |

`C7 /0` | `MOV ` | Move imm32 to r/m32 |

`0F 6F /` | `MOVQ ` | Move quadword from mm/m64 to mm. |

`0F 7F /` | `MOVQ ` | Move quadword from mm to mm/m64. |

`F6 /2` | `NOT ` | Reverse each bit of r/m8 |

`F7 /2` | `NOT ` | Reverse each bit of r/m16 |

`F7 /2` | `NOT ` | Reverse each bit of r/m32 |

`0F FE /` | `PADDD ` | Add packed doubleword integers from mm/m64 and mm. |

`8F /0` | `POP ` | Pop top of stack into m16; increment stack pointer |

`8F /0` | `POP ` | Pop top of stack into m32; increment stack pointer |

`58+ ` | `POP ` | Pop top of stack into r16; increment stack pointer |

`58+ ` | `POP ` | Pop top of stack into r32; increment stack pointer |

`1F` | `POP DS` | Pop top of stack into DS; increment stack pointer |

`07` | `POP ES` | Pop top of stack into ES; increment stack pointer |

`17` | `POP SS` | Pop top of stack into SS; increment stack pointer |

`0F A1` | `POP FS` | Pop top of stack into FS; increment stack pointer |

`0F A9` | `POP GS` | Pop top of stack into GS; increment stack pointer |

`0F 68 /` | `PUNPCKHBW ` | Unpack and interleave high-order bytes from mm and mm/m64 into mm. |

`FF /6` | `PUSH ` | Push r/m16 |

`FF /6` | `PUSH ` | Push r/m32 |

`50+` | `PUSH ` | Push r16 |

`50+` | `PUSH ` | Push r32 |

`6A` | `PUSH ` | Push imm8 |

`68` | `PUSH ` | Push imm16 |

`68` | `PUSH ` | Push imm32 |

`0E` | `PUSH CS` | Push CS |

`16` | `PUSH SS` | Push SS |

`1E` | `PUSH DS` | Push DS |

`06` | `PUSH ES` | Push ES |

`0F A0` | `PUSH FS` | Push FS |

`0F A8` | `PUSH GS` | Push GS |

`F3 A6` | `REPE CMPS ` | Find nonmatching bytes in ES:[(E)DI] and DS:[(E)SI] |

`F3 A7` | `REPE CMPS ` | Find nonmatching words in ES:[(E)DI] and DS:[(E)SI] |

`F3 A7` | `REPE CMPS ` | Find nonmatching doublewords in ES:[(E)DI] and DS:[(E)SI] |

`C3` | `RET` | Near return to calling procedure |

`CB` | `RET` | Far return to calling procedure |

`C2 ` | `RET ` | Near return to calling procedure and pop imm16 bytes from stack |

`CA ` | `RET ` | Far return to calling procedure and pop imm16 bytes from stack |

`D0 /4` | `SAL ` | Multiply r/m8 by 2, once |

`D2 /4` | `SAL ` | Multiply r/m8 by 2, CL times |

`C0 /4 ` | `SAL ` | Multiply r/m8 by 2, imm8 times |

`D1 /4` | `SAL ` | Multiply r/m16 by 2, once |

`D3 /4` | `SAL ` | Multiply r/m16 by 2, CL times |

`C1 /4 ` | `SAL ` | Multiply r/m16 by 2, imm8 times |

`D1 /4` | `SAL ` | Multiply r/m32 by 2, once |

`D3 /4` | `SAL ` | Multiply r/m32 by 2, CL times |

`C1 /4 ` | `SAL ` | Multiply r/m32 by 2, imm8 times |

`D0 /7` | `SAR ` | Signed divide r/m8 by 2, once |

`D2 /7` | `SAR ` | Signed divide r/m8 by 2, CL times |

`C0 /7 ` | `SAR ` | Signed divide r/m8 by 2, imm8 times |

`D1 /7` | `SAR ` | Signed divide r/m16 by 2, once |

`D3 /7` | `SAR ` | Signed divide r/m16 by 2, CL times |

`C1 /7 ` | `SAR ` | Signed divide r/m16 by 2, imm8 times |

`D1 /7` | `SAR ` | Signed divide r/m32 by 2, once |

`D3 /7` | `SAR ` | Signed divide r/m32 by 2, CL times |

`C1 /7 ` | `SAR ` | Signed divide r/m32 by 2, imm8 times |

`FD` | `STD` | Set DF flag |

`90+` | `XCHG AX,` | Exchange r16 with AX |

`90+` | `XCHG EAX,` | Exchange r32 with EAX |

`86 /` | `XCHG ` | Exchange r8 with r/m8 |

`87 /` | `XCHG ` | Exchange r16 with r/m16 |

`87 /` | `XCHG ` | Exchange r32 with r/m32 |