qemu/target/arm
Alistair Francis 2f143d3ad1 target/arm: Fix vector operation segfault
Commit 89e68b575 "target/arm: Use vector operations for saturation"
causes this abort() when booting QEMU ARM with a Cortex-A15:

0  0x00007ffff4c2382f in raise () at /usr/lib/libc.so.6
1  0x00007ffff4c0e672 in abort () at /usr/lib/libc.so.6
2  0x00005555559c1839 in disas_neon_data_insn (insn=<optimized out>, s=<optimized out>) at ./target/arm/translate.c:6673
3  0x00005555559c1839 in disas_neon_data_insn (s=<optimized out>, insn=<optimized out>) at ./target/arm/translate.c:6386
4  0x00005555559cd8a4 in disas_arm_insn (insn=4081107068, s=0x7fffe59a9510) at ./target/arm/translate.c:9289
5  0x00005555559cd8a4 in arm_tr_translate_insn (dcbase=0x7fffe59a9510, cpu=<optimized out>) at ./target/arm/translate.c:13612
6  0x00005555558d1d39 in translator_loop (ops=0x5555561cc580 <arm_translator_ops>, db=0x7fffe59a9510, cpu=0x55555686a2f0, tb=<optimized out>, max_insns=<optimized out>) at ./accel/tcg/translator.c:96
7  0x00005555559d10d4 in gen_intermediate_code (cpu=cpu@entry=0x55555686a2f0, tb=tb@entry=0x7fffd7840080 <code_gen_buffer+126091347>, max_insns=max_insns@entry=512) at ./target/arm/translate.c:13901
8  0x00005555558d06b9 in tb_gen_code (cpu=cpu@entry=0x55555686a2f0, pc=3067096216, cs_base=0, flags=192, cflags=-16252928, cflags@entry=524288) at ./accel/tcg/translate-all.c:1736
9  0x00005555558ce467 in tb_find (cf_mask=524288, tb_exit=1, last_tb=0x7fffd783e640 <code_gen_buffer+126084627>, cpu=0x1) at ./accel/tcg/cpu-exec.c:407
10 0x00005555558ce467 in cpu_exec (cpu=cpu@entry=0x55555686a2f0) at ./accel/tcg/cpu-exec.c:728
11 0x000055555588b0cf in tcg_cpu_exec (cpu=0x55555686a2f0) at ./cpus.c:1431
12 0x000055555588d223 in qemu_tcg_cpu_thread_fn (arg=0x55555686a2f0) at ./cpus.c:1735
13 0x000055555588d223 in qemu_tcg_cpu_thread_fn (arg=arg@entry=0x55555686a2f0) at ./cpus.c:1709
14 0x0000555555d2629a in qemu_thread_start (args=<optimized out>) at ./util/qemu-thread-posix.c:502
15 0x00007ffff4db8a92 in start_thread () at /usr/lib/libpthread.

This patch ensures that we don't hit the abort() in the second switch
case in disas_neon_data_insn() as we will return from the first case.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: ad91b397f360b2fc7f4087e476f7df5b04d42ddb.1558021877.git.alistair.francis@wdc.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-05-23 14:47:43 +01:00
..
arch_dump.c
arm-powerctl.c target/arm/arm-powerctl: Add new arm_set_cpu_on_and_reset() 2019-02-28 11:03:04 +00:00
arm-powerctl.h target/arm/arm-powerctl: Add new arm_set_cpu_on_and_reset() 2019-02-28 11:03:04 +00:00
arm-semi.c qom/cpu: Simplify how CPUClass:cpu_dump_state() prints 2019-04-18 22:18:59 +02:00
arm_ldst.h
cpu-qom.h arm: replace instance_post_init() 2019-01-07 16:18:42 +04:00
cpu.c target/arm: Convert to CPUClass::tlb_fill 2019-05-10 11:12:50 -07:00
cpu.h target/arm: Implement ARMv8.5-RNG 2019-05-22 12:38:54 -04:00
cpu64.c target/arm: Implement ARMv8.5-RNG 2019-05-22 12:38:54 -04:00
crypto_helper.c
gdbstub.c
gdbstub64.c
helper-a64.c target/arm: Split helper_msr_i_pstate into 3 2019-03-05 15:55:08 +00:00
helper-a64.h target/arm: Split helper_msr_i_pstate into 3 2019-03-05 15:55:08 +00:00
helper-sve.h target/arm: Rewrite vector gather first-fault loads 2018-10-08 14:55:03 +01:00
helper.c target/arm: Implement ARMv8.5-RNG 2019-05-22 12:38:54 -04:00
helper.h target/arm: Use tcg_gen_abs_i64 and tcg_gen_gvec_abs 2019-05-13 22:52:08 +00:00
idau.h qom: make interface types abstract 2018-12-11 15:45:22 -02:00
internals.h target/arm: Convert to CPUClass::tlb_fill 2019-05-10 11:12:50 -07:00
iwmmxt_helper.c target/arm: Untabify iwmmxt_helper.c 2018-08-24 13:17:48 +01:00
kvm-consts.h
kvm-stub.c
kvm.c arm: Allow system registers for KVM guests to be changed by QEMU code 2019-05-07 12:55:02 +01:00
kvm32.c arm: Allow system registers for KVM guests to be changed by QEMU code 2019-05-07 12:55:02 +01:00
kvm64.c arm: Allow system registers for KVM guests to be changed by QEMU code 2019-05-07 12:55:02 +01:00
kvm_arm.h kvm: add kvm_arm_get_max_vm_ipa_size 2019-03-05 15:55:09 +00:00
machine.c arm: Allow system registers for KVM guests to be changed by QEMU code 2019-05-07 12:55:02 +01:00
Makefile.objs target/arm: Split out vfp_helper.c 2019-02-21 18:17:45 +00:00
monitor.c qapi: make query-gic-capabilities depend on TARGET_ARM 2019-02-18 14:44:05 +01:00
neon_helper.c target/arm: Use tcg_gen_abs_i64 and tcg_gen_gvec_abs 2019-05-13 22:52:08 +00:00
op_addsub.h
op_helper.c target/arm: Convert to CPUClass::tlb_fill 2019-05-10 11:12:50 -07:00
pauth_helper.c target/arm: Put all PAC keys into a structure 2019-05-22 12:38:54 -04:00
psci.c
sve.decode target/arm: SVE brk[ab] merging does not have s bit 2019-01-07 15:23:45 +00:00
sve_helper.c tcg: Use tlb_fill probe from tlb_vaddr_to_host 2019-05-10 11:12:50 -07:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
translate-a64.c target/arm: Simplify BFXIL expansion 2019-05-23 14:47:43 +01:00
translate-a64.h
translate-sve.c tcg: Specify optional vector requirements with a list 2019-05-13 14:44:03 -07:00
translate.c target/arm: Fix vector operation segfault 2019-05-23 14:47:43 +01:00
translate.h target/arm: Implement M-profile lazy FP state preservation 2019-04-29 17:36:02 +01:00
vec_helper.c target/arm: Add helpers for FMLAL 2019-02-28 11:03:05 +00:00
vfp_helper.c target/arm: Make sure M-profile FPSCR RES0 bits are not settable 2019-04-29 17:35:58 +01:00