URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gdb-7.2/] [gdb-7.2-or32-1.0rc1/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [sub.cgs] - Rev 341
Compare with Previous | Blame | View Log
# sh testcase for sub $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global sub1
sub1:
# 0 - x.
mov #0, r0
mov #3, r1
sub r1, r0
mov #2, r7
not r7, r7
cmp/eq r7, r0
bf wrong
.global sub2
sub2:
# x - 0.
mov #0, r0
mov #3, r1
sub r0, r1
assert r1, #3
.global sub3
sub3:
# x - y.
mov #4, r0
mov #3, r1
sub r0, r1
mov #0, r7
not r7, r7
cmp/eq r7, r1
bf wrong
.global sub4
sub4:
# y - x.
mov #4, r0
mov #3, r1
sub r1, r0
assert r0, #1
.global sub5
sub5:
# y - y == 0 (where y are in two distinct registers).
mov #4, r0
mov #4, r1
sub r1, r0
assert r0, #0
.global sub6
sub6:
# y - y = 0 (where y is the same register).
mov #4, r1
sub r1, r1
assert r1, #0
okay:
pass
wrong:
fail