mirror of
https://git.wownero.com/wownero/RandomWOW.git
synced 2024-08-15 00:23:14 +00:00
Code generator fixups
- fixed a crash in Instruction::print - new example program - added a design note about the number of x86 instruction per VM instruction
This commit is contained in:
parent
77f809e8db
commit
e6ba0a1b7d
4 changed files with 956 additions and 953 deletions
|
@ -133,6 +133,10 @@ This section describes the design of the RandomX virtual machine (VM).
|
|||
|
||||
RandomX uses a fixed-length instruction encoding with 8 bytes per instruction. This allows a 32-bit immediate value to be included in the instruction word. The interpretation of the instruction word bits was chosen so that any 8-byte word is a valid instruction. This allows for very efficient random program generation (see chapter 1.1.1).
|
||||
|
||||
#### 2.1.1 Instruction complexity
|
||||
|
||||
The VM is a complex instruction set machine that allows both register and memory addressed operands. However, each RandomX instructions translates to only 1-7 x86 instructions (1.8 on average). It is important to keep the instruction complexity relatively low to minimize the efficiency advantage of specialized hardware with a tailored instruction set.
|
||||
|
||||
### 2.2 Program
|
||||
|
||||
The program executed by the VM has the form of a loop consisting of 256 random instructions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue