asm/win: add same physical register access tests

This commit is contained in:
Denis Drakhnia 2024-01-13 15:14:10 +02:00
parent 9eac08d540
commit 639b4ac7bd
3 changed files with 60 additions and 0 deletions

View File

@ -70,6 +70,8 @@ asm_tests = {
'out-of-bounds-2': { 'should_fail': true }, 'out-of-bounds-2': { 'should_fail': true },
'out-of-bounds-3': { 'should_fail': true }, 'out-of-bounds-3': { 'should_fail': true },
'br-1': {}, 'br-1': {},
'same-reg-access-1': {},
'same-reg-access-2': {},
}, },
'ct': { 'ct': {
'ibranch-1': {}, 'ibranch-1': {},

View File

@ -0,0 +1,29 @@
#include "test_start.S"
{
setwd wsz=8, nfx=1
setbn rsz=3, rbs=4, rcur=0
}
{
ldd,0 [ mem ], %empty
}
{
addd,1 0, 0, %r8
addd,2 0, 0, %r9
}
{
ldd,0 [ mem ], %r8
ldd,2 [ mem ], %r9
}
{
addd,0 %b[0], 0, %r0
addd,2 %b[1], 0, %r1
}
assert_eq_i64(%r0, 0xdeadbeef)
assert_eq_i64(%r1, 0xdeadbeef)
#include "test_end.S"
.section ".rodata"
mem:
.quad 0xdeadbeef

View File

@ -0,0 +1,29 @@
#include "test_start.S"
{
setwd wsz=8, nfx=1
setbn rsz=3, rbs=4, rcur=0
}
{
ldd,0 [ mem ], %empty
}
{
addd,1 0, 0, %b[0]
addd,2 0, 0, %b[1]
}
{
ldd,0 [ mem ], %b[0]
ldd,2 [ mem ], %b[1]
}
{
addd,0 %r8, 0, %r0
addd,2 %r9, 0, %r1
}
assert_eq_i64(%r0, 0xdeadbeef)
assert_eq_i64(%r1, 0xdeadbeef)
#include "test_end.S"
.section ".rodata"
mem:
.quad 0xdeadbeef