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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [sim/] [testsuite/] [sim/] [v850/] [satsub.cgs] - Blame information for rev 438

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

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

powered by: WebSVN 2.1.0

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