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/] [v850/] [satsubi.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
# v850 satsubi
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    0x7ffffffe, r1
11
        satsubi -10, r1, r2
12
 
13
        flags   sat + c + v + ns + nz
14
        reg     r2, 0x7fffffff
15
 
16
# Similarly, if the result of the add is "positive", that means we
17
# went too negative.  The result should be the most negative number.
18
 
19
        noflags
20
        seti    0x80000001, r1
21
        satsubi 10, r1, r2
22
 
23
        flags   sat + nc + v + s + nz
24
        reg     r2, 0x80000000
25
 
26
# Check that the SAT flag remains set until reset
27
 
28
        seti    2, r1
29
        satsubi 1, r1, r2
30
 
31
        flags   sat + nc + nv + ns + nz
32
        reg     r2, 1
33
 
34
        noflags
35
        seti    2, r1
36
        satsubi 1, r1, r2
37
 
38
        flags   nsat + nc + nv + ns + nz
39
        reg     r2, 1
40
 
41
# Check that results exactly equal to min/max don't saturate
42
 
43
        noflags
44
        seti    0x7ffffffe, r1
45
        satsubi -1, r1, r2
46
 
47
        flags   nsat + c + nv + ns + nz
48
        reg     r2, 0x7fffffff
49
 
50
 
51
        noflags
52
        seti    0x80000001, r1
53
        satsubi 1, r1, r2
54
 
55
        flags   nsat + nc + nv + s + nz
56
        reg     r2, 0x80000000
57
 
58
 
59
        pass

powered by: WebSVN 2.1.0

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