2 * Selector manipulation functions
4 * Copyright 1995 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "wine/winbase16.h"
24 #include "wine/server.h"
25 #include "wine/debug.h"
26 #include "kernel16_private.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(selector
);
30 const struct ldt_copy
*ldt_copy
= NULL
;
32 static ULONG bitmap_data
[LDT_SIZE
/ 32];
33 static RTL_BITMAP ldt_bitmap
= { LDT_SIZE
, bitmap_data
};
34 static const LDT_ENTRY null_entry
;
35 static WORD first_ldt_entry
= 32;
37 /* get the number of selectors needed to cover up to the selector limit */
38 static inline WORD
get_sel_count( WORD sel
)
40 return (ldt_get_limit( sel
) >> 16) + 1;
43 static inline int is_gdt_sel( WORD sel
)
48 static LDT_ENTRY
ldt_make_entry( const void *base
, unsigned int limit
, unsigned char flags
)
52 entry
.BaseLow
= (WORD
)(ULONG_PTR
)base
;
53 entry
.HighWord
.Bits
.BaseMid
= (BYTE
)((ULONG_PTR
)base
>> 16);
54 entry
.HighWord
.Bits
.BaseHi
= (BYTE
)((ULONG_PTR
)base
>> 24);
55 if ((entry
.HighWord
.Bits
.Granularity
= (limit
>= 0x100000))) limit
>>= 12;
56 entry
.LimitLow
= (WORD
)limit
;
57 entry
.HighWord
.Bits
.LimitHi
= limit
>> 16;
58 entry
.HighWord
.Bits
.Dpl
= 3;
59 entry
.HighWord
.Bits
.Pres
= 1;
60 entry
.HighWord
.Bits
.Type
= flags
;
61 entry
.HighWord
.Bits
.Sys
= 0;
62 entry
.HighWord
.Bits
.Reserved_0
= 0;
63 entry
.HighWord
.Bits
.Default_Big
= (flags
& LDT_FLAGS_32BIT
) != 0;
67 /***********************************************************************
70 void init_selectors(void)
72 const struct ldt_copy
**ldt_copy_ptr
;
73 if (!is_gdt_sel( get_gs() )) first_ldt_entry
+= 512;
74 if (!is_gdt_sel( get_fs() )) first_ldt_entry
+= 512;
75 RtlSetBits( &ldt_bitmap
, 0, first_ldt_entry
);
76 ldt_copy_ptr
= (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "__wine_ldt_copy" );
77 if (ldt_copy_ptr
) ldt_copy
= *ldt_copy_ptr
;
80 /***********************************************************************
83 BOOL
ldt_is_system( WORD sel
)
85 return is_gdt_sel( sel
) || ((sel
>> 3) < first_ldt_entry
);
88 /***********************************************************************
91 BOOL
ldt_is_valid( WORD sel
)
93 return !ldt_is_system( sel
) && RtlAreBitsSet( &ldt_bitmap
, sel
>> 3, 1 );
96 /***********************************************************************
99 void *ldt_get_ptr( WORD sel
, DWORD offset
)
101 if (ldt_is_system( sel
)) return (void *)offset
;
102 if (!(ldt_get_flags( sel
) & LDT_FLAGS_32BIT
)) offset
&= 0xffff;
103 return (char *)ldt_get_base( sel
) + offset
;
106 /***********************************************************************
109 BOOL
ldt_get_entry( WORD sel
, LDT_ENTRY
*entry
)
111 if (!ldt_is_valid( sel
))
116 *entry
= ldt_make_entry( ldt_get_base( sel
), ldt_get_limit( sel
), ldt_get_flags( sel
));
120 /***********************************************************************
123 void ldt_set_entry( WORD sel
, LDT_ENTRY entry
)
125 NtSetLdtEntries( sel
, entry
, 0, null_entry
);
129 static ULONG
alloc_entries( ULONG count
)
131 ULONG idx
= RtlFindClearBitsAndSet( &ldt_bitmap
, count
, first_ldt_entry
);
133 if (idx
== ~0u) return 0;
134 return (idx
<< 3) | 7;
137 static void free_entries( ULONG sel
, ULONG count
)
139 RtlClearBits( &ldt_bitmap
, sel
>> 3, count
);
142 ldt_set_entry( sel
, null_entry
);
148 /***********************************************************************
149 * AllocSelectorArray (KERNEL.206)
151 WORD WINAPI
AllocSelectorArray16( WORD count
)
153 WORD i
, sel
= alloc_entries( count
);
157 LDT_ENTRY entry
= ldt_make_entry( 0, 1, LDT_FLAGS_DATA
); /* avoid 0 base and limit */
158 for (i
= 0; i
< count
; i
++) ldt_set_entry( sel
+ (i
<< 3), entry
);
164 /***********************************************************************
165 * AllocSelector (KERNEL.175)
167 WORD WINAPI
AllocSelector16( WORD sel
)
169 WORD newsel
, count
, i
;
171 count
= sel
? get_sel_count(sel
) : 1;
172 newsel
= alloc_entries( count
);
173 TRACE("(%04x): returning %04x\n", sel
, newsel
);
174 if (!newsel
) return 0;
175 if (!sel
) return newsel
; /* nothing to copy */
176 for (i
= 0; i
< count
; i
++)
179 if (!ldt_get_entry( sel
+ (i
<< 3), &entry
)) break;
180 ldt_set_entry( newsel
+ (i
<< 3), entry
);
186 /***********************************************************************
187 * FreeSelector (KERNEL.176)
189 WORD WINAPI
FreeSelector16( WORD sel
)
193 if (idx
< first_ldt_entry
) return sel
; /* error */
194 if (!RtlAreBitsSet( &ldt_bitmap
, idx
, 1 )) return sel
; /* error */
195 free_entries( sel
, 1 );
200 /***********************************************************************
201 * SELECTOR_SetEntries
203 * Set the LDT entries for an array of selectors.
205 static void SELECTOR_SetEntries( WORD sel
, const void *base
, DWORD size
, unsigned char flags
)
207 WORD i
, count
= (size
+ 0xffff) / 0x10000;
209 for (i
= 0; i
< count
; i
++)
211 ldt_set_entry( sel
+ (i
<< 3), ldt_make_entry( base
, size
- 1, flags
));
212 base
= (const char *)base
+ 0x10000;
213 size
-= 0x10000; /* yep, Windows sets limit like that, not 64K sel units */
218 /***********************************************************************
219 * SELECTOR_AllocBlock
221 * Allocate selectors for a block of linear memory.
223 WORD
SELECTOR_AllocBlock( const void *base
, DWORD size
, unsigned char flags
)
228 count
= (size
+ 0xffff) / 0x10000;
229 if ((sel
= alloc_entries( count
))) SELECTOR_SetEntries( sel
, base
, size
, flags
);
234 /***********************************************************************
237 * Free a block of selectors.
239 void SELECTOR_FreeBlock( WORD sel
)
241 WORD idx
= sel
>> 3, count
= get_sel_count( sel
);
243 TRACE("(%04x,%d)\n", sel
, count
);
245 if (idx
< first_ldt_entry
) return; /* error */
246 if (!RtlAreBitsSet( &ldt_bitmap
, idx
, count
)) return; /* error */
247 free_entries( sel
, count
);
251 /***********************************************************************
252 * SELECTOR_ReallocBlock
254 * Change the size of a block of selectors.
256 WORD
SELECTOR_ReallocBlock( WORD sel
, const void *base
, DWORD size
)
258 int oldcount
, newcount
;
262 if (!ldt_is_valid( sel
)) return sel
;
263 flags
= ldt_get_flags( sel
);
264 oldcount
= (ldt_get_limit( sel
) >> 16) + 1;
265 newcount
= (size
+ 0xffff) >> 16;
267 if (oldcount
< newcount
) /* we need to add selectors */
269 ULONG idx
= sel
>> 3;
271 if (RtlAreBitsClear( &ldt_bitmap
, idx
+ oldcount
, newcount
- oldcount
))
273 RtlSetBits( &ldt_bitmap
, idx
+ oldcount
, newcount
- oldcount
);
277 free_entries( sel
, oldcount
);
278 sel
= alloc_entries( newcount
);
281 else if (oldcount
> newcount
)
283 free_entries( sel
+ (newcount
<< 3), oldcount
- newcount
);
285 if (sel
) SELECTOR_SetEntries( sel
, base
, size
, flags
);
290 /***********************************************************************
291 * PrestoChangoSelector (KERNEL.177)
293 WORD WINAPI
PrestoChangoSelector16( WORD selSrc
, WORD selDst
)
295 if (!ldt_is_valid( selSrc
)) return selDst
;
296 /* toggle the executable bit */
297 ldt_set_entry( selDst
, ldt_make_entry( ldt_get_base( selSrc
), ldt_get_limit( selSrc
),
298 ldt_get_flags( selSrc
) ^ (LDT_FLAGS_CODE
^ LDT_FLAGS_DATA
) ));
303 /***********************************************************************
304 * AllocCStoDSAlias (KERNEL.170)
305 * AllocAlias (KERNEL.172)
307 WORD WINAPI
AllocCStoDSAlias16( WORD sel
)
311 if (!ldt_is_valid( sel
)) return 0;
312 newsel
= AllocSelector16( 0 );
313 TRACE("(%04x): returning %04x\n", sel
, newsel
);
314 if (!newsel
) return 0;
315 ldt_set_entry( newsel
, ldt_make_entry( ldt_get_base(sel
), ldt_get_limit(sel
), LDT_FLAGS_DATA
));
320 /***********************************************************************
321 * AllocDStoCSAlias (KERNEL.171)
323 WORD WINAPI
AllocDStoCSAlias16( WORD sel
)
327 if (!ldt_is_valid( sel
)) return 0;
328 newsel
= AllocSelector16( 0 );
329 TRACE("(%04x): returning %04x\n", sel
, newsel
);
330 if (!newsel
) return 0;
331 ldt_set_entry( newsel
, ldt_make_entry( ldt_get_base(sel
), ldt_get_limit(sel
), LDT_FLAGS_CODE
));
336 /***********************************************************************
337 * LongPtrAdd (KERNEL.180)
339 void WINAPI
LongPtrAdd16( SEGPTR ptr
, DWORD add
)
341 WORD sel
= SELECTOROF( ptr
);
343 if (!ldt_is_valid( sel
)) return;
344 ldt_set_entry( sel
, ldt_make_entry( (char *)ldt_get_base( sel
) + add
,
345 ldt_get_limit( sel
), ldt_get_flags( sel
)));
349 /***********************************************************************
350 * GetSelectorBase (KERNEL.186)
352 DWORD WINAPI
GetSelectorBase( WORD sel
)
354 /* if base points into DOSMEM, assume we have to
355 * return pointer into physical lower 1MB */
356 return DOSMEM_MapLinearToDos( ldt_get_base( sel
));
360 /***********************************************************************
361 * SetSelectorBase (KERNEL.187)
363 WORD WINAPI
SetSelectorBase( WORD sel
, DWORD base
)
365 if (!ldt_is_valid( sel
)) return 0;
366 ldt_set_entry( sel
, ldt_make_entry( DOSMEM_MapDosToLinear(base
),
367 ldt_get_limit( sel
), ldt_get_flags( sel
)));
372 /***********************************************************************
373 * GetSelectorLimit (KERNEL.188)
375 DWORD WINAPI
GetSelectorLimit16( WORD sel
)
377 return ldt_get_limit( sel
);
381 /***********************************************************************
382 * SetSelectorLimit (KERNEL.189)
384 WORD WINAPI
SetSelectorLimit16( WORD sel
, DWORD limit
)
386 if (!ldt_is_valid( sel
)) return 0;
387 ldt_set_entry( sel
, ldt_make_entry( ldt_get_base( sel
), limit
, ldt_get_flags( sel
)));
392 /***********************************************************************
393 * SelectorAccessRights (KERNEL.196)
395 WORD WINAPI
SelectorAccessRights16( WORD sel
, WORD op
, WORD val
)
399 if (!ldt_get_entry( sel
, &entry
)) return 0;
400 if (op
== 0) /* get */
402 return entry
.HighWord
.Bytes
.Flags1
| ((entry
.HighWord
.Bytes
.Flags2
& 0xf0) << 8);
406 entry
.HighWord
.Bytes
.Flags1
= LOBYTE(val
) | 0xf0;
407 entry
.HighWord
.Bytes
.Flags2
= (entry
.HighWord
.Bytes
.Flags2
& 0x0f) | (HIBYTE(val
) & 0xf0);
408 ldt_set_entry( sel
, entry
);
414 /***********************************************************************
415 * IsBadCodePtr (KERNEL.336)
417 BOOL16 WINAPI
IsBadCodePtr16( SEGPTR ptr
)
419 WORD sel
= SELECTOROF( ptr
);
421 /* check for code segment, ignoring conforming, read-only and accessed bits */
422 if ((ldt_get_flags( sel
) ^ LDT_FLAGS_CODE
) & 0x18) return TRUE
;
423 if (OFFSETOF(ptr
) > ldt_get_limit( sel
)) return TRUE
;
428 /***********************************************************************
429 * IsBadStringPtr (KERNEL.337)
431 BOOL16 WINAPI
IsBadStringPtr16( SEGPTR ptr
, UINT16 size
)
433 WORD sel
= SELECTOROF( ptr
);
435 /* check for data or readable code segment */
436 if (!(ldt_get_flags( sel
) & 0x10)) return TRUE
; /* system descriptor */
437 if ((ldt_get_flags( sel
) & 0x0a) == 0x08) return TRUE
; /* non-readable code segment */
438 if (strlen(MapSL(ptr
)) < size
) size
= strlen(MapSL(ptr
)) + 1;
439 if (size
&& (OFFSETOF(ptr
) + size
- 1 > ldt_get_limit( sel
))) return TRUE
;
444 /***********************************************************************
445 * IsBadHugeReadPtr (KERNEL.346)
447 BOOL16 WINAPI
IsBadHugeReadPtr16( SEGPTR ptr
, DWORD size
)
449 WORD sel
= SELECTOROF( ptr
);
451 /* check for data or readable code segment */
452 if (!(ldt_get_flags( sel
) & 0x10)) return TRUE
; /* system descriptor */
453 if ((ldt_get_flags( sel
) & 0x0a) == 0x08) return TRUE
; /* non-readable code segment */
454 if (size
&& (OFFSETOF(ptr
) + size
- 1 > ldt_get_limit( sel
))) return TRUE
;
459 /***********************************************************************
460 * IsBadHugeWritePtr (KERNEL.347)
462 BOOL16 WINAPI
IsBadHugeWritePtr16( SEGPTR ptr
, DWORD size
)
464 WORD sel
= SELECTOROF( ptr
);
466 /* check for writable data segment, ignoring expand-down and accessed flags */
467 if ((ldt_get_flags( sel
) ^ LDT_FLAGS_DATA
) & 0x1a) return TRUE
;
468 if (size
&& (OFFSETOF(ptr
) + size
- 1 > ldt_get_limit( sel
))) return TRUE
;
472 /***********************************************************************
473 * IsBadReadPtr (KERNEL.334)
475 BOOL16 WINAPI
IsBadReadPtr16( SEGPTR ptr
, UINT16 size
)
477 return IsBadHugeReadPtr16( ptr
, size
);
481 /***********************************************************************
482 * IsBadWritePtr (KERNEL.335)
484 BOOL16 WINAPI
IsBadWritePtr16( SEGPTR ptr
, UINT16 size
)
486 return IsBadHugeWritePtr16( ptr
, size
);
490 /***********************************************************************
491 * IsBadFlatReadWritePtr (KERNEL.627)
493 BOOL16 WINAPI
IsBadFlatReadWritePtr16( SEGPTR ptr
, DWORD size
, BOOL16 bWrite
)
495 return bWrite
? IsBadHugeWritePtr16( ptr
, size
)
496 : IsBadHugeReadPtr16( ptr
, size
);
500 /************************************* Win95 pointer mapping functions *
506 struct mapls_entry
*next
;
507 void *addr
; /* linear address */
508 int count
; /* ref count */
509 WORD sel
; /* selector */
512 static struct mapls_entry
*first_entry
;
515 /***********************************************************************
519 * Maps linear pointer to segmented.
521 SEGPTR WINAPI
MapLS( LPCVOID ptr
)
523 struct mapls_entry
*entry
, *free
= NULL
;
527 if (!HIWORD(ptr
)) return (SEGPTR
)LOWORD(ptr
);
529 base
= (const char *)ptr
- ((ULONG_PTR
)ptr
& 0x7fff);
530 HeapLock( GetProcessHeap() );
531 for (entry
= first_entry
; entry
; entry
= entry
->next
)
533 if (entry
->addr
== base
) break;
534 if (!entry
->count
) free
= entry
;
539 if (!free
) /* no free entry found, create a new one */
541 if (!(free
= HeapAlloc( GetProcessHeap(), 0, sizeof(*free
) ))) goto done
;
542 if (!(free
->sel
= SELECTOR_AllocBlock( base
, 0x10000, LDT_FLAGS_DATA
)))
544 HeapFree( GetProcessHeap(), 0, free
);
548 free
->next
= first_entry
;
551 SetSelectorBase( free
->sel
, (DWORD
)base
);
552 free
->addr
= (void*)base
;
556 ret
= MAKESEGPTR( entry
->sel
, (const char *)ptr
- (char *)entry
->addr
);
558 HeapUnlock( GetProcessHeap() );
562 /***********************************************************************
563 * UnMapLS (KERNEL32.@)
564 * UnMapLS (KERNEL.359)
566 * Free mapped selector.
568 void WINAPI
UnMapLS( SEGPTR sptr
)
570 struct mapls_entry
*entry
;
571 WORD sel
= SELECTOROF(sptr
);
575 HeapLock( GetProcessHeap() );
576 for (entry
= first_entry
; entry
; entry
= entry
->next
) if (entry
->sel
== sel
) break;
577 if (entry
&& entry
->count
> 0) entry
->count
--;
578 HeapUnlock( GetProcessHeap() );
582 /***********************************************************************
586 * Maps fixed segmented pointer to linear.
588 LPVOID WINAPI
MapSL( SEGPTR sptr
)
590 return (char *)ldt_get_base( SELECTOROF(sptr
) ) + OFFSETOF(sptr
);
593 /***********************************************************************
594 * MapSLFix (KERNEL32.@)
596 * FIXME: MapSLFix and UnMapSLFixArray should probably prevent
597 * unexpected linear address change when GlobalCompact() shuffles
601 LPVOID WINAPI
MapSLFix( SEGPTR sptr
)
607 /***********************************************************************
608 * UnMapSLFixArray (KERNEL32.@)
610 * Must not change EAX, hence defined as asm function.
612 __ASM_STDCALL_FUNC( UnMapSLFixArray
, 8, "ret $8" )
614 /***********************************************************************
615 * SMapLS (KERNEL32.@)
617 __ASM_STDCALL_FUNC( SMapLS
, 0,
619 "testl $0xffff0000,%eax\n\t"
622 "call " __ASM_STDCALL("MapLS",4) "\n\t"
626 /***********************************************************************
627 * SUnMapLS (KERNEL32.@)
629 __ASM_STDCALL_FUNC( SUnMapLS
, 0,
630 "pushl %eax\n\t" /* preserve eax */
632 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
636 /***********************************************************************
637 * SMapLS_IP_EBP_8 (KERNEL32.@)
639 * These functions map linear pointers at [EBP+xxx] to segmented pointers
641 * Win95 uses some kind of alias structs, which it stores in [EBP+x] to
642 * unravel them at SUnMapLS. We just store the segmented pointer there.
644 __ASM_STDCALL_FUNC( SMapLS_IP_EBP_8
, 0,
645 "movl 8(%ebp),%eax\n\t"
646 "call " __ASM_STDCALL("SMapLS",0) "\n\t"
647 "movl %edx,8(%ebp)\n\t"
650 /***********************************************************************
651 * SMapLS_IP_EBP_12 (KERNEL32.@)
653 __ASM_STDCALL_FUNC( SMapLS_IP_EBP_12
, 0,
654 "movl 12(%ebp),%eax\n\t"
655 "call " __ASM_STDCALL("SMapLS",0) "\n\t"
656 "movl %edx,12(%ebp)\n\t"
659 /***********************************************************************
660 * SMapLS_IP_EBP_16 (KERNEL32.@)
662 __ASM_STDCALL_FUNC( SMapLS_IP_EBP_16
, 0,
663 "movl 16(%ebp),%eax\n\t"
664 "call " __ASM_STDCALL("SMapLS",0) "\n\t"
665 "movl %edx,16(%ebp)\n\t"
668 /***********************************************************************
669 * SMapLS_IP_EBP_20 (KERNEL32.@)
671 __ASM_STDCALL_FUNC( SMapLS_IP_EBP_20
, 0,
672 "movl 20(%ebp),%eax\n\t"
673 "call " __ASM_STDCALL("SMapLS",0) "\n\t"
674 "movl %edx,20(%ebp)\n\t"
677 /***********************************************************************
678 * SMapLS_IP_EBP_24 (KERNEL32.@)
680 __ASM_STDCALL_FUNC( SMapLS_IP_EBP_24
, 0,
681 "movl 24(%ebp),%eax\n\t"
682 "call " __ASM_STDCALL("SMapLS",0) "\n\t"
683 "movl %edx,24(%ebp)\n\t"
686 /***********************************************************************
687 * SMapLS_IP_EBP_28 (KERNEL32.@)
689 __ASM_STDCALL_FUNC( SMapLS_IP_EBP_28
, 0,
690 "movl 28(%ebp),%eax\n\t"
691 "call " __ASM_STDCALL("SMapLS",0) "\n\t"
692 "movl %edx,28(%ebp)\n\t"
695 /***********************************************************************
696 * SMapLS_IP_EBP_32 (KERNEL32.@)
698 __ASM_STDCALL_FUNC( SMapLS_IP_EBP_32
, 0,
699 "movl 32(%ebp),%eax\n\t"
700 "call " __ASM_STDCALL("SMapLS",0) "\n\t"
701 "movl %edx,32(%ebp)\n\t"
704 /***********************************************************************
705 * SMapLS_IP_EBP_36 (KERNEL32.@)
707 __ASM_STDCALL_FUNC( SMapLS_IP_EBP_36
, 0,
708 "movl 36(%ebp),%eax\n\t"
709 "call " __ASM_STDCALL("SMapLS",0) "\n\t"
710 "movl %edx,36(%ebp)\n\t"
713 /***********************************************************************
714 * SMapLS_IP_EBP_40 (KERNEL32.@)
716 __ASM_STDCALL_FUNC( SMapLS_IP_EBP_40
, 0,
717 "movl 40(%ebp),%eax\n\t"
718 "call " __ASM_STDCALL("SMapLS",0) "\n\t"
719 "movl %edx,40(%ebp)\n\t"
722 /***********************************************************************
723 * SUnMapLS_IP_EBP_8 (KERNEL32.@)
725 __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_8
, 0,
726 "pushl %eax\n\t" /* preserve eax */
728 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
729 "movl $0,8(%ebp)\n\t"
733 /***********************************************************************
734 * SUnMapLS_IP_EBP_12 (KERNEL32.@)
736 __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_12
, 0,
737 "pushl %eax\n\t" /* preserve eax */
739 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
740 "movl $0,12(%ebp)\n\t"
744 /***********************************************************************
745 * SUnMapLS_IP_EBP_16 (KERNEL32.@)
747 __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_16
, 0,
748 "pushl %eax\n\t" /* preserve eax */
750 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
751 "movl $0,16(%ebp)\n\t"
755 /***********************************************************************
756 * SUnMapLS_IP_EBP_20 (KERNEL32.@)
758 __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_20
, 0,
759 "pushl %eax\n\t" /* preserve eax */
761 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
762 "movl $0,20(%ebp)\n\t"
766 /***********************************************************************
767 * SUnMapLS_IP_EBP_24 (KERNEL32.@)
769 __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_24
, 0,
770 "pushl %eax\n\t" /* preserve eax */
772 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
773 "movl $0,24(%ebp)\n\t"
777 /***********************************************************************
778 * SUnMapLS_IP_EBP_28 (KERNEL32.@)
780 __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_28
, 0,
781 "pushl %eax\n\t" /* preserve eax */
783 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
784 "movl $0,28(%ebp)\n\t"
788 /***********************************************************************
789 * SUnMapLS_IP_EBP_32 (KERNEL32.@)
791 __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_32
, 0,
792 "pushl %eax\n\t" /* preserve eax */
794 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
795 "movl $0,32(%ebp)\n\t"
799 /***********************************************************************
800 * SUnMapLS_IP_EBP_36 (KERNEL32.@)
802 __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_36
, 0,
803 "pushl %eax\n\t" /* preserve eax */
805 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
806 "movl $0,36(%ebp)\n\t"
810 /***********************************************************************
811 * SUnMapLS_IP_EBP_40 (KERNEL32.@)
813 __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_40
, 0,
814 "pushl %eax\n\t" /* preserve eax */
816 "call " __ASM_STDCALL("UnMapLS",4) "\n\t"
817 "movl $0,40(%ebp)\n\t"