Commit cc735c78 authored by David Mosberger's avatar David Mosberger Committed by David Mosberger

ia64: Fix ia64_fls() so it works for all possible 64-bit values.

	Reported by Dan Magenheimer (note: the bug didn't affect
	the existing kernel, since the possible values passed to
	the routine were always "safe").
parent 2135c38f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define _ASM_IA64_BITOPS_H #define _ASM_IA64_BITOPS_H
/* /*
* Copyright (C) 1998-2002 Hewlett-Packard Co * Copyright (C) 1998-2003 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com> * David Mosberger-Tang <davidm@hpl.hp.com>
* *
* 02/06/02 find_next_bit() and find_first_bit() added from Erich Focht's ia64 O(1) * 02/06/02 find_next_bit() and find_first_bit() added from Erich Focht's ia64 O(1)
...@@ -320,7 +320,7 @@ __ffs (unsigned long x) ...@@ -320,7 +320,7 @@ __ffs (unsigned long x)
static inline unsigned long static inline unsigned long
ia64_fls (unsigned long x) ia64_fls (unsigned long x)
{ {
double d = x; long double d = x;
long exp; long exp;
__asm__ ("getf.exp %0=%1" : "=r"(exp) : "f"(d)); __asm__ ("getf.exp %0=%1" : "=r"(exp) : "f"(d));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment