Changeset 07d7870 in mainline


Ignore:
Timestamp:
2006-06-08T08:43:24Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b1facba
Parents:
846848a6
Message:

FPU psthread support for mips.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r846848a6 r07d7870  
    5252endif
    5353
     54CFLAGS += -DCONFIG_MIPS_FPU
     55
    5456BUILDS := $(addsuffix .build,$(DIRS))
    5557CLEANS := $(addsuffix .clean,$(DIRS))
  • libc/arch/mips32/Makefile.inc

    r846848a6 r07d7870  
    3434CFLAGS += -mips3
    3535
     36-include ../Makefile.config
     37ifeq ($(CONFIG_MIPS_FPU),y)
     38        CFLAGS += -DCONFIG_MIPS_FPU
     39endif
     40
    3641ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \
    3742        arch/$(ARCH)/src/psthread.S \
    3843        arch/$(ARCH)/src/thread.c
    3944
     45
    4046BFD_ARCH = mips
    4147BFD_NAME = elf32-little
  • libc/arch/mips32/include/context_offset.h

    r846848a6 r07d7870  
    1515#define OFFSET_TLS     0x30
    1616
     17#define OFFSET_F20     0x34
     18#define OFFSET_F21     0x38
     19#define OFFSET_F22     0x3c
     20#define OFFSET_F23     0x40
     21#define OFFSET_F24     0x44
     22#define OFFSET_F25     0x48
     23#define OFFSET_F26     0x4c
     24#define OFFSET_F27     0x50
     25#define OFFSET_F28     0x54
     26#define OFFSET_F29     0x58
     27#define OFFSET_F30     0x5c
     28
    1729 /** @}
    1830 */
  • libc/arch/mips32/include/psthread.h

    r846848a6 r07d7870  
    7070        uint32_t gp;
    7171        uint32_t tls; /* Thread local storage(=k1) */
     72
     73        uint32_t f20;
     74        uint32_t f21;
     75        uint32_t f22;
     76        uint32_t f23;
     77        uint32_t f24;
     78        uint32_t f25;
     79        uint32_t f26;
     80        uint32_t f27;
     81        uint32_t f28;
     82        uint32_t f29;
     83        uint32_t f30;
     84       
    7285} context_t;
    7386
  • libc/arch/mips32/src/entry.s

    r846848a6 r07d7870  
    6161        jal __exit
    6262        nop
     63.end
    6364
    6465.ent __entry_driver
     
    8384        jal __exit
    8485        nop
    85 
     86.end
    8687# Alignment of output section data to 0x4000
    8788.section .data
  • libc/arch/mips32/src/psthread.S

    r846848a6 r07d7870  
    3838.global context_save
    3939.global context_restore
    40 
     40       
    4141.macro CONTEXT_STORE r
    4242        sw $s0,OFFSET_S0(\r)
     
    5151        sw $gp,OFFSET_GP(\r)
    5252        sw $k1,OFFSET_TLS(\r)
     53
     54#ifdef CONFIG_MIPS_FPU 
     55        mfc1 $t0,$20
     56        sw $t0, OFFSET_F20(\r)
     57
     58        mfc1 $t0,$21
     59        sw $t0, OFFSET_F21(\r)
     60
     61        mfc1 $t0,$22
     62        sw $t0, OFFSET_F22(\r)
     63
     64        mfc1 $t0,$23
     65        sw $t0, OFFSET_F23(\r)
     66
     67        mfc1 $t0,$24
     68        sw $t0, OFFSET_F24(\r)
     69
     70        mfc1 $t0,$25
     71        sw $t0, OFFSET_F25(\r)
     72
     73        mfc1 $t0,$26
     74        sw $t0, OFFSET_F26(\r)
     75
     76        mfc1 $t0,$27
     77        sw $t0, OFFSET_F27(\r)
     78
     79        mfc1 $t0,$28
     80        sw $t0, OFFSET_F28(\r)
     81
     82        mfc1 $t0,$29
     83        sw $t0, OFFSET_F29(\r)
    5384       
     85        mfc1 $t0,$30
     86        sw $t0, OFFSET_F30(\r)
     87#endif 
     88               
    5489        sw $ra,OFFSET_PC(\r)
    5590        sw $sp,OFFSET_SP(\r)
     
    68103        lw $gp,OFFSET_GP(\r)
    69104        lw $k1,OFFSET_TLS(\r)
    70        
     105
     106#ifdef CONFIG_MIPS_FPU 
     107        lw $t0, OFFSET_F20(\r)
     108        mtc1 $t0,$20
     109
     110        lw $t0, OFFSET_F21(\r)
     111        mtc1 $t0,$21
     112
     113        lw $t0, OFFSET_F22(\r)
     114        mtc1 $t0,$22
     115
     116        lw $t0, OFFSET_F23(\r)
     117        mtc1 $t0,$23
     118
     119        lw $t0, OFFSET_F24(\r)
     120        mtc1 $t0,$24
     121
     122        lw $t0, OFFSET_F25(\r)
     123        mtc1 $t0,$25
     124
     125        lw $t0, OFFSET_F26(\r)
     126        mtc1 $t0,$26
     127
     128        lw $t0, OFFSET_F27(\r)
     129        mtc1 $t0,$27
     130
     131        lw $t0, OFFSET_F28(\r)
     132        mtc1 $t0,$28
     133
     134        lw $t0, OFFSET_F29(\r)
     135        mtc1 $t0,$29
     136
     137        lw $t0, OFFSET_F30(\r)
     138        mtc1 $t0,$30
     139#endif 
     140               
    71141        lw $ra,OFFSET_PC(\r)
    72142        lw $sp,OFFSET_SP(\r)
  • uspace.config

    r846848a6 r07d7870  
    2828! [ARCH=ppc64] PPC64_COMPILER (choice)
    2929% [ARCH=ppc64] SAVEAS PPC64_COMPILER COMPILER
     30
     31# MIPS FPU support
     32! [ARCH=mips32|ARCH=mips32eb] CONFIG_MIPS_FPU (n/y)
     33
Note: See TracChangeset for help on using the changeset viewer.