projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57d1157
)
fix InterruptLevel code to return the correct level
author
Ali Saidi
<saidi@eecs.umich.edu>
Sun, 21 Jan 2007 04:12:32 +0000
(23:12 -0500)
committer
Ali Saidi
<saidi@eecs.umich.edu>
Sun, 21 Jan 2007 04:12:32 +0000
(23:12 -0500)
(the bit positition that is set in softint)
--HG--
extra : convert_revision :
ba0e1f4ec1f74aac64c3f9bb7eb1b771e17b013a
src/arch/sparc/regfile.cc
patch
|
blob
|
history
diff --git
a/src/arch/sparc/regfile.cc
b/src/arch/sparc/regfile.cc
index 5d8ac6a1780505889177c191092a766144306520..b36133544c85fc492882966eaf795d0e1ff55b93 100644
(file)
--- a/
src/arch/sparc/regfile.cc
+++ b/
src/arch/sparc/regfile.cc
@@
-189,10
+189,10
@@
int SparcISA::InterruptLevel(uint64_t softint)
if (softint & 0x10000 || softint & 0x1)
return 14;
- int level = 1
4
;
- while (level >
= 0 && !(1 << (level + 1)
& softint))
+ int level = 1
5
;
+ while (level >
0 && !(1 << level
& softint))
level--;
- if (1 <<
(level + 1)
& softint)
+ if (1 <<
level
& softint)
return level;
return 0;
}