OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [fmac.cgs] - Blame information for rev 26

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 jlechner
# sh testcase for fmac -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        start
9
 
10
        # 0.0 * x + y = y.
11
 
12
        fldi0 fr0
13
        fldi1 fr1
14
        fldi1 fr2
15
        fmac fr0, fr1, fr2
16
        # check result.
17
        fldi1 fr0
18
        fcmp/eq fr0, fr2
19
        bf wrong
20
 
21
        # x * y + 0.0 = x * y.
22
 
23
        fldi1 fr0
24
        fldi1 fr1
25
        fldi0 fr2
26
        # double it.
27
        fadd fr1, fr2
28
        fmac fr0, fr1, fr2
29
        # check result.
30
        fldi1 fr0
31
        fadd fr0, fr0
32
        fcmp/eq fr0, fr2
33
        bf wrong
34
 
35
        # x * 0.0 + y = y.
36
 
37
        fldi1 fr0
38
        fldi0 fr1
39
        fldi1 fr2
40
        fadd fr2, fr2
41
        fmac fr0, fr1, fr2
42
        # check result.
43
        fldi1 fr0
44
        # double fr0.
45
        fadd fr0, fr0
46
        fcmp/eq fr0, fr2
47
        bf wrong
48
 
49
        # x * 0.0 + 0.0 = 0.0
50
 
51
        fldi1 fr0
52
        fadd fr0, fr0
53
        fldi0 fr1
54
        fldi0 fr2
55
        fmac fr0, fr1, fr2
56
        # check result.
57
        fldi0 fr0
58
        fcmp/eq fr0, fr2
59
        bf wrong
60
 
61
        # 0.0 * x + 0.0 = 0.0.
62
 
63
        fldi0 fr0
64
        fldi1 fr1
65
        # double it.
66
        fadd fr1, fr1
67
        fldi0 fr2
68
        fmac fr0, fr1, fr2
69
        # check result.
70
        fldi0 fr0
71
        fcmp/eq fr0, fr2
72
        bf wrong
73
 
74
okay:
75
        pass
76
 
77
wrong:
78
        fail

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.