]> git.sur5r.net Git - freertos/blob - FreeRTOS/Source/portable/Renesas/SH2A_FPU/portasm.src
Update version number to 8.1.2 after moving the defaulting of configUSE_PORT_OPTIMISE...
[freertos] / FreeRTOS / Source / portable / Renesas / SH2A_FPU / portasm.src
1 ;/*\r
2 ;    FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd.\r
3 ;    All rights reserved\r
4 ;       \r
5 ;\r
6 ;    ***************************************************************************\r
7 ;     *                                                                       *\r
8 ;     *    FreeRTOS tutorial books are available in pdf and paperback.        *\r
9 ;     *    Complete, revised, and edited pdf reference manuals are also       *\r
10 ;     *    available.                                                         *\r
11 ;     *                                                                       *\r
12 ;     *    Purchasing FreeRTOS documentation will not only help you, by       *\r
13 ;     *    ensuring you get running as quickly as possible and with an        *\r
14 ;     *    in-depth knowledge of how to use FreeRTOS, it will also help       *\r
15 ;     *    the FreeRTOS project to continue with its mission of providing     *\r
16 ;     *    professional grade, cross platform, de facto standard solutions    *\r
17 ;     *    for microcontrollers - completely free of charge!                  *\r
18 ;     *                                                                       *\r
19 ;     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *\r
20 ;     *                                                                       *\r
21 ;     *    Thank you for using FreeRTOS, and thank you for your support!      *\r
22 ;     *                                                                       *\r
23 ;    ***************************************************************************\r
24 ;\r
25 ;\r
26 ;    This file is part of the FreeRTOS distribution.\r
27 ;\r
28 ;    FreeRTOS is free software; you can redistribute it and/or modify it under\r
29 ;    the terms of the GNU General Public License (version 2) as published by the\r
30 ;    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
31 ;    >>>NOTE<<< The modification to the GPL is included to allow you to\r
32 ;    distribute a combined work that includes FreeRTOS without being obliged to\r
33 ;    provide the source code for proprietary components outside of the FreeRTOS\r
34 ;    kernel.  FreeRTOS is distributed in the hope that it will be useful, but\r
35 ;    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
36 ;    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
37 ;    more details. You should have received a copy of the GNU General Public\r
38 ;    License and the FreeRTOS license exception along with FreeRTOS; if not it\r
39 ;    can be viewed here: http://www.freertos.org/a00114.html and also obtained\r
40 ;    by writing to Richard Barry, contact details for whom are available on the\r
41 ;    FreeRTOS WEB site.\r
42 ;\r
43 ;    1 tab == 4 spaces!\r
44 ;\r
45 ;    http://www.FreeRTOS.org - Documentation, latest information, license and\r
46 ;    contact details.\r
47 ;\r
48 ;    http://www.SafeRTOS.com - A version that is certified for use in safety\r
49 ;    critical systems.\r
50 ;\r
51 ;    http://www.OpenRTOS.com - Commercial support, development, porting,\r
52 ;    licensing and training services.\r
53 ;*/\r
54 \r
55         .import _pxCurrentTCB\r
56         .import _vTaskSwitchContext\r
57         .import _xTaskIncrementTick\r
58 \r
59         .export _vPortStartFirstTask\r
60         .export _ulPortGetGBR\r
61         .export _vPortYieldHandler\r
62         .export _vPortPreemptiveTick\r
63         .export _vPortCooperativeTick\r
64         .export _vPortSaveFlopRegisters\r
65         .export _vPortRestoreFlopRegisters\r
66 \r
67     .section    P\r
68 \r
69         .INCLUDE "ISR_Support.inc"\r
70         \r
71 _vPortStartFirstTask:\r
72                 \r
73         portRESTORE_CONTEXT\r
74         \r
75 ;-----------------------------------------------------------\r
76 \r
77 _vPortYieldHandler:\r
78 \r
79         portSAVE_CONTEXT\r
80 \r
81         mov.l   #_vTaskSwitchContext, r0\r
82         jsr             @r0\r
83         nop\r
84 \r
85         portRESTORE_CONTEXT\r
86         \r
87 ;-----------------------------------------------------------\r
88 \r
89 _vPortPreemptiveTick\r
90 \r
91         portSAVE_CONTEXT\r
92         \r
93         mov.l   #_xTaskIncrementTick, r0\r
94         jsr             @r0\r
95         nop\r
96 \r
97         mov.l   #_vTaskSwitchContext, r0\r
98         jsr             @r0\r
99         nop\r
100 \r
101         portRESTORE_CONTEXT\r
102         \r
103 ;-----------------------------------------------------------\r
104 \r
105 _vPortCooperativeTick\r
106 \r
107         portSAVE_CONTEXT\r
108         \r
109         mov.l   #_xTaskIncrementTick, r0\r
110         jsr             @r0\r
111         nop\r
112 \r
113         portRESTORE_CONTEXT\r
114         \r
115 ;-----------------------------------------------------------\r
116 \r
117 _ulPortGetGBR:\r
118 \r
119         stc.l   gbr, r0\r
120         rts\r
121         nop\r
122 \r
123 ;-----------------------------------------------------------\r
124 \r
125 _vPortSaveFlopRegisters:\r
126 \r
127         fmov.s  fr0, @-r4\r
128         fmov.s  fr1, @-r4\r
129         fmov.s  fr2, @-r4\r
130         fmov.s  fr3, @-r4\r
131         fmov.s  fr4, @-r4\r
132         fmov.s  fr5, @-r4\r
133         fmov.s  fr6, @-r4\r
134         fmov.s  fr7, @-r4\r
135         fmov.s  fr8, @-r4\r
136         fmov.s  fr9, @-r4\r
137         fmov.s  fr10, @-r4\r
138         fmov.s  fr11, @-r4\r
139         fmov.s  fr12, @-r4\r
140         fmov.s  fr13, @-r4\r
141         fmov.s  fr14, @-r4\r
142         fmov.s  fr15, @-r4      \r
143         sts.l   fpul, @-r4\r
144         sts.l   fpscr, @-r4\r
145         \r
146         rts\r
147         nop\r
148 \r
149 ;-----------------------------------------------------------\r
150         \r
151 _vPortRestoreFlopRegisters:\r
152 \r
153         add.l  #-72, r4\r
154         lds.l  @r4+, fpscr\r
155         lds.l  @r4+, fpul       \r
156         fmov.s @r4+, fr15\r
157         fmov.s @r4+, fr14\r
158         fmov.s @r4+, fr13\r
159         fmov.s @r4+, fr12\r
160         fmov.s @r4+, fr11\r
161         fmov.s @r4+, fr10\r
162         fmov.s @r4+, fr9\r
163         fmov.s @r4+, fr8\r
164         fmov.s @r4+, fr7\r
165         fmov.s @r4+, fr6\r
166         fmov.s @r4+, fr5\r
167         fmov.s @r4+, fr4\r
168         fmov.s @r4+, fr3\r
169         fmov.s @r4+, fr2\r
170         fmov.s @r4+, fr1\r
171         fmov.s @r4+, fr0\r
172         \r
173         rts\r
174         nop\r
175         \r
176         .end\r
177                 \r