source: rtems/c/src/lib/libbsp/i960/rxgen960/startup/asmstub.S @ 8ac4213

4.104.114.84.95
Last change on this file since 8ac4213 was 49b8c26, checked in by Joel Sherrill <joel.sherrill@…>, on 10/27/99 at 15:57:15

Moved asmstub.s to asmstub.S per GNU conventions.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1#######################################
2# asmstub.s                           #
3# Last change : 20. 1.95              #
4#######################################
5
6########################################################################
7#
8# PURPOSE:      resets processor
9#
10# ARGUMENTS:    g0 = start point
11#               g1 = prcb
12#
13# RETURNS:      none
14########################################################################
15
16        .text
17        .globl  _asm_exit
18
19        .text
20_asm_exit:
21        ldconst 0x300, g2
22#       ldconst _start, g1
23#       ldconst _ram_prcb, g2
24        sysctl  g2, g0, g1
25        ret
26
27########################################################################
28#
29# PURPOSE:      execute sysctl instruction
30#
31# ARGUMENTS:    g0 = message type       (0x300 for reinitialize)
32#               g1 = depends on type    (inst addr for reinitialize)
33#               g2 = depends on type    (prcb addr for reinitialize)
34#
35# RETURNS:      none
36########################################################################
37
38        .text
39        .globl  _asm_sysctl
40
41        .text
42_asm_sysctl:
43        b       _asm_sysctl     
44        sysctl  g0, g1, g2
45        ret
46
47########################################################################
48#
49# PURPOSE:      alter a bit in the interrupt pending register
50#
51# ARGUMENTS:    g0 = interrupt number
52#               g1 = 1 to set, 0 to clear
53#
54# RETURNS:      none
55########################################################################
56
57        .text
58        .globl          _asm_ipend
59
60        .text
61_asm_ipend:
62        chkbit   0, g1
63        alterbit g0, sf0, sf0
64        ret
65########################################################################
66#
67# PURPOSE:      alter a bit in the interrupt mask register
68#
69# ARGUMENTS:    g0 = interrupt number
70#               g1 = 1 to set, 0 to clear
71#
72# RETURNS:      none
73########################################################################
74
75        .text
76        .globl          _asm_imask
77
78        .text
79_asm_imask:
80        chkbit   0, g1
81        alterbit g0, sf1, sf1
82        ret
83
84
85########################################################################
86#
87# PURPOSE:      get the value of the interrupt mask register
88#
89# ARGUMENTS:    none
90#
91# RETURNS:      value of IMASK reg
92########################################################################
93
94        .text
95        .globl          _asm_get_imask
96
97        .text
98_asm_get_imask:
99        mov             sf1, g0
100        ret
101
102########################################################################
103#
104# PURPOSE:      modify process-controls register
105#
106# ARGUMENTS:    g0 = value masked/stored in PC reg
107#               g1 = mask of bits to be modified
108#
109# RETURNS:      g0 = initial value of PC reg
110########################################################################
111
112        .text
113        .globl  _asm_modpc
114
115        .text
116_asm_modpc:
117        modpc   g1, g1, g0
118        ret
119
120########################################################################
121#
122# PURPOSE:      change a cached interrupt vector
123#
124# ARGUMENTS:    g0 = interrupt number
125#               g1 = new interrupt vector
126#
127# RETURNS:      none
128########################################################################
129
130        .text
131        .globl          _asm_ivector
132
133        .text
134_asm_ivector:
135        addo    1, g0, g0
136        st      g1, [g0 * 4]
137        ret
138
139###############
140# End of file #
141###############
Note: See TracBrowser for help on using the repository browser.