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/] [sh/] [padd.s] - Blame information for rev 300

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

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for padd
2
# mach:  shdsp
3
# as(shdsp):    -defsym sim_cpu=1 -dsp
4
 
5
        .include "testutils.inc"
6
 
7
        start
8
        set_grs_a5a5
9
        lds     r0, a0
10
        pcopy   a0, a1
11
        lds     r0, x0
12
        lds     r0, x1
13
        lds     r0, y0
14
        lds     r0, y1
15
        pcopy   x0, m0
16
        pcopy   y1, m1
17
 
18
        padd    x0, y0, a0
19
        assert_sreg     0x4b4b4b4a, a0
20
 
21
        # 2 + 2 = 4
22
        mov     #2, r0
23
        lds     r0, x0
24
        lds     r0, y0
25
        padd    x0, y0, a0
26
        assert_sreg     4, a0
27
 
28
        set_dcfalse
29
        dct padd x0, y0, a1
30
        assert_sreg2    0xa5a5a5a5, a1
31
        set_dctrue
32
        dct padd x0, y0, a1
33
        assert_sreg2    4, a1
34
 
35
        set_dctrue
36
        dcf padd x0, y0, m1
37
        assert_sreg2    0xa5a5a5a5, m1
38
        set_dcfalse
39
        dcf padd x0, y0, m1
40
        assert_sreg2    4, m1
41
 
42
        # padd / pmuls
43
 
44
        padd    x0, y0, y0      pmuls   x1, y1, m1
45
        assert_sreg     4, y0
46
        assert_sreg2    0x3fc838b2, m1  ! (int) 0xa5a5 x (int) 0xa5a5 x 2
47
 
48
        set_greg        0xa5a5a5a5, r0
49
        test_grs_a5a5
50
        assert_sreg     0xa5a5a5a5, x1
51
        assert_sreg     0xa5a5a5a5, y1
52
 
53
        pass
54
        exit 0

powered by: WebSVN 2.1.0

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