projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc0df3f
)
ARM: Fix the CLZ instruction.
author
Gabe Black
<gblack@eecs.umich.edu>
Mon, 27 Jul 2009 07:52:59 +0000
(
00:52
-0700)
committer
Gabe Black
<gblack@eecs.umich.edu>
Mon, 27 Jul 2009 07:52:59 +0000
(
00:52
-0700)
src/arch/arm/isa/decoder.isa
patch
|
blob
|
history
diff --git
a/src/arch/arm/isa/decoder.isa
b/src/arch/arm/isa/decoder.isa
index f43395c19bde91bd91fc23088c0c464eb0c43dc9..046e529507ef77523664bed8cac39c81e46ec1db 100644
(file)
--- a/
src/arch/arm/isa/decoder.isa
+++ b/
src/arch/arm/isa/decoder.isa
@@
-113,8
+113,7
@@
format DataOp {
0x1: decode OPCODE {
0x9: BranchExchange::bx({{ }});
0xb: PredOp::clz({{
- unsigned lsb = findLsbSet(Rm);
- Rd = (lsb > 31) ? 32 : lsb;
+ Rd = ((Rm == 0) ? 32 : (31 - findMsbSet(Rm)));
}});
}
0x2: decode OPCODE {