Actually add the check_stack_alignment implementation for x86.

This commit is contained in:
joerg 2010-12-03 20:51:21 +00:00
parent 12e38db326
commit 65b45bb0d8
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,15 @@
/* $NetBSD: h_initfini_align.S,v 1.1 2010/12/03 20:51:21 joerg Exp $ */
#include <machine/asm.h>
RCSID("$NetBSD: h_initfini_align.S,v 1.1 2010/12/03 20:51:21 joerg Exp $")
_ENTRY(check_stack_alignment)
movl %esp, %eax
andl $3, %eax
jz 1f
xorl %eax, %eax
ret
1:
incl %eax
ret

View File

@ -0,0 +1,16 @@
/* $NetBSD: h_initfini_align.S,v 1.1 2010/12/03 20:51:21 joerg Exp $ */
#include <machine/asm.h>
RCSID("$NetBSD: h_initfini_align.S,v 1.1 2010/12/03 20:51:21 joerg Exp $")
_ENTRY(check_stack_alignment)
movl %esp, %eax
andl $15, %eax
subl $8, %eax
jz 1f
xorl %eax, %eax
ret
1:
incl %eax
ret