1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 01:41:01 -08:00
emacs/mps/code/spi3.asm
Richard Brooksby 3d5e2ca85f Adding hopenames back into the master sources, so that they can be included in the union sources along with the id keywords.
This was achieved by partially undoing changelist 24817, including an accidental corruption of eventgen.pl.

Copied from Perforce
 Change: 24877
 ServerID: perforce.ravenbrook.com
2001-12-06 18:14:02 +00:00

28 lines
722 B
NASM

; impl.asm.spi3: STACK PROBE
;
; $Id$
; $HopeName: MMsrc!spi3.asm(trunk.2) $
; 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