Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144949
b: refs/heads/master
c: 47740eb
h: refs/heads/master
i:
  144947: 3e69469
v: v3
  • Loading branch information
Ralf Baechle committed May 14, 2009
1 parent d5c9228 commit f0dc1c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d57c31e5790d44905af0459a21086dbad167d26
refs/heads/master: 47740eb887796608fb4c629aa6b8507a2fb6c0eb
4 changes: 2 additions & 2 deletions trunk/arch/mips/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ static inline unsigned long __fls(unsigned long word)
int num;

if (BITS_PER_LONG == 32 &&
__builtin_constant_p(cpu_has_mips_r) && cpu_has_mips_r) {
__builtin_constant_p(cpu_has_clo_clz) && cpu_has_clo_clz) {
__asm__(
" .set push \n"
" .set mips32 \n"
Expand Down Expand Up @@ -644,7 +644,7 @@ static inline int fls(int x)
{
int r;

if (__builtin_constant_p(cpu_has_mips_r) && cpu_has_mips_r) {
if (__builtin_constant_p(cpu_has_clo_clz) && cpu_has_clo_clz) {
__asm__("clz %0, %1" : "=r" (x) : "r" (x));

return 32 - x;
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/mips/include/asm/cpu-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@
#define cpu_has_mips_r (cpu_has_mips32r1 | cpu_has_mips32r2 | \
cpu_has_mips64r1 | cpu_has_mips64r2)

/*
* MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other
* pre-MIPS32/MIPS53 processors have CLO, CLZ. For 64-bit kernels
* cpu_has_clo_clz also indicates the availability of DCLO and DCLZ.
*/
# ifndef cpu_has_clo_clz
# define cpu_has_clo_clz cpu_has_mips_r
# endif

#ifndef cpu_has_dsp
#define cpu_has_dsp (cpu_data[0].ases & MIPS_ASE_DSP)
#endif
Expand Down

0 comments on commit f0dc1c8

Please sign in to comment.