Bug 79327

Summary: the function hal_msbindex() has error
Product: [Retired] eCos Reporter: Need Real Name <zgd>
Component: HALAssignee: eCos bugs internal list <es-ecos-bugs-int>
Status: CLOSED WONTFIX QA Contact: eCos bugs internal list <es-ecos-bugs-int>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.3.1   
Target Milestone: ---   
Target Release: ---   
Hardware: arm7   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-20 16:17:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2002-12-10 06:13:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:
int hal_msbindex(int mask)
   {
    int i;
    for (i = 32;  i >= 0;  i++) {
      if (mask & (1<<i)) return (i);
    }
    return (-1);
    }

It should be 

int hal_msbindex(int mask)
   {
    int i;
    for (i = 31;  i >= 0;  i--) {
      if (mask & (1<<i)) return (i);
    }
    return (-1);
    }

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.look it 
2.think it
3.ok
	

Additional info:

Comment 1 Alex Schuilenburg 2003-06-20 16:17:58 UTC
This bug has moved to http://bugs.ecos.sourceware.org/show_bug.cgi?id=79327