Implemented register to register instructions
This commit is contained in:
parent
1c27f0cad2
commit
a9d43a8716
11 changed files with 171 additions and 16 deletions
7
src/build/arch/x64/REX.go
Normal file
7
src/build/arch/x64/REX.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package x64
|
||||
|
||||
// REX is used to generate a REX prefix.
|
||||
// w, r, x and b can only be set to either 0 or 1.
|
||||
func REX(w, r, x, b byte) byte {
|
||||
return 0b_0100_0000 | (w << 3) | (r << 2) | (x << 1) | b
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue