Merge pull request #3514 from uselessboard/master
MIPS: fix FPU compile error for ls1bdev
This commit is contained in:
commit
00f5094150
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
|
#include <mips_fpu.h>
|
||||||
|
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "uart.h"
|
#include "uart.h"
|
||||||
|
|
|
@ -36,7 +36,7 @@ OBJDUMP = PREFIX + 'objdump'
|
||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
READELF = PREFIX + 'readelf'
|
READELF = PREFIX + 'readelf'
|
||||||
|
|
||||||
DEVICE = ' -mips32'
|
DEVICE = ' -mips32r2'
|
||||||
CFLAGS = DEVICE + ' -EL -G0 -mno-abicalls -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -fomit-frame-pointer'
|
CFLAGS = DEVICE + ' -EL -G0 -mno-abicalls -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -fomit-frame-pointer'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -EL -fno-pic -fno-builtin -mno-abicalls -x assembler-with-cpp'
|
AFLAGS = ' -c' + DEVICE + ' -EL -fno-pic -fno-builtin -mno-abicalls -x assembler-with-cpp'
|
||||||
LFLAGS = DEVICE + ' -nostartfiles -EL -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T ls1b_ram.lds'
|
LFLAGS = DEVICE + ' -nostartfiles -EL -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T ls1b_ram.lds'
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* init hardware FPU
|
* init hardware FPU
|
||||||
*/
|
*/
|
||||||
#ifdef RT_USING_FPU
|
#ifdef RT_USING_FPU
|
||||||
inline void rt_hw_fpu_init(void)
|
rt_inline void rt_hw_fpu_init(void)
|
||||||
{
|
{
|
||||||
rt_uint32_t c0_status = 0;
|
rt_uint32_t c0_status = 0;
|
||||||
rt_uint32_t c1_status = 0;
|
rt_uint32_t c1_status = 0;
|
||||||
|
@ -38,7 +38,7 @@ inline void rt_hw_fpu_init(void)
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
inline void rt_hw_fpu_init(void){} /* Do nothing */
|
rt_inline void rt_hw_fpu_init(void){} /* Do nothing */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -999,7 +999,7 @@ do { \
|
||||||
|
|
||||||
#define write_32bit_cp0_set1_register(register,value) \
|
#define write_32bit_cp0_set1_register(register,value) \
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
"ctc0\t%0,"STR(register)"\n\t" \
|
"ctc0\t%0,$"STR(register)"\n\t" \
|
||||||
"nop" \
|
"nop" \
|
||||||
: : "r" (value));
|
: : "r" (value));
|
||||||
|
|
||||||
|
@ -1037,14 +1037,14 @@ do { \
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
".set\tpush\n\t" \
|
".set\tpush\n\t" \
|
||||||
".set\treorder\n\t" \
|
".set\treorder\n\t" \
|
||||||
"cfc1\t%0,"STR(source)"\n\t" \
|
"cfc1\t%0,$"STR(source)"\n\t" \
|
||||||
".set\tpop" \
|
".set\tpop" \
|
||||||
: "=r" (__res)); \
|
: "=r" (__res)); \
|
||||||
__res;})
|
__res;})
|
||||||
|
|
||||||
#define write_32bit_cp1_register(register,value) \
|
#define write_32bit_cp1_register(register,value) \
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
"ctc1\t%0,"STR(register)"\n\t" \
|
"ctc1\t%0,$"STR(register)"\n\t" \
|
||||||
"nop" \
|
"nop" \
|
||||||
: : "r" (value));
|
: : "r" (value));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue