Changeset a1493d9 in mainline for arch/mips/src/exception.c


Ignore:
Timestamp:
2005-09-10T17:54:53Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8491c48
Parents:
24241cf
Message:

Fixed bad address loading in simulators.
FPU cooprocessor unusable now checks, if it is FPU that is unusable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips/src/exception.c

    r24241cf ra1493d9  
    3737void exception(struct exception_regdump *pstate)
    3838{
     39        int cause;
    3940        int excno;
    4041        __u32 epc_shift = 0;
     
    6061                THREAD->pstate = pstate;
    6162
     63        cause = cp0_cause_read();
     64        excno = cp0_cause_excno(cause);
    6265        /* decode exception number and process the exception */
    63         switch (excno = (cp0_cause_read() >> 2) & 0x1f) {
     66        switch (excno) {
    6467                case EXC_Int:
    6568                        interrupt();
     
    7174                case EXC_CpU:
    7275#ifdef FPU_LAZY     
    73                         scheduler_fpu_lazy_request();
    74 #else
    75                         panic("unhandled Coprocessor Unusable Exception\n");
     76                        if (cp0_cause_coperr(cause) == fpu_cop_id)
     77                                scheduler_fpu_lazy_request();
     78                        else
    7679#endif
     80                                panic("unhandled Coprocessor Unusable Exception\n");
    7781                        break;
    7882                case EXC_Mod:
Note: See TracChangeset for help on using the changeset viewer.