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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [testutils.inc] - Blame information for rev 227

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
# Support macros for the assembly test cases.
2
 
3
        .macro start
4
        .text
5
        .global start
6
start:
7
        .endm
8
 
9
        # Perform a single to double precision floating point conversion.
10
        .macro _s2d fpr dpr
11
        flds \fpr, fpul
12
        _setpr
13
        fcnvsd fpul, \dpr
14
        _clrpr
15
        .endm
16
 
17
        # Set the PR (PRecision) bit in the FPSCR.
18
        .macro _setpr
19
        sts fpscr, r7
20
        mov #8, r8
21
        shll16 r8
22
        or r8, r7
23
        lds r7, fpscr
24
        .endm
25
 
26
        # Clear the PR bit.
27
        .macro _clrpr
28
        sts fpscr, r7
29
        mov #8, r8
30
        shll16 r8
31
        not r8, r8
32
        and r8, r7
33
        lds r7, fpscr
34
        .endm
35
 
36
        # nb: this macro clobbers R7.
37
        .macro assert reg value
38
        mov \value, r7
39
        cmp/eq \reg, r7
40
        bf wrong
41
        .endm
42
 
43
        .macro pass
44
        trapa #253
45
        .endm
46
 
47
        .macro fail
48
        trapa #254
49
        .endm

powered by: WebSVN 2.1.0

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