Changeset ffc277e in mainline for arch/mips/src/fpu_context.c


Ignore:
Timestamp:
2005-09-10T00:52:13Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f3a6c8e5
Parents:
b02e5d1
Message:

Cleanup of makefiles to have common options in one main makefile.

Add simple build process for different simulators for MIPS.
Added FPU context & lazy FPU context switching to MIPS.
Cleanup of MIPS linker script.
Moved MIPS kernel above 1MB. Not tested on real machine yet, but it might help.

There is something broken with gcc inlined memcpy (either simulator or gcc), it is disabled on BigEndian mips now.

File:
1 edited

Legend:

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

    rb02e5d1 rffc277e  
    2929
    3030#include <fpu_context.h>
     31#include <arch.h>
     32#include <arch/cp0.h>
    3133
    32 void fpu_context_save(fpu_context_t *fctx)
    33 {
     34void fpu_disable(void)
     35{       
     36#ifdef HAVE_FPU
     37        cp0_status_write(cp0_status_read() & ~cp0_status_fpu_bit);
     38        if (THREAD && THREAD->pstate)
     39                THREAD->pstate->status &= ~cp0_status_fpu_bit;
     40#endif
    3441}
    3542
    36 
    37 void fpu_context_restore(fpu_context_t *fctx)
     43void fpu_enable(void)
    3844{
     45#ifdef HAVE_FPU
     46        cp0_status_write(cp0_status_read() | cp0_status_fpu_bit);
     47        if (THREAD && THREAD->pstate)
     48                THREAD->pstate->status |= cp0_status_fpu_bit;
     49#endif
    3950}
    4051
     52void fpu_init(void)
     53{
     54        /* TODO: Zero all registers */
     55}
Note: See TracChangeset for help on using the changeset viewer.