qemu-e2k/target/xtensa
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
..
core-dc232b Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
core-dc233c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
core-fsf Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
core-dc232b.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
core-dc233c.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
core-fsf.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
cpu-qom.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
cpu.c qom: Introduce CPUClass.tcg_initialize 2017-10-24 22:00:13 +02:00
cpu.h xtensa: replace cpu_xtensa_init() with cpu_generic_init() 2017-09-01 11:54:24 -03:00
gdbstub.c target/xtensa: gdbstub: drop dead return statement 2017-07-11 11:18:37 +03:00
helper.c xtensa: replace cpu_xtensa_init() with cpu_generic_init() 2017-09-01 11:54:24 -03:00
helper.h target/xtensa updates: 2017-01-25 16:36:57 +00:00
import_core.sh target/xtensa: add two missing headers to core import script 2017-02-23 10:50:56 -08:00
Makefile.objs Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
monitor.c monitor: Fix crashes when using HMP commands without CPU 2017-02-21 18:29:01 +00:00
op_helper.c target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro 2017-09-26 09:11:22 +03:00
overlay_tool.h target/xtensa: sim: instantiate local memories 2017-02-23 10:30:41 -08:00
translate.c tcg: convert tb->cflags reads to tb_cflags(tb) 2017-10-24 13:53:41 -07:00
xtensa-semi.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00