URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [sh64/] [media/] [xor.cgs] - Rev 308
Go to most recent revision | Compare with Previous | Blame | View Log
# sh testcase for xor $rm, $rn, $rd -*- Asm -*-
# mach: all
# as: -isa=shmedia
# ld: -m shelf64
.include "media/testutils.inc"
start
init:
pta wrong, tr0
xor1:
# 0 xor 0 = 0.
movi 0, r0
movi 0, r1
xor r0, r1, r2
bnei r2, 0, tr0
xor2:
# 0 xor 1 = 1.
movi 0, r0
movi 1, r1
xor r0, r1, r2
bnei r2, 1, tr0
xor3:
# 1 xor 0 = 1.
movi 1, r0
movi 0, r1
xor r0, r1, r2
bnei r2, 1, tr0
xor4:
# 1 xor 1 = 0.
movi 1, r0
movi 1, r1
xor r0, r1, r2
bnei r2, 0, tr0
xor5:
movi 1, r0
shlli r0, 63, r0
ori r0, 1, r0
movi 3, r1
xor r0, r1, r2
andi r2, 255, r2
bnei r2, 2, tr0
okay:
pass
wrong:
fail
Go to most recent revision | Compare with Previous | Blame | View Log