📄 crunch.lst
字号:
ARM macroassembler Page:1
1 00000000 ;**********************************************************************
2 00000000 ;
3 00000000 ; Filename: crunch.s
4 00000000 ;
5 00000000 ; Description: Includes routines for the context switch save and restore
6 00000000 ; registers for the crunch engine.
7 00000000 ;
8 00000000 ; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
9 00000000 ; ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
10 00000000 ; THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
11 00000000 ; PARTICULAR PURPOSE.
12 00000000 ;
13 00000000 ; Use of this source code is subject to the terms of the Cirrus end-user
14 00000000 ; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
15 00000000 ; If you did not accept the terms of the EULA, you are not authorized to
16 00000000 ; use this source code. For a copy of the EULA, please see the
17 00000000 ; EULA.RTF on your install media.
18 00000000 ;
19 00000000 ; Copyright(c) Cirrus Logic Corporation 2002, All Rights Reserved
20 00000000 ;
21 00000000 ;**********************************************************************
22 00000000
27 00000000 OPT 1 ; reenable listing
28 00000000 OPT 128 ; disable listing of macro expansions
29 00000000
30 00000000 CRUNCH_SAVESIZE EQU 0xB0
31 00000000
32 00000000 TEXTAREA
33 00000000
34 00000000 ;**********************************************************************
35 00000000 ;
36 00000000 ; void OEMInitCoProcRegisterSavedArea( LPBYTE pArea );
37 00000000 ;
38 00000000 ; This function is called by the kernel when a thread is created to
39 00000000 ; initialize the debug registers.
40 00000000 ;
41 00000000 ; r0 - Buffer that will be used to save/restore debug registers.
42 00000000 ; The initialized value will be passed directly to
43 00000000 ; OEMRestoreCoProcRegister when the thread is first scheduled.
44 00000000 ;
45 00000000 ; Currently we don't have any debug coprocessor registers.
46 00000000 ;
47 00000000 ;**********************************************************************
48 00000000
49 00000000 LEAF_ENTRY OEMInitCoProcRegisterSavedArea
50 00000000 e0211001 eor r1, r1, r1
51 00000004 e28220b0 add r2, r2, #CRUNCH_SAVESIZE
52 00000008
53 00000008 InitSaveAreaLoop
54 00000008 e4801004 str r1, [r0], #4
55 0000000c e1500002 cmp r0, r2
56 00000010 9afffffc bls InitSaveAreaLoop
57 00000014
58 00000014 RETURN
59 00000018
60 00000018 ;**********************************************************************
61 00000018 ;
62 00000018 ; void OEMSaveCoProcRegister(LPBYTE pArea);
63 00000018 ;
64 00000018 ; This function is called by the kernel when a thread switch occurs
65 00000018 ; to save the platform specific debug registers. The same area will
66 00000018 ; be passed to OEMRestoreCoProcRegister when the thread is scheduled
67 00000018 ; again.
68 00000018 ;
69 00000018 ; r0 - Pointer to a memory buffer used to store the co-processor
70 00000018 ; registers.
71 00000018 ;
72 00000018 ;**********************************************************************
73 00000018 LEAF_ENTRY OEMSaveCoProcRegister
74 00000018
75 00000018 cfstr64 c15, [r0, #0x78]
76 0000001c cfmv32sc c15, c0
77 00000020 cfstr64 c15, [r0, #0xb0]
78 00000024 cfstr64 c0, [r0, #0x00]
79 00000028 cfstr64 c1, [r0, #0x08]
80 0000002c cfstr64 c2, [r0, #0x10]
81 00000030 cfstr64 c3, [r0, #0x18]
82 00000034 cfstr64 c4, [r0, #0x20]
83 00000038 cfstr64 c5, [r0, #0x28]
84 0000003c cfstr64 c6, [r0, #0x30]
85 00000040 cfstr64 c7, [r0, #0x38]
86 00000044 cfstr64 c8, [r0, #0x40]
87 00000048 cfstr64 c9, [r0, #0x48]
88 0000004c cfstr64 c10, [r0, #0x50]
89 00000050 cfstr64 c11, [r0, #0x58]
90 00000054 cfstr64 c12, [r0, #0x60]
91 00000058 cfstr64 c13, [r0, #0x68]
92 0000005c cfstr64 c14, [r0, #0x70]
93 00000060
94 00000060 cfmv32al c0, a0
95 00000064 cfmv32am c1, a0
96 00000068 cfmv32ah c2, a0
97 0000006c cfmv32al c3, a1
98 00000070 cfmv32am c4, a1
99 00000074 cfmv32ah c5, a1
100 00000078 cfmv32al c6, a2
101 0000007c cfmv32am c7, a2
102 00000080 cfmv32ah c8, a2
103 00000084 cfmv32al c9, a3
104 00000088 cfmv32am c10, a3
105 0000008c cfmv32ah c11, a3
106 00000090 cfstr32 c0, [r0, #0x80]
107 00000094 cfstr32 c1, [r0, #0x84]
108 00000098 cfstr32 c2, [r0, #0x88]
109 0000009c cfstr32 c3, [r0, #0x8c]
110 000000a0 cfstr32 c4, [r0, #0x90]
111 000000a4 cfstr32 c5, [r0, #0x94]
112 000000a8 cfstr32 c6, [r0, #0x98]
113 000000ac cfstr32 c7, [r0, #0x9c]
114 000000b0 cfstr32 c8, [r0, #0xa0]
115 000000b4 cfstr32 c9, [r0, #0xa4]
116 000000b8 cfstr32 c10, [r0, #0xa8]
117 000000bc cfstr32 c11, [r0, #0xac]
118 000000c0
119 000000c0 RETURN
120 000000c4
121 000000c4
122 000000c4
123 000000c4 ;**********************************************************************
124 000000c4 ;
125 000000c4 ; void OEMRestoreCoProcRegister( LPBYTE pArea );
126 000000c4 ;
127 000000c4 ; This function is called by the kernel when a thread switch occurs
128 000000c4 ; to restore the platform specific debug registers
129 000000c4 ;
130 000000c4 ; r0 - Pointer to a memory buffer that contains the information to
131 000000c4 ; restore to the co-processor registers which should have be set
132 000000c4 ; by the OEMInitCoProcRegisterSavedArea or OEMSaveCoProcRegister.
133 000000c4 ;
134 000000c4 ;**********************************************************************
135 000000c4 LEAF_ENTRY OEMRestoreCoProcRegister
136 000000c4
137 000000c4 cfldr64 c0, [r0, #0x80]
138 000000c8 cfldr32 c1, [r0, #0x88]
139 000000cc cfldr64 c2, [r0, #0x8c]
140 000000d0 cfldr32 c3, [r0, #0x94]
141 000000d4 cfldr64 c4, [r0, #0x98]
142 000000d8 cfldr32 c5, [r0, #0xa0]
143 000000dc cfldr64 c6, [r0, #0xa4]
144 000000e0 cfldr32 c7, [r0, #0xac]
145 000000e4 cfmva64 a0, c0
146 000000e8 cfmvah32 a0, c1
147 000000ec cfmva64 a1, c2
148 000000f0 cfmvah32 a1, c3
149 000000f4 cfmva64 a2, c4
150 000000f8 cfmvah32 a2, c5
151 000000fc cfmva64 a3, c6
152 00000100 cfmvah32 a3, c7
153 00000104
154 00000104 cfldr64 c0, [r0, #0x00]
155 00000108 cfldr64 c1, [r0, #0x08]
156 0000010c cfldr64 c2, [r0, #0x10]
157 00000110 cfldr64 c3, [r0, #0x18]
158 00000114 cfldr64 c4, [r0, #0x20]
159 00000118 cfldr64 c5, [r0, #0x28]
160 0000011c cfldr64 c6, [r0, #0x30]
161 00000120 cfldr64 c7, [r0, #0x38]
162 00000124 cfldr64 c8, [r0, #0x40]
163 00000128 cfldr64 c9, [r0, #0x48]
164 0000012c cfldr64 c10, [r0, #0x50]
165 00000130 cfldr64 c11, [r0, #0x58]
166 00000134 cfldr64 c12, [r0, #0x60]
167 00000138 cfldr64 c13, [r0, #0x68]
168 0000013c cfldr64 c14, [r0, #0x70]
169 00000140
170 00000140 cfldr64 c15, [r0, #0xb0]
171 00000144 cfmvsc32 c0, c15
172 00000148 cfldr64 c15, [r0, #0x78]
173 0000014c RETURN
174 00000150 END
Assembly terminated, errors: 0, warnings: 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -