unicorn/qemu/target/arm
Emilio G. Cota c384da2f47
tcg: convert tb->cflags reads to tb_cflags(tb)
Convert all existing readers of tb->cflags to tb_cflags, so that we
use atomic_read and therefore avoid undefined behaviour in C11.

Note that the remaining setters/getters of the field are protected
by tb_lock, and therefore do not need conversion.

Luckily all readers access the field via 'tb->cflags' (so no foo.cflags,
bar->cflags in the code base), which makes the conversion easily
scriptable:

FILES=$(git grep 'tb->cflags' target include/exec/gen-icount.h \
accel/tcg/translator.c | cut -f1 -d':' | sort | uniq)

perl -pi -e 's/([^.>])tb->cflags/$1tb_cflags(tb)/g' $FILES
perl -pi -e 's/([a-z->.]*)(->|\.)tb->cflags/tb_cflags($1$2tb)/g' $FILES

Then manually fixed the few errors that checkpatch reported.

Compile-tested for all targets.

Backports commit c5a49c63fa26e8825ad101dfe86339ae4c216539 from qemu
2018-03-13 14:57:51 -04:00
..
arm-powerctl.c ARM: Factor out ARM on/off PSCI control functions 2018-03-01 23:31:47 -05:00
arm-powerctl.h ARM: Factor out ARM on/off PSCI control functions 2018-03-01 23:31:47 -05:00
arm_ldst.h Fix Thumb-1 BE32 execution and disassembly. 2018-03-02 00:20:11 -05:00
cpu-qom.h target/arm: Add "-cpu max" support 2018-03-12 10:11:49 -04:00
cpu.c target/arm: Make 'any' CPU just an alias for 'max' 2018-03-12 10:11:49 -04:00
cpu.h target/arm/cpu and crypto_helper: Correct bad merge and adjust to qemu code style 2018-03-12 11:57:24 -04:00
cpu64.c target/arm: Make 'any' CPU just an alias for 'max' 2018-03-12 10:11:49 -04:00
crypto_helper.c target/arm/cpu and crypto_helper: Correct bad merge and adjust to qemu code style 2018-03-12 11:57:24 -04:00
helper-a64.c target/arm/helper64: Correct bad merge 2018-03-12 11:37:27 -04:00
helper-a64.h arm/translate-a64: add FP16 FSQRT to simd_two_reg_misc_fp16 2018-03-08 21:57:35 -05:00
helper.c target/arm/helper: Correct bad merge 2018-03-12 11:33:45 -04:00
helper.h target/arm: Decode aa64 armv8.3 fcmla 2018-03-09 01:05:02 -05:00
internals.h target/arm: Enforce access to ZCR_EL at translation 2018-03-08 09:17:33 -05:00
iwmmxt_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
kvm-consts.h arm: better stub version for MISMATCH_CHECK 2018-03-02 00:13:45 -05:00
Makefile.objs target/arm: Decode aa64 armv8.1 scalar three same extra 2018-03-09 00:02:23 -05:00
neon_helper.c target/*/cpu.h: remove softfloat.h 2018-03-08 09:58:47 -05:00
op_addsub.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
op_helper.c target/arm/op_helper: Correct bad merge 2018-03-12 11:42:43 -04:00
psci.c fix WFI/WFE length in syndrome register 2018-03-05 11:21:51 -05:00
translate-a64.c tcg: convert tb->cflags reads to tb_cflags(tb) 2018-03-13 14:57:51 -04:00
translate.c tcg: convert tb->cflags reads to tb_cflags(tb) 2018-03-13 14:57:51 -04:00
translate.h target/arm: Add SVE state to TB->FLAGS 2018-03-07 11:44:32 -05:00
unicorn.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
unicorn_aarch64.c unicorn/aarch64: Use qemu-provided helpers for accessing VFP/NEON/SIMD registers 2018-03-07 11:25:41 -05:00
unicorn_arm.c Use DEFINE_MACHINE() to register all machines 2018-03-11 15:12:46 -04:00
vec_helper.c translate/arm/vec_helper: Align to qemu formatting 2018-03-12 11:59:14 -04:00