Bug 79327 - the function hal_msbindex() has error
Summary: the function hal_msbindex() has error
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: eCos
Classification: Retired
Component: HAL
Version: 1.3.1
Hardware: arm7
OS: Linux
medium
medium
Target Milestone: ---
Assignee: eCos bugs internal list
QA Contact: eCos bugs internal list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-10 06:13 UTC by Need Real Name
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-06-20 16:17:58 UTC


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.