unicorn/qemu
Emilio G. Cota 9aaad9ed27
target/arm: optimize indirect branches
Speed up indirect branches by jumping to the target if it is valid.

Softmmu measurements (see later commit for user-mode results):

Note: baseline (i.e. speedup == 1x) is QEMU v2.9.0.

- Impact on Boot time

| setup | ARM debian jessie boot+shutdown time | stddev |
|--------+--------------------------------------+--------|
| v2.9.0 | 8.84 | 0.07 |
| +cross | 8.85 | 0.03 |
| +jr | 8.83 | 0.06 |

- NBench, arm-softmmu (debian jessie guest). Host: Intel i7-4790K @ 4.00GHz

1.3x +-+-------------------------------------------------------------------------------------------------------------+-+
| |
| cross #### |
1.25x +cross+jr..........................................................#++#.........................................+-+
| #### # # |
| +++# # # # |
| +++ **** # # # |
1.2x +-+...................................####............*..*..#......#..#.........................................+-+
| **** # * * # # # #### |
| * * # * * # # # # # |
1.15x +-+................................*..*..#............*..*..#......#..#.....#..#................................+-+
| * * # * * # # # # # |
| * * # #### * * # # # # # |
| * * # # # * * # # # # # #### |
1.1x +-+................................*..*..#......#..#..*..*..#......#..#.....#..#.........................#..#...+-+
| * * # # # * * # # # # # # # |
| * * # # # * * # # # # # # # |
1.05x +-+..........................####..*..*..#......#..#..*..*..#......#..#.....#..#......+++............*****..#...+-+
| ***** # * * # # # * * # ***** # # # +++ | ****### * * # |
| *+++* # * * # # # * * # *+++* # **** # *****### * * # * * # |
| *****### +++#### * * # * * # ***** # * * # * * # * * # * | *++# * * # * * # |
1x +-++-+*+++*-+#++****++#++*+-+*++#+-*++*++#-+*+++*-+#++*++*++#++*+-+*++#+-*++*++#-+*+++*-+#++*++*++#++*+-+*++#+-++-+
| * * # * * # * * # * * # * * # * * # * * # * * # * * # * * # * * # |
| * * # * * # * * # * * # * * # * * # * * # * * # * * # * * # * * # |
0.95x +-+---*****###--****###--*****###--****###--*****###--****###--*****###--****###--*****###--****###--*****###---+-+
ASSIGNMENT BITFIELD FOURFP EMULATION HUFFMAN LU DECOMPOSITIONEURAL NNUMERIC SOSTRING SORT hmean
png: http://imgur.com/eOLmZNR

NB. 'cross' represents the previous commit.

Backports commit 8a6b28c7b5104263344508df0f4bce97f22cfcaf from qemu
2018-03-02 21:18:15 -05:00
..
crypto
default-configs
docs
fpu softfloat: Use correct type in float64_to_uint64_round_to_zero() 2018-03-02 10:44:10 -05:00
hw i386: Remove AMD feature flag aliases from Opteron models 2018-03-01 23:49:04 -05:00
include tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
qapi qapi: Fix object input visit beyond end of list 2018-03-02 12:22:50 -05:00
qobject util/cutils: Rename qemu_strtoll(), qemu_strtoull() 2018-03-02 08:39:45 -05:00
qom qapi: Drop unused non-strict qobject input visitor 2018-03-02 12:14:52 -05:00
scripts
target target/arm: optimize indirect branches 2018-03-02 21:18:15 -05:00
tcg tcg/i386: implement goto_ptr 2018-03-02 21:08:38 -05:00
util bitmap: add bitmap_copy_and_clear_atomic 2018-03-02 18:59:11 -05:00
aarch64.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
aarch64eb.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
accel.c
arm.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
armeb.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
atomic_template.h
CODING_STYLE
configure configure: remove Cygwin 2018-03-02 14:17:41 -05:00
COPYING
COPYING.LIB
cpu-exec-common.c
cpu-exec.c tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
cpus.c tcg: handle EXCP_ATOMIC exception for system emulation 2018-03-02 09:56:43 -05:00
cputlb.c cputlb: handle first atomic write to the page 2018-03-02 18:59:12 -05:00
exec.c memory: tune last param of iommu_ops.translate() 2018-03-02 18:59:12 -05:00
gen_all_header.sh
glib_compat.c qapi: Improve qobject input visitor error reporting 2018-03-02 12:05:53 -05:00
HACKING
header_gen.py tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
ioport.c
LICENSE
m68k.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
Makefile
Makefile.objs
Makefile.target Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
memory_ldst.inc.c
memory_mapping.c
memory.c memory: Introduce DEVICE_HOST_ENDIAN for ram device 2018-03-02 11:24:32 -05:00
mips64.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
mips64el.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
mips.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
mipsel.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
powerpc.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
qapi-schema.json
qemu-timer.c
rules.mak
softmmu_template.h
sparc64.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
sparc.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
tcg-runtime.c tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00
translate-all.c translate-all: exit cpu_restore_state early if translating 2018-03-02 12:46:16 -05:00
translate-all.h
translate-common.c
unicorn_common.h
VERSION
vl.c tcg: add options for enabling MTTCG 2018-03-02 09:25:01 -05:00
vl.h
x86_64.h tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr 2018-03-02 21:05:18 -05:00