Changeset 0e30dec in mainline for arch/ia32/src/asm.S


Ignore:
Timestamp:
2006-03-15T14:56:13Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b629483
Parents:
f8973c00
Message:

Improved ia32 interrupt handlers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/asm.S

    rf8973c00 r0e30dec  
    9090                movl $0, %eax
    9191        .endif
    92         andl $ERROR_WORD_INTERRUPT_LIST,%eax
     92        andl $ERROR_WORD_INTERRUPT_LIST, %eax
     93        movl (%esp), %eax
    9394
    9495        /*
    95          * If this interrupt/exception  stores error word,
     96         * If this interrupt/exception stores error word,
    9697         * we need to pop EAX.
    9798         * If this interrupt doesn't store error word, we emulate it
    98          * for the sake of consistent pstate structure. In that case
     99         * for the sake of consistent istate structure. In that case
    99100         * we merely leave the EAX on the stack.
    100101         */
     
    103104        /*
    104105         * This exception stores error word.
     106         * Remove EAX from the stack.
    105107         */
    106         pop %eax
    107         jmp 1f
     108        addl $4, %esp
    108109
    1091100:
    110         /*
    111          * This interrupt doesn't store error word.
    112          * Just restore EAX without doing POP.
    113          */
    114         movl (%esp), %eax
    115 
    116 1:
    117111        pusha
    118112        movl %esp, %ebp
    119113        push %ds
    120114        push %es
     115        push %fs
     116        push %gs
    121117
    122118        # we must fill the data segment registers
     
    125121        movw %ax,%es
    126122
    127         movl $(\i),%edi
    128123        pushl %ebp
    129         pushl %edi
     124        pushl $(\i)
    130125        call exc_dispatch
    131126        addl $8,%esp
    132127
     128        pop %gs
     129        pop %fs
    133130        pop %es
    134131        pop %ds
     
    137134        pushfl
    138135        pop %eax
    139         and $0xFFFFBFFF,%eax
     136        and $0xffffbfff,%eax
    140137        push %eax
    141138        popfl
    142139       
    143140        popa
    144         add $4,%esp     # Skip error word, whether real or fake.
     141        addl $4,%esp    # Skip error word, whether real or fake.
    145142        iret
    146143
Note: See TracChangeset for help on using the changeset viewer.