mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-20 04:30:55 -08:00
This change will be integrated but ignored (-ay) to the gg-epcore/union sources, so that they retain HopeNames. Copied from Perforce Change: 24911 ServerID: perforce.ravenbrook.com
27 lines
682 B
NASM
27 lines
682 B
NASM
; impl.asm.spi3: STACK PROBE
|
|
;
|
|
; $Id$
|
|
; Copyright (c) 2001 Ravenbrook Limited.
|
|
;
|
|
; This function reads a location that is probeDepth words beyond
|
|
; the current stack pointer. On intel platforms the stack grows
|
|
; downwards so this means reading from a location with a lesser address.
|
|
;
|
|
; The registers edi, esi, ebx are the registers defined to be preserved
|
|
; across function calls, so we do not use those.
|
|
|
|
.386
|
|
.model flat
|
|
.code
|
|
|
|
_StackProbe proc public ; (Size probeDepth)
|
|
push ebp ; frame pointer
|
|
mov ebp,esp
|
|
mov eax, [ebp+08]
|
|
neg eax
|
|
mov eax, [esp+eax*4] ; do the actual probe
|
|
leave
|
|
ret ; return
|
|
_StackProbe endp
|
|
|
|
end
|