URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [sh64/] [media/] [mextr2.cgs] - Rev 816
Go to most recent revision | Compare with Previous | Blame | View Log
# sh testcase for mextr2 $rm, $rn, $rd -*- Asm -*-
# mach: all
# as: -isa=shmedia
# ld: -m shelf64
.include "media/testutils.inc"
start
init:
# Put a distinguised bit pattern in R0.
movi 0x1020, r0
shlli r0, 8, r0
ori r0, 0x30, r0
shlli r0, 8, r0
ori r0, 0x40, r0
shlli r0, 8, r0
ori r0, 0x50, r0
shlli r0, 8, r0
ori r0, 0x60, r0
shlli r0, 8, r0
ori r0, 0x70, r0
shlli r0, 8, r0
ori r0, 0x80, r0
# Put another distinguished bit pattern in R1.
movi 0x1525, r1
shlli r1, 8, r1
ori r1, 0x35, r1
shlli r1, 8, r1
ori r1, 0x45, r1
shlli r1, 8, r1
ori r1, 0x55, r1
shlli r1, 8, r1
ori r1, 0x65, r1
shlli r1, 8, r1
ori r1, 0x75, r1
shlli r1, 8, r1
ori r1, 0x85, r1
mextr2:
mextr2 r0, r1, r2
check:
# Put the result in R3.
movi 0x3545, r3
shlli r3, 8, r3
ori r3, 0x55, r3
shlli r3, 8, r3
ori r3, 0x65, r3
shlli r3, 8, r3
ori r3, 0x75, r3
shlli r3, 8, r3
ori r3, 0x85, r3
shlli r3, 8, r3
ori r3, 0x10, r3
shlli r3, 8, r3
ori r3, 0x20, r3
pta wrong, tr0
bne r2, r3, tr0
okay:
pass
wrong:
fail
Go to most recent revision | Compare with Previous | Blame | View Log