Skip to content

Commit 00f5094

Browse files
authored
Merge pull request #3514 from uselessboard/master
MIPS: fix FPU compile error for ls1bdev
2 parents 446091f + ab8e5e5 commit 00f5094

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

bsp/ls1bdev/.gitignore

Whitespace-only changes.

bsp/ls1bdev/drivers/board.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <rtthread.h>
1818
#include <rthw.h>
19+
#include <mips_fpu.h>
1920

2021
#include "board.h"
2122
#include "uart.h"

bsp/ls1bdev/rtconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
OBJCPY = PREFIX + 'objcopy'
3737
READELF = PREFIX + 'readelf'
3838

39-
DEVICE = ' -mips32'
39+
DEVICE = ' -mips32r2'
4040
CFLAGS = DEVICE + ' -EL -G0 -mno-abicalls -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -fomit-frame-pointer'
4141
AFLAGS = ' -c' + DEVICE + ' -EL -fno-pic -fno-builtin -mno-abicalls -x assembler-with-cpp'
4242
LFLAGS = DEVICE + ' -nostartfiles -EL -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T ls1b_ram.lds'

libcpu/mips/common/mips_fpu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* init hardware FPU
1919
*/
2020
#ifdef RT_USING_FPU
21-
inline void rt_hw_fpu_init(void)
21+
rt_inline void rt_hw_fpu_init(void)
2222
{
2323
rt_uint32_t c0_status = 0;
2424
rt_uint32_t c1_status = 0;
@@ -38,7 +38,7 @@ inline void rt_hw_fpu_init(void)
3838
return ;
3939
}
4040
#else
41-
inline void rt_hw_fpu_init(void){} /* Do nothing */
41+
rt_inline void rt_hw_fpu_init(void){} /* Do nothing */
4242
#endif
4343

4444
#endif

libcpu/mips/common/mips_regs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ do { \
999999

10001000
#define write_32bit_cp0_set1_register(register,value) \
10011001
__asm__ __volatile__( \
1002-
"ctc0\t%0,"STR(register)"\n\t" \
1002+
"ctc0\t%0,$"STR(register)"\n\t" \
10031003
"nop" \
10041004
: : "r" (value));
10051005

@@ -1037,14 +1037,14 @@ do { \
10371037
__asm__ __volatile__( \
10381038
".set\tpush\n\t" \
10391039
".set\treorder\n\t" \
1040-
"cfc1\t%0,"STR(source)"\n\t" \
1040+
"cfc1\t%0,$"STR(source)"\n\t" \
10411041
".set\tpop" \
10421042
: "=r" (__res)); \
10431043
__res;})
10441044

10451045
#define write_32bit_cp1_register(register,value) \
10461046
__asm__ __volatile__( \
1047-
"ctc1\t%0,"STR(register)"\n\t" \
1047+
"ctc1\t%0,$"STR(register)"\n\t" \
10481048
"nop" \
10491049
: : "r" (value));
10501050

0 commit comments

Comments
 (0)