Go to the documentation of this file.
7 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
9 #define ACCOUNT_GET_STAMP \
10 (pUStk) mov.m r20=ar.itc;
11 #define ACCOUNT_SYS_ENTER \
12 (pUStk) br.call.spnt rp=account_sys_enter \
15 #define ACCOUNT_GET_STAMP
16 #define ACCOUNT_SYS_ENTER
19 .section
".data..patch.rse",
"a"
47 #define IA64_NATIVE_DO_SAVE_MIN(__COVER,SAVE_IFS,EXTRA,WORKAROUND) \
48 mov r16=IA64_KR(CURRENT); \
52 MOV_FROM_IPSR(p0,r29); \
58 adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16; \
62 adds r1=-IA64_TASK_THREAD_ON_USTACK_OFFSET,r16 \
67 cmp.eq pKStk,pUStk=r0,r17; \
69 (pUStk) mov ar.rsc=0; \
71 (pUStk) mov.m r24=ar.rnat; \
72 (pUStk) addl r22=IA64_RBS_OFFSET,r1; \
75 (pUStk) lfetch.fault.excl.nt1 [r22]; \
76 (pUStk) addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1; \
77 (pUStk) mov r23=ar.bspstore; \
79 (pUStk) mov ar.bspstore=r22; \
80 (pKStk) addl r1=-IA64_PT_REGS_SIZE,r1; \
82 (pUStk) mov r18=ar.bsp; \
83 (pUStk) mov ar.rsc=0x3; \
84 adds r17=2*L1_CACHE_BYTES,r1; \
85 adds r16=PT(CR_IPSR),r1; \
87 lfetch.fault.excl.nt1 [r17],L1_CACHE_BYTES; \
90 lfetch.fault.excl.nt1 [r17]; \
91 tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \
99 .mem.offset 0,0; st8.spill [r16]=r8,16; \
100 .mem.offset 8,0; st8.spill [r17]=r9,16; \
102 .mem.offset 0,0; st8.spill [r16]=r10,24; \
103 .mem.offset 8,0; st8.spill [r17]=r11,24; \
107 (pUStk) sub r18=r18,r22; \
111 movl r11=FPSR_DEFAULT; \
118 (pUStk) st8 [r17]=r24,16; \
119 (pKStk) adds r17=16,r17; \
121 (pUStk) st8 [r16]=r23,16; \
123 (pKStk) adds r16=16,r16; \
127 cmp.eq pNonSys,pSys=r0,r0 \
129 .mem.offset 0,0; st8.spill [r16]=r20,16; \
130 .mem.offset 8,0; st8.spill [r17]=r12,16; \
133 .mem.offset 0,0; st8.spill [r16]=r13,16; \
134 .mem.offset 8,0; st8.spill [r17]=r21,16; \
135 mov r13=IA64_KR(CURRENT); \
137 .mem.offset 0,0; st8.spill [r16]=r15,16; \
138 .mem.offset 8,0; st8.spill [r17]=r14,16; \
140 .mem.offset 0,0; st8.spill [r16]=r2,16; \
141 .mem.offset 8,0; st8.spill [r17]=r3,16; \
143 adds r2=IA64_PT_REGS_R16_OFFSET,r1; \
167 .mem.offset 0,0; st8.spill [r2]=r16,16; \
168 .mem.offset 8,0; st8.spill [r3]=r17,16; \
170 .mem.offset 0,0; st8.spill [r2]=r18,16; \
171 .mem.offset 8,0; st8.spill [r3]=r19,16; \
173 .mem.offset 0,0; st8.spill [r2]=r20,16; \
174 .mem.offset 8,0; st8.spill [r3]=r21,16; \
177 .mem.offset 0,0; st8.spill [r2]=r22,16; \
178 .mem.offset 8,0; st8.spill [r3]=r23,16; \
181 .mem.offset 0,0; st8.spill [r2]=r24,16; \
182 .mem.offset 8,0; st8.spill [r3]=r25,16; \
184 .mem.offset 0,0; st8.spill [r2]=r26,16; \
185 .mem.offset 8,0; st8.spill [r3]=r27,16; \
187 .mem.offset 0,0; st8.spill [r2]=r28,16; \
188 .mem.offset 8,0; st8.spill [r3]=r29,16; \
190 .mem.offset 0,0; st8.spill [r2]=r30,16; \
191 .mem.offset 8,0; st8.spill [r3]=r31,32; \
195 adds r24=PT(B6)-PT(F7),r3; \
197 stf.spill [r2]=f6,32; \
198 stf.spill [r3]=f7,32; \
200 stf.spill [r2]=f8,32; \
201 stf.spill [r3]=f9,32; \
203 stf.spill [r2]=f10; \
204 stf.spill [r3]=f11; \
205 adds r25=PT(B7)-PT(F11),r3; \
214 #define RSE_WORKAROUND \
215 (pUStk) extr.u r17=r18,3,6; \
216 (pUStk) sub r16=r18,r22; \
217 [1:](pKStk) br.cond.sptk.many 1f; \
218 .xdata4 ".data..patch.rse",1b-. \
220 cmp.ge p6,p7 = 33,r17; \
222 (p6) mov r17=0x310; \
223 (p7) mov r17=0x308; \
225 cmp.leu p1,p0=r16,r17; \
226 (p1) br.cond.sptk.many 1f; \
227 dep.z r17=r26,0,62; \
231 dep r27=r0,r27,16,14; \
241 mov ar.bspstore=r22 \
246 .pred.rel "mutex", pKStk, pUStk
248 #define SAVE_MIN_WITH_COVER DO_SAVE_MIN(COVER, mov r30=cr.ifs, , RSE_WORKAROUND)
249 #define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(COVER, mov r30=cr.ifs, mov r15=r19, RSE_WORKAROUND)
250 #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, , )