source: rtems/c/src/lib/libbsp/i960/rxgen960/startup/asmstub.S @ 2ea8df3

4.104.114.84.95
Last change on this file since 2ea8df3 was 2ea8df3, checked in by Joel Sherrill <joel.sherrill@…>, on 10/27/99 at 16:27:34

Added CVS Ids and a basic header. More header cleanup needed.

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