URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 157 |
Rev 223 |
# sh testcase for byterev $rm, $rd -*- Asm -*-
|
# sh testcase for byterev $rm, $rd -*- Asm -*-
|
# mach: all
|
# mach: all
|
# as: -isa=shmedia
|
# as: -isa=shmedia
|
# ld: -m shelf64
|
# ld: -m shelf64
|
|
|
.include "media/testutils.inc"
|
.include "media/testutils.inc"
|
|
|
start
|
start
|
pta wrong, tr0
|
pta wrong, tr0
|
init:
|
init:
|
# Put a distinctive pattern in r0.
|
# Put a distinctive pattern in r0.
|
movi 10, r0
|
movi 10, r0
|
shlli r0, 8, r0
|
shlli r0, 8, r0
|
ori r0, 20, r0
|
ori r0, 20, r0
|
shlli r0, 8, r0
|
shlli r0, 8, r0
|
ori r0, 30, r0
|
ori r0, 30, r0
|
shlli r0, 8, r0
|
shlli r0, 8, r0
|
ori r0, 40, r0
|
ori r0, 40, r0
|
shlli r0, 8, r0
|
shlli r0, 8, r0
|
ori r0, 50, r0
|
ori r0, 50, r0
|
shlli r0, 8, r0
|
shlli r0, 8, r0
|
ori r0, 60, r0
|
ori r0, 60, r0
|
shlli r0, 8, r0
|
shlli r0, 8, r0
|
ori r0, 70, r0
|
ori r0, 70, r0
|
shlli r0, 8, r0
|
shlli r0, 8, r0
|
ori r0, 80, r0
|
ori r0, 80, r0
|
|
|
byterev:
|
byterev:
|
byterev r0, r1
|
byterev r0, r1
|
|
|
check:
|
check:
|
andi r1, 255, r2
|
andi r1, 255, r2
|
movi 10, r3
|
movi 10, r3
|
bne r2, r3, tr0
|
bne r2, r3, tr0
|
shlri r1, 8, r1
|
shlri r1, 8, r1
|
andi r1, 255, r2
|
andi r1, 255, r2
|
movi 20, r3
|
movi 20, r3
|
bne r2, r3, tr0
|
bne r2, r3, tr0
|
shlri r1, 8, r1
|
shlri r1, 8, r1
|
andi r1, 255, r2
|
andi r1, 255, r2
|
movi 30, r3
|
movi 30, r3
|
bne r2, r3, tr0
|
bne r2, r3, tr0
|
shlri r1, 8, r1
|
shlri r1, 8, r1
|
andi r1, 255, r2
|
andi r1, 255, r2
|
movi 40, r3
|
movi 40, r3
|
bne r2, r3, tr0
|
bne r2, r3, tr0
|
shlri r1, 8, r1
|
shlri r1, 8, r1
|
andi r1, 255, r2
|
andi r1, 255, r2
|
movi 50, r3
|
movi 50, r3
|
bne r2, r3, tr0
|
bne r2, r3, tr0
|
shlri r1, 8, r1
|
shlri r1, 8, r1
|
andi r1, 255, r2
|
andi r1, 255, r2
|
movi 60, r3
|
movi 60, r3
|
bne r2, r3, tr0
|
bne r2, r3, tr0
|
shlri r1, 8, r1
|
shlri r1, 8, r1
|
andi r1, 255, r2
|
andi r1, 255, r2
|
movi 70, r3
|
movi 70, r3
|
bne r2, r3, tr0
|
bne r2, r3, tr0
|
shlri r1, 8, r1
|
shlri r1, 8, r1
|
andi r1, 255, r2
|
andi r1, 255, r2
|
movi 80, r3
|
movi 80, r3
|
bne r2, r3, tr0
|
bne r2, r3, tr0
|
|
|
okay:
|
okay:
|
pass
|
pass
|
wrong:
|
wrong:
|
fail
|
fail
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.