Implemented register to register instructions

This commit is contained in:
2024-06-23 20:26:53 +02:00
parent 31845dbc48
commit 4fc1935183
11 changed files with 171 additions and 16 deletions

View File

@ -0,0 +1,9 @@
package x64
// ModRM is used to generate a ModRM suffix.
// - mod: 2 bits
// - reg: 3 bits
// - rm: 3 bits
func ModRM(mod byte, reg byte, rm byte) byte {
return (mod << 6) | (reg << 3) | rm
}