Replace more __asm

This commit is contained in:
ad 2008-06-24 16:30:09 +00:00
parent 28c7c338ce
commit c73fe0bf2d

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipkdb_glue.c,v 1.8 2005/12/24 20:07:10 perry Exp $ */
/* $NetBSD: ipkdb_glue.c,v 1.9 2008/06/24 16:30:09 ad Exp $ */
/*
* Copyright (C) 2000 Wolfgang Solfrank.
@ -31,7 +31,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ipkdb_glue.c,v 1.8 2005/12/24 20:07:10 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: ipkdb_glue.c,v 1.9 2008/06/24 16:30:09 ad Exp $");
#include "opt_ipkdb.h"
@ -72,8 +72,7 @@ void
ipkdb_trap()
{
ipkdb_mode = IPKDB_CMD_STEP;
__asm volatile ("pushf; pop %%eax; orl %0,%%eax; push %%eax; popf"
:: "i"(PSL_T));
x86_write_eflags(x86_read_eflags() | PSL_T));
}
int
@ -87,7 +86,7 @@ ipkdb_trap_glue(frame)
|| (ipkdb_mode != IPKDB_CMD_STEP && frame.tf_trapno == T_TRCTRAP))
return 0;
__asm volatile ("cli"); /* Interrupts need to be disabled while in IPKDB */
x86_disable_intr(); /* Interrupts need to be disabled while in IPKDB */
ipkdbregs[EAX] = frame.tf_eax;
ipkdbregs[ECX] = frame.tf_ecx;
ipkdbregs[EDX] = frame.tf_edx;