arm64: Support less-than-64-bit integers in Bitrev, Clz, Cls, and Popcnt instructions.

Includes a temporary bugfix for popcnt with 32-bit operand. The popcnt
issue was initially identified by Benjamin Bouvier <public@benj.me>, and
the root cause was debugged by Joey Gouly <joey.gouly@arm.com>. This
patch is simply a quick fix that zero-extends the operand to 64 bits;
Joey plans to contribute a more permanent fix shortly (tracked in
 #1537).
This commit is contained in:
Chris Fallin
2020-04-16 14:21:54 -07:00
parent 4c82da440a
commit 5e53482a13
3 changed files with 229 additions and 18 deletions

View File

@@ -221,7 +221,7 @@ impl From<(Opcode, Type)> for BitOp {
(Opcode::Clz, I64) => BitOp::Clz64,
(Opcode::Cls, I32) => BitOp::Cls32,
(Opcode::Cls, I64) => BitOp::Cls64,
_ => unreachable!("Called with non-bit op!"),
_ => unreachable!("Called with non-bit op!: {:?}", op_ty),
}
}
}