diff options
Diffstat (limited to 'arch/mips/lib/memset.S')
-rw-r--r-- | arch/mips/lib/memset.S | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/mips/lib/memset.S b/arch/mips/lib/memset.S index 3f8b8b3d0b23..3bf38422342f 100644 --- a/arch/mips/lib/memset.S +++ b/arch/mips/lib/memset.S | |||
@@ -5,6 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 1998, 1999, 2000 by Ralf Baechle | 6 | * Copyright (C) 1998, 1999, 2000 by Ralf Baechle |
7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
8 | * Copyright (C) 2007 Maciej W. Rozycki | ||
8 | */ | 9 | */ |
9 | #include <asm/asm.h> | 10 | #include <asm/asm.h> |
10 | #include <asm/asm-offsets.h> | 11 | #include <asm/asm-offsets.h> |
@@ -74,8 +75,16 @@ FEXPORT(__bzero) | |||
74 | bnez t0, small_memset | 75 | bnez t0, small_memset |
75 | andi t0, a0, LONGMASK /* aligned? */ | 76 | andi t0, a0, LONGMASK /* aligned? */ |
76 | 77 | ||
78 | #ifndef CONFIG_CPU_DADDI_WORKAROUNDS | ||
77 | beqz t0, 1f | 79 | beqz t0, 1f |
78 | PTR_SUBU t0, LONGSIZE /* alignment in bytes */ | 80 | PTR_SUBU t0, LONGSIZE /* alignment in bytes */ |
81 | #else | ||
82 | .set noat | ||
83 | li AT, LONGSIZE | ||
84 | beqz t0, 1f | ||
85 | PTR_SUBU t0, AT /* alignment in bytes */ | ||
86 | .set at | ||
87 | #endif | ||
79 | 88 | ||
80 | #ifdef __MIPSEB__ | 89 | #ifdef __MIPSEB__ |
81 | EX(LONG_S_L, a1, (a0), first_fixup) /* make word/dword aligned */ | 90 | EX(LONG_S_L, a1, (a0), first_fixup) /* make word/dword aligned */ |
@@ -106,7 +115,7 @@ memset_partial: | |||
106 | .set noat | 115 | .set noat |
107 | LONG_SRL AT, t0, 1 | 116 | LONG_SRL AT, t0, 1 |
108 | PTR_SUBU t1, AT | 117 | PTR_SUBU t1, AT |
109 | .set noat | 118 | .set at |
110 | #endif | 119 | #endif |
111 | jr t1 | 120 | jr t1 |
112 | PTR_ADDU a0, t0 /* dest ptr */ | 121 | PTR_ADDU a0, t0 /* dest ptr */ |