xemu/target/mips
Emilio G. Cota c5a49c63fa 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.

Suggested-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2017-10-24 13:53:41 -07:00
..
cp0_timer.c mips: introduce internal.h and cleanup cpu.h 2017-09-21 13:24:34 +01:00
cpu-qom.h mips: MIPSCPU model subclasses 2017-09-21 13:25:30 +01:00
cpu.c qom: Introduce CPUClass.tcg_initialize 2017-10-24 22:00:13 +02:00
cpu.h mips: replace cpu_mips_init() with cpu_generic_init() 2017-09-21 13:25:37 +01:00
dsp_helper.c mips: Improve macro parenthesization 2017-09-21 13:25:41 +01:00
gdbstub.c mips: introduce internal.h and cleanup cpu.h 2017-09-21 13:24:34 +01:00
helper.c mips: introduce internal.h and cleanup cpu.h 2017-09-21 13:24:34 +01:00
helper.h target/mips: Add segmentation control registers 2017-07-20 22:42:26 +01:00
internal.h mips: MIPSCPU model subclasses 2017-09-21 13:25:30 +01:00
kvm_mips.h
kvm.c mips: introduce internal.h and cleanup cpu.h 2017-09-21 13:24:34 +01:00
lmi_helper.c
machine.c mips: introduce internal.h and cleanup cpu.h 2017-09-21 13:24:34 +01:00
Makefile.objs mips: move hw/mips/cputimer.c to target/mips/ 2017-09-21 13:24:34 +01:00
mips-defs.h linux-user: Tidy and enforce reserved_va initialization 2017-10-16 16:00:56 +03:00
mips-semi.c
msa_helper.c mips: introduce internal.h and cleanup cpu.h 2017-09-21 13:24:34 +01:00
op_helper.c mips: introduce internal.h and cleanup cpu.h 2017-09-21 13:24:34 +01:00
TODO
trace-events docs: fix broken paths to docs/devel/tracing.txt 2017-07-31 13:12:53 +03:00
translate_init.c mips: MIPSCPU model subclasses 2017-09-21 13:25:30 +01:00
translate.c tcg: convert tb->cflags reads to tb_cflags(tb) 2017-10-24 13:53:41 -07:00