Compare commits

...

3 Commits

14 changed files with 194 additions and 12 deletions

23
cross/e2k-linux-old.txt Normal file
View File

@ -0,0 +1,23 @@
[constants]
arch = 'e2k-linux'
sysroot = '/opt/mcst/fs/e2k-v' + iset
toolchain = '/opt/mcst/lcc-e2k-v' + iset / 'bin.toolchain'
common_flags = ['-mcpu=' + mcpu]
[built-in options]
c_args = common_flags
cpp_args = common_flags
c_link_args = common_flags
cpp_link_args = common_flags
[binaries]
c = toolchain / arch + '-cc'
cpp = toolchain / arch + '-c++'
strip = toolchain / arch + '-strip'
exe_wrapper = ['qemu-e2k', '-cpu', cpu + ',tags=on', '-L', sysroot]
[host_machine]
system = 'linux'
cpu_family = 'e2k'
cpu = cpu
endian = 'little'

23
cross/e2k-linux.txt Normal file
View File

@ -0,0 +1,23 @@
[constants]
arch = 'e2k-linux'
sysroot = '/opt/mcst/fs/e2k-v' + iset
toolchain = '/opt/mcst/lcc-e2k-v' + iset / 'bin.toolchain'
common_flags = ['-mtune=' + mcpu, '--sysroot', sysroot]
[built-in options]
c_args = common_flags
cpp_args = common_flags
c_link_args = common_flags
cpp_link_args = common_flags
[binaries]
c = toolchain / arch + '-cc'
cpp = toolchain / arch + '-c++'
strip = toolchain / arch + '-strip'
exe_wrapper = ['qemu-e2k', '-cpu', cpu + ',tags=on', '-L', sysroot]
[host_machine]
system = 'linux'
cpu_family = 'e2k'
cpu = cpu
endian = 'little'

5
cross/e2k-v1.txt Normal file
View File

@ -0,0 +1,5 @@
[constants]
cpu = 'elbrus'
mcpu = cpu
iset = '1'
toolchain = '/opt/mcst/lcc/bin.toolchain'

5
cross/e2k-v2.txt Normal file
View File

@ -0,0 +1,5 @@
[constants]
cpu = 'e2c+'
mcpu = 'elbrus-2c+'
iset = '2'
toolchain = '/opt/mcst/lcc/bin.toolchain'

5
cross/e2k-v3.txt Normal file
View File

@ -0,0 +1,5 @@
[constants]
cpu = 'e4c'
mcpu = 'elbrus-4c'
iset = '3'
toolchain = '/opt/mcst/lcc/bin.toolchain'

5
cross/e2k-v4.txt Normal file
View File

@ -0,0 +1,5 @@
[constants]
cpu = 'e8c'
mcpu = 'elbrus-8c'
iset = '4'
toolchain = '/opt/mcst/lcc/bin.toolchain'

5
cross/e2k-v5.txt Normal file
View File

@ -0,0 +1,5 @@
[constants]
cpu = 'e8c2'
mcpu = 'elbrus-8c2'
iset = '5'
toolchain = '/opt/mcst/lcc/bin.toolchain'

5
cross/e2k-v6.txt Normal file
View File

@ -0,0 +1,5 @@
[constants]
cpu = 'e16c'
mcpu = 'elbrus-16c'
iset = '6'
toolchain = '/opt/mcst/lcc/bin.toolchain'

4
cross/e2k-v7.txt Normal file
View File

@ -0,0 +1,4 @@
[constants]
cpu = 'e48c'
mcpu = 'elbrus-48c'
iset = '7'

View File

@ -1,12 +0,0 @@
[binaries]
c = 'e2k-linux-cc'
cpp = 'e2k-linux-c++'
ar = 'e2k-linux-ar'
strip = 'e2k-linux-strip'
exe_wrapper = 'qemu-e2k'
[host_machine]
system = 'linux'
cpu_family = 'e2k'
cpu = 'e8c'
endian = 'little'

View File

@ -70,6 +70,8 @@ asm_tests = {
'out-of-bounds-2': { 'should_fail': true },
'out-of-bounds-3': { 'should_fail': true },
'br-1': {},
'same-reg-access-1': {},
'same-reg-access-2': {},
},
'ct': {
'ibranch-1': {},
@ -221,6 +223,9 @@ asm_tests = {
'stmqp-page-3': { 'src': 'stmqp-page-1', 'c_args': ['-DMIN_VER=6'] },
'stmqp-page-4': { 'src': 'stmqp-page-2', 'c_args': ['-DMIN_VER=6'] },
},
'v7': {
'qpack-1': {},
},
}
foreach suite, tests : asm_tests

51
tests/asm/v7/qpack-1.S Normal file
View File

@ -0,0 +1,51 @@
#include "test_start.S"
setwd wsz=4, nfx=1
{
addd,0 0, 0x0706050403020100, %g16
addd,1 0, 0x0f0e0d0c0b0a0908, %g17
}
{
addd,0 0, 0x7060504030201000, %g18
addd,1 0, 0xf0e0d0c0b0a09080, %g19
}
{
qppackdl,0 %g17, %g16, %g16
qppackdl,1 %g19, %g18, %g17
}
{
qpackhbss,0 %g16, %g17, %r0
qpackhbus,1 %g16, %g17, %r1
qpackwhss,3 %g16, %g17, %r2
qpackwhus,4 %g16, %g17, %r3
}
{
qpacksshb,1 %g16, %g17, %r4
qpackushb,4 %g16, %g17, %r5
}
{
qpacksswh,1 %g16, %g17, %r6
qpackuswh,4 %g16, %g17, %r7
}
assert_eq_i64(%r0, %r4)
assert_eq_i64(%r1, %r5)
assert_eq_i64(%r2, %r6)
assert_eq_i64(%r3, %r7)
{
qpswitchd,0 %r0, %r0
qpswitchd,1 %r1, %r1
qpswitchd,3 %r2, %r2
qpswitchd,4 %r3, %r3
}
{
qpswitchd,0 %r4, %r4
qpswitchd,1 %r5, %r5
qpswitchd,3 %r6, %r6
qpswitchd,4 %r7, %r7
}
assert_eq_i64(%r0, %r4)
assert_eq_i64(%r1, %r5)
assert_eq_i64(%r2, %r6)
assert_eq_i64(%r3, %r7)
#include "test_end.S"

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