Patch from Ian Lance Taylor <ian@airs.com>:

Here is a patch which slightly improves the i386 interrupt handling
    macros.  These macros were written to use both input and output
    parameters, which is not necessary.  This patch changes them to use
    only an input or output parameter, as appropriate.  It also changes
    the constraints to permit the interrupt level to be loaded directly in
    and out of memory, rather than always requiring a register.
This commit is contained in:
Joel Sherrill
1999-02-18 21:41:59 +00:00
parent c0438adde9
commit 8dcbc16b6e

View File

@@ -36,7 +36,7 @@
asm volatile ( "pushf ; \
cli ; \
pop %0" \
: "=r" ((_level)) : "0" ((_level)) \
: "=rm" ((_level)) \
); \
}
@@ -44,7 +44,7 @@
{ \
asm volatile ( "push %0 ; \
popf" \
: "=r" ((_level)) : "0" ((_level)) \
: "=rm" ((_level)) \
); \
}
@@ -53,17 +53,17 @@
asm volatile ( "push %0 ; \
popf ; \
cli" \
: "=r" ((_level)) : "0" ((_level)) \
: "=rm" ((_level)) \
); \
}
#define i386_get_interrupt_level( _level ) \
do { \
register unsigned32 _eflags = 0; \
register unsigned32 _eflags; \
\
asm volatile ( "pushf ; \
pop %0" \
: "=r" ((_eflags)) : "0" ((_eflags)) \
: "=rm" ((_eflags)) \
); \
\
_level = (_eflags & EFLAGS_INTR_ENABLE) ? 0 : 1; \