Changeset 103014 in vbox for trunk/include
- Timestamp:
- Jan 24, 2024 12:58:12 AM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 161248
- Location:
- trunk/include/iprt
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm-mem-watcom-x86-16.h
r103005 r103014 52 52 * the watcom header at both the top and the bottom of asm.h file. 53 53 */ 54 55 #undef ASMMemZeroPage56 #ifdef IPRT_ASM_WATCOM_X86_16_WITH_PRAGMAS57 # if defined(__SW_0) || defined(__SW_1) || defined(__SW_2)58 # pragma aux ASMMemZeroPage = \59 "mov cx, 2048" \60 "xor ax, ax" \61 "rep stosw" \62 parm [es di] \63 modify exact [ax cx di];64 # else65 # pragma aux ASMMemZeroPage = \66 "mov ecx, 1024" \67 "xor eax, eax" \68 "rep stosd" \69 parm [es di] \70 modify exact [ax cx di];71 # endif72 #endif73 54 74 55 #undef ASMMemZero32 -
trunk/include/iprt/asm-mem-watcom-x86-32.h
r103005 r103014 53 53 */ 54 54 55 #undef ASMMemZeroPage56 #ifdef IPRT_ASM_WATCOM_X86_32_WITH_PRAGMAS57 #pragma aux ASMMemZeroPage = \58 "mov ecx, 1024" \59 "xor eax, eax" \60 "rep stosd" \61 parm [edi] \62 modify exact [eax ecx edi];63 #endif64 65 55 #undef ASMMemZero32 66 56 #ifdef IPRT_ASM_WATCOM_X86_32_WITH_PRAGMAS -
trunk/include/iprt/asm-mem.h
r103013 r103014 101 101 # endif 102 102 #endif 103 104 105 #ifdef RT_ASM_PAGE_SIZE106 /**107 * Zeros a 4K memory page.108 *109 * @param pv Pointer to the memory block. This must be page aligned.110 */111 # if (RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN) || (!defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86))112 RT_ASM_DECL_PRAGMA_WATCOM(void) ASMMemZeroPage(volatile void RT_FAR *pv) RT_NOTHROW_PROTO;113 # else114 DECLINLINE(void) ASMMemZeroPage(volatile void RT_FAR *pv) RT_NOTHROW_DEF115 {116 # if RT_INLINE_ASM_USES_INTRIN117 # ifdef RT_ARCH_AMD64118 __stosq((unsigned __int64 *)pv, 0, RT_ASM_PAGE_SIZE / 8);119 # else120 __stosd((unsigned long *)pv, 0, RT_ASM_PAGE_SIZE / 4);121 # endif122 123 # elif RT_INLINE_ASM_GNU_STYLE124 RTCCUINTREG uDummy;125 # ifdef RT_ARCH_AMD64126 __asm__ __volatile__("rep stosq"127 : "=D" (pv),128 "=c" (uDummy)129 : "0" (pv),130 "c" (RT_ASM_PAGE_SIZE >> 3),131 "a" (0)132 : "memory");133 # else134 __asm__ __volatile__("rep stosl"135 : "=D" (pv),136 "=c" (uDummy)137 : "0" (pv),138 "c" (RT_ASM_PAGE_SIZE >> 2),139 "a" (0)140 : "memory");141 # endif142 # else143 __asm144 {145 # ifdef RT_ARCH_AMD64146 xor rax, rax147 mov ecx, 0200h148 mov rdi, [pv]149 rep stosq150 # else151 xor eax, eax152 mov ecx, 0400h153 mov edi, [pv]154 rep stosd155 # endif156 }157 # endif158 }159 # endif160 #endif /* RT_ASM_PAGE_SIZE */161 103 162 104 -
trunk/include/iprt/mangling.h
r102647 r103014 291 291 # define ASMMemZero32 RT_MANGLER(ASMMemZero32) 292 292 # define ASMMemZero32_EndProc RT_MANGLER(ASMMemZero32_EndProc) 293 # define ASMMemZeroPage RT_MANGLER(ASMMemZeroPage)294 # define ASMMemZeroPage_EndProc RT_MANGLER(ASMMemZeroPage_EndProc)295 293 # define ASMMultU64ByU32DivByU32 RT_MANGLER(ASMMultU64ByU32DivByU32) 296 294 # define ASMMultU64ByU32DivByU32_EndProc RT_MANGLER(ASMMultU64ByU32DivByU32_EndProc)
Note:
See TracChangeset
for help on using the changeset viewer.