]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ExceptionHandlerAsm.S
1. Separated DxeSmmCpuExceptionHandlerLib.inf into 2 instance DxeCpuExceptionHandlerL...
[mirror_edk2.git] / UefiCpuPkg / Library / CpuExceptionHandlerLib / Ia32 / ExceptionHandlerAsm.S
CommitLineData
8f07f895 1#------------------------------------------------------------------------------\r
2#*\r
e41aad15 3#* Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.<BR>\r
8f07f895 4#* This program and the accompanying materials\r
5#* are licensed and made available under the terms and conditions of the BSD License\r
6#* which accompanies this distribution. The full text of the license may be found at\r
7#* http://opensource.org/licenses/bsd-license.php\r
8#*\r
9#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11#*\r
12#* ExceptionHandlerAsm.S\r
13#*\r
14#* Abstract:\r
15#*\r
16#* IA32 CPU Exception Handler\r
17#\r
18#------------------------------------------------------------------------------\r
19\r
20\r
8f07f895 21#.MMX\r
22#.XMM\r
23\r
24ASM_GLOBAL ASM_PFX(CommonExceptionHandler)\r
25ASM_GLOBAL ASM_PFX(CommonInterruptEntry)\r
e41aad15 26ASM_GLOBAL ASM_PFX(HookAfterStubEnd)\r
8f07f895 27\r
e41aad15
JF
28#EXTRN ASM_PFX(mErrorCodeFlag):DWORD # Error code flags for exceptions\r
29#EXTRN ASM_PFX(mDoFarReturnFlag):DWORD # Do far return flag\r
8f07f895 30\r
31.text\r
32\r
33#\r
34# exception handler stub table\r
35#\r
36Exception0Handle:\r
e41aad15
JF
37 .byte 0x6a # push #VectorNum\r
38 .byte 0\r
39 pushl %eax\r
40 .byte 0xB8\r
41 .long ASM_PFX(CommonInterruptEntry)\r
42 jmp *%eax\r
8f07f895 43Exception1Handle:\r
e41aad15
JF
44 .byte 0x6a # push #VectorNum\r
45 .byte 1\r
46 pushl %eax\r
47 .byte 0xB8\r
48 .long ASM_PFX(CommonInterruptEntry)\r
49 jmp *%eax\r
8f07f895 50Exception2Handle:\r
e41aad15
JF
51 .byte 0x6a # push #VectorNum\r
52 .byte 2\r
53 pushl %eax\r
54 .byte 0xB8\r
55 .long ASM_PFX(CommonInterruptEntry)\r
56 jmp *%eax\r
8f07f895 57Exception3Handle:\r
e41aad15
JF
58 .byte 0x6a # push #VectorNum\r
59 .byte 3\r
60 pushl %eax\r
61 .byte 0xB8\r
62 .long ASM_PFX(CommonInterruptEntry)\r
63 jmp *%eax\r
8f07f895 64Exception4Handle:\r
e41aad15
JF
65 .byte 0x6a # push #VectorNum\r
66 .byte 4\r
67 pushl %eax\r
68 .byte 0xB8\r
69 .long ASM_PFX(CommonInterruptEntry)\r
70 jmp *%eax\r
8f07f895 71Exception5Handle:\r
e41aad15
JF
72 .byte 0x6a # push #VectorNum\r
73 .byte 5\r
74 pushl %eax\r
75 .byte 0xB8\r
76 .long ASM_PFX(CommonInterruptEntry)\r
77 jmp *%eax\r
8f07f895 78Exception6Handle:\r
e41aad15
JF
79 .byte 0x6a # push #VectorNum\r
80 .byte 6\r
81 pushl %eax\r
82 .byte 0xB8\r
83 .long ASM_PFX(CommonInterruptEntry)\r
84 jmp *%eax\r
8f07f895 85Exception7Handle:\r
e41aad15
JF
86 .byte 0x6a # push #VectorNum\r
87 .byte 7\r
88 pushl %eax\r
89 .byte 0xB8\r
90 .long ASM_PFX(CommonInterruptEntry)\r
91 jmp *%eax\r
8f07f895 92Exception8Handle:\r
e41aad15
JF
93 .byte 0x6a # push #VectorNum\r
94 .byte 8\r
95 pushl %eax\r
96 .byte 0xB8\r
97 .long ASM_PFX(CommonInterruptEntry)\r
98 jmp *%eax\r
8f07f895 99Exception9Handle:\r
e41aad15
JF
100 .byte 0x6a # push #VectorNum\r
101 .byte 9\r
102 pushl %eax\r
103 .byte 0xB8\r
104 .long ASM_PFX(CommonInterruptEntry)\r
105 jmp *%eax\r
8f07f895 106Exception10Handle:\r
e41aad15
JF
107 .byte 0x6a # push #VectorNum\r
108 .byte 10\r
109 pushl %eax\r
110 .byte 0xB8\r
111 .long ASM_PFX(CommonInterruptEntry)\r
112 jmp *%eax\r
8f07f895 113Exception11Handle:\r
e41aad15
JF
114 .byte 0x6a # push #VectorNum\r
115 .byte 11\r
116 pushl %eax\r
117 .byte 0xB8\r
118 .long ASM_PFX(CommonInterruptEntry)\r
119 jmp *%eax\r
8f07f895 120Exception12Handle:\r
e41aad15
JF
121 .byte 0x6a # push #VectorNum\r
122 .byte 12\r
123 pushl %eax\r
124 .byte 0xB8\r
125 .long ASM_PFX(CommonInterruptEntry)\r
126 jmp *%eax\r
8f07f895 127Exception13Handle:\r
e41aad15
JF
128 .byte 0x6a # push #VectorNum\r
129 .byte 13\r
130 pushl %eax\r
131 .byte 0xB8\r
132 .long ASM_PFX(CommonInterruptEntry)\r
133 jmp *%eax\r
8f07f895 134Exception14Handle:\r
e41aad15
JF
135 .byte 0x6a # push #VectorNum\r
136 .byte 14\r
137 pushl %eax\r
138 .byte 0xB8\r
139 .long ASM_PFX(CommonInterruptEntry)\r
140 jmp *%eax\r
8f07f895 141Exception15Handle:\r
e41aad15
JF
142 .byte 0x6a # push #VectorNum\r
143 .byte 15\r
144 pushl %eax\r
145 .byte 0xB8\r
146 .long ASM_PFX(CommonInterruptEntry)\r
147 jmp *%eax\r
8f07f895 148Exception16Handle:\r
e41aad15
JF
149 .byte 0x6a # push #VectorNum\r
150 .byte 16\r
151 pushl %eax\r
152 .byte 0xB8\r
153 .long ASM_PFX(CommonInterruptEntry)\r
154 jmp *%eax\r
8f07f895 155Exception17Handle:\r
e41aad15
JF
156 .byte 0x6a # push #VectorNum\r
157 .byte 17\r
158 pushl %eax\r
159 .byte 0xB8\r
160 .long ASM_PFX(CommonInterruptEntry)\r
161 jmp *%eax\r
8f07f895 162Exception18Handle:\r
e41aad15
JF
163 .byte 0x6a # push #VectorNum\r
164 .byte 18\r
165 pushl %eax\r
166 .byte 0xB8\r
167 .long ASM_PFX(CommonInterruptEntry)\r
168 jmp *%eax\r
8f07f895 169Exception19Handle:\r
e41aad15
JF
170 .byte 0x6a # push #VectorNum\r
171 .byte 19\r
172 pushl %eax\r
173 .byte 0xB8\r
174 .long ASM_PFX(CommonInterruptEntry)\r
175 jmp *%eax\r
8f07f895 176Exception20Handle:\r
e41aad15
JF
177 .byte 0x6a # push #VectorNum\r
178 .byte 20\r
179 pushl %eax\r
180 .byte 0xB8\r
181 .long ASM_PFX(CommonInterruptEntry)\r
182 jmp *%eax\r
8f07f895 183Exception21Handle:\r
e41aad15
JF
184 .byte 0x6a # push #VectorNum\r
185 .byte 21\r
186 pushl %eax\r
187 .byte 0xB8\r
188 .long ASM_PFX(CommonInterruptEntry)\r
189 jmp *%eax\r
8f07f895 190Exception22Handle:\r
e41aad15
JF
191 .byte 0x6a # push #VectorNum\r
192 .byte 22\r
193 pushl %eax\r
194 .byte 0xB8\r
195 .long ASM_PFX(CommonInterruptEntry)\r
196 jmp *%eax\r
8f07f895 197Exception23Handle:\r
e41aad15
JF
198 .byte 0x6a # push #VectorNum\r
199 .byte 23\r
200 pushl %eax\r
201 .byte 0xB8\r
202 .long ASM_PFX(CommonInterruptEntry)\r
203 jmp *%eax\r
8f07f895 204Exception24Handle:\r
e41aad15
JF
205 .byte 0x6a # push #VectorNum\r
206 .byte 24\r
207 pushl %eax\r
208 .byte 0xB8\r
209 .long ASM_PFX(CommonInterruptEntry)\r
210 jmp *%eax\r
8f07f895 211Exception25Handle:\r
e41aad15
JF
212 .byte 0x6a # push #VectorNum\r
213 .byte 25\r
214 pushl %eax\r
215 .byte 0xB8\r
216 .long ASM_PFX(CommonInterruptEntry)\r
217 jmp *%eax\r
8f07f895 218Exception26Handle:\r
e41aad15
JF
219 .byte 0x6a # push #VectorNum\r
220 .byte 26\r
221 pushl %eax\r
222 .byte 0xB8\r
223 .long ASM_PFX(CommonInterruptEntry)\r
224 jmp *%eax\r
8f07f895 225Exception27Handle:\r
e41aad15
JF
226 .byte 0x6a # push #VectorNum\r
227 .byte 27\r
228 pushl %eax\r
229 .byte 0xB8\r
230 .long ASM_PFX(CommonInterruptEntry)\r
231 jmp *%eax\r
8f07f895 232Exception28Handle:\r
e41aad15
JF
233 .byte 0x6a # push #VectorNum\r
234 .byte 28\r
235 pushl %eax\r
236 .byte 0xB8\r
237 .long ASM_PFX(CommonInterruptEntry)\r
238 jmp *%eax\r
8f07f895 239Exception29Handle:\r
e41aad15
JF
240 .byte 0x6a # push #VectorNum\r
241 .byte 29\r
242 pushl %eax\r
243 .byte 0xB8\r
244 .long ASM_PFX(CommonInterruptEntry)\r
245 jmp *%eax\r
8f07f895 246Exception30Handle:\r
e41aad15
JF
247 .byte 0x6a # push #VectorNum\r
248 .byte 30\r
249 pushl %eax\r
250 .byte 0xB8\r
251 .long ASM_PFX(CommonInterruptEntry)\r
252 jmp *%eax\r
8f07f895 253Exception31Handle:\r
e41aad15
JF
254 .byte 0x6a # push #VectorNum\r
255 .byte 31\r
256 pushl %eax\r
257 .byte 0xB8\r
258 .long ASM_PFX(CommonInterruptEntry)\r
259 jmp *%eax\r
260\r
261HookAfterStubBegin:\r
262 .byte 0x6a # push\r
263VectorNum:\r
264 .byte 0 # 0 will be fixed\r
265 pushl %eax\r
266 .byte 0xB8 # movl ASM_PFX(HookAfterStubHeaderEnd), %eax\r
267 .long ASM_PFX(HookAfterStubHeaderEnd)\r
268 jmp *%eax\r
269ASM_GLOBAL ASM_PFX(HookAfterStubHeaderEnd)\r
270HookAfterStubHeaderEnd:\r
271 popl %eax\r
272 subl $8, %esp # reserve room for filling exception data later\r
273 pushl 8(%esp)\r
274 xchgl (%esp), %ecx # get vector number\r
275 bt %ecx, ASM_PFX(mErrorCodeFlag)\r
276 jnc NoErrorData\r
277 pushl (%esp) # addition push if exception data needed\r
278NoErrorData:\r
279 xchg (%esp), %ecx # restore ecx\r
280 pushl %eax\r
8f07f895 281\r
282#---------------------------------------;\r
283# CommonInterruptEntry ;\r
284#---------------------------------------;\r
285# The follow algorithm is used for the common interrupt routine.\r
286\r
287ASM_GLOBAL ASM_PFX(CommonInterruptEntry)\r
288ASM_PFX(CommonInterruptEntry):\r
289 cli\r
e41aad15 290 popl %eax\r
8f07f895 291 #\r
292 # All interrupt handlers are invoked through interrupt gates, so\r
293 # IF flag automatically cleared at the entry point\r
294 #\r
295\r
296 #\r
e41aad15 297 # Get vector number from top of stack\r
8f07f895 298 #\r
299 xchgl (%esp), %ecx\r
e41aad15 300 andl $0x0FF, %ecx # Vector number should be less than 256\r
8f07f895 301 cmpl $32, %ecx # Intel reserved vector for exceptions?\r
302 jae NoErrorCode\r
303 bt %ecx, ASM_PFX(mErrorCodeFlag)\r
304 jc HasErrorCode\r
305\r
306NoErrorCode:\r
307\r
308 #\r
309 # Stack:\r
310 # +---------------------+\r
311 # + EFlags +\r
312 # +---------------------+\r
313 # + CS +\r
314 # +---------------------+\r
315 # + EIP +\r
316 # +---------------------+\r
317 # + ECX +\r
318 # +---------------------+ <-- ESP\r
319 #\r
320 # Registers:\r
321 # ECX - Vector Number\r
322 #\r
323\r
324 #\r
325 # Put Vector Number on stack\r
326 #\r
327 pushl %ecx\r
328\r
329 #\r
330 # Put 0 (dummy) error code on stack, and restore ECX\r
331 #\r
332 xorl %ecx, %ecx # ECX = 0\r
333 xchgl 4(%esp), %ecx\r
334\r
335 jmp ErrorCodeAndVectorOnStack\r
336\r
337HasErrorCode:\r
338\r
339 #\r
340 # Stack:\r
341 # +---------------------+\r
342 # + EFlags +\r
343 # +---------------------+\r
344 # + CS +\r
345 # +---------------------+\r
346 # + EIP +\r
347 # +---------------------+\r
348 # + Error Code +\r
349 # +---------------------+\r
350 # + ECX +\r
351 # +---------------------+ <-- ESP\r
352 #\r
353 # Registers:\r
354 # ECX - Vector Number\r
355 #\r
356\r
357 #\r
358 # Put Vector Number on stack and restore ECX\r
359 #\r
360 xchgl (%esp), %ecx \r
361\r
8f07f895 362ErrorCodeAndVectorOnStack:\r
363 pushl %ebp\r
364 movl %esp, %ebp\r
365\r
366 #\r
367 # Stack:\r
368 # +---------------------+\r
369 # + EFlags +\r
370 # +---------------------+\r
371 # + CS +\r
372 # +---------------------+\r
373 # + EIP +\r
374 # +---------------------+\r
375 # + Error Code +\r
376 # +---------------------+\r
377 # + Vector Number +\r
378 # +---------------------+\r
379 # + EBP +\r
380 # +---------------------+ <-- EBP\r
381 #\r
382\r
383 #\r
384 # Align stack to make sure that EFI_FX_SAVE_STATE_IA32 of EFI_SYSTEM_CONTEXT_IA32\r
385 # is 16-byte aligned\r
386 #\r
387 andl $0x0fffffff0, %esp \r
388 subl $12, %esp\r
389\r
e41aad15
JF
390 subl $8, %esp\r
391 pushl $0 # check EXCEPTION_HANDLER_CONTEXT.OldIdtHandler\r
392 pushl $0 # check EXCEPTION_HANDLER_CONTEXT.ExceptionDataFlag\r
393 \r
8f07f895 394#; UINT32 Edi, Esi, Ebp, Esp, Ebx, Edx, Ecx, Eax;\r
395 pushl %eax\r
396 pushl %ecx\r
397 pushl %edx\r
398 pushl %ebx\r
399 leal 24(%ebp), %ecx\r
400 pushl %ecx # ESP\r
401 pushl (%ebp) # EBP\r
402 pushl %esi\r
403 pushl %edi\r
404\r
405#; UINT32 Gs, Fs, Es, Ds, Cs, Ss;\r
406 movl %ss, %eax\r
407 pushl %eax\r
408 movzwl 16(%ebp), %eax \r
409 pushl %eax\r
410 movl %ds, %eax\r
411 pushl %eax\r
412 movl %es, %eax\r
413 pushl %eax\r
414 movl %fs, %eax\r
415 pushl %eax\r
416 movl %gs, %eax\r
417 pushl %eax\r
418\r
419#; UINT32 Eip;\r
420 movl 12(%ebp), %eax\r
421 pushl %eax\r
422\r
423#; UINT32 Gdtr[2], Idtr[2];\r
424 subl $8, %esp\r
425 sidt (%esp)\r
426 movl 2(%esp), %eax\r
427 xchgl (%esp), %eax\r
428 andl $0x0FFFF, %eax \r
429 movl %eax, 4(%esp)\r
430\r
431 subl $8, %esp\r
432 sgdt (%esp)\r
433 movl 2(%esp), %eax\r
434 xchgl (%esp), %eax\r
435 andl $0x0FFFF, %eax \r
436 movl %eax, 4(%esp)\r
437\r
438#; UINT32 Ldtr, Tr;\r
439 xorl %eax, %eax\r
440 str %ax\r
441 pushl %eax\r
442 sldt %ax\r
443 pushl %eax\r
444\r
445#; UINT32 EFlags;\r
446 movl 20(%ebp), %eax\r
447 pushl %eax\r
448\r
449#; UINT32 Cr0, Cr1, Cr2, Cr3, Cr4;\r
450 movl %cr4, %eax\r
451 orl $0x208, %eax\r
452 movl %eax, %cr4\r
453 pushl %eax\r
454 movl %cr3, %eax\r
455 pushl %eax\r
456 movl %cr2, %eax\r
457 pushl %eax\r
458 xorl %eax, %eax\r
459 pushl %eax\r
460 movl %cr0, %eax\r
461 pushl %eax\r
462\r
463#; UINT32 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;\r
464 movl %dr7, %eax\r
465 pushl %eax\r
466 movl %dr6, %eax\r
467 pushl %eax\r
468 movl %dr3, %eax\r
469 pushl %eax\r
470 movl %dr2, %eax\r
471 pushl %eax\r
472 movl %dr1, %eax\r
473 pushl %eax\r
474 movl %dr0, %eax\r
475 pushl %eax\r
476\r
477#; FX_SAVE_STATE_IA32 FxSaveState;\r
478 subl $512, %esp\r
479 movl %esp, %edi\r
480 .byte 0x0f, 0x0ae, 0x07 #fxsave [edi]\r
481\r
482#; UEFI calling convention for IA32 requires that Direction flag in EFLAGs is clear\r
483 cld\r
484\r
485#; UINT32 ExceptionData;\r
486 pushl 8(%ebp)\r
487\r
488#; Prepare parameter and call\r
489 movl %esp, %edx\r
490 pushl %edx\r
491 movl 4(%ebp), %edx\r
492 pushl %edx\r
493\r
494 #\r
495 # Call External Exception Handler\r
496 #\r
497 call ASM_PFX(CommonExceptionHandler)\r
498 addl $8, %esp\r
499\r
500 cli\r
501#; UINT32 ExceptionData;\r
502 addl $4, %esp\r
503\r
504#; FX_SAVE_STATE_IA32 FxSaveState;\r
505 movl %esp, %esi\r
506 .byte 0x0f, 0x0ae, 0x0e # fxrstor [esi]\r
507 addl $512, %esp\r
508\r
509#; UINT32 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;\r
510#; Skip restoration of DRx registers to support in-circuit emualators\r
511#; or debuggers set breakpoint in interrupt/exception context\r
512 addl $24, %esp\r
513\r
514#; UINT32 Cr0, Cr1, Cr2, Cr3, Cr4;\r
515 popl %eax\r
516 movl %eax, %cr0\r
517 addl $4, %esp # not for Cr1\r
518 popl %eax\r
519 movl %eax, %cr2\r
520 popl %eax\r
521 movl %eax, %cr3\r
522 popl %eax\r
523 movl %eax, %cr4\r
524\r
525#; UINT32 EFlags;\r
526 popl 20(%ebp)\r
527\r
528#; UINT32 Ldtr, Tr;\r
529#; UINT32 Gdtr[2], Idtr[2];\r
530#; Best not let anyone mess with these particular registers...\r
531 addl $24, %esp\r
532\r
533#; UINT32 Eip;\r
534 popl 12(%ebp)\r
535\r
536#; UINT32 Gs, Fs, Es, Ds, Cs, Ss;\r
537#; NOTE - modified segment registers could hang the debugger... We\r
538#; could attempt to insulate ourselves against this possibility,\r
539#; but that poses risks as well.\r
540#;\r
541 popl %gs\r
542 popl %fs\r
543 popl %es\r
544 popl %ds\r
545 popl 16(%ebp)\r
546 popl %ss\r
547\r
548#; UINT32 Edi, Esi, Ebp, Esp, Ebx, Edx, Ecx, Eax;\r
549 popl %edi\r
550 popl %esi\r
551 addl $4, %esp # not for ebp\r
552 addl $4, %esp # not for esp\r
553 popl %ebx\r
554 popl %edx\r
555 popl %ecx\r
556 popl %eax\r
557\r
e41aad15
JF
558 popl -8(%ebp)\r
559 popl -4(%ebp)\r
8f07f895 560 movl %ebp, %esp\r
561 popl %ebp\r
562 addl $8, %esp\r
e41aad15
JF
563 cmpl $0, -16(%esp) # check EXCEPTION_HANDLER_CONTEXT.OldIdtHandler\r
564 jz DoReturn\r
565 cmpl $1, -20(%esp) # check EXCEPTION_HANDLER_CONTEXT.ExceptionDataFlag\r
566 jz ErrorCode\r
567 jmp *-16(%esp)\r
568ErrorCode:\r
569 subl $4, %esp\r
570 jmp *-12(%esp)\r
571\r
572DoReturn:\r
573 cmpl $0, ASM_PFX(mDoFarReturnFlag)\r
574 jz DoIret\r
575 pushl 8(%esp) # save EFLAGS\r
576 addl $16, %esp\r
577 pushl -8(%esp) # save CS in new location\r
578 pushl -8(%esp) # save EIP in new location\r
579 pushl -8(%esp) # save EFLAGS in new location\r
580 popfl # restore EFLAGS\r
581 retf # far return\r
582\r
583DoIret:\r
8f07f895 584 iretl\r
585\r
586\r
587#---------------------------------------;\r
e41aad15
JF
588# _AsmGetTemplateAddressMap ;\r
589#---------------------------------------;\r
8f07f895 590# \r
591# Protocol prototype\r
e41aad15 592# AsmGetTemplateAddressMap (\r
8f07f895 593# EXCEPTION_HANDLER_TEMPLATE_MAP *AddressMap\r
594# );\r
595# \r
596# Routine Description:\r
597# \r
598# Return address map of interrupt handler template so that C code can generate\r
599# interrupt table.\r
600# \r
601# Arguments:\r
602# \r
603# \r
604# Returns: \r
605# \r
606# Nothing\r
607#\r
608# \r
609# Input: [ebp][0] = Original ebp\r
610# [ebp][4] = Return address\r
611# \r
612# Output: Nothing\r
613# \r
614# Destroys: Nothing\r
615#-----------------------------------------------------------------------------;\r
616#-------------------------------------------------------------------------------------\r
617# AsmGetAddressMap (&AddressMap);\r
618#-------------------------------------------------------------------------------------\r
e41aad15
JF
619ASM_GLOBAL ASM_PFX(AsmGetTemplateAddressMap)\r
620ASM_PFX(AsmGetTemplateAddressMap):\r
8f07f895 621\r
622 pushl %ebp\r
623 movl %esp,%ebp\r
624 pushal\r
625\r
626 movl 0x8(%ebp), %ebx\r
627 movl $Exception0Handle, (%ebx)\r
628 movl $(Exception1Handle - Exception0Handle), 0x4(%ebx)\r
e41aad15 629 movl $(HookAfterStubBegin), 0x8(%ebx)\r
8f07f895 630\r
631 popal\r
632 popl %ebp\r
633 ret\r
e41aad15
JF
634#-------------------------------------------------------------------------------------\r
635# AsmVectorNumFixup (*VectorBase, VectorNum);\r
636#-------------------------------------------------------------------------------------\r
637ASM_GLOBAL ASM_PFX(AsmVectorNumFixup)\r
638ASM_PFX(AsmVectorNumFixup):\r
639 movl 8(%esp), %eax\r
640 movl 4(%esp), %ecx\r
641 movb %al, (VectorNum - HookAfterStubBegin)(%ecx)\r
642 ret\r