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. * Copyright (C) 2000 Wolfgang Solfrank.
@ -31,7 +31,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <sys/cdefs.h> #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" #include "opt_ipkdb.h"
@ -72,8 +72,7 @@ void
ipkdb_trap() ipkdb_trap()
{ {
ipkdb_mode = IPKDB_CMD_STEP; ipkdb_mode = IPKDB_CMD_STEP;
__asm volatile ("pushf; pop %%eax; orl %0,%%eax; push %%eax; popf" x86_write_eflags(x86_read_eflags() | PSL_T));
:: "i"(PSL_T));
} }
int int
@ -87,7 +86,7 @@ ipkdb_trap_glue(frame)
|| (ipkdb_mode != IPKDB_CMD_STEP && frame.tf_trapno == T_TRCTRAP)) || (ipkdb_mode != IPKDB_CMD_STEP && frame.tf_trapno == T_TRCTRAP))
return 0; 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[EAX] = frame.tf_eax;
ipkdbregs[ECX] = frame.tf_ecx; ipkdbregs[ECX] = frame.tf_ecx;
ipkdbregs[EDX] = frame.tf_edx; ipkdbregs[EDX] = frame.tf_edx;