target/arm: Promote consecutive memory ops for aa32

For a sequence of loads or stores from a single register,
little-endian operations can be promoted to an 8-byte op.
This can reduce the number of operations by a factor of 8.

Backports commit e23f12b3a252352b575908ca7b94587acd004641 from qemu
This commit is contained in:
Richard Henderson 2018-11-10 11:19:12 -05:00 committed by Lioncash
parent 1cab7a41ac
commit 37103f1bc4
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -5159,6 +5159,16 @@ static int disas_neon_ls_insn(DisasContext *s, uint32_t insn)
if (size == 3 && (interleave | spacing) != 1) {
return 1;
}
/* For our purposes, bytes are always little-endian. */
if (size == 0) {
endian = MO_LE;
}
/* Consecutive little-endian elements from a single register
* can be promoted to a larger little-endian operation.
*/
if (interleave == 1 && endian == MO_LE) {
size = 3;
}
tmp64 = tcg_temp_new_i64(tcg_ctx);
addr = tcg_temp_new_i32(tcg_ctx);
tmp2 = tcg_const_i32(tcg_ctx, 1 << size);