Added arm package
All checks were successful
/ test (push) Successful in 19s

This commit is contained in:
Eduard Urbach 2025-06-23 11:49:39 +02:00
parent bac5986425
commit 3ae47f93eb
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
45 changed files with 1417 additions and 0 deletions

25
src/arm/Call_test.go Normal file
View file

@ -0,0 +1,25 @@
package arm_test
import (
"testing"
"git.urbach.dev/cli/q/src/arm"
"git.urbach.dev/go/assert"
)
func TestCall(t *testing.T) {
usagePatterns := []struct {
Offset int
Code uint32
}{
{0, 0x94000000},
{1, 0x94000001},
{-1, 0x97FFFFFF},
}
for _, pattern := range usagePatterns {
t.Logf("bl %d", pattern.Offset)
code := arm.Call(pattern.Offset)
assert.Equal(t, code, pattern.Code)
}
}