diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-02-18 21:41:59 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-02-18 21:41:59 +0000 |
commit | 8dcbc16b6eaa77fce4ea1a3dbf75e6de33807066 (patch) | |
tree | a6cd4ed5c0f72ce8bcfee79e200b4f430d7ecb53 | |
parent | Renamed network to wd8003. (diff) | |
download | rtems-8dcbc16b6eaa77fce4ea1a3dbf75e6de33807066.tar.bz2 |
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.
-rw-r--r-- | c/src/lib/libcpu/i386/cpu.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/c/src/lib/libcpu/i386/cpu.h b/c/src/lib/libcpu/i386/cpu.h index fa0c510a2b..d080f92cd4 100644 --- a/c/src/lib/libcpu/i386/cpu.h +++ b/c/src/lib/libcpu/i386/cpu.h @@ -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,20 +53,20 @@ 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; \ + _level = (_eflags & EFLAGS_INTR_ENABLE) ? 0 : 1; \ } while (0) #define _CPU_ISR_Disable( _level ) i386_disable_interrupts( _level ) |