[a64] Fix `BYTE_SWAP_V128`

This just reverses the bytes of 32-bit values, not reverse the whole vector.
This commit is contained in:
Wunkolo 2024-05-03 14:26:29 -07:00
parent 9960ef9deb
commit 39429aada7
1 changed files with 1 additions and 3 deletions

View File

@ -2626,9 +2626,7 @@ struct BYTE_SWAP_V128
: Sequence<BYTE_SWAP_V128, I<OPCODE_BYTE_SWAP, V128Op, V128Op>> {
static void Emit(A64Emitter& e, const EmitArgType& i) {
// Reverse upper and lower 64-bit halfs
e.REV64(i.dest.reg().B16(), i.src1.reg().B16());
// Reverse the 64-bit halfs themselves
e.EXT(i.dest.reg().B16(), i.dest.reg().B16(), i.dest.reg().B16(), 8);
e.REV32(i.dest.reg().B16(), i.src1.reg().B16());
}
};
EMITTER_OPCODE_TABLE(OPCODE_BYTE_SWAP, BYTE_SWAP_I16, BYTE_SWAP_I32,