diff options
author | rick | 2016-01-19 13:52:10 +0800 |
---|---|---|
committer | rick | 2016-01-21 10:41:43 +0800 |
commit | b19cc6bf2160e09607e141fe0fc571701070d1d6 (patch) | |
tree | 4a50690879d6e84708e254ac628ea1f075efd905 /arch/nds32 | |
parent | 077678eb0c226e52a1f90edabd3369ab26065b32 (diff) |
nds32: Fix compile error.
Fix compile error with gcc 4.9.3
Signed-off-by: rick <rick@andestech.com>
Cc: Andes <uboot@andestech.com>
Diffstat (limited to 'arch/nds32')
-rw-r--r-- | arch/nds32/cpu/n1213/start.S | 2 | ||||
-rw-r--r-- | arch/nds32/include/asm/macro.h | 22 | ||||
-rw-r--r-- | arch/nds32/include/asm/posix_types.h | 4 |
3 files changed, 16 insertions, 12 deletions
diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S index 2f0b76c04cf..8b7f8f45402 100644 --- a/arch/nds32/cpu/n1213/start.S +++ b/arch/nds32/cpu/n1213/start.S @@ -400,7 +400,7 @@ end_flush_dcache: ! FIXME: Other way to get PC? ! FIXME: Update according to the newest spec!! 1: - la $r28, 1 + li $r28, 1 push $r28 mfsr $r28, PSW ! $PSW push $r28 diff --git a/arch/nds32/include/asm/macro.h b/arch/nds32/include/asm/macro.h index f5c853991a6..66be2580522 100644 --- a/arch/nds32/include/asm/macro.h +++ b/arch/nds32/include/asm/macro.h @@ -23,20 +23,20 @@ */ .macro write32, addr, data - li $r4, addr - li $r5, data + li $r4, \addr + li $r5, \data swi $r5, [$r4] .endm .macro write16, addr, data - li $r4, addr - li $r5, data + li $r4, \addr + li $r5, \data shi $r5, [$r4] .endm .macro write8, addr, data - li $r4, addr - li $r5, data + li $r4, \addr + li $r5, \data sbi $r5, [$r4] .endm @@ -46,17 +46,17 @@ * Note: Instruction 'ori' supports immediate value up to 15 bits. */ .macro setbf32, addr, data - li $r4, addr + li $r4, \addr lwi $r5, [$r4] - li $r6, data + li $r6, \data or $r5, $r5, $r6 swi $r5, [$r4] .endm .macro setbf15, addr, data - li $r4, addr + li $r4, \addr lwi $r5, [$r4] - ori $r5, $r5, data + ori $r5, $r5, \data swi $r5, [$r4] .endm @@ -69,7 +69,7 @@ */ .macro wait_timer, time - li $r4, time + li $r4, \time 1: nop addi $r4, $r4, -1 diff --git a/arch/nds32/include/asm/posix_types.h b/arch/nds32/include/asm/posix_types.h index a92803878e8..e6c591dfe4f 100644 --- a/arch/nds32/include/asm/posix_types.h +++ b/arch/nds32/include/asm/posix_types.h @@ -33,7 +33,11 @@ typedef int __kernel_pid_t; typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; +#ifdef __GNUC__ +typedef __SIZE_TYPE__ __kernel_size_t; +#else typedef unsigned int __kernel_size_t; +#endif typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; typedef long __kernel_time_t; |