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

powered by: WebSVN 2.1.0

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