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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [float.cgs] - Blame information for rev 280

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for float -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        start
9
 
10
pos:
11
        mov #3, r0
12
        lds r0, fpul
13
        float fpul, fr7
14
 
15
        # Check the result.
16
        fldi1 fr0
17
        fldi1 fr1
18
        fadd fr0, fr1
19
        fadd fr0, fr1
20
        fcmp/eq fr1, fr7
21
        bf wrong
22
 
23
neg:
24
        mov #3, r0
25
        neg r0, r0
26
        lds r0, fpul
27
        float fpul, fr7
28
 
29
        # Check the result.
30
        fldi1 fr0
31
        fldi1 fr1
32
        fadd fr0, fr1
33
        fadd fr0, fr1
34
        fneg fr1
35
        fcmp/eq fr1, fr7
36
        bf wrong
37
 
38
        bra double
39
        nop
40
 
41
wrong:
42
        fail
43
 
44
double:
45
        mov #3, r0
46
        lds r0, fpul
47
        _setpr
48
        float fpul, dr8
49
        _clrpr
50
        # check the result.
51
        fldi1 fr0
52
        fldi1 fr1
53
        fadd fr0, fr1
54
        fadd fr0, fr1
55
        _s2d fr1, dr2
56
        fcmp/eq dr2, dr8
57
        bf wrong
58
 
59
dneg:
60
        mov #3, r0
61
        neg r0, r0
62
        lds r0, fpul
63
        _setpr
64
        float fpul, dr8
65
        _clrpr
66
        # check the result.
67
        fldi1 fr0
68
        fldi1 fr1
69
        fadd fr0, fr1
70
        fadd fr0, fr1
71
        fneg fr1
72
        _s2d fr1, dr2
73
        fcmp/eq dr2, dr8
74
        bf wrong
75
 
76
okay:
77
        pass
78
 
79
wrong2:
80
        fail

powered by: WebSVN 2.1.0

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