URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 24 |
Rev 157 |
# sh testcase for xori $rm, $imm6, $rd -*- Asm -*-
|
# sh testcase for xori $rm, $imm6, $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
|
init:
|
init:
|
pta wrong, tr0
|
pta wrong, tr0
|
|
|
xori1:
|
xori1:
|
# 0 xor 0 = 0.
|
# 0 xor 0 = 0.
|
movi 0, r0
|
movi 0, r0
|
xori r0, 0, r2
|
xori r0, 0, r2
|
bnei r2, 0, tr0
|
bnei r2, 0, tr0
|
|
|
xori2:
|
xori2:
|
# 0 xor 1 = 1.
|
# 0 xor 1 = 1.
|
movi 0, r0
|
movi 0, r0
|
xori r0, 1, r2
|
xori r0, 1, r2
|
bnei r2, 1, tr0
|
bnei r2, 1, tr0
|
|
|
xori3:
|
xori3:
|
# 1 xor 0 = 1.
|
# 1 xor 0 = 1.
|
movi 1, r0
|
movi 1, r0
|
xori r0, 0, r2
|
xori r0, 0, r2
|
bnei r2, 1, tr0
|
bnei r2, 1, tr0
|
|
|
xori4:
|
xori4:
|
# 1 xor 1 = 0.
|
# 1 xor 1 = 0.
|
movi 1, r0
|
movi 1, r0
|
xori r0, 1, r2
|
xori r0, 1, r2
|
bnei r2, 0, tr0
|
bnei r2, 0, tr0
|
|
|
xori5:
|
xori5:
|
movi 1, r0
|
movi 1, r0
|
shlli r0, 63, r0
|
shlli r0, 63, r0
|
ori r0, 1, r0
|
ori r0, 1, r0
|
xori r0, 3, r2
|
xori r0, 3, r2
|
andi r2, 255, r2
|
andi r2, 255, r2
|
bnei r2, 2, tr0
|
bnei r2, 2, tr0
|
|
|
okay:
|
okay:
|
pass
|
pass
|
|
|
wrong:
|
wrong:
|
fail
|
fail
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.