J. EFI Byte Code Virtual Machine Opcode List

The following table lists the opcodes for EBC instructions. Note that opcodes only require 6 bits of the opcode byte of EBC instructions. The other two bits are used for other encodings that are dependent on the particular instruction.

Table J.1 EBC Virtual Machine Opcode Summary

Opcode

Description

0x00

BREAK [break code]

0x01

JMP 32{cs {@}R1 {Immed32

0x02

JMP8 {cs Immed8

0x03

CALL 32{EX}{a} {@}R1 {Immed32

0x04

RET

0x05

CMP [32 R1, {@}R2 {Index16

0x06

CMP [32 R1, {@}R2 {Index16

0x07

CMP [32 R1, {@}R2 {Index16

0x08

CMP [32 R1, {@}R2 {Index16

0x09

CMP [32 R1, {@}R2 {Index16

0x0A

NOT [32 {@}R1, {@}R2 {Index16

0x0B

NEG [32 {@}R1,{@}R2 {Index16

0x0C

ADD [32 {@}R1,{@}R2 {Index16

0x0D

SUB [32 {@}R1,{@}R2 {Index16

0x0E

MUL [32 {@}R1,{@}R2 {Index16

0x0F

MULU [32 {@}R1,{@}R2 {Index16

0x10

DIV [32 {@}R1,{@}R2 {Index16

0x11

DIVU [32 {@}R1,{@}R2 {Index16

0x12

MOD [32 {@}R1,{@}R2 {Index16

0x13

MODU [32 {@}R1,{@}R2 {Index16

0x14

AND [32 {@}R1,{@}R2 {Index16

0x15

OR [32 {@}R1,{@}R2 {Index16

0x16

XOR [32 {@}R1,{@}R2 {Index16

0x17

SHL [32 {@}R1,{@}R2 {Index16

0x18

SHR [32 {@}R1,{@}R2 {Index16

0x19

ASHR [32 {@}R1,{@}R2 {Index16

0x1A

EXTNDB [32 {@}R1, {@}R2 {Index16

0x1B

EXTNDW [32 {@}R1,{@}R2 {Index16

0x1C

EXTNDD [32 {@}R1,{@}R2 {Index16

0x1D

MOV bw {@}R1 {Index16}, {@}R2 {Index16}

0x1E

MOV ww {@}R1 {Index16}, {@}R2 {Index16}

0x1F

MOV dw {@}R1 {Index16}, {@}R2 {Index16}

0x20

MOV qw {@}R1 {Index16}, {@}R2 {Index16}

0x21

MOV bd {@}R1 {Index32}, {@}R2 {Index32}

0x22

MOV wd {@}R1 {Index32}, {@}R2 {Index32}

0x23

MOV dd {@}R1 {Index32}, {@}R2 {Index32}

0x24

MOV qd {@}R1 {Index32}, {@}R2 {Index32}

0x25

MOVsn w {@}R1 {Index16}, {@}R2 {Index16

0x26

MOVsn d {@}R1 {Index32}, {@}R2 {Index32

0x27

Reserved

0x28

MOV qq {@}R1 {Index64}, {@}R2 {Index64}

0x29

LOADSP [Flags], R2

0x2A

STORESP R1, [IP|Flags]

0x2B

PUSH [32 {@}R1 {Index16

0x2C

POP [32 {@}R1 {Index16

0x2D

CMPI [32 {@}R1 {Index16}, Immed16

0x2E

CMPI [32 {@}R1 {Index16}, Immed16

0x2F

CMPI [32 {@}R1 {Index16}, Immed16

0x30

CMPI [32 {@}R1 {Index16}, Immed16

0x31

CMPI [32 {@}R1 {Index16}, Immed16

0x32

MOVn w {@}R1 {Index16}, {@}R2 {Index16}

0x33

MOVn d {@}R1 {Index32}, {@}R2 {Index32}

0x34

Reserved

0x35

PUSHn {@}R1 {Index16

0x36

POPn {@}R1 {Index16

0x37

MOVI [b {@}R1 {Index16}, Immed16

0x38

MOVIn [w {@}R1 {Index16}, Index16

0x39

MOVREL [w {@}R1 {Index16}, Immed16

0x3A

Reserved

0x3B

Reserved

0x3C

Reserved

0x3D

Reserved

0x3E

Reserved

0x3F

Reserved