Simplified file structure
This commit is contained in:
parent
cacee7260a
commit
a466281307
219 changed files with 453 additions and 457 deletions
17
src/arch/x64/x64_test.go
Normal file
17
src/arch/x64/x64_test.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package x64_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/arch/x64"
|
||||
"git.akyoto.dev/go/assert"
|
||||
)
|
||||
|
||||
func TestX64(t *testing.T) {
|
||||
assert.DeepEqual(t, x64.Call(nil, 1), []byte{0xe8, 0x01, 0x00, 0x00, 0x00})
|
||||
assert.DeepEqual(t, x64.MoveRegisterNumber(nil, 0, 1), []byte{0xb8, 0x01, 0x00, 0x00, 0x00})
|
||||
assert.DeepEqual(t, x64.MoveRegisterNumber(nil, 1, 1), []byte{0xb9, 0x01, 0x00, 0x00, 0x00})
|
||||
assert.DeepEqual(t, x64.Return(nil), []byte{0xc3})
|
||||
assert.DeepEqual(t, x64.Syscall(nil), []byte{0x0f, 0x05})
|
||||
assert.DeepEqual(t, x64.ExtendRAXToRDX(nil), []byte{0x48, 0x99})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue