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-6.8/] [pre-binutils-2.20.1-sync/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [neg.cgs] - Rev 157
Go to most recent revision | Compare with Previous | Blame | View Log
# sh testcase for neg $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
.macro signbit sign
shlr16 r1
shlr8 r1
shlr r1
shlr r1
shlr r1
shlr r1
shlr r1
shlr r1
shlr r1
assert r1, \sign
.endm
start
.global neg
neg:
mov #0, r0
neg r0, r1
signbit #0
mov #42, r0
neg r0, r1
signbit #1
mov #0, r0
or #25, r0
neg r0, r1
signbit #1
# neg(0) is 0.
mov #0, r0
neg r0, r1
signbit #0
# neg(neg(x)) = x.
mov #42, r0
neg r0, r1
signbit #1
mov #42, r0
neg r0, r2
neg r2, r1
signbit #0
okay:
pass
wrong:
fail
Go to most recent revision | Compare with Previous | Blame | View Log