qemu/include/exec
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
..
user linux-user: Use correct alignment for long long on i386 guests 2016-08-04 16:34:59 +03:00
address-spaces.h
cpu_ldst_template.h trace: switch to modular code generation for sub-directories 2017-01-31 17:11:18 +00:00
cpu_ldst_useronly_template.h trace: switch to modular code generation for sub-directories 2017-01-31 17:11:18 +00:00
cpu_ldst.h cpu_ldst.h: use correct guest address parameter 2016-11-22 23:26:51 +01:00
cpu-all.h accel/tcg: allow to invalidate a write TLB entry immediately 2017-10-20 13:32:10 +02:00
cpu-common.h cpu: Introduce a wrapper for tlb_flush() that can be used in common code 2017-07-04 14:30:03 +02:00
cpu-defs.h cputlb: bring back tlb_flush_count under !TLB_DEBUG 2017-10-10 07:37:10 -07:00
cputlb.h cputlb: bring back tlb_flush_count under !TLB_DEBUG 2017-10-10 07:37:10 -07:00
exec-all.h tcg: Include CF_COUNT_MASK in CF_HASH_MASK 2017-10-24 13:53:41 -07:00
gdbstub.h gdbstub: rename cpu_index -> cpu_gdb_index 2017-07-14 12:04:41 +02:00
gen-icount.h tcg: convert tb->cflags reads to tb_cflags(tb) 2017-10-24 13:53:41 -07:00
helper-gen.h tcg: Introduce tcgv_{i32,i64,ptr}_{arg,temp} 2017-10-24 21:47:46 +02:00
helper-head.h tcg: Remove GET_TCGV_* and MAKE_TCGV_* 2017-10-24 21:49:30 +02:00
helper-proto.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
helper-tcg.h tcg: Expand glue macros before stringifying helper names 2017-07-19 14:45:15 -07:00
hwaddr.h
ioport.h
log.h
memattrs.h memory.h: Move MemTxResult type to memattrs.h 2017-09-04 15:21:54 +01:00
memory-internal.h memory: Rework "info mtree" to print flat views and dispatch trees 2017-09-21 23:19:38 +02:00
memory.h memory: trace FlatView creation and destruction 2017-09-22 01:06:51 +02:00
poison.h include/exec/poison: Mark CONFIG_SOFTMMU as poisoned 2017-07-04 14:39:11 +02:00
ram_addr.h cpu_physical_memory_sync_dirty_bitmap: Fix alignment check 2017-08-01 17:27:33 +02:00
ramlist.h ramblock: add new hmp command "info ramblock" 2017-05-17 17:31:16 +01:00
semihost.h
softmmu-semi.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
target_page.h migration: Make savevm.c target independent 2017-05-18 19:21:00 +02:00
tb-context.h tcg: allocate TB structs before the corresponding translated code 2017-06-19 11:10:59 -07:00
tb-hash-xx.h tcg: define CF_PARALLEL and use it for TB hashing along with CF_COUNT_MASK 2017-10-24 13:53:41 -07:00
tb-hash.h tcg: define CF_PARALLEL and use it for TB hashing along with CF_COUNT_MASK 2017-10-24 13:53:41 -07:00
tb-lookup.h tcg: define CF_PARALLEL and use it for TB hashing along with CF_COUNT_MASK 2017-10-24 13:53:41 -07:00
translator.h tcg: Add generic translation framework 2017-09-06 08:06:47 -07:00