Changeset 8dcbc16b in rtems


Ignore:
Timestamp:
02/18/99 21:41:59 (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
a53a2bf7
Parents:
c0438add
Message:

Patch from Ian Lance Taylor <ian@…>:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/i386/cpu.h

    rc0438add r8dcbc16b  
    3737                    cli ; \
    3838                    pop %0" \
    39                     : "=r" ((_level)) : "0" ((_level)) \
     39                   : "=rm" ((_level)) \
    4040    ); \
    4141  }
     
    4545    asm volatile ( "push %0 ; \
    4646                    popf" \
    47                     : "=r" ((_level)) : "0" ((_level)) \
     47                    : "=rm" ((_level)) \
    4848    ); \
    4949  }
     
    5454                    popf ; \
    5555                    cli" \
    56                     : "=r" ((_level)) : "0" ((_level)) \
     56                    : "=rm" ((_level)) \
    5757    ); \
    5858  }
     
    6060#define i386_get_interrupt_level( _level ) \
    6161  do { \
    62     register unsigned32 _eflags = 0; \
     62    register unsigned32 _eflags; \
    6363    \
    6464    asm volatile ( "pushf ; \
    6565                    pop %0" \
    66                     : "=r" ((_eflags)) : "0" ((_eflags)) \
     66                    : "=rm" ((_eflags)) \
    6767    ); \
    6868    \
    69     _level = (_eflags &  EFLAGS_INTR_ENABLE) ? 0 : 1; \
     69    _level = (_eflags & EFLAGS_INTR_ENABLE) ? 0 : 1; \
    7070  } while (0)
    7171
Note: See TracChangeset for help on using the changeset viewer.