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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [v850/] [satadd.cgs] - Blame information for rev 856

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

Line No. Rev Author Line
1 24 jeremybenn
# v850 satadd
2
# mach: all
3
 
4
        .include "testutils.inc"
5
 
6
# If the result of the add is "negative", that means we went too
7
# positive.  The result should be the most positive number.
8
 
9
        noflags
10
        seti    0x70000000, r1
11
        seti    0x70000000, r2
12
        satadd  r1, r2
13
 
14
        flags   sat + nc + v + ns + nz
15
        reg     r2, 0x7fffffff
16
 
17
        noflags
18
        seti    0x7ffffffe, r1
19
        satadd  10, r1
20
 
21
        flags   sat + nc + v + ns + nz
22
        reg     r1, 0x7fffffff
23
 
24
# Similarly, if the result of the add is "positive", that means we
25
# went too negative.  The result should be the most negative number.
26
 
27
        noflags
28
        seti    0x90000000, r1
29
        seti    0x90000000, r2
30
        satadd  r1, r2
31
 
32
        flags   sat + c + v + s + nz
33
        reg     r2, 0x80000000
34
 
35
        noflags
36
        seti    0x80000001, r1
37
        satadd  -10, r1
38
 
39
        flags   sat + c + v + s + nz
40
        reg     r1, 0x80000000
41
 
42
# Check that the SAT flag remains set until reset
43
 
44
        seti    1, r1
45
        seti    2, r2
46
        satadd  r1,r2
47
 
48
        flags   sat + nc + nv + ns + nz
49
        reg     r2, 3
50
 
51
        noflags
52
        seti    1, r1
53
        seti    2, r2
54
        satadd  r1,r2
55
 
56
        flags   nsat + nc + nv + ns + nz
57
        reg     r2, 3
58
 
59
# Check that results exactly equal to min/max don't saturate
60
 
61
        noflags
62
        seti    0x70000000, r1
63
        seti    0x0fffffff, r2
64
        satadd  r1,r2
65
 
66
        flags   nsat + nc + nv + ns + nz
67
        reg     r2, 0x7fffffff
68
 
69
 
70
        noflags
71
        seti    0x90000000, r1
72
        seti    0xf0000000, r2
73
        satadd  r1,r2
74
 
75
        flags   nsat + c + nv + s + nz
76
        reg     r2, 0x80000000
77
 
78
 
79
        pass

powered by: WebSVN 2.1.0

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