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/] [media/] [fabss.cgs] - Rev 341
Compare with Previous | Blame | View Log
# sh testcase for fabs.s $frgh, $frf -*- Asm -*-
# mach: all
# as: -isa=shmedia
# ld: -m shelf64
.include "media/testutils.inc"
start
init:
pta wrong, tr0
movi 0, r0
movi 1, r1
fabs0:
# Ensure fabs(-1) = 1.
fmov.ls r0, fr7
float.ls fr7, fr0
fmov.ls r1, fr7
float.ls fr7, fr1
fsub.s fr0, fr1, fr2
fabs.s fr2, fr3
fcmpeq.s fr3, fr1, r7
bnei r7, 1, tr0
fabs1:
# Ensure fabs(1) = 1.
fmov.ls r0, fr7
float.ls fr7, fr0
fmov.ls r1, fr7
float.ls fr7, fr1
fabs.s fr1, fr2
fcmpeq.s fr1, fr2, r7
bnei r7, 1, tr0
okay:
pass
wrong:
fail