Implemented array storage

This commit is contained in:
2024-07-20 17:35:26 +02:00
parent d35c07ed1c
commit 155df7c44c
17 changed files with 150 additions and 45 deletions

View File

@ -13,7 +13,7 @@ func TestLoadRegister(t *testing.T) {
Destination cpu.Register
Source cpu.Register
Offset byte
NumBytes byte
Length byte
Code []byte
}{
// No offset
@ -150,8 +150,8 @@ func TestLoadRegister(t *testing.T) {
}
for _, pattern := range usagePatterns {
t.Logf("load %dB %s, [%s+%d]", pattern.NumBytes, pattern.Destination, pattern.Source, pattern.Offset)
code := x64.LoadRegister(nil, pattern.Destination, pattern.Offset, pattern.NumBytes, pattern.Source)
t.Logf("load %dB %s, [%s+%d]", pattern.Length, pattern.Destination, pattern.Source, pattern.Offset)
code := x64.LoadRegister(nil, pattern.Destination, pattern.Offset, pattern.Length, pattern.Source)
assert.DeepEqual(t, code, pattern.Code)
}
}