- Timestamp:
- Oct 24, 2024 12:43:36 PM (6 months ago)
- svn:sync-xref-src-repo-rev:
- 165505
- Location:
- trunk/src/VBox/Additions/3D/win/VBoxICD
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/3D/win/VBoxICD/VBoxICD.c
r106452 r106658 121 121 * and loading it in a lazy way fails for unknown reason on 64 bit Windows. 122 122 * 123 * Update 2024-10-24 / bird: It fails on AMD64 because you trash the parameter registers 124 * when making the call. duh. 125 * 123 126 * So just call VBoxLoadICD from DLL_PROCESS_ATTACH. 124 127 */ -
trunk/src/VBox/Additions/3D/win/VBoxICD/icd_forwarders.py
r106061 r106658 57 57 sys.exit() 58 58 59 asm_file.write('; AUTOGENERATED - DO NOT EDIT!\n') 59 60 asm_file.write('%include "iprt/asmdefs.mac"\n') 60 61 asm_file.write('\n') 61 62 asm_file.write(';;;; Enable ICD_LAZY_LOAD to lazy load the ICD DLL (does not work on Win64)\n') 62 63 asm_file.write('; %define ICD_LAZY_LOAD 1\n') 63 asm_file.write('\n')64 asm_file.write('%ifdef RT_ARCH_AMD64\n')65 asm_file.write('%define PTR_SIZE_PREFIX qword\n')66 asm_file.write('%else ; X86\n')67 asm_file.write('%define PTR_SIZE_PREFIX dword\n')68 asm_file.write('%endif\n')69 64 asm_file.write('\n') 70 65 asm_file.write('%ifdef ICD_LAZY_LOAD\n') … … 81 76 asm_file.write('; int3\n') 82 77 asm_file.write('%ifdef ICD_LAZY_LOAD\n') 83 asm_file.write(' mov xAX, PTR_SIZE_PREFIX NAME(g_hmodICD)\n') 84 asm_file.write(' mov xAX, [xAX]\n') 85 asm_file.write(' or xAX, xAX\n') 86 asm_file.write(' jnz l_icd_loaded_%s\n' % fn) 78 asm_file.write(' mov xAX, [NAME(g_hmodICD) xWrtRIP]\n') 79 asm_file.write(' test xAX, xAX\n') 80 asm_file.write(' jnz .already_loaded\n') 87 81 asm_file.write(' call NAME(VBoxLoadICD)\n') 88 asm_file.write(' l_icd_loaded_%s:\n' % fn)82 asm_file.write('.already_loaded:\n') 89 83 asm_file.write('%endif\n') 90 asm_file.write(' mov xAX, PTR_SIZE_PREFIX NAME(pfn_%s)\n' % fn) 91 asm_file.write(' mov xAX, [xAX]\n') 92 asm_file.write(' or xAX, xAX\n') 93 asm_file.write(' jnz l_jmp_to_%s\n' % fn) 84 asm_file.write(' mov xAX, [NAME(pfn_%s) xWrtRIP]\n' % fn) 85 asm_file.write(' test xAX, xAX\n') 86 asm_file.write(' jz .return\n') 87 asm_file.write(' jmp xAX\n') 88 asm_file.write('.return:\n') 94 89 asm_file.write('%ifdef RT_ARCH_AMD64\n') 95 90 asm_file.write(' ret\n') 96 91 asm_file.write('%else ; X86\n') 97 asm_file.write(' ret %s\n' % cbRet)92 asm_file.write(' ret %s\n' % cbRet) 98 93 asm_file.write('%endif\n') 99 asm_file.write('l_jmp_to_%s:\n' % fn)100 asm_file.write(' jmp xAX\n')101 94 asm_file.write('ENDPROC %s\n' % fn) 102 95
Note:
See TracChangeset
for help on using the changeset viewer.