Renamed x64 to x86
This commit is contained in:
parent
f558a69366
commit
9c53235e7e
80 changed files with 1757 additions and 1757 deletions
19
src/x86/x64_test.go
Normal file
19
src/x86/x64_test.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package x86_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/x86"
|
||||
"git.akyoto.dev/go/assert"
|
||||
)
|
||||
|
||||
func TestX64(t *testing.T) {
|
||||
assert.DeepEqual(t, x86.AlignStack(nil), []byte{0x48, 0x83, 0xE4, 0xF0})
|
||||
assert.DeepEqual(t, x86.Call(nil, 1), []byte{0xE8, 0x01, 0x00, 0x00, 0x00})
|
||||
assert.DeepEqual(t, x86.CallAtAddress(nil, 1), []byte{0xFF, 0x15, 0x01, 0x00, 0x00, 0x00})
|
||||
assert.DeepEqual(t, x86.ExtendRAXToRDX(nil), []byte{0x48, 0x99})
|
||||
assert.DeepEqual(t, x86.MoveRegisterNumber(nil, 0, 1), []byte{0xB8, 0x01, 0x00, 0x00, 0x00})
|
||||
assert.DeepEqual(t, x86.MoveRegisterNumber(nil, 1, 1), []byte{0xB9, 0x01, 0x00, 0x00, 0x00})
|
||||
assert.DeepEqual(t, x86.Return(nil), []byte{0xC3})
|
||||
assert.DeepEqual(t, x86.Syscall(nil), []byte{0x0F, 0x05})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue