diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-07-27 00:52:59 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-07-27 00:52:59 -0700 |
commit | b560acfe17b5898d0c68715f9d1cb7e1dd1f006f (patch) | |
tree | 5d47a5528cdfa2a7118214d5fe8c977f3a1a4a33 /src/arch/arm/isa | |
parent | dc0df3f3966b3d4a5ff313007b44fb4b428a70d9 (diff) | |
download | gem5-b560acfe17b5898d0c68715f9d1cb7e1dd1f006f.tar.xz |
ARM: Fix the CLZ instruction.
Diffstat (limited to 'src/arch/arm/isa')
-rw-r--r-- | src/arch/arm/isa/decoder.isa | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/arch/arm/isa/decoder.isa b/src/arch/arm/isa/decoder.isa index f43395c19..046e52950 100644 --- 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 { |