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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Source/] [portable/] [Renesas/] [SH2A_FPU/] [portasm.src] - Blame information for rev 572

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 572 jeremybenn
;/*
2
;    FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd.
3
;
4
;    ***************************************************************************
5
;    *                                                                         *
6
;    * If you are:                                                             *
7
;    *                                                                         *
8
;    *    + New to FreeRTOS,                                                   *
9
;    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
10
;    *    + Looking for basic training,                                        *
11
;    *    + Wanting to improve your FreeRTOS skills and productivity           *
12
;    *                                                                         *
13
;    * then take a look at the FreeRTOS books - available as PDF or paperback  *
14
;    *                                                                         *
15
;    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
16
;    *                  http://www.FreeRTOS.org/Documentation                  *
17
;    *                                                                         *
18
;    * A pdf reference manual is also available.  Both are usually delivered   *
19
;    * to your inbox within 20 minutes to two hours when purchased between 8am *
20
;    * and 8pm GMT (although please allow up to 24 hours in case of            *
21
;    * exceptional circumstances).  Thank you for your support!                *
22
;    *                                                                         *
23
;    ***************************************************************************
24
;
25
;    This file is part of the FreeRTOS distribution.
26
;
27
;    FreeRTOS is free software; you can redistribute it and/or modify it under
28
;    the terms of the GNU General Public License (version 2) as published by the
29
;    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
30
;    ***NOTE*** The exception to the GPL is included to allow you to distribute
31
;    a combined work that includes FreeRTOS without being obliged to provide the
32
;    source code for proprietary components outside of the FreeRTOS kernel.
33
;    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
34
;    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
35
;    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
36
;    more details. You should have received a copy of the GNU General Public
37
;    License and the FreeRTOS license exception along with FreeRTOS; if not it
38
;    can be viewed here: http://www.freertos.org/a00114.html and also obtained
39
;    by writing to Richard Barry, contact details for whom are available on the
40
;    FreeRTOS WEB site.
41
;
42
;    1 tab == 4 spaces!
43
;
44
;    http://www.FreeRTOS.org - Documentation, latest information, license and
45
;    contact details.
46
;
47
;    http://www.SafeRTOS.com - A version that is certified for use in safety
48
;    critical systems.
49
;
50
;    http://www.OpenRTOS.com - Commercial support, development, porting,
51
;    licensing and training services.
52
;*/
53
 
54
        .import _pxCurrentTCB
55
        .import _vTaskSwitchContext
56
        .import _vTaskIncrementTick
57
 
58
        .export _vPortStartFirstTask
59
        .export _ulPortGetGBR
60
        .export _vPortYieldHandler
61
        .export _vPortPreemptiveTick
62
        .export _vPortCooperativeTick
63
        .export _vPortSaveFlopRegisters
64
        .export _vPortRestoreFlopRegisters
65
 
66
    .section    P
67
 
68
        .INCLUDE "ISR_Support.inc"
69
 
70
_vPortStartFirstTask:
71
 
72
        portRESTORE_CONTEXT
73
 
74
;-----------------------------------------------------------
75
 
76
_vPortYieldHandler:
77
 
78
        portSAVE_CONTEXT
79
 
80
        mov.l   #_vTaskSwitchContext, r0
81
        jsr             @r0
82
        nop
83
 
84
        portRESTORE_CONTEXT
85
 
86
;-----------------------------------------------------------
87
 
88
_vPortPreemptiveTick
89
 
90
        portSAVE_CONTEXT
91
 
92
        mov.l   #_vTaskIncrementTick, r0
93
        jsr             @r0
94
        nop
95
 
96
        mov.l   #_vTaskSwitchContext, r0
97
        jsr             @r0
98
        nop
99
 
100
        portRESTORE_CONTEXT
101
 
102
;-----------------------------------------------------------
103
 
104
_vPortCooperativeTick
105
 
106
        portSAVE_CONTEXT
107
 
108
        mov.l   #_vTaskIncrementTick, r0
109
        jsr             @r0
110
        nop
111
 
112
        portRESTORE_CONTEXT
113
 
114
;-----------------------------------------------------------
115
 
116
_ulPortGetGBR:
117
 
118
        stc.l   gbr, r0
119
        rts
120
        nop
121
 
122
;-----------------------------------------------------------
123
 
124
_vPortSaveFlopRegisters:
125
 
126
        fmov.s  fr0, @-r4
127
        fmov.s  fr1, @-r4
128
        fmov.s  fr2, @-r4
129
        fmov.s  fr3, @-r4
130
        fmov.s  fr4, @-r4
131
        fmov.s  fr5, @-r4
132
        fmov.s  fr6, @-r4
133
        fmov.s  fr7, @-r4
134
        fmov.s  fr8, @-r4
135
        fmov.s  fr9, @-r4
136
        fmov.s  fr10, @-r4
137
        fmov.s  fr11, @-r4
138
        fmov.s  fr12, @-r4
139
        fmov.s  fr13, @-r4
140
        fmov.s  fr14, @-r4
141
        fmov.s  fr15, @-r4
142
        sts.l   fpul, @-r4
143
        sts.l   fpscr, @-r4
144
 
145
        rts
146
        nop
147
 
148
;-----------------------------------------------------------
149
 
150
_vPortRestoreFlopRegisters:
151
 
152
        add.l  #-72, r4
153
        lds.l  @r4+, fpscr
154
        lds.l  @r4+, fpul
155
        fmov.s @r4+, fr15
156
        fmov.s @r4+, fr14
157
        fmov.s @r4+, fr13
158
        fmov.s @r4+, fr12
159
        fmov.s @r4+, fr11
160
        fmov.s @r4+, fr10
161
        fmov.s @r4+, fr9
162
        fmov.s @r4+, fr8
163
        fmov.s @r4+, fr7
164
        fmov.s @r4+, fr6
165
        fmov.s @r4+, fr5
166
        fmov.s @r4+, fr4
167
        fmov.s @r4+, fr3
168
        fmov.s @r4+, fr2
169
        fmov.s @r4+, fr1
170
        fmov.s @r4+, fr0
171
 
172
        rts
173
        nop
174
 
175
        .end
176
 

powered by: WebSVN 2.1.0

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