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/] [ftrv.cgs] - Blame information for rev 24

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

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for ftrv xmtrx, $fvn -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        # set the fr bit in the fpscr
9
        .macro _setfr
10
        sts fpscr, r7
11
        mov #32, r8
12
        shll16 r8
13
        or r8, r7
14
        lds r7, fpscr
15
        .endm
16
 
17
        # clear the fr bit
18
        .macro _clrfr
19
        sts fpscr, r7
20
        mov #32, r8
21
        shll16 r8
22
        not r8, r8
23
        and r8, r7
24
        lds r7, fpscr
25
        .endm
26
 
27
        .macro incr old new
28
        fldi1 \new
29
        fadd \old, \new
30
        .endm
31
 
32
        start
33
        _setfr
34
popmtrx:
35
        # 1.0.
36
        fldi1 fr0
37
        # 2.0.
38
        fldi1 fr1
39
        fadd fr1, fr1
40
 
41
        incr fr1, fr2
42
        incr fr2, fr3
43
        incr fr3, fr4
44
        incr fr4, fr5
45
        incr fr5, fr6
46
        incr fr6, fr7
47
        incr fr7, fr8
48
        incr fr8, fr9
49
        incr fr9, fr10
50
        incr fr10, fr11
51
        incr fr11, fr12
52
        incr fr12, fr13
53
        incr fr13, fr14
54
        incr fr14, fr15
55
 
56
popvect:
57
        # Swtich fp banks.
58
        _clrfr
59
        fldi1 fr4
60
        fldi1 fr5
61
        fadd fr5, fr5
62
        fldi1 fr6
63
        fadd fr5, fr6
64
        fldi1 fr7
65
        fadd fr6, fr7
66
 
67
ftrv:
68
        # fr[4,7] should contain the results:
69
        # { 30, 70, 110, 150 }.
70
        ftrv xmtrx, fv4
71
 
72
okay:
73
        pass
74
 

powered by: WebSVN 2.1.0

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