diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-01-22 10:48:11 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-07 15:51:01 +0100 |
commit | 35020629914b4d3af6195d33e1a68e8b1c8c2fa3 (patch) | |
tree | 640af0a249d5bde7ef53731be6a0a33a9529be58 /rust/hw/char/pl011/src/lib.rs | |
parent | 059fad25fda352e3b8d79d0c7ad681d08516d8d5 (diff) | |
download | qemu-35020629914b4d3af6195d33e1a68e8b1c8c2fa3.zip qemu-35020629914b4d3af6195d33e1a68e8b1c8c2fa3.tar.gz qemu-35020629914b4d3af6195d33e1a68e8b1c8c2fa3.tar.bz2 |
tcg/optimize: optimize TSTNE using smask and zmask
Generalize the existing optimization of "TSTNE x,sign" and "TSTNE x,-1".
This can be useful for example in the i386 frontend, which will generate
tests of zero-extended registers against 0xffffffff.
Ironically, on x86 hosts this is a very slight pessimization in the very
case it's meant to optimize because
brcond_i64 cc_dst,$0xffffffff,tsteq,$L1
(test %ebx, %ebx) is 1 byte smaller than
brcond_i64 cc_dst,$0x0,eq,$L1
(test %rbx, %rbx). However, in general it is an improvement, especially
if it avoids placing a large immediate in the constant pool.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw/char/pl011/src/lib.rs')
0 files changed, 0 insertions, 0 deletions