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/] [fr30/] [addn.cgs] - Blame information for rev 373

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

Line No. Rev Author Line
1 330 jeremybenn
# fr30 testcase for addn $Rj,$Ri, addn $u4,$Rj
2
# mach(): fr30
3
 
4
        .include "testutils.inc"
5
 
6
        START
7
 
8
        .text
9
        .global addn
10
addn:
11
        ; Test addn $Rj,$Ri
12
        mvi_h_gr        1,r7
13
        mvi_h_gr        2,r8
14
        set_cc          0x0f            ; Set mask opposite of normal result
15
        addn            r7,r8
16
        test_cc         1 1 1 1
17
        test_h_gr       3,r8
18
 
19
        mvi_h_gr        0x7fffffff,r7
20
        mvi_h_gr        1,r8
21
        set_cc          0x05            ; Set mask opposite of normal result
22
        addn            r7,r8
23
        test_cc         0 1 0 1
24
        test_h_gr       0x80000000,r8
25
 
26
        set_cc          0x08            ; Set mask opposite of normal result
27
        addn            r8,r8
28
        test_cc         1 0 0 0
29
        test_h_gr       0,r8
30
 
31
        ; Test addn $u4Ri
32
        mvi_h_gr        4,r8
33
        set_cc          0x0f            ; Set mask opposite of normal result
34
        addn            0,r8
35
        test_cc         1 1 1 1
36
        test_h_gr       4,r8
37
        set_cc          0x0f            ; Set mask opposite of normal result
38
        addn            1,r8
39
        test_cc         1 1 1 1
40
        test_h_gr       5,r8
41
        set_cc          0x0f            ; Set mask opposite of normal result
42
        addn            15,r8
43
        test_cc         1 1 1 1
44
        test_h_gr       20,r8
45
        mvi_h_gr        0x7fffffff,r8   ; test neg and overflow bits
46
        set_cc          0x05            ; Set mask opposite of normal result
47
        addn            1,r8
48
        test_cc         0 1 0 1
49
        test_h_gr       0x80000000,r8
50
        set_cc          0x08            ; Set mask opposite of normal result
51
        addn            r8,r8           ; test zero, carry and overflow bits
52
        test_cc         1 0 0 0;
53
        test_h_gr       0,r8
54
 
55
        pass

powered by: WebSVN 2.1.0

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