cranelift: Add support for bswap.i128 (#5186)

* fuzzgen: Request only one variable for bswap

This was included by accident. Bswap only has one input, instead of two.

* cranelift: Add `bswap.i128` support

Adds support only for x86, AArch64, S390X.

RISCV does not yet have bswap.
This commit is contained in:
Afonso Bordado
2022-11-03 18:03:37 +00:00
committed by GitHub
parent 22159848c5
commit 2c69b94744
5 changed files with 21 additions and 16 deletions

View File

@@ -672,12 +672,10 @@ const OPCODE_SIGNATURES: &'static [(
(Opcode::Bmask, &[I64], &[I128], insert_opcode),
(Opcode::Bmask, &[I128], &[I128], insert_opcode),
// Bswap
(Opcode::Bswap, &[I16, I16], &[I16], insert_opcode),
(Opcode::Bswap, &[I32, I32], &[I32], insert_opcode),
(Opcode::Bswap, &[I64, I64], &[I64], insert_opcode),
// I128 version not yet implemented.
#[cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))]
(Opcode::Bswap, &[I128, I128], &[I128], insert_opcode),
(Opcode::Bswap, &[I16], &[I16], insert_opcode),
(Opcode::Bswap, &[I32], &[I32], insert_opcode),
(Opcode::Bswap, &[I64], &[I64], insert_opcode),
(Opcode::Bswap, &[I128], &[I128], insert_opcode),
// Fadd
(Opcode::Fadd, &[F32, F32], &[F32], insert_opcode),
(Opcode::Fadd, &[F64, F64], &[F64], insert_opcode),