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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [fr30/] [ret.cgs] - Blame information for rev 868

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

Line No. Rev Author Line
1 24 jeremybenn
# fr30 testcase for ret
2
# mach(): fr30
3
 
4
        .include "testutils.inc"
5
 
6
        START
7
 
8
        .text
9
        .global ret
10
 
11
        ; Test ret
12
        mvi_h_gr        0xdeadbeef,r9
13
        mvi_h_gr        #func1,r0
14
        set_cc          0x0f            ; condition codes shouldn't change
15
call1:
16
        call            @r0
17
        testr_h_gr      2,r0
18
        test_h_gr       0xbeefdead,r9
19
        pass
20
 
21
func1:
22
        test_cc         1 1 1 1
23
        mvi_h_gr        #call1,r7
24
        inci_h_gr       2,r7
25
        testr_h_dr      r7,rp
26
        save_rp
27
 
28
        mvi_h_gr        #func2,r0
29
        set_cc          0x0f            ; condition codes shouldn't change
30
call2:
31
        call:d          @r0
32
        ldi:8           1,r0            ; Must assume this works
33
        testr_h_gr      2,r0
34
        restore_rp
35
        ret
36
func2:
37
        test_cc         1 1 1 1
38
        mvi_h_gr        #call2,r7
39
        inci_h_gr       4,r7
40
        testr_h_dr      r7,rp
41
        testr_h_gr      1,r0
42
        save_rp
43
 
44
        set_cc          0x0f            ; condition codes shouldn't change
45
call3:
46
        call            func3
47
        testr_h_gr      2,r0
48
        restore_rp
49
        ret
50
func3:
51
        test_cc         1 1 1 1
52
        mvi_h_gr        #call3,r7
53
        inci_h_gr       2,r7
54
        testr_h_dr      r7,rp
55
        save_rp
56
 
57
        set_cc          0x0f            ; condition codes shouldn't change
58
call4:
59
        call:d          func4
60
        ldi:8           1,r0            ; Must assume this works
61
        testr_h_gr      3,r0
62
        restore_rp
63
        ret:d
64
        ldi:8           2,r0            ; Must assume this works
65
func4:
66
        test_cc         1 1 1 1
67
        mvi_h_gr        #call4,r7
68
        inci_h_gr       4,r7
69
        testr_h_dr      r7,rp
70
        testr_h_gr      1,r0
71
        mvi_h_gr        0xbeefdead,r9
72
        ret:d
73
        ldi:8           3,r0            ; Must assume this works
74
 
75
        fail

powered by: WebSVN 2.1.0

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