Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
EFI Byte Code Virtual Machine
Version 1.10 12/01/02 19-9
19.6 EBC Instruction Syntax
Most EBC instructions have one or more variations that modify the size of the instruction and/or
the behavior of the instruction itself. These variations will typically modify an instruction in one or
more of the following ways:
The size of the data being operated upon
The addressing mode for the operands
The size of index or immediate data
To represent these variations syntactically in this specification the following conventions are used:
Natural indexes are indicated with the Index keyword, and may take the form of Index16,
Index32, or Index64 to indicate the size of the index value supported. Sometimes the form
Index16|32|64 is used here, which is simply a shorthand notation for Index16|Index32|Index64.
A natural index is encoded per Table 19-4 and is resolved at runtime.
Immediate values are indicated with the Immed keyword, and may take the form of
Immed16, Immed32, or Immed64 to indicate the size of the immediate value supported.
The shorthand notation Immed16|32|64 is sometimes used when different size immediate
values are supported.
Terms in brackets [ ] are required.
Terms in braces { } are optional.
Alternate terms are separated by a vertical bar |.
The form R
1
and R
2
represent Operand 1 register and Operand 2 register respectfully, and can
typically be any VM general-purpose register R0-R7.
Within descriptions of the instructions, brackets [ ] enclosing a register and/or index indicate
that the contents of the memory pointed to by the enclosed contents are used.
19.7 Instruction Encoding
Most EBC instructions take the form:
INSTRUCTION R
1
, R
2
Index|Immed
For those instructions that adhere to this form, the binary encoding for the instruction will typically
consist of an opcode byte, followed by an operands byte, followed by two or more bytes of
immediate or index data. Thus the instruction stream will be:
(1 Byte Opcode) + (1 Byte Operands) + (Immediate data|Index data)