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:
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user